[PATCH] mm: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- mm/mempolicy.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index

[PATCH] iio: adc: max9611: Avoid implicit enum conversion warning

2018-09-14 Thread Nathan Chancellor
Clang warns when an enumerated type is implicitly converted to another. drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain =

[PATCH] mm: use match_string() helper to simplify the code

2018-09-14 Thread zhong jiang
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: zhong jiang --- mm/mempolicy.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index

[PATCH] iio: adc: max9611: Avoid implicit enum conversion warning

2018-09-14 Thread Nathan Chancellor
Clang warns when an enumerated type is implicitly converted to another. drivers/iio/adc/max9611.c:292:16: warning: implicit conversion from enumeration type 'enum max9611_conf_ids' to different enumeration type 'enum max9611_csa_gain' [-Wenum-conversion] *csa_gain =

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 9:36 PM, Reinette Chatre wrote: > On 9/14/2018 1:32 PM, Fenghua Yu wrote: >> From: Reinette Chatre >> >> multiple resources are managed > > The above snippet is redundant. We can remove it in the next version. Apologies, I responded too fast. The subject intended to read:

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 9:36 PM, Reinette Chatre wrote: > On 9/14/2018 1:32 PM, Fenghua Yu wrote: >> From: Reinette Chatre >> >> multiple resources are managed > > The above snippet is redundant. We can remove it in the next version. Apologies, I responded too fast. The subject intended to read:

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 1:32 PM, Fenghua Yu wrote: > From: Reinette Chatre > > multiple resources are managed The above snippet is redundant. We can remove it in the next version. Reinette

Re: [PATCH 4/9] x86/intel_rdt: Fix invalid mode warning when

2018-09-14 Thread Reinette Chatre
On 9/14/2018 1:32 PM, Fenghua Yu wrote: > From: Reinette Chatre > > multiple resources are managed The above snippet is redundant. We can remove it in the next version. Reinette

Re: [PATCH v5] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-14 Thread Paul E. McKenney
On Fri, Sep 14, 2018 at 05:08:21PM -0400, Alan Stern wrote: > More than one kernel developer has expressed the opinion that the LKMM > should enforce ordering of writes by locking. In other words, given > the following code: > > WRITE_ONCE(x, 1); > spin_unlock(): > spin_lock();

Re: [PATCH v5] tools/memory-model: Add extra ordering for locks and remove it for ordinary release/acquire

2018-09-14 Thread Paul E. McKenney
On Fri, Sep 14, 2018 at 05:08:21PM -0400, Alan Stern wrote: > More than one kernel developer has expressed the opinion that the LKMM > should enforce ordering of writes by locking. In other words, given > the following code: > > WRITE_ONCE(x, 1); > spin_unlock(): > spin_lock();

[PATCH v7 1/1] staging: mt7621-mmc: Delete IRQ_MSG() and its users.

2018-09-14 Thread Nishad Kamdar
This patch removes IRQ_MSG() and its users as currently it is a no-op. Signed-off-by: Nishad Kamdar --- Changes in v7: - Delete IRQ_MSG() and all its users Changes in v6: - No change Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 12

[PATCH v7 1/1] staging: mt7621-mmc: Delete IRQ_MSG() and its users.

2018-09-14 Thread Nishad Kamdar
This patch removes IRQ_MSG() and its users as currently it is a no-op. Signed-off-by: Nishad Kamdar --- Changes in v7: - Delete IRQ_MSG() and all its users Changes in v6: - No change Changes in v5: - No change --- drivers/staging/mt7621-mmc/dbg.h | 12

[PATCH] staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] msleep drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536: msleep in issue_deauth_ex drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110: issue_deauth_ex in

[PATCH] staging: rtl8188eu: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call path (from bottom to top) in Linux-4.17 is: [FUNC] msleep drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 1536: msleep in issue_deauth_ex drivers/staging/rtl8188eu/core/rtw_mlme_ext.c, 5110: issue_deauth_ex in

[PATCH v7 0/1] staging: mt7621-mmc: Fix debug macros and their usages

2018-09-14 Thread Nishad Kamdar
This patch fixes the the debug macro IRQ_MSG(). It deletes IRQ_MSG() and all its users as currently it is a no-op. Changes in v7: - Delete IRQ_MSG() macro and its users. - Patchset reduced to 1 patch as the patches fixing N_MSG() and ERR_MSG() have been accepted. Changes in v6: -

[PATCH v7 0/1] staging: mt7621-mmc: Fix debug macros and their usages

2018-09-14 Thread Nishad Kamdar
This patch fixes the the debug macro IRQ_MSG(). It deletes IRQ_MSG() and all its users as currently it is a no-op. Changes in v7: - Delete IRQ_MSG() macro and its users. - Patchset reduced to 1 patch as the patches fixing N_MSG() and ERR_MSG() have been accepted. Changes in v6: -

Re: KSM not working in 4.9 Kernel

2018-09-14 Thread Pintu Kumar
On Fri, 14 Sep 2018, 10:42 pm Yang Shi, wrote: > > Hi Pintu, > > I recall there are some ksm test cases in LTP. Did you try them out? No. I haven't seen the LTP test. I will check out now. But I wonder what is the problem with my test? > On Fri, Sep 14, 2018 at 7:28 AM Pintu Kumar wrote: > >

Re: KSM not working in 4.9 Kernel

2018-09-14 Thread Pintu Kumar
On Fri, 14 Sep 2018, 10:42 pm Yang Shi, wrote: > > Hi Pintu, > > I recall there are some ksm test cases in LTP. Did you try them out? No. I haven't seen the LTP test. I will check out now. But I wonder what is the problem with my test? > On Fri, Sep 14, 2018 at 7:28 AM Pintu Kumar wrote: > >

[PATCH 2/2] staging: rtl8723bs: Fix two sleep-in-atomic-context bugs in _rtw_pwr_wakeup()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1243: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in

[PATCH 2/2] staging: rtl8723bs: Fix two sleep-in-atomic-context bugs in _rtw_pwr_wakeup()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_pwrctrl.c, 1243: msleep in _rtw_pwr_wakeup drivers/staging/rtl8723bs/core/rtw_ioctl_set.c, 510: _rtw_pwr_wakeup in

[PATCH 1/2] staging: rtl8723bs: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in

[PATCH 1/2] staging: rtl8723bs: Fix a sleep-in-atomic-context bug in issue_deauth_ex()

2018-09-14 Thread Jia-Ju Bai
The driver may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.17 are: [FUNC] msleep drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 3805: msleep in issue_deauth_ex drivers/staging/rtl8723bs/core/rtw_mlme_ext.c, 6336: issue_deauth_ex in

INFO: task hung in fsnotify_connector_destroy_workfn (2)

2018-09-14 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:11da3a7f84f1 Linux 4.19-rc3 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=141ffbca40 kernel config: https://syzkaller.appspot.com/x/.config?x=9917ff4b798e1a1e dashboard link:

INFO: task hung in fsnotify_connector_destroy_workfn (2)

2018-09-14 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:11da3a7f84f1 Linux 4.19-rc3 git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=141ffbca40 kernel config: https://syzkaller.appspot.com/x/.config?x=9917ff4b798e1a1e dashboard link:

Re: [PATCH v6 3/3] staging: mt7621-mmc: Fix debug macro IRQ_MSG and its usages

2018-09-14 Thread Nishad Kamdar
On Mon, Sep 10, 2018 at 05:05:13PM +0200, Greg Kroah-Hartman wrote: > On Sat, Sep 01, 2018 at 03:51:10AM +0530, Nishad Kamdar wrote: > > Replace all usages of IRQ_MSG with with dev_ without __func__ > > or __LINE__ or current->comm and current->pid. Remove the do {} > > while(0) loop for the

Re: [PATCH v6 3/3] staging: mt7621-mmc: Fix debug macro IRQ_MSG and its usages

2018-09-14 Thread Nishad Kamdar
On Mon, Sep 10, 2018 at 05:05:13PM +0200, Greg Kroah-Hartman wrote: > On Sat, Sep 01, 2018 at 03:51:10AM +0530, Nishad Kamdar wrote: > > Replace all usages of IRQ_MSG with with dev_ without __func__ > > or __LINE__ or current->comm and current->pid. Remove the do {} > > while(0) loop for the

Re: [PATCH] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.

2018-09-14 Thread Song Qiang
On Sat, Sep 15, 2018 at 12:13:22AM +0530, Himanshu Jha wrote: > Hi Song, > > On Thu, Sep 13, 2018 at 10:22:29AM +0800, Song Qiang wrote: > > This driver was originally written by ST in 2016 as a misc input device > > driver, and hasn't been maintained for a long time. I grabbed some code > > from

Re: [PATCH] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor.

2018-09-14 Thread Song Qiang
On Sat, Sep 15, 2018 at 12:13:22AM +0530, Himanshu Jha wrote: > Hi Song, > > On Thu, Sep 13, 2018 at 10:22:29AM +0800, Song Qiang wrote: > > This driver was originally written by ST in 2016 as a misc input device > > driver, and hasn't been maintained for a long time. I grabbed some code > > from

Re: [PATCH AUTOSEL 4.18 51/92] tools/testing/nvdimm: Fix support for emulating controller temperature

2018-09-14 Thread Dan Williams
On Fri, Sep 14, 2018 at 6:40 PM, Sasha Levin wrote: > On Fri, Sep 14, 2018 at 06:34:43PM -0700, Dan Williams wrote: >>On Fri, Sep 14, 2018 at 6:30 PM, Sasha Levin >> wrote: >>> From: Dan Williams >>> >>> [ Upstream commit e5d772fbe7685aae0dff99f3b54158a0ec32155e ] >>> >>> In addition to

Re: [PATCH AUTOSEL 4.18 51/92] tools/testing/nvdimm: Fix support for emulating controller temperature

2018-09-14 Thread Dan Williams
On Fri, Sep 14, 2018 at 6:40 PM, Sasha Levin wrote: > On Fri, Sep 14, 2018 at 06:34:43PM -0700, Dan Williams wrote: >>On Fri, Sep 14, 2018 at 6:30 PM, Sasha Levin >> wrote: >>> From: Dan Williams >>> >>> [ Upstream commit e5d772fbe7685aae0dff99f3b54158a0ec32155e ] >>> >>> In addition to

[PATCH AUTOSEL 4.18 07/92] bpf: fix rcu annotations in compute_effective_progs()

2018-09-14 Thread Sasha Levin
From: Roman Gushchin [ Upstream commit 3960f4fd6585608e8cc285d9665821985494e147 ] The progs local variable in compute_effective_progs() is marked as __rcu, which is not correct. This is a local pointer, which is initialized by bpf_prog_array_alloc(), which also now returns a generic non-rcu

[PATCH AUTOSEL 4.18 03/92] arm64: dts: uniphier: Add missing cooling device properties for CPUs

2018-09-14 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit af0e09d0c6762e486b0eb5cc4737396964c34fad ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then

[PATCH AUTOSEL 4.18 07/92] bpf: fix rcu annotations in compute_effective_progs()

2018-09-14 Thread Sasha Levin
From: Roman Gushchin [ Upstream commit 3960f4fd6585608e8cc285d9665821985494e147 ] The progs local variable in compute_effective_progs() is marked as __rcu, which is not correct. This is a local pointer, which is initialized by bpf_prog_array_alloc(), which also now returns a generic non-rcu

[PATCH AUTOSEL 4.18 03/92] arm64: dts: uniphier: Add missing cooling device properties for CPUs

2018-09-14 Thread Sasha Levin
From: Viresh Kumar [ Upstream commit af0e09d0c6762e486b0eb5cc4737396964c34fad ] The cooling device properties, like "#cooling-cells" and "dynamic-power-coefficient", should either be present for all the CPUs of a cluster or none. If these are present only for a subset of CPUs of a cluster then

[PATCH AUTOSEL 4.18 05/92] mtdchar: fix overflows in adjustment of `count`

2018-09-14 Thread Sasha Levin
From: Jann Horn [ Upstream commit 6c6bc9ea84d0008024606bf5ba10519e20d851bf ] The first checks in mtdchar_read() and mtdchar_write() attempt to limit `count` such that `*ppos + count <= mtd->size`. However, they ignore the possibility of `*ppos > mtd->size`, allowing the calculation of `count`

[PATCH AUTOSEL 4.18 04/92] audit: fix use-after-free in audit_add_watch

2018-09-14 Thread Sasha Levin
From: Ronny Chevalier [ Upstream commit baa2a4fdd525c8c4b0f704d20457195b29437839 ] audit_add_watch stores locally krule->watch without taking a reference on watch. Then, it calls audit_add_to_parent, and uses the watch stored locally. Unfortunately, it is possible that audit_add_to_parent

[PATCH AUTOSEL 4.18 09/92] Bluetooth: Use lock_sock_nested in bt_accept_enqueue

2018-09-14 Thread Sasha Levin
From: Philipp Puschmann [ Upstream commit b71c69c26b4916d11b8d403d8e667bbd191f1b8f ] Fixes this warning that was provoked by a pairing: [60258.016221] WARNING: possible recursive locking detected [60258.021558] 4.15.0-RD1812-BSP #1 Tainted: G O [60258.027146]

[PATCH AUTOSEL 4.18 11/92] mtd: rawnand: sunxi: Add an U suffix to NFC_PAGE_OP definition

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit cf3e3fd2e94f4648f17fbd5e0e26409d5d1face9 ] Fixes the "warning: large integer implicitly truncated to unsigned type [-Woverflow]" warning when compiled for x86. This is needed in order to allow compiling this driver when COMPILE_TEST=y. Reported-by:

[PATCH AUTOSEL 4.18 05/92] mtdchar: fix overflows in adjustment of `count`

2018-09-14 Thread Sasha Levin
From: Jann Horn [ Upstream commit 6c6bc9ea84d0008024606bf5ba10519e20d851bf ] The first checks in mtdchar_read() and mtdchar_write() attempt to limit `count` such that `*ppos + count <= mtd->size`. However, they ignore the possibility of `*ppos > mtd->size`, allowing the calculation of `count`

[PATCH AUTOSEL 4.18 04/92] audit: fix use-after-free in audit_add_watch

2018-09-14 Thread Sasha Levin
From: Ronny Chevalier [ Upstream commit baa2a4fdd525c8c4b0f704d20457195b29437839 ] audit_add_watch stores locally krule->watch without taking a reference on watch. Then, it calls audit_add_to_parent, and uses the watch stored locally. Unfortunately, it is possible that audit_add_to_parent

[PATCH AUTOSEL 4.18 09/92] Bluetooth: Use lock_sock_nested in bt_accept_enqueue

2018-09-14 Thread Sasha Levin
From: Philipp Puschmann [ Upstream commit b71c69c26b4916d11b8d403d8e667bbd191f1b8f ] Fixes this warning that was provoked by a pairing: [60258.016221] WARNING: possible recursive locking detected [60258.021558] 4.15.0-RD1812-BSP #1 Tainted: G O [60258.027146]

[PATCH AUTOSEL 4.18 11/92] mtd: rawnand: sunxi: Add an U suffix to NFC_PAGE_OP definition

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit cf3e3fd2e94f4648f17fbd5e0e26409d5d1face9 ] Fixes the "warning: large integer implicitly truncated to unsigned type [-Woverflow]" warning when compiled for x86. This is needed in order to allow compiling this driver when COMPILE_TEST=y. Reported-by:

[PATCH AUTOSEL 4.18 19/92] pinctrl: mt7622: Fix probe fail by misuse the selector

2018-09-14 Thread Sasha Levin
From: Sean Wang [ Upstream commit 238262af08a20e5f1932fcf606b8b84370ac8b77 ] After the commit acf137951367 ("pinctrl: core: Return selector to the pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver"), it's necessary to add the fixes needed for

[PATCH AUTOSEL 4.18 15/92] PM / devfreq: use put_device() instead of kfree()

2018-09-14 Thread Sasha Levin
From: Arvind Yadav [ Upstream commit 2d803dc8f7a5f622ac47c3b650834ada3a2659b9 ] Never directly free @dev after calling device_register() or device_unregister(), even if device_register() returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind

[PATCH AUTOSEL 4.18 12/92] evm: Don't deadlock if a crypto algorithm is unavailable

2018-09-14 Thread Sasha Levin
From: Matthew Garrett [ Upstream commit e2861fa71641c6414831d628a1f4f793b6562580 ] When EVM attempts to appraise a file signed with a crypto algorithm the kernel doesn't have support for, it will cause the kernel to trigger a module load. If the EVM policy includes appraisal of kernel modules

[PATCH AUTOSEL 4.18 20/92] pinctrl: rza1: Fix selector use for groups and functions

2018-09-14 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit dc4003d260594aa300028c3c5d040c5719abd19b ] We must use a mutex around the generic_add functions and save the function and group selector in case we need to remove them. Otherwise the selector use will be racy for deferred probe at least. Fixes:

[PATCH AUTOSEL 4.18 10/92] mtd: rawnand: fscm: Avoid collision on PC def when compiling for MIPS

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit 8f3931ed975e1d775b87ce85d65ecacd54138359 ] We want to allow this driver to be selected when COMPILE_TEST=y, this means the driver can be compiled for any arch, including MIPS. When compiling this driver for MIPS, we end up with a collision on the 'PC'

[PATCH AUTOSEL 4.18 19/92] pinctrl: mt7622: Fix probe fail by misuse the selector

2018-09-14 Thread Sasha Levin
From: Sean Wang [ Upstream commit 238262af08a20e5f1932fcf606b8b84370ac8b77 ] After the commit acf137951367 ("pinctrl: core: Return selector to the pinctrl driver") and the commit 47f1242d19c3 ("pinctrl: pinmux: Return selector to the pinctrl driver"), it's necessary to add the fixes needed for

[PATCH AUTOSEL 4.18 15/92] PM / devfreq: use put_device() instead of kfree()

2018-09-14 Thread Sasha Levin
From: Arvind Yadav [ Upstream commit 2d803dc8f7a5f622ac47c3b650834ada3a2659b9 ] Never directly free @dev after calling device_register() or device_unregister(), even if device_register() returned an error. Always use put_device() to give up the reference initialized. Signed-off-by: Arvind

[PATCH AUTOSEL 4.18 12/92] evm: Don't deadlock if a crypto algorithm is unavailable

2018-09-14 Thread Sasha Levin
From: Matthew Garrett [ Upstream commit e2861fa71641c6414831d628a1f4f793b6562580 ] When EVM attempts to appraise a file signed with a crypto algorithm the kernel doesn't have support for, it will cause the kernel to trigger a module load. If the EVM policy includes appraisal of kernel modules

[PATCH AUTOSEL 4.18 20/92] pinctrl: rza1: Fix selector use for groups and functions

2018-09-14 Thread Sasha Levin
From: Tony Lindgren [ Upstream commit dc4003d260594aa300028c3c5d040c5719abd19b ] We must use a mutex around the generic_add functions and save the function and group selector in case we need to remove them. Otherwise the selector use will be racy for deferred probe at least. Fixes:

[PATCH AUTOSEL 4.18 10/92] mtd: rawnand: fscm: Avoid collision on PC def when compiling for MIPS

2018-09-14 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit 8f3931ed975e1d775b87ce85d65ecacd54138359 ] We want to allow this driver to be selected when COMPILE_TEST=y, this means the driver can be compiled for any arch, including MIPS. When compiling this driver for MIPS, we end up with a collision on the 'PC'

[PATCH AUTOSEL 4.18 13/92] KVM: PPC: Book3S HV: Add of_node_put() in success path

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 51eaa08f029c7343df846325d7cf047be8b96e81 ] The call to of_find_compatible_node() is returning a pointer with incremented refcount so it must be explicitly decremented after the last use. As here it is only being used for checking of node presence but

[PATCH AUTOSEL 4.18 14/92] security: check for kstrdup() failure in lsm_append()

2018-09-14 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 87ea58433208d17295e200d56be5e2a4fe4ce7d6 ] lsm_append() should return -ENOMEM if memory allocation failed. Fixes: d69dece5f5b6 ("LSM: Add /sys/kernel/security/lsm") Signed-off-by: Eric Biggers Signed-off-by: James Morris Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.18 13/92] KVM: PPC: Book3S HV: Add of_node_put() in success path

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 51eaa08f029c7343df846325d7cf047be8b96e81 ] The call to of_find_compatible_node() is returning a pointer with incremented refcount so it must be explicitly decremented after the last use. As here it is only being used for checking of node presence but

[PATCH AUTOSEL 4.18 14/92] security: check for kstrdup() failure in lsm_append()

2018-09-14 Thread Sasha Levin
From: Eric Biggers [ Upstream commit 87ea58433208d17295e200d56be5e2a4fe4ce7d6 ] lsm_append() should return -ENOMEM if memory allocation failed. Fixes: d69dece5f5b6 ("LSM: Add /sys/kernel/security/lsm") Signed-off-by: Eric Biggers Signed-off-by: James Morris Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.18 31/92] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

2018-09-14 Thread Sasha Levin
From: Rick Farrington [ Upstream commit ac13d6d8eaded15c67265eafc32f439ea3a0ac4a ] When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only

[PATCH AUTOSEL 4.18 24/92] efi/esrt: Only call efi_mem_reserve() for boot services memory

2018-09-14 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 61f0d55569463a1af897117ff47d202b0ccb2e24 ] The following commit: 7e1550b8f208 ("efi: Drop type and attribute checks in efi_mem_desc_lookup()") refactored the implementation of efi_mem_desc_lookup() so that the type check is moved to the callers, one of

[PATCH AUTOSEL 4.18 23/92] sched/core: Use smp_mb() in wake_woken_function()

2018-09-14 Thread Sasha Levin
From: Andrea Parri [ Upstream commit 76e079fefc8f62bd9b2cd2950814d1ee806e31a5 ] wake_woken_function() synchronizes with wait_woken() as follows: [wait_woken] [wake_woken_function] entry->flags &= ~wq_flag_woken;condition = true; smp_mb();

[PATCH AUTOSEL 4.18 28/92] ARM: hisi: fix error handling and missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 9f30b5ae0585ca5234fe979294b8f897299dec99 ] of_iomap() can return NULL which seems critical here and thus should be explicitly flagged so that the cause of system halting can be understood. As of_find_compatible_node() is returning a device node with

[PATCH AUTOSEL 4.18 31/92] liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

2018-09-14 Thread Sasha Levin
From: Rick Farrington [ Upstream commit ac13d6d8eaded15c67265eafc32f439ea3a0ac4a ] When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR mode was disabled by reset, which was not true. Since DPDK driver had set IPTR mode previously, the VF driver (which uses buf-ptr-only

[PATCH AUTOSEL 4.18 24/92] efi/esrt: Only call efi_mem_reserve() for boot services memory

2018-09-14 Thread Sasha Levin
From: Ard Biesheuvel [ Upstream commit 61f0d55569463a1af897117ff47d202b0ccb2e24 ] The following commit: 7e1550b8f208 ("efi: Drop type and attribute checks in efi_mem_desc_lookup()") refactored the implementation of efi_mem_desc_lookup() so that the type check is moved to the callers, one of

[PATCH AUTOSEL 4.18 23/92] sched/core: Use smp_mb() in wake_woken_function()

2018-09-14 Thread Sasha Levin
From: Andrea Parri [ Upstream commit 76e079fefc8f62bd9b2cd2950814d1ee806e31a5 ] wake_woken_function() synchronizes with wait_woken() as follows: [wait_woken] [wake_woken_function] entry->flags &= ~wq_flag_woken;condition = true; smp_mb();

[PATCH AUTOSEL 4.18 28/92] ARM: hisi: fix error handling and missing of_node_put

2018-09-14 Thread Sasha Levin
From: Nicholas Mc Guire [ Upstream commit 9f30b5ae0585ca5234fe979294b8f897299dec99 ] of_iomap() can return NULL which seems critical here and thus should be explicitly flagged so that the cause of system halting can be understood. As of_find_compatible_node() is returning a device node with

[PATCH AUTOSEL 4.18 35/92] serial: 8250: of: Correct of_platform_serial_setup() error handling

2018-09-14 Thread Sasha Levin
From: Alexander Sverdlin [ Upstream commit b29330d829042512fabb2bfa3bbfa32df1115594 ] Don't dispose IRQ mapping before it has been created. Fixes: aa9594740 ("serial: 8250_of: Add IO space support") Signed-off-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha

[PATCH AUTOSEL 4.18 33/92] ASoC: hdmi-codec: fix routing

2018-09-14 Thread Sasha Levin
From: Russell King [ Upstream commit d30e23d69981a4b665f5ce8711335df986576389 ] Commit 943fa0228252 ("ASoC: hdmi-codec: Use different name for playback streams") broke hdmi-codec's routing between it's output "TX" widget and the S/PDIF or I2S streams by renaming the streams. Whether an error

[PATCH AUTOSEL 4.18 40/92] mmc: sdhci: do not try to use 3.3V signaling if not supported

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 1b5190c2e74c47ebe4bcecf7a072358ad9f1feaa ] For eMMC devices it is valid to only support 1.8V signaling. When vqmmc is set to a fixed 1.8V regulator the stack tries to set 3.3V initially and prints the following warning: mmc1: Switching to 3.3V signalling

[PATCH AUTOSEL 4.18 35/92] serial: 8250: of: Correct of_platform_serial_setup() error handling

2018-09-14 Thread Sasha Levin
From: Alexander Sverdlin [ Upstream commit b29330d829042512fabb2bfa3bbfa32df1115594 ] Don't dispose IRQ mapping before it has been created. Fixes: aa9594740 ("serial: 8250_of: Add IO space support") Signed-off-by: Alexander Sverdlin Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha

[PATCH AUTOSEL 4.18 33/92] ASoC: hdmi-codec: fix routing

2018-09-14 Thread Sasha Levin
From: Russell King [ Upstream commit d30e23d69981a4b665f5ce8711335df986576389 ] Commit 943fa0228252 ("ASoC: hdmi-codec: Use different name for playback streams") broke hdmi-codec's routing between it's output "TX" widget and the S/PDIF or I2S streams by renaming the streams. Whether an error

[PATCH AUTOSEL 4.18 40/92] mmc: sdhci: do not try to use 3.3V signaling if not supported

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 1b5190c2e74c47ebe4bcecf7a072358ad9f1feaa ] For eMMC devices it is valid to only support 1.8V signaling. When vqmmc is set to a fixed 1.8V regulator the stack tries to set 3.3V initially and prints the following warning: mmc1: Switching to 3.3V signalling

[PATCH AUTOSEL 4.18 39/92] mmc: tegra: prevent HS200 on Tegra 3

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 127407e36f4fe3a1d5e8b9998b479956ce83a7dc ] The stack assumes that SDHC controller which support SD3.0 (SDR104) do support HS200. This is not the case for Tegra 3, which does support SD 3.0 but only supports eMMC spec 4.41. Use SDHCI_QUIRK2_BROKEN_HS200 to

[PATCH AUTOSEL 4.18 39/92] mmc: tegra: prevent HS200 on Tegra 3

2018-09-14 Thread Sasha Levin
From: Stefan Agner [ Upstream commit 127407e36f4fe3a1d5e8b9998b479956ce83a7dc ] The stack assumes that SDHC controller which support SD3.0 (SDR104) do support HS200. This is not the case for Tegra 3, which does support SD 3.0 but only supports eMMC spec 4.41. Use SDHCI_QUIRK2_BROKEN_HS200 to

[PATCH AUTOSEL 4.18 41/92] drm/nouveau: Fix runtime PM leak in drm_open()

2018-09-14 Thread Sasha Levin
From: Lyude Paul [ Upstream commit 922a8c82fafdec99688bbaea6c5889f562a42cdc ] Noticed this as I was skimming through, if we fail to allocate memory for cli we'll end up returning without dropping the runtime PM ref we got. Additionally, we'll even return the wrong return code! (ret most likely

[PATCH AUTOSEL 4.18 45/92] parport: sunbpp: fix error return code

2018-09-14 Thread Sasha Levin
From: Julia Lawall [ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ] Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman

[PATCH AUTOSEL 4.18 41/92] drm/nouveau: Fix runtime PM leak in drm_open()

2018-09-14 Thread Sasha Levin
From: Lyude Paul [ Upstream commit 922a8c82fafdec99688bbaea6c5889f562a42cdc ] Noticed this as I was skimming through, if we fail to allocate memory for cli we'll end up returning without dropping the runtime PM ref we got. Additionally, we'll even return the wrong return code! (ret most likely

[PATCH AUTOSEL 4.18 45/92] parport: sunbpp: fix error return code

2018-09-14 Thread Sasha Levin
From: Julia Lawall [ Upstream commit faa1a47388b33623e4d504c23569188907b039a0 ] Return an error code on failure. Change leading spaces to tab on the first if. Problem found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman

[PATCH AUTOSEL 4.18 43/92] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-09-14 Thread Sasha Levin
From: Thierry Reding [ Upstream commit b59fb482b52269977ee5de205308e5b236a03917 ] Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for

[PATCH AUTOSEL 4.18 36/92] tty: fix termios input-speed encoding when using BOTHER

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit 1cee38f0363a88db374e50b232ca17b9a4c12fa0 ] When the termios CIBAUD bits are left unset (i.e. B0), we use the same output and input speed and should leave CIBAUD unchanged. When the user requests a rate using BOTHER and c_ospeed which the driver cannot set

[PATCH AUTOSEL 4.18 43/92] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping

2018-09-14 Thread Sasha Levin
From: Thierry Reding [ Upstream commit b59fb482b52269977ee5de205308e5b236a03917 ] Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for

[PATCH AUTOSEL 4.18 36/92] tty: fix termios input-speed encoding when using BOTHER

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit 1cee38f0363a88db374e50b232ca17b9a4c12fa0 ] When the termios CIBAUD bits are left unset (i.e. B0), we use the same output and input speed and should leave CIBAUD unchanged. When the user requests a rate using BOTHER and c_ospeed which the driver cannot set

[PATCH AUTOSEL 4.18 49/92] coresight: ETM: Add support for Arm Cortex-A73 and Cortex-A35

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 5cedd22370a0a460b663c06de1fc10b4ba3c5d0b ] Add ETM PIDs of the Arm cortex-A CPUs to the white list of ETMs. While at it add a helper macro to make it easier to add the new entries. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by:

[PATCH AUTOSEL 4.18 42/92] drm/nouveau/debugfs: Wake up GPU before doing any reclocking

2018-09-14 Thread Sasha Levin
From: Karol Herbst [ Upstream commit eaeb9010bb4bcdc20e58254fa42f3fe730a7f908 ] Fixes various reclocking related issues on prime systems. Signed-off-by: Karol Herbst Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.18 47/92] coresight: Handle errors in finding input/output ports

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit fe470f5f7f684ed15bc49b6183a64237547910ff ] If we fail to find the input / output port for a LINK component while enabling a path, we should fail gracefully rather than assuming port "0". Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose

[PATCH AUTOSEL 4.18 46/92] sched/fair: Fix util_avg of new tasks for asymmetric systems

2018-09-14 Thread Sasha Levin
From: Quentin Perret [ Upstream commit 8fe5c5a937d0f4e84221631833a2718afde52285 ] When a new task wakes-up for the first time, its initial utilization is set to half of the spare capacity of its CPU. The current implementation of post_init_entity_util_avg() uses SCHED_CAPACITY_SCALE directly as

[PATCH AUTOSEL 4.18 50/92] f2fs: do checkpoint in kill_sb

2018-09-14 Thread Sasha Levin
From: Jaegeuk Kim [ Upstream commit 1cb50f87e10696e8cc61fb62d0d948e11b0e6dc1 ] When unmounting f2fs in force mode, we can get it stuck by io_schedule() by some pending IOs in meta_inode. io_schedule+0xd/0x30 wait_on_page_bit_common+0xc6/0x130 __filemap_fdatawait_range+0xbd/0x100

[PATCH AUTOSEL 4.18 52/92] drm/amd/display: support access ddc for mst branch

2018-09-14 Thread Sasha Levin
From: Eric Yang [ Upstream commit 0a14544661fad1606cc96aece30b2950fd9c4c81 ] [Why] Megachip dockings accesses ddc line through display driver when installing FW. Previously, we would fail every transaction because link attached to mst branch did not have their ddc transaction type set. [How]

[PATCH AUTOSEL 4.18 53/92] ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data()

2018-09-14 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit b8110a87b75f948d978c06e130cc68026645c4a1 ] The main thing is that the data->priv[] array has AFE_PORT_MAX elements so the > condition should be >=. But we may as well check for negative values as well just to be safe. Fixes: 24c4cbcfac09 ("ASoC: qdsp6:

[PATCH AUTOSEL 4.18 37/92] tty: fix termios input-speed encoding

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit fada18c48d774b9e837928ecdce6a5d5fdd11ee7 ] Make sure to clear the CIBAUD bits before OR-ing the new mask when encoding the termios input baud rate. This could otherwise lead to an incorrect input rate being reported back and incidentally set on subsequent

[PATCH AUTOSEL 4.18 49/92] coresight: ETM: Add support for Arm Cortex-A73 and Cortex-A35

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 5cedd22370a0a460b663c06de1fc10b4ba3c5d0b ] Add ETM PIDs of the Arm cortex-A CPUs to the white list of ETMs. While at it add a helper macro to make it easier to add the new entries. Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by:

[PATCH AUTOSEL 4.18 42/92] drm/nouveau/debugfs: Wake up GPU before doing any reclocking

2018-09-14 Thread Sasha Levin
From: Karol Herbst [ Upstream commit eaeb9010bb4bcdc20e58254fa42f3fe730a7f908 ] Fixes various reclocking related issues on prime systems. Signed-off-by: Karol Herbst Signed-off-by: Martin Peres Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.18 47/92] coresight: Handle errors in finding input/output ports

2018-09-14 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit fe470f5f7f684ed15bc49b6183a64237547910ff ] If we fail to find the input / output port for a LINK component while enabling a path, we should fail gracefully rather than assuming port "0". Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose

[PATCH AUTOSEL 4.18 46/92] sched/fair: Fix util_avg of new tasks for asymmetric systems

2018-09-14 Thread Sasha Levin
From: Quentin Perret [ Upstream commit 8fe5c5a937d0f4e84221631833a2718afde52285 ] When a new task wakes-up for the first time, its initial utilization is set to half of the spare capacity of its CPU. The current implementation of post_init_entity_util_avg() uses SCHED_CAPACITY_SCALE directly as

[PATCH AUTOSEL 4.18 50/92] f2fs: do checkpoint in kill_sb

2018-09-14 Thread Sasha Levin
From: Jaegeuk Kim [ Upstream commit 1cb50f87e10696e8cc61fb62d0d948e11b0e6dc1 ] When unmounting f2fs in force mode, we can get it stuck by io_schedule() by some pending IOs in meta_inode. io_schedule+0xd/0x30 wait_on_page_bit_common+0xc6/0x130 __filemap_fdatawait_range+0xbd/0x100

[PATCH AUTOSEL 4.18 52/92] drm/amd/display: support access ddc for mst branch

2018-09-14 Thread Sasha Levin
From: Eric Yang [ Upstream commit 0a14544661fad1606cc96aece30b2950fd9c4c81 ] [Why] Megachip dockings accesses ddc line through display driver when installing FW. Previously, we would fail every transaction because link attached to mst branch did not have their ddc transaction type set. [How]

[PATCH AUTOSEL 4.18 53/92] ASoC: qdsp6: q6afe-dai: fix a range check in of_q6afe_parse_dai_data()

2018-09-14 Thread Sasha Levin
From: Dan Carpenter [ Upstream commit b8110a87b75f948d978c06e130cc68026645c4a1 ] The main thing is that the data->priv[] array has AFE_PORT_MAX elements so the > condition should be >=. But we may as well check for negative values as well just to be safe. Fixes: 24c4cbcfac09 ("ASoC: qdsp6:

[PATCH AUTOSEL 4.18 37/92] tty: fix termios input-speed encoding

2018-09-14 Thread Sasha Levin
From: Johan Hovold [ Upstream commit fada18c48d774b9e837928ecdce6a5d5fdd11ee7 ] Make sure to clear the CIBAUD bits before OR-ing the new mask when encoding the termios input baud rate. This could otherwise lead to an incorrect input rate being reported back and incidentally set on subsequent

[PATCH AUTOSEL 4.18 48/92] coresight: tpiu: Fix disabling timeouts

2018-09-14 Thread Sasha Levin
From: Robin Murphy [ Upstream commit ccff2dfaceaca4517432f5c149594215fe9098cc ] Probing the TPIU driver under UBSan triggers an out-of-bounds shift warning in coresight_timeout(): ... [5.677530] UBSAN: Undefined behaviour in drivers/hwtracing/coresight/coresight.c:929:16 [5.685542]

[PATCH AUTOSEL 4.18 56/92] staging: bcm2835-audio: Don't leak workqueue if open fails

2018-09-14 Thread Sasha Levin
From: Tuomas Tynkkynen [ Upstream commit 678c5b119307c40f9a17152512f9c949d0ec7292 ] Currently, if bcm2835_audio_open() fails partway, the allocated workqueue is leaked. Avoid that. While at it, propagate the return value of bcm2835_audio_open_connection() on failure instead of returning -1.

[PATCH AUTOSEL 4.18 51/92] tools/testing/nvdimm: Fix support for emulating controller temperature

2018-09-14 Thread Sasha Levin
From: Dan Williams [ Upstream commit e5d772fbe7685aae0dff99f3b54158a0ec32155e ] In addition to populating the value the payload also needs to set the "controller temperature valid" flag. Fixes: cdd77d3e1930 ("nfit, libnvdimm: deprecate the generic SMART ioctl") Signed-off-by: Dan Williams

[PATCH AUTOSEL 4.18 55/92] lightnvm: pblk: enable line minor version detection

2018-09-14 Thread Sasha Levin
From: Matias Bjørling [ Upstream commit 99b8dad1b6e52721904220322a947f7b75056303 ] When recovering a line, an extra check was added when debugging was active, such that minor version where also checked. Unfortunately, this used the ifdef NVM_DEBUG, which is not correct. Instead use the proper

  1   2   3   4   5   6   7   8   9   10   >