Re: [PATCH] staging: kpc2000: Fix: fix platform_no_drv_owner.cocci warnings

2019-06-21 Thread Greg Kroah-Hartman
On Sat, Jun 22, 2019 at 03:04:08AM +0800, kbuild test robot wrote: > From: kbuild test robot > > drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:200:3-8: No need to set > .owner here. The core will do it. > > Remove .owner field if calls are used which set it automatically > > Generated by:

[PATCH v3 2/2][v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
This patch is the extension of following upstream commit to fix the race condition between get_task_mm() and core dumping for IB->mlx4 and IB->mlx5 drivers: commit 04f5866e41fb ("coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping")' Thanks to Jason for pointing

[PATCH v3 0/2] [v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping [PATCH v3 1/2]: Backporting of commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. [PATCH v3 2/2]: Extension of commit 04f5866e41fb to fix the race condition between get_task_mm() and core dumping for

[PATCH v3 1/2] [v4.9.y] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-21 Thread Ajay Kaher
From: Andrea Arcangeli commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization

RE: [PATCH v2] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Michael Kelley
From: Dexuan Cui Sent: Friday, June 21, 2019 4:45 PM > > The commit 05f151a73ec2 itself is correct, but it exposes this > use-after-free bug, which is caught by some memory debug options. > > Add a Fixes tag to indicate the dependency. > > Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in

[PATCH v2] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Dexuan Cui
The commit 05f151a73ec2 itself is correct, but it exposes this use-after-free bug, which is caught by some memory debug options. Add a Fixes tag to indicate the dependency. Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in hv_eject_device_work()") Signed-off-by: Dexuan Cui Cc:

RE: [PATCH] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Dexuan Cui
> From: Michael Kelley > > @@ -1880,6 +1880,7 @@ static void hv_pci_devices_present(struct > hv_pcibus_device > > *hbus, > > static void hv_eject_device_work(struct work_struct *work) > > { > > struct pci_eject_response *ejct_pkt; > > + struct hv_pcibus_device *hbus; > > struct

RE: [PATCH] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Michael Kelley
From: Dexuan Cui Sent: Friday, June 21, 2019 12:02 PM > > The commit 05f151a73ec2 itself is correct, but it exposes this > use-after-free bug, which is caught by some memory debug options. > > Add the Fixes tag to indicate the dependency. > > Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in

[PATCH] staging: kpc2000: Fix: fix platform_no_drv_owner.cocci warnings

2019-06-21 Thread kbuild test robot
From: kbuild test robot drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c:200:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: abddd78ef465 ("staging:

[PATCH] PCI: hv: Fix a use-after-free bug in hv_eject_device_work()

2019-06-21 Thread Dexuan Cui
The commit 05f151a73ec2 itself is correct, but it exposes this use-after-free bug, which is caught by some memory debug options. Add the Fixes tag to indicate the dependency. Fixes: 05f151a73ec2 ("PCI: hv: Fix a memory leak in hv_eject_device_work()") Signed-off-by: Dexuan Cui Cc:

[PATCH] binder: fix memory leak in error path

2019-06-21 Thread Todd Kjos
syzkallar found a 32-byte memory leak in a rarely executed error case. The transaction complete work item was not freed if put_user() failed when writing the BR_TRANSACTION_COMPLETE to the user command buffer. Fixed by freeing it before put_user() is called. Reported-by:

Re: memory leak in binder_transaction

2019-06-21 Thread Todd Kjos
On Thu, Jun 13, 2019 at 2:56 PM syzbot wrote: > > Hello, > > syzbot found the following crash on: > > HEAD commit:d1fdb6d8 Linux 5.2-rc4 > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=15e5ce1ea0 > kernel config:

Re: [GIT PULL] Staging/IIO driver fixes for 5.2-rc6

2019-06-21 Thread pr-tracker-bot
The pull request you sent on Fri, 21 Jun 2019 10:11:02 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > tags/staging-5.2-rc6 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/db54615e21419c3cb4d699a0b0aa16cc44d0e9da Thank you! --

[PATCH] staging: most: Fix error path of audio_init

2019-06-21 Thread YueHaibing
If most_register_configfs_subsys fails, call most_deregister_component to clean up. Fixes: 919c03ae11b9 ("staging: most: enable configfs support") Signed-off-by: YueHaibing --- drivers/staging/most/sound/sound.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-21 Thread Sergio Paracuellos
Hi Greg, On Fri, Jun 21, 2019 at 2:35 PM Greg Ungerer wrote: > > Hi Sergio, > > On 21/6/19 4:15 pm, Sergio Paracuellos wrote: > > This patch series properly handle minor issues in this driver. These are: > > * Disable pcie port clock on pci dirver instead of doing it in the phy > >driver.

Re: [PATCH 4/4] rts5208: Fix usleep range is preferred over udelay

2019-06-21 Thread Lukas Schneider
Am 21.06.2019 um 13:04 schrieb Pavel Machek: On Wed 2019-06-19 17:46:48, Lukas Schneider wrote: This patch fixes the issue reported by checkpatch: CHECK: usleep_range is preferred over udelay; see Doucmentation/timers/timers-howto.txt It's save to sleep here instead of using busy waiting,

Re: [PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-21 Thread Greg Ungerer
Hi Sergio, On 21/6/19 4:15 pm, Sergio Paracuellos wrote: This patch series properly handle minor issues in this driver. These are: * Disable pcie port clock on pci dirver instead of doing it in the phy driver. The pci driver is the correct place to do this. * Add a missing call to phy_exit

Re: [PATCH 4/4] rts5208: Fix usleep range is preferred over udelay

2019-06-21 Thread Pavel Machek
On Wed 2019-06-19 17:46:48, Lukas Schneider wrote: > This patch fixes the issue reported by checkpatch: > > CHECK: usleep_range is preferred over udelay; > see Doucmentation/timers/timers-howto.txt > > It's save to sleep here instead of using busy waiting, > because we are not in an atomic

Re: [PATCH v2 5/8] staging: erofs: introduce generic decompression backend

2019-06-21 Thread Gao Xiang
Hi Chao, On 2019/6/21 17:46, Chao Yu wrote: > On 2019/6/21 0:07, Gao Xiang wrote: >> This patch adds a new generic decompression framework >> in order to replace the old LZ4-specific decompression code. >> >> Even though LZ4 is still the only supported algorithm, yet >> it is more cleaner and

Re: [PATCH v2 7/8] staging: erofs: switch to new decompression backend

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > This patch integrates new decompression framework to > erofs decompression path, and remove the old > decompression implementation as well. > > On kirin980 platform, sequential read is slightly > improved to 778MiB/s after the new decompression > backend is

Re: [PATCH v2 8/8] staging: erofs: integrate decompression inplace

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > Decompressor needs to know whether it's a partial > or full decompression since only full decompression > can be decompressed in-place. > > On kirin980 platform, sequential read is finally > increased to 812MiB/s after decompression inplace > is enabled. > >

Re: [PATCH v2 6/8] staging: erofs: introduce LZ4 decompression inplace

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > compressed data will be usually loaded into last pages of > the extent (the last page for 4k) for in-place decompression > (more specifically, in-place IO), as ilustration below, > > start of compressed logical extent >|

Re: [PATCH v2 5/8] staging: erofs: introduce generic decompression backend

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > This patch adds a new generic decompression framework > in order to replace the old LZ4-specific decompression code. > > Even though LZ4 is still the only supported algorithm, yet > it is more cleaner and easy to integrate new algorithm than > the old almost

Re: [PATCH v2 3/8] staging: erofs: move per-CPU buffers implementation to utils.c

2019-06-21 Thread Gao Xiang
Hi Chao, On 2019/6/21 15:57, Chao Yu wrote: > On 2019/6/21 0:07, Gao Xiang wrote: >> +static inline void *erofs_get_pcpubuf(unsigned int pagenr) >> +{ >> +return ERR_PTR(-ENOTSUPP); >> +} > > [snip] > >> +percpu_data = erofs_get_pcpubuf(0); > > If erofs_get_pcpubuf may return error

[GIT PULL] Staging/IIO driver fixes for 5.2-rc6

2019-06-21 Thread Greg KH
The following changes since commit f2c7c76c5d0a443053e94adb9f0918fa2fb85c3a: Linux 5.2-rc3 (2019-06-02 13:55:33 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git tags/staging-5.2-rc6 for you to fetch changes up to

Re: [PATCH v2 2/8] staging: erofs: add compacted compression indexes support

2019-06-21 Thread Gao Xiang
On 2019/6/21 15:53, Chao Yu wrote: > On 2019/6/21 0:07, Gao Xiang wrote: >> This patch aims at compacted compression indexes: >> 1) cleanup z_erofs_map_blocks_iter and move into zmap.c; >> 2) add compacted 4/2B decoding support. >> >> On kirin980 platform, sequential read is increased about

Re: [PATCH v2 1/8] staging: erofs: add compacted ondisk compression indexes

2019-06-21 Thread Gao Xiang
Hi Chao, On 2019/6/21 15:46, Chao Yu wrote: > On 2019/6/21 0:07, Gao Xiang wrote: >> This patch introduces new compacted compression indexes. >> >> In contract to legacy compression indexes that >>each 4k logical cluster has an 8-byte index, >> compacted ondisk compression indexes will have

Re: [PATCH v2 4/8] staging: erofs: move stagingpage operations to compress.h

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > stagingpages are behaved as bounce pages for temporary use. > Move to compress.h since the upcoming decompressor will > allocate stagingpages as well. > > Signed-off-by: Gao Xiang Reviewed-by: Chao Yu Thanks,

Re: [PATCH v2 3/8] staging: erofs: move per-CPU buffers implementation to utils.c

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > +static inline void *erofs_get_pcpubuf(unsigned int pagenr) > +{ > + return ERR_PTR(-ENOTSUPP); > +} [snip] > + percpu_data = erofs_get_pcpubuf(0); If erofs_get_pcpubuf may return error once EROFS_PCPUBUF_NR_PAGES equals to zero, we'd better to

Re: [PATCH v2 2/8] staging: erofs: add compacted compression indexes support

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > This patch aims at compacted compression indexes: > 1) cleanup z_erofs_map_blocks_iter and move into zmap.c; > 2) add compacted 4/2B decoding support. > > On kirin980 platform, sequential read is increased about > 6% (725MiB/s -> 770MiB/s) on enwik9 dataset

Re: [PATCH v2 1/8] staging: erofs: add compacted ondisk compression indexes

2019-06-21 Thread Chao Yu
On 2019/6/21 0:07, Gao Xiang wrote: > This patch introduces new compacted compression indexes. > > In contract to legacy compression indexes that >each 4k logical cluster has an 8-byte index, > compacted ondisk compression indexes will have >amortized 2 bytes for each 4k logical cluster

[PATCH v2] staging: ks7010: Fix build error

2019-06-21 Thread YueHaibing
when CRYPTO is m and KS7010 is y, building fails: drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13': ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to `crypto_shash_setkey' ks_hostif.c:(.text+0x5e0):

Re: [PATCH] staging: ks7010: Fix build error

2019-06-21 Thread Greg KH
On Fri, Jun 21, 2019 at 11:42:21AM +0800, YueHaibing wrote: > when CRYPTO is m and KS7010 is y, building fails: > > drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13': > ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash' > ks_hostif.c:(.text+0x580):

[PATCH 1/1] staging: media: fix style problem

2019-06-21 Thread Aliasgar Surti
From: Aliasgar Surti checkpatch reported "WARNING: line over 80 characters". This patch fixes the warning for file soc_camera/soc_ov5642.c Signed-off-by: Aliasgar Surti --- drivers/staging/media/soc_camera/soc_ov5642.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 3/4] staging: mt7621-pci-phy: remove disable clock from the phy exit function

2019-06-21 Thread Sergio Paracuellos
The clock which has been used here is not about the phy but the pcie port. It has been properly handled into host pcie driver code. Hence, remove it from here which is the correct thing to do. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 8 1

[PATCH 4/4] staging: mt7621-pci: use 'module_init' instead of 'arch_initcall'

2019-06-21 Thread Sergio Paracuellos
This driver has dependencies on mt7621-gpio and mt7621-pci-phy which are init in later stages. Hence, when this driver is probed it is always returning 'EPROBE_DEFER' and being initialized afterwards. Use function 'module_init' to just initialize later. Signed-off-by: Sergio Paracuellos ---

[PATCH 2/4] staging: mt7621-pci: add phy exit call if phy_power_on call fails

2019-06-21 Thread Sergio Paracuellos
Add missing call to 'phy_exit' function if the phy_power_on call fails. With this call added the error path is properly handled. Fixes: 07420a02b003 ("staging: mt7621-pci: use gpio perst instead of builtin behaviour") Signed-off-by: Sergio Paracuellos ---

[PATCH 1/4] staging: mt7621-pci: disable pcie port clock if there is no pcie link

2019-06-21 Thread Sergio Paracuellos
When there is no pcie link detected we have to properly disable the port pcie clock. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH 0/4] staging: mt7621-pci: Handle minor issues

2019-06-21 Thread Sergio Paracuellos
This patch series properly handle minor issues in this driver. These are: * Disable pcie port clock on pci dirver instead of doing it in the phy driver. The pci driver is the correct place to do this. * Add a missing call to phy_exit function to properly handle the function

[PATCH 07/10] staging: rtl8712: Remove function r8712_setfwdig_cmd()

2019-06-21 Thread Nishka Dasgupta
Remove unused function r8712_setfwdig_cmd(). Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 20 drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 21 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c

[PATCH 08/10] staging: rtl8712: Remove function r8712_setfwra_cmd()

2019-06-21 Thread Nishka Dasgupta
Remove unused function r8712_setfwra_cmd. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 20 drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 21 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c

[PATCH 06/10] staging: rtl8712: Remove function r8712_setbasicrate_cmd

2019-06-21 Thread Nishka Dasgupta
Remove unused function r8712_setbasicrate_cmd. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 21 - drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 22 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c

[PATCH 10/10] staging: rtl8712: Replace function r8712_init_cmd_priv()

2019-06-21 Thread Nishka Dasgupta
Remove function r8712_init_cmd_priv as all it does is call _init_cmd_priv. Rename _init_cmd_priv to r8712_init_cmd_priv to maintain compatibility with call sites. Change type of new r8712_init_cmd_priv from static to non-static as original r8712_init_cmd_priv was non-static. Change return type of

[PATCH 04/10] staging: rtl8712: r8712_wdg_timeout_handler: Remove function

2019-06-21 Thread Nishka Dasgupta
Remove function _r8712_wdg_timeout_handler as all it does is call r8712_wdg_wk_cmd. Modify call site of _r8712_wdg_timeout_handler to call r8712_wdg_wk_cmd instead. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/mlme_linux.c | 2 +- drivers/staging/rtl8712/rtl871x_mlme.c | 5 -

[PATCH 03/10] staging: rtl8712: r8712_wdg_wk_cmd(): Change return type

2019-06-21 Thread Nishka Dasgupta
Change return type of function r8712_wdg_wk_cmd from u8 to void as its return value is never stored, checked or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++ drivers/staging/rtl8712/rtl871x_cmd.h |

[PATCH 01/10] staging: rtl8712: r8712_addbareq_cmd(): Change return type

2019-06-21 Thread Nishka Dasgupta
Change return type of the function r8712_addbareq_cmd from u8 to void as its return value is not stored, checked or otherwise used. Also modify its return statements accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++

[PATCH 09/10] staging: rtl8712: Remove function r8712_setrfintfs_cmd()

2019-06-21 Thread Nishka Dasgupta
Remove unused function r8712_setrfintfs_cmd. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 21 - drivers/staging/rtl8712/rtl871x_cmd.h | 1 - 2 files changed, 22 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c

[PATCH 02/10] staging: rtl8712: r8712_disconnectCtrlEx_cmd(): Change return type

2019-06-21 Thread Nishka Dasgupta
Change return type of function r8712_disconnectCtrlEx_cmd from u8 to void as its return value is never stored, checked or otherwise used. Modify its return statements accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++

[PATCH 05/10] staging: rtl8712: r8712_enqueue_cmd_ex(): Change return type

2019-06-21 Thread Nishka Dasgupta
Change return type of function r8712_enqueue_cmd_ex from u8 to void as its return value is never stored, checked or otherwise used. Modify return statements accordingly. Signed-off-by: Nishka Dasgupta --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +++ drivers/staging/rtl8712/rtl871x_cmd.h |