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

2020-07-15 Thread Eric Biggers
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 lock sequence: > > Possible unsafe locking scenario: > >

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

2020-07-15 Thread Kees Cook
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 unsigned long to the callback function. This has several problems: - This

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

2020-07-15 Thread Kees Cook
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: Kees Cook --- drivers/usb/gadget/udc/snps_udc_core.c | 6 ++ 1

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

2020-07-15 Thread Kees Cook
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 been removed here as well. Signed-off-by: Kees Cook ---

[PATCH 0/3] Modernize tasklet callback API

2020-07-15 Thread Kees Cook
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 the same rationale as the timer_struct changes from a bit ago: less abuse

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

2020-07-15 Thread Tetsuo Handa
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. [1] https://syzkaller.appspot.com/bug?id=bc9e7303f537c41b2b0cc2dfcea3fc42964c2d45 Reported-by: syzbot Reported-by: syzbot

Re: [PATCH] Staging: speakup: Replace HTTP links with HTTPS ones

2020-07-15 Thread Samuel Thibault
Alexander A. Klimov, le lun. 13 juil. 2020 11:13:05 +0200, a ecrit: > Rationale: > Reduces attack surface on kernel devs opening the links for MITM > as HTTPS traffic is much harder to manipulate. > > Deterministic algorithm: > For each file: > If not .svg: > For each line: > If

[PATCH v8 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

2020-07-15 Thread Jim Quinlan
The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no region bounds checking.

[PATCH v8 00/12] PCI: brcmstb: enable PCIe for STB chips

2020-07-15 Thread Jim Quinlan
Patchset Summary: Enhance a PCIe host controller driver. Because of its unusual design we are foced to change dev->dma_pfn_offset into a more general role allowing multiple offsets. See the 'v1' notes below for more info. v8: Commit: "device core: Introduce DMA range map, supplanting

[PATCH] staging: rtl*/security: Use static const in array declarations

2020-07-15 Thread Joe Perches
Use static const in declarations where appropriate. Signed-off-by: Joe Perches --- drivers/staging/rtl8188eu/core/rtw_security.c | 4 ++-- drivers/staging/rtl8712/rtl871x_security.c| 2 +- drivers/staging/rtl8723bs/core/rtw_security.c | 6 +++--- 3 files changed, 6 insertions(+), 6

[PATCH v2] staging: rtl8188eu: add blank line after declarations

2020-07-15 Thread Rahul Gottipati
Added a blank line after declarations in drivers/staging/rtl8188eu/core/rtw_security.c to fix a checkpatch.pl warning Signed-off-by: Rahul Gottipati --- drivers/staging/rtl8188eu/core/rtw_security.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v3] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Arpitha Raghunandan
Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' in a string in rtw_ioctl_set.c Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- Changes v2->v3: - Added information about what changed from previous versions Changes v1->v2: - Added full name in From and

Re: [PATCH v2] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Greg KH
On Wed, Jul 15, 2020 at 07:57:10PM +0530, Arpitha Raghunandan wrote: > Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' > in a string in rtw_ioctl_set.c > > Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> > --- > drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 10

RE: [PATCH 0/6] staging: dpaa2-ethsw: cleanup of link state and MAC addresses

2020-07-15 Thread Ioana Ciornei
> Subject: Re: [PATCH 0/6] staging: dpaa2-ethsw: cleanup of link state and MAC > addresses > > On Tue, Jul 14, 2020 at 04:34:25PM +0300, Ioana Ciornei wrote: > > This patch set is cleaning up the link state handling of the switch > > ports in patches 1-4. The last two patches are setting up the

[PATCH v2] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Arpitha Raghunandan
Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' in a string in rtw_ioctl_set.c Signed-off-by: Arpitha Raghunandan <98.a...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 0/6] staging: dpaa2-ethsw: cleanup of link state and MAC addresses

2020-07-15 Thread Greg KH
On Tue, Jul 14, 2020 at 04:34:25PM +0300, Ioana Ciornei wrote: > This patch set is cleaning up the link state handling of the switch > ports in patches 1-4. The last two patches are setting up the MAC > addresses of the switch ports automatically so that the user is not > forced to manually add

Re: [PATCH] staging: rtl8188eu: core: fix coding style issues

2020-07-15 Thread Greg KH
On Wed, Jul 15, 2020 at 02:55:59AM +0530, Arpitha wrote: > Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' > in a string in rtw_ioctl_set.c > > Signed-off-by: Arpitha <98.a...@gmail.com> We need a "full" name for kernel patches, what you use to sign documents. Same for

Re: [PATCH] media: cedrus: Propagate OUTPUT resolution to CAPTURE

2020-07-15 Thread Paul Kocialkowski
Hi, On Wed 15 Jul 20, 08:57, Ezequiel Garcia wrote: > It seems this one felt thru the cracks. Sorry for the delay. > > On Thu, 2020-05-14 at 11:39 -0400, Nicolas Dufresne wrote: > > As per spec, the CAPTURE resolution should be automatically set based on > > the OTUPUT resolution. This patch

[PATCH v3] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhixu Zhao
A coding alignment issue is found by checkpatch.pl. Fix it by using a temporary for gasket_dev->bar_data[bar_num]. Signed-off-by: Zhixu Zhao --- Changes in v2: - gasket_dev->bar_data[bar_num] was used everywhere. Now replace it with a `struct gasket_bar_data *data`, making the code more

Re: [PATCH] media: cedrus: Propagate OUTPUT resolution to CAPTURE

2020-07-15 Thread Ezequiel Garcia
It seems this one felt thru the cracks. Sorry for the delay. On Thu, 2020-05-14 at 11:39 -0400, Nicolas Dufresne wrote: > As per spec, the CAPTURE resolution should be automatically set based on > the OTUPUT resolution. This patch properly propagate width/height to the > capture when the OUTPUT

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

2020-07-15 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 void [noderef] __user * to unsigned int __user * . Signed-off-by: B K Karthik --- drivers/staging/comedi/comedi_fops.c | 4 ++-- 1 file changed, 2

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 7:19 AM Ian Abbott wrote: > > On 15/07/2020 05:48, B K Karthik wrote: > > fixed a sparse warning by changing the type in > > assignment from void [noderef] __user * to unsigned int * > > (different address space) > > > > Signed-off-by: B K Karthik > > --- > >

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Ian Abbott
On 15/07/2020 05:48, B K Karthik wrote: fixed a sparse warning by changing the type in assignment from void [noderef] __user * to unsigned int * (different address space) Signed-off-by: B K Karthik --- drivers/staging/comedi/comedi_fops.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Dan Carpenter
On Wed, Jul 15, 2020 at 06:45:21PM +0800, Zhao wrote: > At 2020-07-15 17:04:06, "Joe Perches" wrote: > >On Wed, 2020-07-15 at 11:37 +0300, Dan Carpenter wrote: > >> On Wed, Jul 15, 2020 at 09:57:55AM +0200, Greg KH wrote: > >> > On Wed, Jul 15, 2020 at 12:24:22AM -0700, Joe Perches wrote: > >> >

Re:Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhao
At 2020-07-15 17:04:06, "Joe Perches" wrote: >On Wed, 2020-07-15 at 11:37 +0300, Dan Carpenter wrote: >> On Wed, Jul 15, 2020 at 09:57:55AM +0200, Greg KH wrote: >> > On Wed, Jul 15, 2020 at 12:24:22AM -0700, Joe Perches wrote: >> > > On Wed, 2020-07-15 at 09:17 +0200, Greg KH wrote: >> > > > On

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Zhao
At 2020-06-18 03:10:02, "Dan Carpenter" wrote: >On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: >> diff --git a/drivers/staging/gasket/gasket_core.c >> b/drivers/staging/gasket/gasket_core.c >> index 67325fbaf760..28dab302183b 100644 >> --- a/drivers/staging/gasket/gasket_core.c >>

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:29 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 05:21:01AM -0400, B K Karthik wrote: > > On Wed, Jul 15, 2020 at 5:14 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote: > > > > On Wed, Jul 15, 2020 at

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 05:21:01AM -0400, B K Karthik wrote: > On Wed, Jul 15, 2020 at 5:14 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote: > > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Jul 15,

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:19 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 04:47:48AM -0400, B K Karthik wrote: > > On Wed, Jul 15, 2020 at 4:41 AM B K Karthik wrote: > > > > > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > > > wrote: > > > > > > > > On Wed, Jul 15, 2020 at

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 5:14 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote: > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > > > On Wed, Jul 15, 2020,

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 04:47:48AM -0400, B K Karthik wrote: > On Wed, Jul 15, 2020 at 4:41 AM B K Karthik wrote: > > > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > > > On Wed, Jul 15, 2020, 12:38 PM

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 04:41:52AM -0400, B K Karthik wrote: > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman < > > > gre...@linuxfoundation.org> wrote: > > >

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Joe Perches
On Wed, 2020-07-15 at 11:37 +0300, Dan Carpenter wrote: > On Wed, Jul 15, 2020 at 09:57:55AM +0200, Greg KH wrote: > > On Wed, Jul 15, 2020 at 12:24:22AM -0700, Joe Perches wrote: > > > On Wed, 2020-07-15 at 09:17 +0200, Greg KH wrote: > > > > On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 4:41 AM B K Karthik wrote: > > On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman > wrote: > > > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman < > > > gre...@linuxfoundation.org> wrote: > > > > > > >

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 4:31 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman < > > gre...@linuxfoundation.org> wrote: > > > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote: > > > >

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Dan Carpenter
On Wed, Jul 15, 2020 at 09:57:55AM +0200, Greg KH wrote: > On Wed, Jul 15, 2020 at 12:24:22AM -0700, Joe Perches wrote: > > On Wed, 2020-07-15 at 09:17 +0200, Greg KH wrote: > > > On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao wrote: > > > > On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 01:56:45PM +0530, B K Karthik wrote: > On Wed, Jul 15, 2020, 12:38 PM Greg Kroah-Hartman < > gre...@linuxfoundation.org> wrote: > > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote: > > > fixed a sparse warning by changing the type in > > > assignment from

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread B K Karthik
On Wed, Jul 15, 2020 at 3:08 AM Greg Kroah-Hartman wrote: > > On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote: > > fixed a sparse warning by changing the type in > > assignment from void [noderef] __user * to unsigned int * > > (different address space) > > > > Signed-off-by: B K

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Greg KH
On Wed, Jul 15, 2020 at 12:24:22AM -0700, Joe Perches wrote: > On Wed, 2020-07-15 at 09:17 +0200, Greg KH wrote: > > On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao wrote: > > > On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: > > > > A coding alignment issue is found by

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Joe Perches
On Wed, 2020-07-15 at 09:17 +0200, Greg KH wrote: > On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao wrote: > > On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: > > > A coding alignment issue is found by checkpatch.pl. > > > Fix it by using a temporary for

Re: [PATCH v2] staging: gasket: core: Fix a coding style issue in gasket_core.c

2020-07-15 Thread Greg KH
On Wed, Jul 15, 2020 at 07:44:40AM +0800, Zhixu Zhao wrote: > On Thu, Jun 18, 2020 at 12:11:27AM +0800, Zhixu Zhao wrote: > > A coding alignment issue is found by checkpatch.pl. > > Fix it by using a temporary for gasket_dev->bar_data[bar_num]. > > > > Signed-off-by: Zhixu Zhao > > Hi, there~ >

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Greg Kroah-Hartman
On Wed, Jul 15, 2020 at 12:48:13AM -0400, B K Karthik wrote: > fixed a sparse warning by changing the type in > assignment from void [noderef] __user * to unsigned int * > (different address space) > > Signed-off-by: B K Karthik > --- > drivers/staging/comedi/comedi_fops.c | 2 +- > 1 file

Re: possible deadlock in shmem_fallocate (4)

2020-07-15 Thread Michal Hocko
On Tue 14-07-20 10:32:20, Suren Baghdasaryan wrote: [...] > I'm not sure how we can annotate the fact that the inode_lock in > generic_file_write_iter and in shmem_fallocate always operate on > different inodes. Ideas? I believe that the standard way is to use lockdep_set_class on your backing