[PATCH] mm/gup: Check for protnone only if it is a PTE entry.

2017-02-19 Thread Aneesh Kumar K.V
Do the prot_none/FOLL_NUMA check after we are sure this is a THP pte. Archs can implement prot_none such that it can return true for regular pmd entries. Signed-off-by: Aneesh Kumar K.V --- mm/gup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c

[PATCH] NFC: st21nfca: Fix potential memory leak

2017-02-19 Thread Christophe JAILLET
If all bits of 'dev_mask' are already set, there is a memory leak because 'info' should be freed before returning. While fixing it, 'return -ENOMEM' directly if the first kzalloc fails. This makes the code more readable. Signed-off-by: Christophe JAILLET --- drivers/nfc/st21nfca/core.c | 12

RE: [RFC 2/5] iwlwifi: fix request_module() use

2017-02-19 Thread Grumbach, Emmanuel
> > The return value of request_module() being 0 does not mean that the driver > which was requested has loaded. To properly check that the driver was > loaded each driver can use internal mechanisms to vet the driver is now > present. The helper try_then_request_module() was added to help with >

RE: [RFC 2/5] iwlwifi: fix request_module() use

2017-02-19 Thread Grumbach, Emmanuel
> > The return value of request_module() being 0 does not mean that the driver > which was requested has loaded. To properly check that the driver was > loaded each driver can use internal mechanisms to vet the driver is now > present. The helper try_then_request_module() was added to help with >

[PATCH] fs/pstore: constify pstore_zbackend structures

2017-02-19 Thread Bhumika Goyal
The references of pstore_zbackend structures are stored into the pointer zbackend of type struct pstore_zbackend. The pointer zbackend can be made const as it is only dereferenced. After making this change the pstore_zbackend structures whose references are stored into the pointer zbackend can be

[PATCH] fs/pstore: constify pstore_zbackend structures

2017-02-19 Thread Bhumika Goyal
The references of pstore_zbackend structures are stored into the pointer zbackend of type struct pstore_zbackend. The pointer zbackend can be made const as it is only dereferenced. After making this change the pstore_zbackend structures whose references are stored into the pointer zbackend can be

[PATCH] qlcnic: Fix a memory leak in error handling path

2017-02-19 Thread Christophe JAILLET
If 'dma_alloc_coherent()' fails, we should release resources allocated so far, just as done in all other cases in this function. Signed-off-by: Christophe JAILLET --- checkpatch.pl complains about '== NULL'. I have left it as-is because both '== NULL' and '!' are

[PATCH] qlcnic: Fix a memory leak in error handling path

2017-02-19 Thread Christophe JAILLET
If 'dma_alloc_coherent()' fails, we should release resources allocated so far, just as done in all other cases in this function. Signed-off-by: Christophe JAILLET --- checkpatch.pl complains about '== NULL'. I have left it as-is because both '== NULL' and '!' are already used in the file. ---

[PATCH] net: mvpp2: Fix a memory leak in error handling path

2017-02-19 Thread Christophe JAILLET
if 'devm_kzalloc()' fails, we should release resources allocated so far, just as done a few lines below. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/marvell/mvpp2.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH] net: mvpp2: Fix a memory leak in error handling path

2017-02-19 Thread Christophe JAILLET
if 'devm_kzalloc()' fails, we should release resources allocated so far, just as done a few lines below. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/marvell/mvpp2.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvpp2.c

Re: [PATCH 4/9] vfs: intercept reads to overlay files

2017-02-19 Thread Miklos Szeredi
On Sun, Feb 19, 2017 at 10:05 AM, Al Viro wrote: > On Fri, Feb 17, 2017 at 05:09:33PM +0100, Miklos Szeredi wrote: >> ...in order to handle the corner case when the file is copyied up after >> being opened read-only. > >> --- /dev/null >> +++ b/fs/overlay_util.c >> @@

Re: [PATCH 4/9] vfs: intercept reads to overlay files

2017-02-19 Thread Miklos Szeredi
On Sun, Feb 19, 2017 at 10:05 AM, Al Viro wrote: > On Fri, Feb 17, 2017 at 05:09:33PM +0100, Miklos Szeredi wrote: >> ...in order to handle the corner case when the file is copyied up after >> being opened read-only. > >> --- /dev/null >> +++ b/fs/overlay_util.c >> @@ -0,0 +1,39 @@ >> +/* >> + *

RE: [RFC 1/5] iwlwifi: fix drv cleanup on opmode registration failure

2017-02-19 Thread Grumbach, Emmanuel
Hi Luis, > > The firmware async callback handles the device's opmode start call, but > optionally also allows opmode registration to take care of its opmode start. > If > the firmware callback handles it its error path in case of opmode start > failure > has a few pieces of code missing from

Re: [PATCH 0/9] overlay: fix inconsistency of ro file after copy-up

2017-02-19 Thread Al Viro
On Fri, Feb 17, 2017 at 05:09:29PM +0100, Miklos Szeredi wrote: > A file is opened for read-only, opened read-write (resulting in a copy up) > and modified. The data read back from the the read-only fd will be stale > in this case (the read-only file descriptor still refers to the lower, >

Re: [PATCH 0/9] overlay: fix inconsistency of ro file after copy-up

2017-02-19 Thread Al Viro
On Fri, Feb 17, 2017 at 05:09:29PM +0100, Miklos Szeredi wrote: > A file is opened for read-only, opened read-write (resulting in a copy up) > and modified. The data read back from the the read-only fd will be stale > in this case (the read-only file descriptor still refers to the lower, >

RE: [RFC 1/5] iwlwifi: fix drv cleanup on opmode registration failure

2017-02-19 Thread Grumbach, Emmanuel
Hi Luis, > > The firmware async callback handles the device's opmode start call, but > optionally also allows opmode registration to take care of its opmode start. > If > the firmware callback handles it its error path in case of opmode start > failure > has a few pieces of code missing from

Re: [PATCH 4/9] vfs: intercept reads to overlay files

2017-02-19 Thread Al Viro
On Fri, Feb 17, 2017 at 05:09:33PM +0100, Miklos Szeredi wrote: > ...in order to handle the corner case when the file is copyied up after > being opened read-only. > --- /dev/null > +++ b/fs/overlay_util.c > @@ -0,0 +1,39 @@ > +/* > + * Copyright (C) 2017 Red Hat, Inc. > + * > + * This program is

Re: [PATCH 4/9] vfs: intercept reads to overlay files

2017-02-19 Thread Al Viro
On Fri, Feb 17, 2017 at 05:09:33PM +0100, Miklos Szeredi wrote: > ...in order to handle the corner case when the file is copyied up after > being opened read-only. > --- /dev/null > +++ b/fs/overlay_util.c > @@ -0,0 +1,39 @@ > +/* > + * Copyright (C) 2017 Red Hat, Inc. > + * > + * This program is

Re: [PATCH] make.cross: Update openrisc toolchain to fix builds

2017-02-19 Thread Fengguang Wu
Applied, thank you! On Sun, Feb 19, 2017 at 05:14:36PM +0900, Stafford Horne wrote: The latest openrisc kernel patchs in linux-next are failing to build due to old toolchains at the crosstool website. Update to point the the toolchain binaries released the OpenRISC team. Signed-off-by:

Re: [PATCH] make.cross: Update openrisc toolchain to fix builds

2017-02-19 Thread Fengguang Wu
Applied, thank you! On Sun, Feb 19, 2017 at 05:14:36PM +0900, Stafford Horne wrote: The latest openrisc kernel patchs in linux-next are failing to build due to old toolchains at the crosstool website. Update to point the the toolchain binaries released the OpenRISC team. Signed-off-by:

Re: [PATCH] proc/sysctl: prune stale dentries during unregistering

2017-02-19 Thread Al Viro
On Sat, Feb 18, 2017 at 09:55:28PM +0300, Konstantin Khlebnikov wrote: > This patch has locking problem. I've got lockdep splat under LTP. > > d_lock nests inside i_lock > sysctl_lock nests inside d_lock in d_compare > > This patch adds i_lock nesting inside sysctl_lock. Once ->unregistering is

Re: [PATCH] proc/sysctl: prune stale dentries during unregistering

2017-02-19 Thread Al Viro
On Sat, Feb 18, 2017 at 09:55:28PM +0300, Konstantin Khlebnikov wrote: > This patch has locking problem. I've got lockdep splat under LTP. > > d_lock nests inside i_lock > sysctl_lock nests inside d_lock in d_compare > > This patch adds i_lock nesting inside sysctl_lock. Once ->unregistering is

Re: [PATCH] backlight: report error on failure

2017-02-19 Thread Daniel Thompson
On Sat, Feb 18, 2017 at 04:31:43PM +, Sudip Mukherjee wrote: > On Monday 30 January 2017 11:04 PM, Sudip Mukherjee wrote: > > On Wednesday 18 January 2017 09:23 PM, Sudip Mukherjee wrote: > > > It is possible to update the backlight power and the brightness using > > > the sysfs and on writing

Re: [PATCH] backlight: report error on failure

2017-02-19 Thread Daniel Thompson
On Sat, Feb 18, 2017 at 04:31:43PM +, Sudip Mukherjee wrote: > On Monday 30 January 2017 11:04 PM, Sudip Mukherjee wrote: > > On Wednesday 18 January 2017 09:23 PM, Sudip Mukherjee wrote: > > > It is possible to update the backlight power and the brightness using > > > the sysfs and on writing

Re: Crosstool/kbuild-all toolchain updates

2017-02-19 Thread Stafford Horne
Ping? On Wed, Feb 01, 2017 at 07:44:38AM +0900, Stafford Horne wrote: > Hi Fengguang/All, > > I am working as the OpenRISC linux kernel maintainer. Currently in > linux-next our patches are causing kbuild test robot to fail. > > This is because the patches are taking advantage of 2 'new' (2

Re: Crosstool/kbuild-all toolchain updates

2017-02-19 Thread Stafford Horne
Ping? On Wed, Feb 01, 2017 at 07:44:38AM +0900, Stafford Horne wrote: > Hi Fengguang/All, > > I am working as the OpenRISC linux kernel maintainer. Currently in > linux-next our patches are causing kbuild test robot to fail. > > This is because the patches are taking advantage of 2 'new' (2

[PATCH] make.cross: Update openrisc toolchain to fix builds

2017-02-19 Thread Stafford Horne
The latest openrisc kernel patchs in linux-next are failing to build due to old toolchains at the crosstool website. Update to point the the toolchain binaries released the OpenRISC team. Signed-off-by: Stafford Horne --- sbin/make.cross | 21 - 1 file

[PATCH] make.cross: Update openrisc toolchain to fix builds

2017-02-19 Thread Stafford Horne
The latest openrisc kernel patchs in linux-next are failing to build due to old toolchains at the crosstool website. Update to point the the toolchain binaries released the OpenRISC team. Signed-off-by: Stafford Horne --- sbin/make.cross | 21 - 1 file changed, 20

Re: [PATCH] backlight: report error on failure

2017-02-19 Thread Daniel Thompson
On Wed, Jan 18, 2017 at 09:23:50PM +, Sudip Mukherjee wrote: > It is possible to update the backlight power and the brightness using > the sysfs and on writing it either returns the count or if the callback > function does not exist then returns the error code 'ENXIO'. > > We have a situation

Re: [PATCH] backlight: report error on failure

2017-02-19 Thread Daniel Thompson
On Wed, Jan 18, 2017 at 09:23:50PM +, Sudip Mukherjee wrote: > It is possible to update the backlight power and the brightness using > the sysfs and on writing it either returns the count or if the callback > function does not exist then returns the error code 'ENXIO'. > > We have a situation

<    2   3   4   5   6   7