Re: [PATCH 1/1] staging: android: ashmem: Fix lockdep warning for write operation

2020-07-16 Thread Suren Baghdasaryan
On Wed, Jul 15, 2020 at 8:30 PM Eric Biggers wrote: > > On Wed, Jul 15, 2020 at 07:45:27PM -0700, Suren Baghdasaryan wrote: > > syzbot report [1] describes a deadlock when write operation against an > > ashmem fd executed at the time when ashmem is shrinking its cache results > > in the following

Re: [PATCH v2] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Tetsuo Handa
On 2020/07/17 1:29, Christian Brauner wrote: > Does this need a Cc: stable? Up to someone who applies this patch. I think this race is hard to hit. ___ devel mailing list de...@linuxdriverproject.org

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 01:48:20PM -0700, Dmitry Torokhov wrote: > On Thu, Jul 16, 2020 at 12:14 PM Kees Cook wrote: > > > > On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > > > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > > > Hi, > > > > > > > > This is the

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Dmitry Torokhov
On Thu, Jul 16, 2020 at 12:14 PM Kees Cook wrote: > > On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > > Hi, > > > > > > This is the infrastructure changes to prepare the tasklet API for > > > conversion to passing

Re: [PATCH 1/3] usb: gadget: udc: Avoid tasklet passing a global

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 09:28:23AM +0200, Greg Kroah-Hartman wrote: > On Wed, Jul 15, 2020 at 08:08:45PM -0700, Kees Cook wrote: > > There's no reason for the tasklet callback to set an argument since it > > always uses a global. Instead, use the global directly, in preparation > > for converting

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 10:15:38AM +0200, Sebastian Andrzej Siewior wrote: > On 2020-07-16 09:57:18 [+0200], Peter Zijlstra wrote: > > > > there appear to be hardly any users left.. Can't we stage an extinction > > event here instead? > > Most of the time the tasklet is scheduled from an

Re: [PATCH 3/3] tasklet: Introduce new initialization API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 04:37:04PM +0100, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote: > > +#define DECLARE_TASKLET(name, _callback) \ > > +struct tasklet_struct name = { \ > > + .count = ATOMIC_INIT(0),

Re: [PATCH 2/3] treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 12:29:14PM +0100, Matthew Wilcox wrote: > On Wed, Jul 15, 2020 at 08:08:46PM -0700, Kees Cook wrote: > > This converts all the existing DECLARE_TASKLET() (and ...DISABLED) > > macros with DECLARE_TASKLET_OLD() in preparation for refactoring the > > tasklet callback type.

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Kees Cook
On Thu, Jul 16, 2020 at 09:57:18AM +0200, Peter Zijlstra wrote: > On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > > Hi, > > > > This is the infrastructure changes to prepare the tasklet API for > > conversion to passing the tasklet struct as the callback argument instead > > of an

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

2020-07-16 Thread pr-tracker-bot
The pull request you sent on Thu, 16 Jul 2020 17:29:39 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > tags/staging-5.8-rc6 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6a058f0be518bbb10aadd3c5d18516f91b1a4a04 Thank you! --

Re: [PATCH v2] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Christian Brauner
On Thu, Jul 16, 2020 at 05:17:56PM +0200, Michal Hocko wrote: > On Fri 17-07-20 00:12:15, Tetsuo Handa wrote: > > syzbot is reporting that mmput() from shrinker function has a risk of > > deadlock [1], for delayed_uprobe_add() from update_ref_ctr() calls > > kzalloc(GFP_KERNEL) with

Good day

2020-07-16 Thread Tony Ray
Did you receive my message?Please let me know. Tony ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: rtl8192u: fix a dubious looking mask before a shift

2020-07-16 Thread Colin King
From: Colin Ian King Currently the masking of ret with 0xff and followed by a right shift of 8 bits always leaves a zero result. It appears the mask of 0xff is incorrect and should be 0xff00, but I don't have the hardware to test this. Fix this to mask the upper 8 bits before shifting. [ Not

Re: [PATCH 3/3] tasklet: Introduce new initialization API

2020-07-16 Thread Matthew Wilcox
On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote: > +#define DECLARE_TASKLET(name, _callback) \ > +struct tasklet_struct name = { \ > + .count = ATOMIC_INIT(0),\ > + .callback = _callback, \

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

2020-07-16 Thread Greg KH
The following changes since commit 9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68: Linux 5.8-rc3 (2020-06-28 15:00:24 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git tags/staging-5.8-rc6 for you to fetch changes up to

[PATCH v4] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from void [noderef] __user * to unsigned int __force * and a reverse cast in argument from unsigned int * to unsigned int __user * . v1 -> v2: - Add a reverse cast in argument v2 -> v3: - Change commit description as suggested by Ian Abott v3

[PATCH] staging: rtl8712: handle firmware load failure

2020-07-16 Thread Rustam Kovhaev
when firmware fails to load we should not call unregister_netdev() this patch fixes a race condition between rtl871x_load_fw_cb() and r871xu_dev_remove() and fixes the bug reported by syzbot Reported-by: syzbot+80899a8a8efe8968c...@syzkaller.appspotmail.com Link:

Re: [PATCH v2] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Michal Hocko
On Fri 17-07-20 00:12:15, Tetsuo Handa wrote: > syzbot is reporting that mmput() from shrinker function has a risk of > deadlock [1], for delayed_uprobe_add() from update_ref_ctr() calls > kzalloc(GFP_KERNEL) with delayed_uprobe_lock held, and > uprobe_clear_state() from __mmput() also holds

[PATCH v2] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Tetsuo Handa
syzbot is reporting that mmput() from shrinker function has a risk of deadlock [1], for delayed_uprobe_add() from update_ref_ctr() calls kzalloc(GFP_KERNEL) with delayed_uprobe_lock held, and uprobe_clear_state() from __mmput() also holds delayed_uprobe_lock. Commit a1b2289cef92ef0e ("android:

[PATCH] media: atomisp: fix mask and shift operation on ISPSSPM0

2020-07-16 Thread Colin King
From: Colin Ian King Currently the check on bits 25:24 on ISPSSPM0 is always 0 because the mask and shift operations are incorrect. Fix this by shifting by MRFLD_ISPSSPM0_ISPSSS_OFFSET (24 bits right) and then masking with RFLD_ISPSSPM0_ISPSSC_MASK (0x03) to get the appropriate 2 bits to check.

Re: [PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread Greg Kroah-Hartman
On Thu, Jul 16, 2020 at 10:28:06AM -0400, B K Karthik wrote: > On Thu, Jul 16, 2020 at 10:25 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jul 16, 2020 at 10:17:47AM -0400, B K Karthik wrote: > > > fixed sparse warnings by adding a cast in assignment from > > > void [noderef] __user * to

Re: [PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
On Thu, Jul 16, 2020 at 10:25 AM Greg Kroah-Hartman wrote: > > On Thu, Jul 16, 2020 at 10:17:47AM -0400, B K Karthik wrote: > > fixed sparse warnings by adding a cast in assignment from > > void [noderef] __user * to unsigned int __force * > > and a reverse cast in argument from > > unsigned int

Re: [PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread Greg Kroah-Hartman
On Thu, Jul 16, 2020 at 10:17:47AM -0400, B K Karthik wrote: > fixed sparse warnings by adding a cast in assignment from > void [noderef] __user * to unsigned int __force * > and a reverse cast in argument from > unsigned int * to unsigned int __user * . > > Signed-off-by: B K Karthik > --- >

[PATCH v3] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread B K Karthik
fixed sparse warnings by adding a cast in assignment from void [noderef] __user * to unsigned int __force * and a reverse cast in argument from unsigned int * to unsigned int __user * . Signed-off-by: B K Karthik --- drivers/staging/comedi/comedi_fops.c | 4 ++-- 1 file changed, 2

Re: [PATCH] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Michal Hocko
On Thu 16-07-20 22:41:14, Tetsuo Handa wrote: > On 2020/07/16 17:35, Michal Hocko wrote: [...] > > But in order for this to happen the shrinker would have to do the last > > put on the mm. But mm cannot go away from under uprobe_mmap so those two > > paths cannot race with each other. > > and mm1

Re: [PATCH] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Tetsuo Handa
On 2020/07/16 17:35, Michal Hocko wrote: > On Thu 16-07-20 08:36:52, Tetsuo Handa wrote: >> syzbot is reporting that mmput() from shrinker function has a risk of >> deadlock [1]. Don't start synchronous teardown of mm when called from >> shrinker function. > > Please add the actual lock

Re: [PATCH 2/3] treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

2020-07-16 Thread Matthew Wilcox
On Wed, Jul 15, 2020 at 08:08:46PM -0700, Kees Cook wrote: > This converts all the existing DECLARE_TASKLET() (and ...DISABLED) > macros with DECLARE_TASKLET_OLD() in preparation for refactoring the > tasklet callback type. All existing DECLARE_TASKLET() users had a "0" > data argument, it has

Re: [PATCH v2] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread Ian Abbott
On 15/07/2020 12:48, B K Karthik wrote: fixed sparse warnings by adding a cast in assignment from void [noderef] __user * to unsigned int __force * and a reverse cast in argument from void [noderef] __user * to unsigned int __user * . Minor quibble: the reverse cast is actually from unsigned

[PATCH] staging: qlge/qlge_main.c: Replace depracated MSI API.

2020-07-16 Thread Suraj Upadhyay
Replace the depracated MSI API pci_enable_msi() with pci_alloc_irq_vectors(). Signed-off-by: Suraj Upadhyay --- drivers/staging/qlge/qlge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c index

Re: [PATCH] binder: Don't use mmput() from shrinker function.

2020-07-16 Thread Michal Hocko
On Thu 16-07-20 08:36:52, Tetsuo Handa wrote: > syzbot is reporting that mmput() from shrinker function has a risk of > deadlock [1]. Don't start synchronous teardown of mm when called from > shrinker function. Please add the actual lock dependency to the changelog. Anyway is this deadlock real?

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Sebastian Andrzej Siewior
On 2020-07-16 09:57:18 [+0200], Peter Zijlstra wrote: > > there appear to be hardly any users left.. Can't we stage an extinction > event here instead? Most of the time the tasklet is scheduled from an interrupt handler. So we could get rid of these tasklets by using threaded IRQs. Sebastian

Re: [PATCH 0/3] Modernize tasklet callback API

2020-07-16 Thread Peter Zijlstra
On Wed, Jul 15, 2020 at 08:08:44PM -0700, Kees Cook wrote: > Hi, > > This is the infrastructure changes to prepare the tasklet API for > conversion to passing the tasklet struct as the callback argument instead > of an arbitrary unsigned long. The first patch details why this is useful > (it's

[staging:staging-testing] BUILD SUCCESS 419317021ccc8957d9cf11bf2500c2cff37ca6c7

2020-07-16 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing branch HEAD: 419317021ccc8957d9cf11bf2500c2cff37ca6c7 staging: rtl8188eu: core: fix coding style issues elapsed time: 796m configs tested: 111 configs skipped: 6 The following configs have been

Re: [PATCH 2/3] treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()

2020-07-16 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 08:08:46PM -0700, Kees Cook wrote: > This converts all the existing DECLARE_TASKLET() (and ...DISABLED) > macros with DECLARE_TASKLET_OLD() in preparation for refactoring the > tasklet callback type. All existing DECLARE_TASKLET() users had a "0" > data argument, it has

Re: [PATCH 3/3] tasklet: Introduce new initialization API

2020-07-16 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 08:08:47PM -0700, Kees Cook wrote: > From: Romain Perier > > Nowadays, modern kernel subsystems that use callbacks pass the data > structure associated with a given callback as argument to the callback. > The tasklet subsystem remains one which passes an arbitrary

Re: [PATCH 1/3] usb: gadget: udc: Avoid tasklet passing a global

2020-07-16 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 08:08:45PM -0700, Kees Cook wrote: > There's no reason for the tasklet callback to set an argument since it > always uses a global. Instead, use the global directly, in preparation > for converting the tasklet subsystem to modern callback conventions. > > Signed-off-by:

Re: [PATCH] staging: rtl8712: Fixes coding style in several headers

2020-07-16 Thread Greg Kroah-Hartman
On Thu, Jul 16, 2020 at 02:41:12PM +0800, Qiu Wenbo wrote: > This patch fixes warnings in several headers found by the checkpatch.pl tool. What warnings specifically? Please only fix one type of warning per patch. > > Signed-off-by: Qiu Wenbo > --- > drivers/staging/rtl8712/rtl871x_event.h

[PATCH] staging: rtl8712: Fixes coding style in several headers

2020-07-16 Thread Qiu Wenbo
This patch fixes warnings in several headers found by the checkpatch.pl tool. Signed-off-by: Qiu Wenbo --- drivers/staging/rtl8712/rtl871x_event.h | 15 ++- drivers/staging/rtl8712/rtl871x_io.h | 3 ++- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 15 ++-