Re: [PATCH 01/12] bus: ti-sysc: Support 16-bit writes too

2019-05-28 Thread Tony Lindgren
* David Laight [190528 11:06]: > From: Tony Lindgren > > Sent: 27 May 2019 13:14 > > We need to also support 16-bit writes for i2c in addition to the reads > > when we start configuring the sysconfig register for reset and idle modes. > > > > Signed-off-by: Tony Lindgren > > --- > > drivers/bus

Re: [RFC 7/7] mm: madvise support MADV_ANONYMOUS_FILTER and MADV_FILE_FILTER

2019-05-28 Thread Minchan Kim
On Tue, May 28, 2019 at 02:06:14PM +0200, Michal Hocko wrote: > On Tue 28-05-19 20:44:36, Minchan Kim wrote: > > On Tue, May 28, 2019 at 01:28:40PM +0200, Michal Hocko wrote: > > > On Tue 28-05-19 20:12:08, Minchan Kim wrote: > > > > On Tue, May 28, 2019 at 12:41:17PM +0200, Michal Hocko wrote: > >

RE: [PATCH] x86/entry/64: randomize kernel stack offset upon syscall

2019-05-28 Thread Reshetova, Elena
> > With 5 bits there's a ~96.9% chance of crashing the system in an attempt, > > the exploit cannot be used for a range of attacks, including spear > > attacks and fast-spreading worms, right? A crashed and inaccessible > > system also increases the odds of leaving around unfinished attack code >

[PATCH] perf: Fix oops when kthread execs user process

2019-05-28 Thread Young Xiao
When a kthread calls call_usermodehelper() the steps are: 1. allocate current->mm 2. load_elf_binary() 3. populate current->thread.regs While doing this, interrupts are not disabled. If there is a perf interrupt in the middle of this process (i.e. step 1 has completed but not yet reached to

Re: [RFC 7/7] mm: madvise support MADV_ANONYMOUS_FILTER and MADV_FILE_FILTER

2019-05-28 Thread Michal Hocko
On Tue 28-05-19 05:11:16, Daniel Colascione wrote: > On Tue, May 28, 2019 at 4:49 AM Michal Hocko wrote: [...] > > > We have various system calls that provide hints for open files, but > > > the memory operations are distinct. Modeling anonymous memory as a > > > kind of file-backed memory for pur

Re: [PATCH] wlcore: spi: Fix a memory leaking bug in wl1271_probe()

2019-05-28 Thread Kalle Valo
Gen Zhang writes: > On Tue, May 28, 2019 at 11:39:22AM +, Kalle Valo wrote: >> Gen Zhang wrote: >> >> > In wl1271_probe(), 'glue->core' is allocated by platform_device_alloc(), >> > when this allocation fails, ENOMEM is returned. However, 'pdev_data' >> > and 'glue' are allocated by devm_kz

[PATCH net-next] net: ethernet: ti: cpsw: correct .ndo_open error path

2019-05-28 Thread Ivan Khoronzhuk
It's found while review and probably never happens, but real number of queues is set per device, and error path should be per device. Also correct label name for shared error path. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 del

Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-28 Thread Oliver Neukum
Am Donnerstag, den 23.05.2019, 10:01 -0400 schrieb Alan Stern: > On Wed, 22 May 2019, Oliver Neukum wrote: > > > On Mi, 2019-05-22 at 10:56 -0400, Alan Stern wrote: > > > On Wed, 22 May 2019, Oliver Neukum wrote: > > > > > > > I agree with the problem, but I fail to see why this issue would be >

[PATCH] cx231xx-dvb: fix memory leak in dvb_fini()

2019-05-28 Thread Young Xiao
In dvb_init(), dev->dvb is allocated by kzalloc. Therefore, it must be freed being set to NULL. Signed-off-by: Young Xiao <92siuy...@gmail.com> --- drivers/media/usb/cx231xx/cx231xx-dvb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/

Re: [PATCH] rtlwifi: rtl8821ae: Remove set but not used variables 'cur_txokcnt' and 'b_last_is_cur_rdl_state'

2019-05-28 Thread Kalle Valo
YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c: In function > rtl8821ae_dm_check_rssi_monitor: > drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:658:6: warning: variable > cur_txokcnt set but not used [-Wunused-but

Re: [PATCH] rtlwifi: btcoex: remove unused function exhalbtc_stack_operation_notify

2019-05-28 Thread Kalle Valo
YueHaibing wrote: > There is no callers in tree, so can be removed. > > Signed-off-by: YueHaibing Patch applied to wireless-drivers-next.git, thanks. dfbe36197dbc rtlwifi: btcoex: remove unused function exhalbtc_stack_operation_notify -- https://patchwork.kernel.org/patch/10960845/ https:

Re: [PATCH] rtlwifi: btcoex: Remove set but not used variable 'len' and 'asso_type_v2'

2019-05-28 Thread Kalle Valo
YueHaibing wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c: In function > rtl_btc_btmpinfo_notify: > drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.c:319:17: warning: > variable len set but not used [-Wunused-but-set-

Re: [RFC 7/7] mm: madvise support MADV_ANONYMOUS_FILTER and MADV_FILE_FILTER

2019-05-28 Thread Michal Hocko
On Tue 28-05-19 05:18:48, Daniel Colascione wrote: [...] > The important requirement, I think, is that we need to support > managing "memory-naive" uncooperative tasks (perhaps legacy ones > written before cross-process memory management even became possible), > and I think that the cooperative-vs-

Re: [PATCH] wlcore: spi: Fix a memory leaking bug in wl1271_probe()

2019-05-28 Thread Gen Zhang
On Tue, May 28, 2019 at 03:33:09PM +0300, Kalle Valo wrote: > Yeah, I don't see how that thread proves that these patches are correct. > Sure, I didn't mean that we came to an agreement that these patches are correct. > > Further, I e-mailed Greg K-H about when should we use devm_kmalloc(). > > >

Re: [RFC 1/7] mm: introduce MADV_COOL

2019-05-28 Thread Minchan Kim
On Tue, May 28, 2019 at 08:15:23PM +0800, Hillf Danton wrote: < snip > > > > > + > > > > + get_page(page); > > > > + spin_unlock(ptl); > > > > + lock_page(page); > > > > + err = split_huge_page(page); > > > > +

Re: [alsa-devel] [PATCH] ASoC: fsl: sai: Fix clock source for mclk0

2019-05-28 Thread Daniel Baluta
On Sun, Apr 21, 2019 at 11:26 AM Nicolin Chen wrote: > > On Sun, Apr 21, 2019 at 01:04:39AM -0700, Nicolin Chen wrote: > > On Sun, Apr 21, 2019 at 10:26:40AM +0300, Daniel Baluta wrote: > > > > Firstly, according to your commit message, neither imx8qm nor > > > > imx6sx has an "mclk0" clock in the

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-28 Thread Russell King - ARM Linux admin
On Tue, May 28, 2019 at 08:31:29PM +0800, Young Xiao wrote: > When a kthread calls call_usermodehelper() the steps are: > 1. allocate current->mm > 2. load_elf_binary() > 3. populate current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in the

Re: [Question: devm_kfree] When should devm_kfree() be used?

2019-05-28 Thread Greg KH
On Tue, May 28, 2019 at 03:14:00PM +0800, Gen Zhang wrote: > On Tue, May 28, 2019 at 08:49:49AM +0200, Greg KH wrote: > > On Tue, May 28, 2019 at 08:32:57AM +0800, Gen Zhang wrote: > > > devm_kmalloc() is used to allocate memory for a driver dev. Comments > > > above the definition and doc > > > (

Re: [PATCH] libertas: fix spelling mistake "Donwloading" -> "Downloading"

2019-05-28 Thread Kalle Valo
Colin King wrote: > From: Colin Ian King > > There is are two spelling mistakes in lbtf_deb_usb2 messages, fix these. > > Signed-off-by: Colin Ian King > Reviewed-by: Mukesh Ojha Patch applied to wireless-drivers-next.git, thanks. aeffda6b10f8 libertas: fix spelling mistake "Donwloading" -

[PATCH v2] arm64: dts: ls1028a: fix watchdog device node

2019-05-28 Thread Chuanhua Han
ls1028a platform uses sp805 watchdog, and use 1/16 platform clock as timer clock, this patch fix device tree node. Signed-off-by: Chuanhua Han --- Changes in v2: - Replace 'wdt' with 'watchdog' as the node name. - Keep nodes sort in unit-address. .../arm64/boot/dts/freescale/fs

[PATCH] arm64: dts: fsl: imx8mq: enable the svns power key

2019-05-28 Thread Angus Ainslie (Purism)
Add the snvs power key. Signed-off-by: Angus Ainslie (Purism) --- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi index 45d10d8efd14..5f93fd9662ae 100644

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > The 8bit metrics ratio values lose precision when the measurement period > gets longer. > > To avoid this we always reset the metric value when reading, as we > already accumulate the count in the perf count value. > > F

[PATCH 3/3] mm: shrinker: make shrinker not depend on memcg kmem

2019-05-28 Thread Yang Shi
Currently shrinker is just allocated and can work when memcg kmem is enabled. But, THP deferred split shrinker is not slab shrinker, it doesn't make too much sense to have such shrinker depend on memcg kmem. It should be able to reclaim THP even though memcg kmem is disabled. Introduce a new shri

[RFC PATCH 0/3] Make deferred split shrinker memcg aware

2019-05-28 Thread Yang Shi
I got some reports from our internal application team about memcg OOM. Even though the application has been killed by oom killer, there are still a lot THPs reside, page reclaim doesn't reclaim them at all. Some investigation shows they are on deferred split queue, memcg direct reclaim can't shr

[PATCH 1/3] mm: thp: make deferred split shrinker memcg aware

2019-05-28 Thread Yang Shi
Currently THP deferred split shrinker is not memcg aware, this may cause premature OOM with some configuration. For example the below test would run into premature OOM easily: $ cgcreate -g memory:thp $ echo 4G > /sys/fs/cgroup/memory/thp/memory/limit_in_bytes $ cgexec -g memory:thp transhuge-stre

[PATCH 2/3] mm: thp: remove THP destructor

2019-05-28 Thread Yang Shi
The THP destructor is used to delete THP from per node deferred split queue, now the operation is moved out of it, so the destructor is not used anymore, remove it. Cc: Kirill Tkhai Cc: Johannes Weiner Cc: Michal Hocko Cc: "Kirill A . Shutemov" Cc: Hugh Dickins Cc: Shakeel Butt Signed-off-by

[PATCH] vboxguest: check for private_data before trying to close it.

2019-05-28 Thread Young Xiao
vbg_misc_device_close doesn't check that filp->private_data is non-NULL before trying to close_session, where vbg_core_close_session uses pointer session whithout checking, too. That can cause an oops in certain error conditions that can occur on open or lookup before the private_data is set. This

Re: [Question: devm_kfree] When should devm_kfree() be used?

2019-05-28 Thread Gen Zhang
On Tue, May 28, 2019 at 02:41:38PM +0200, Greg KH wrote: > No, you are not leaking any memory if you do not call that function. > Try it and see :) > > The function is there if you just want to "free the memory now!", it's > not necessary if you return an error as when the device is removed the >

Re: [kvmtool PATCH v10 5/5] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-05-28 Thread Amit Daniel Kachhap
Hi Dave, On 5/28/19 3:41 PM, Dave Martin wrote: On Wed, Apr 24, 2019 at 02:41:21PM +0100, Dave Martin wrote: On Wed, Apr 24, 2019 at 12:32:22PM +0530, Amit Daniel Kachhap wrote: Hi, On 4/23/19 9:16 PM, Dave Martin wrote: [...] diff --git a/arm/kvm-cpu.c b/arm/kvm-cpu.c index 7780251..acd1

[PATCH net-next v3 1/1] net: mscc: ocelot: Implement port policers via tc command

2019-05-28 Thread Joergen Andreasen
Hardware offload of matchall classifier and police action are now supported via the tc command. Supported police parameters are: rate and burst. Example: Add: tc qdisc add dev eth3 handle : ingress tc filter add dev eth3 parent : prio 1 handle 2 \ matchall skip_sw

[PATCH net-next v3 0/1] Add hw offload of TC police on MSCC ocelot

2019-05-28 Thread Joergen Andreasen
This patch series enables hardware offload of ingress port policing on the MSCC ocelot board. Changes v2 -> v3: v3 now incorporates the following changes suggested by Jakub Kicinski: - Add a check in ndo_set_features() in order to prevent users to clear the NETIF_F_HW_TC flag while offload i

Re: [PATCH] arm64: dts: fsl: imx8mq: enable the svns power key

2019-05-28 Thread Lucas Stach
Hi Angus, Am Dienstag, den 28.05.2019, 05:44 -0700 schrieb Angus Ainslie (Purism): > Add the snvs power key. > > > Signed-off-by: Angus Ainslie (Purism) > --- >  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 + >  1 file changed, 9 insertions(+) > > diff --git a/arch/arm64/boot/dts/frees

Re: [PATCH 25/44] tools headers UAPI: Sync drm/drm.h with the kernel

2019-05-28 Thread Arnaldo Carvalho de Melo
Em Tue, May 28, 2019 at 09:07:03AM +0100, Lionel Landwerlin escreveu: > On 27/05/2019 23:37, Arnaldo Carvalho de Melo wrote: > >From: Arnaldo Carvalho de Melo > > > >To pick up the changes in these csets: > > > > 060cebb20cdb ("drm: introduce a capability flag for syncobj timeline > > support")

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > + x86_pmu.has_metric = x86_pmu.intel_cap.perf_metrics; It makes sense to duplicate that state because? > @@ -717,6 +729,8 @@ struct x86_pmu { > struct extra_reg *extra_regs; > unsigned int flags;

Re: [PATCH 8/9] KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID

2019-05-28 Thread Cornelia Huck
On Tue, 28 May 2019 13:00:30 +0200 Christian Borntraeger wrote: > Paolo, Radim, > > would you consider this patch (or the full series) as 5.2 material or 5.3 > material? FWIW, I'd consider this patch 5.2 material, as we're currently relaying wrong values to userspace. > > > On 23.05.19 18:4

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > index e9075d57853d..07ecfe75f0e6 100644 > --- a/arch/x86/events/core.c > +++ b/arch/x86/events/core.c > @@ -91,16 +91,20 @@ u64 x86_perf_event_update(struct p

[PATCH v15 0/3] Add support for the Purism Librem5 devkit

2019-05-28 Thread Angus Ainslie (Purism)
The Librem5 devkit is based on the imx8mq from NXP. This is a default devicetree to boot the board to a command prompt. Changes since v14: Add regulator-always-on for the SNVS regulators. Added pgc nodes. Fixed charger pre-current. Changes since v13: Moved haptic motor from pwm-led to gpio-vibr

[PATCH v15 1/3] arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit

2019-05-28 Thread Angus Ainslie (Purism)
This is for the development kit board for the Librem 5. The current level of support yields a working console and is able to boot userspace from the network or eMMC. Additional subsystems that are active : - Both USB ports - SD card socket - WiFi usdhc - WWAN modem - GNSS - GPIO keys - LEDs - gyr

[PATCH v15 2/3] dt-bindings: Add an entry for Purism SPC

2019-05-28 Thread Angus Ainslie (Purism)
Add an entry for Purism, SPC Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/binding

[PATCH v15 3/3] dt-bindings: arm: fsl: Add the imx8mq boards

2019-05-28 Thread Angus Ainslie (Purism)
Add an entry for imx8mq based boards Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/arm/fsl.yaml | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/a

Re: [PATCH 01/16 v3] function_graph: Convert ret_stack to a series of longs

2019-05-28 Thread Steven Rostedt
On Tue, 28 May 2019 05:50:43 -0400 Joel Fernandes wrote: > On Fri, May 24, 2019 at 11:16:34PM -0400, Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > > > In order to make it possible to have multiple callbacks registered with the > > function_graph tracer, the retstack needs to be

Re: [linux-sunxi] [RESEND PATCH] ARM: dts: sun7i: olimex-lime2: Enable ac and power supplies

2019-05-28 Thread Paul Kocialkowski
Hi, On Tue, 2019-05-28 at 09:35 +0300, Priit Laes wrote: > Lime2 has battery connector so enable these supplies. Out of curiosity, what is reported to userspace when no battery is attached? Looks good otherwise: Reviewed-by: Paul Kocialkowski Cheers, Paul > Signed-off-by: Priit Laes > --- >

Re: [PATCH] arm64: dts: fsl: imx8mq: enable the svns power key

2019-05-28 Thread Angus Ainslie
Hi Lucas, On 2019-05-28 05:51, Lucas Stach wrote: Hi Angus, Am Dienstag, den 28.05.2019, 05:44 -0700 schrieb Angus Ainslie (Purism): Add the snvs power key. > Signed-off-by: Angus Ainslie (Purism) ---  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 9 +  1 file changed, 9 insertions(+)

Re: [PATCH] rtlwifi: Fix null-pointer dereferences in error handling code of rtl_pci_probe()

2019-05-28 Thread Larry Finger
On 5/28/19 6:55 AM, Kalle Valo wrote: Jia-Ju Bai wrote: *BUG 1: In rtl_pci_probe(), when rtlpriv->cfg->ops->init_sw_vars() fails, rtl_deinit_core() in the error handling code is executed. rtl_deinit_core() calls rtl_free_entries_from_scan_list(), which uses rtlpriv->scan_list.list in list_for_

Re: [PATCH] virtio_console: remove vq buf while unpluging port

2019-05-28 Thread Amit Shah
On Fri, 2019-05-24 at 20:51 +0200, Greg KH wrote: > On Sun, Apr 28, 2019 at 09:50:04AM +0800, zhenwei pi wrote: > > A bug can be easily reproduced: > > Host# cat guest-agent.xml > > > > > >> state="connected"/> > > > > Host# virsh attach-device instance guest-agent.xml > > Host# virsh deta

Re: [PATCH v2 0/3] ARM: sun8i: a83t: Support Camera Sensor Interface controller

2019-05-28 Thread Chen-Yu Tsai
On Mon, May 20, 2019 at 11:10 PM Ondřej Jirman wrote: > > On Mon, May 20, 2019 at 05:06:34PM +0200, verejna wrote: > > From: Ondrej Jirman > > > > This is a re-send of Chen-Yu's A83T CSI patch series with review tags > > applied and removed address/size cells from csi_in port. Already applied > >

Re: [PATCH 05/44] perf data: Fix 'strncat may truncate' build failure with recent gcc

2019-05-28 Thread Arnaldo Carvalho de Melo
Em Mon, May 27, 2019 at 05:46:26PM -0500, Shawn Landden escreveu: > On Mon, May 27, 2019 at 5:38 PM Arnaldo Carvalho de Melo > wrote: > > > > From: Shawn Landden > > > > This strncat() is safe because the buffer was allocated with zalloc(), > > however gcc doesn't know that. Since the string alwa

Re: [RESEND PATCH] PM / devfreq: Fix static checker warning in try_then_request_governor

2019-05-28 Thread Greg KH
On Tue, May 28, 2019 at 10:15:59AM +0900, Chanwoo Choi wrote: > Cc: sta...@vger.kernel.org > > Dear all, > > It missed to send this patch to 'sta...@vger.kernel.org'. > So, I add it to mailing list. This is not the correct way to submit patches for inclusion in the stable kernel tree. Please

Re: [PATCH] rtlwifi: Fix null-pointer dereferences in error handling code of rtl_pci_probe()

2019-05-28 Thread Kalle Valo
Larry Finger writes: > On 5/28/19 6:55 AM, Kalle Valo wrote: >> Jia-Ju Bai wrote: >> >>> *BUG 1: >>> In rtl_pci_probe(), when rtlpriv->cfg->ops->init_sw_vars() fails, >>> rtl_deinit_core() in the error handling code is executed. >>> rtl_deinit_core() calls rtl_free_entries_from_scan_list(), whic

Re: [PATCH v2] mmc: dw_mmc: Disable SDIO interrupts while suspended to fix suspend/resume

2019-05-28 Thread Ulf Hansson
On Mon, 20 May 2019 at 20:41, Doug Anderson wrote: > > Hi, > > On Mon, Apr 29, 2019 at 1:41 PM Douglas Anderson > wrote: > > > > Processing SDIO interrupts while dw_mmc is suspended (or partly > > suspended) seems like a bad idea. We really don't want to be > > processing them until we've gotte

Re: linusw/for-next boot bisection: v5.2-rc1-8-g73a790c68d7e on rk3288-veyron-jaq

2019-05-28 Thread Mark Brown
On Tue, May 28, 2019 at 10:45:13AM +0200, Linus Walleij wrote: > On Tue, May 28, 2019 at 10:36 AM Guillaume Tucker > > Not really, so I've disabled bisections in the linux-gpio tree > > and a few other maintainers' trees for now. I'll see if we can > > come up with a more systematic way of suppre

[PATCH] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT

2019-05-28 Thread Rasmus Villemoes
Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends up in bits 47:32 of the return value, instead of bits 31:16 as they should. Signed-off-by: Rasmus Villemoes --- I also noticed that it's a bit inconsistent that we return U64_MAX if there's a read error in STATS_TYPE_PORT, while

Re: [PATCH] drbd: fix discard_zeroes_if_aligned regression

2019-05-28 Thread Lars Ellenberg
On Fri, May 10, 2019 at 05:36:32PM +, Eric Wheeler wrote: > Hi Lars, > > We just tried 4.19.x and this bugs still exists. We applied the patch > which was originally submitted to this thread and it still applies cleanly > and seems to work for our use case. You mentioned that you had some ol

Re: [PATCH] vboxguest: check for private_data before trying to close it.

2019-05-28 Thread Hans de Goede
Hi, On 28-05-19 14:47, Young Xiao wrote: vbg_misc_device_close doesn't check that filp->private_data is non-NULL before trying to close_session, where vbg_core_close_session uses pointer session whithout checking, too. That can cause an oops in certain error conditions that can occur on open or

[PATCH 0/3] Add mclk0 clock source for SAI

2019-05-28 Thread Daniel Baluta
This patch series brings together patches [1] and [2] which introduce mclk0 clock source via DT. mclk0..3 are the four clock sources options of SAI's clock MUX. mclk0 option selects: - Bus Clock on i.MX8 - MCLK1 on i.MX6/7 Finally we also update the DT binding information for SAI clocks. In

[PATCH 1/3] ARM: dts: imx: Add mclk0 clock for SAI

2019-05-28 Thread Daniel Baluta
From: Shengjiu Wang Audio MCLK source option is selected with a 4:1 MUX controller using MCLK Select bits in SAI xCR2 register. On imx6/7 mclk0 and mclk1 always point to the same clock source. Anyhow, this is no longer true for imx8. For this reason, we need to add mclk0 and handle it in a gene

[PATCH 3/3] ASoC: fsl_sai: Read SAI clock source 0 from DT

2019-05-28 Thread Daniel Baluta
SAI provide multiple master clock source options selectable via bit MSEL of TCR2/RCR2. All possible master clock sources are stored in sai->mclk_clk array. Current implementation assumes that MCLK0 source is always busclk, but this is wrong! For example, on i.MX8QM we have: 00b - Bus Clock selec

[PATCH 2/3] dt-bindings: sound: Clarify the usage of clocks in SAI

2019-05-28 Thread Daniel Baluta
SAI might have up to 4 clock sources selected by an internal CLK mux. On imx6/7 mclk0/mclk1 are the same, while on imx8 mclk0 and mclk1 are coming from different sources. Signed-off-by: Daniel Baluta --- Documentation/devicetree/bindings/sound/fsl-sai.txt | 5 +++-- 1 file changed, 3 insertions

Re: [bugreport] kernel 5.2 pblk bad header/extent: invalid extent entries

2019-05-28 Thread Theodore Ts'o
On Tue, May 28, 2019 at 10:58:03AM +0500, Mikhail Gavrilov wrote: > On Mon, 27 May 2019 at 21:16, Mikhail Gavrilov > wrote: > > > > I am bisected issue. I hope it help understand what is happened on my > > computer. > > > > Why no one answers? > Even if the problem is known and already fixed, I

Re: [PATCH] watchdog: gpio: add support for nowayout option

2019-05-28 Thread Guenter Roeck
On 5/28/19 2:09 AM, Mans Rullgard wrote: Add support for the nowayout option in the gpio watchdog driver. Signed-off-by: Mans Rullgard Reviewed-by: Guenter Roeck --- drivers/watchdog/gpio_wdt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/watchdog/gpio_wdt.c b/driv

Re: Issue: regmap: use debugfs even when no device

2019-05-28 Thread Mark Brown
On Tue, May 28, 2019 at 02:20:15AM +, Andy Duan wrote: > So on i.MX8MM/8QM/8QXP platforms, we catch the issue that user dump regmap > registers without > power cause system hang. > Maybe revert the patch is more reasonable ? This is an issue with or without a device - you can have the same i

Re: [PATCH v2 3/3] regulator: lp87565: Add 4-phase lp87561 regulator support

2019-05-28 Thread Mark Brown
On Tue, May 28, 2019 at 03:23:41PM +0530, Keerthy wrote: > On 22/05/19 9:05 PM, Mark Brown wrote: > > On Thu, May 16, 2019 at 10:02:18AM +0530, Keerthy wrote: > > Acked-by: Mark Brown > This patch will come via the mfd branch? I'd expect so, IIRC it had a build dependency on the earlier patches

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > +static u64 icl_metric_update_event(struct perf_event *event, u64 val) > +{ > + struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); > + struct hw_perf_event *hwc = &event->hw; > + u64 newval, metric, slo

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 28, 2019 at 02:56:15PM +0200, Peter Zijlstra wrote: > On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > > index e9075d57853d..07ecfe75f0e6 100644 > > --- a/arch/x86/events/core.c > > +++ b/arc

Re: [PATCH V2 1/3] perf/x86: Disable non generic regs for software/probe events

2019-05-28 Thread Liang, Kan
On 5/28/2019 4:56 AM, Peter Zijlstra wrote: On Mon, May 27, 2019 at 12:07:55PM -0700, kan.li...@linux.intel.com wrote: diff --git a/arch/x86/include/uapi/asm/perf_regs.h b/arch/x86/include/uapi/asm/perf_regs.h index ac67bbe..3a96971 100644 --- a/arch/x86/include/uapi/asm/perf_regs.h +++ b/ar

[PATCH -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO

2019-05-28 Thread YueHaibing
Fix gcc build error while CONFIG_REGMAP_MMIO is not set drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function `controller_probe': arcx-anybus.c:(.text+0x9d6): undefined reference to `__devm_regmap_init_mmio_clk' Select REGMAP_MMIO to fix it. Reported-by: Hulk Robot Fixes: 2411a336c8ce ("

Re: [RFC PATCH] soc: imx: Try harder to get imq8mq SoC revisions

2019-05-28 Thread Leonard Crestez
On 22.05.2019 16:40, Lucas Stach wrote: > Am Mittwoch, den 22.05.2019, 13:30 + schrieb Leonard Crestez: >> On 22.05.2019 16:13, Guido Günther wrote: >>> Subject: Re: [RFC PATCH] soc: imx: Try harder to get imq8mq SoC revisions >>> On Wed, May 08, 2019 at 02:40:18PM +0200, Guido Günther wrote:

Re: [PATCH] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi

2019-05-28 Thread Hans de Goede
Hi, On 24-05-19 18:43, Andy Shevchenko wrote: On Tue, May 21, 2019 at 9:28 AM Hans de Goede wrote: Commit 78f3ac76d9e5 ("platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey") causes the backlight to be permanently off on various EeePC laptop models using the eeepc-wm

Re: [PATCH] x86/entry/64: randomize kernel stack offset upon syscall

2019-05-28 Thread Theodore Ts'o
I confess I've kind of lost the plot on the performance requirements at this point. Instead of measuring and evaluating potential solutions, can we try to approach this from the opposite direction and ask what the requirements are? What's the maximum number of CPU cycles that we are allowed to bu

Re: [kvmtool PATCH v10 5/5] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-05-28 Thread Dave Martin
On Tue, May 28, 2019 at 06:18:16PM +0530, Amit Daniel Kachhap wrote: > Hi Dave, [...] > >Were you planning to repost this? > > > >Alternatively, I can fix up the diagnostic messages discussed here and > >post it together with the SVE support. I'll do that locally for now, > >but let me know what

[PATCH -next] usb: host: ohci-st: Remove set but not used variable 'ohci'

2019-05-28 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ohci-st.c: In function st_ohci_platform_probe: drivers/usb/host/ohci-st.c:135:19: warning: variable ohci set but not used [-Wunused-but-set-variable] It's never used, so can be removed. Signed-off-by: YueHaibing --- drivers/usb/h

Re: [PATCH] intel-svm: fix typos in code comments

2019-05-28 Thread Joerg Roedel
On Mon, May 20, 2019 at 01:09:48PM +0800, Weitao Hou wrote: > fix acccess to access > > Signed-off-by: Weitao Hou > --- > include/linux/intel-svm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks.

Re: [PATCH -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO

2019-05-28 Thread Sven Van Asbroeck
Hello YueHaibing, On Tue, May 28, 2019 at 9:33 AM YueHaibing wrote: > > Fix gcc build error while CONFIG_REGMAP_MMIO is not set > > drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function > `controller_probe': > arcx-anybus.c:(.text+0x9d6): undefined reference to > `__devm_regmap_init_mmio_

[PATCH resend] tools/perf/util/machine: Return NULL instead of null-terminating

2019-05-28 Thread Donald Yandt
Return NULL instead of null-terminating version char array when fgets fails due to end-of-file or error. Signed-off-by: Donald Yandt --- tools/perf/util/machine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index

Re: [RFC] printk/sysrq: Don't play with console_loglevel

2019-05-28 Thread Petr Mladek
On Tue 2019-05-28 13:46:19, Sergey Senozhatsky wrote: > On (05/28/19 13:15), Sergey Senozhatsky wrote: > > On (05/28/19 01:24), Dmitry Safonov wrote: > > [..] > > > While handling sysrq the console_loglevel is bumped to default to print > > > sysrq headers. It's done to print sysrq messages with WA

[PATCH -next] usb: ohci-s3c2410: Remove set but not used variable 'hcd'

2019-05-28 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ohci-s3c2410.c: In function s3c2410_hcd_oc: drivers/usb/host/ohci-s3c2410.c:296:18: warning: variable hcd set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing --- drivers/usb

Re: [linux-sunxi] [RESEND PATCH] ARM: dts: sun7i: olimex-lime2: Enable ac and power supplies

2019-05-28 Thread Priit Laes
On Tue, May 28, 2019 at 02:58:57PM +0200, Paul Kocialkowski wrote: > Hi, > > On Tue, 2019-05-28 at 09:35 +0300, Priit Laes wrote: > > Lime2 has battery connector so enable these supplies. > > Out of curiosity, what is reported to userspace when no battery is > attached? Data from /sys/class/powe

[PATCH] Bluetooth: hci_bcsp: Fix memory leak in rx_skb

2019-05-28 Thread Tomas Bortoli
Syzkaller found that it is possible to provoke a memory leak by never freeing rx_skb in struct bcsp_struct. Fix by freeing in bcsp_close() Signed-off-by: Tomas Bortoli Reported-by: syzbot+98162c885993b72f1...@syzkaller.appspotmail.com --- drivers/bluetooth/hci_bcsp.c | 4 1 file changed, 4

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > @@ -3287,6 +3304,13 @@ static int core_pmu_hw_config(struct perf_event *event) > return intel_pmu_bts_config(event); > } > > +#define EVENT_CODE(e)(e->attr.config & INTEL_ARCH_EVENT_MASK) > +#define is_slo

Re: [PATCH] net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT

2019-05-28 Thread Andrew Lunn
On Tue, May 28, 2019 at 01:17:10PM +, Rasmus Villemoes wrote: > Currently, the upper half of a 4-byte STATS_TYPE_PORT statistic ends > up in bits 47:32 of the return value, instead of bits 31:16 as they > should. > > Signed-off-by: Rasmus Villemoes Hi Rasmus Please include a Fixes tag, to i

[PATCH -next] usb: host: ehci-st: Remove set but not used variable 'ehci'

2019-05-28 Thread YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/usb/host/ehci-st.c: In function st_ehci_platform_probe: drivers/usb/host/ehci-st.c:155:19: warning: variable ehci set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing --- drivers/usb/

[PATCH v3.1 4/4] arm64: mm: Implement pte_devmap support

2019-05-28 Thread Robin Murphy
In order for things like get_user_pages() to work on ZONE_DEVICE memory, we need a software PTE bit to identify device-backed PFNs. Hook this up along with the relevant helpers to join in with ARCH_HAS_PTE_DEVMAP. Signed-off-by: Robin Murphy --- Fix to build correctly under all combinations of C

[PATCH] trace: Avoid memory leak in predicate_parse()

2019-05-28 Thread Tomas Bortoli
In case of errors, predicate_parse() goes to the out_free label to free memory and to return an error code. However, predicate_parse() does not free the predicates of the temporary prog_stack array, thence leaking them. Signed-off-by: Tomas Bortoli Reported-by: syzbot+6b8e0fb820e570c59...@syzka

Re: [PATCH 4/9] perf/x86/intel: Support hardware TopDown metrics

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:50PM -0700, kan.li...@linux.intel.com wrote: > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h > index b980b9e95d2a..0d7081434d1d 100644 > --- a/include/linux/perf_event.h > +++ b/include/linux/perf_event.h > @@ -133,6 +133,11 @@ struct hw_perf_eve

Re: Re: [PATCH 8/9] KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID

2019-05-28 Thread Christian Borntraeger
On 28.05.19 14:53, Cornelia Huck wrote: > On Tue, 28 May 2019 13:00:30 +0200 > Christian Borntraeger wrote: > >> Paolo, Radim, >> >> would you consider this patch (or the full series) as 5.2 material or 5.3 >> material? > > FWIW, I'd consider this patch 5.2 material, as we're currently relay

Re: [RFC] printk/sysrq: Don't play with console_loglevel

2019-05-28 Thread Petr Mladek
On Tue 2019-05-28 19:15:43, Tetsuo Handa wrote: > On 2019/05/28 17:51, Sergey Senozhatsky wrote: > >> You are trying to omit passing KERN_UNSUPPRESSED by utilizing implicit > >> printk > >> context information. But doesn't such attempt resemble > >> find_printk_buffer() ? > > > > Adding KERN_UNS

Re: [PATCH 5/9] perf/x86/intel: Set correct weight for TopDown metrics events

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:51PM -0700, kan.li...@linux.intel.com wrote: > From: Andi Kleen > > The topdown metrics and slots events are mapped to a fixed counter, > but should have the normal weight for the scheduler. You forgot the 'why/because' part of that sentence. > So special case this

Re: [PATCH 7/9] perf/x86/intel: Disable sampling read slots and topdown

2019-05-28 Thread Peter Zijlstra
On Tue, May 21, 2019 at 02:40:53PM -0700, kan.li...@linux.intel.com wrote: > From: Kan Liang > > To get correct PERF_METRICS value, the fixed counter 3 must start from > 0. It would bring problems when sampling read slots and topdown events. > For example, > perf record -e '{slots, topdow

Re: [PATCH net-next] xprtrdma: Use struct_size() in kzalloc()

2019-05-28 Thread Schumaker, Anna
On Thu, 2019-05-23 at 18:43 -0500, Gustavo A. R. Silva wrote: > > On 5/23/19 6:32 PM, David Miller wrote: > > From: "Gustavo A. R. Silva" > > Date: Thu, 23 May 2019 17:36:00 -0500 > > > > > Hi Dave, > > > > > > I wonder if you can take this patch. > > > > The sunrpc/nfs maintainer should take

Re: [PATCH] mlx5: avoid 64-bit division

2019-05-28 Thread Leon Romanovsky
On Mon, May 20, 2019 at 02:28:35PM +0300, Leon Romanovsky wrote: > On Mon, May 20, 2019 at 01:19:02PM +0200, Michal Kubecek wrote: > > Commit 25c13324d03d ("IB/mlx5: Add steering SW ICM device memory type") > > breaks i386 build by introducing three 64-bit divisions. As the divisor > > is MLX5_SW_I

Re: [PATCH] perf: Fix oops when kthread execs user process

2019-05-28 Thread Peter Zijlstra
On Tue, May 28, 2019 at 08:31:29PM +0800, Young Xiao wrote: > When a kthread calls call_usermodehelper() the steps are: > 1. allocate current->mm > 2. load_elf_binary() > 3. populate current->thread.regs > > While doing this, interrupts are not disabled. If there is a perf > interrupt in the

Re: [PATCH V2 1/3] perf/x86: Disable non generic regs for software/probe events

2019-05-28 Thread Peter Zijlstra
On Tue, May 28, 2019 at 09:33:40AM -0400, Liang, Kan wrote: > Uncore PMU doesn't support sampling. It will return -EINVAL. > There is no regs support for counting. The request will be ignored. > > I think current check for uncore is good enough. breakpoints then.. There's also no guarantee you co

Re: [PATCH V3 2/4] arm64/mm: Hold memory hotplug lock while walking for kernel page table dump

2019-05-28 Thread Mark Rutland
On Mon, May 27, 2019 at 09:20:01AM +0200, Michal Hocko wrote: > On Wed 22-05-19 17:42:13, Mark Rutland wrote: > > On Thu, May 16, 2019 at 01:05:29PM +0200, Michal Hocko wrote: > > > On Thu 16-05-19 11:23:54, Mark Rutland wrote: > > > > On Wed, May 15, 2019 at 06:58:47PM +0200, Michal Hocko wrote: >

Re: [PATCH -next] staging: fieldbus: Fix build error without CONFIG_REGMAP_MMIO

2019-05-28 Thread YueHaibing
On 2019/5/28 21:41, Sven Van Asbroeck wrote: > Hello YueHaibing, > > On Tue, May 28, 2019 at 9:33 AM YueHaibing wrote: >> >> Fix gcc build error while CONFIG_REGMAP_MMIO is not set >> >> drivers/staging/fieldbus/anybuss/arcx-anybus.o: In function >> `controller_probe': >> arcx-anybus.c:(.text+0x

Re: [PATCH V2 1/3] perf/x86: Disable non generic regs for software/probe events

2019-05-28 Thread Vince Weaver
On Tue, 28 May 2019, Peter Zijlstra wrote: > On Tue, May 28, 2019 at 09:33:40AM -0400, Liang, Kan wrote: > > Uncore PMU doesn't support sampling. It will return -EINVAL. > > There is no regs support for counting. The request will be ignored. > > > > I think current check for uncore is good enough

Re: [PATCH 1/2] fork: add clone6

2019-05-28 Thread Andy Lutomirski
On Tue, May 28, 2019 at 3:08 AM Christian Brauner wrote: > > On Mon, May 27, 2019 at 12:27:08PM -0700, Linus Torvalds wrote: > > On Mon, May 27, 2019 at 3:42 AM Christian Brauner > > wrote: > > > > > > Hm, still pondering whether having one unsigned int argument passed > > > through registers th

Re: [PATCH] network: wireless: p54u: Fix race between disconnect and firmware loading

2019-05-28 Thread Alan Stern
On Tue, 28 May 2019, Kalle Valo wrote: > The correct prefix is "p54:", but I can fix that during commit. Oh, okay, thanks. > > Index: usb-devel/drivers/net/wireless/intersil/p54/p54usb.c > > === > > --- usb-devel.orig/drivers/net/wi

Re: [RFC] printk/sysrq: Don't play with console_loglevel

2019-05-28 Thread Tetsuo Handa
On 2019/05/28 22:42, Petr Mladek wrote: >> Ahh.. OK, now I sort of remember why I gave up on this idea (see [1] >> at the bottom, when it comes to uv_nmi_dump_state()) - printk_NMI and >> printk-safe redirections. >> >> NMI >> loglevel = NEW >> printk -> printk_safe_n

Re: [RFC PATCH] usb: host: xhci: allow __GFP_FS in dma allocation

2019-05-28 Thread Alan Stern
On Tue, 28 May 2019, Oliver Neukum wrote: > Am Donnerstag, den 23.05.2019, 10:01 -0400 schrieb Alan Stern: > > On Wed, 22 May 2019, Oliver Neukum wrote: > > > > > On Mi, 2019-05-22 at 10:56 -0400, Alan Stern wrote: > > > > On Wed, 22 May 2019, Oliver Neukum wrote: > > > > > > > > > I agree with

[PATCH 1/5] lightnvm: Fix uninitialized pointer in nvm_remove_tgt()

2019-05-28 Thread Geert Uytterhoeven
With gcc 4.1: drivers/lightnvm/core.c: In function ‘nvm_remove_tgt’: drivers/lightnvm/core.c:510: warning: ‘t’ is used uninitialized in this function Indeed, if no NVM devices have been registered, t will be an uninitialized pointer, and may be dereferenced later. A call to nvm_remove_t

<    1   2   3   4   5   6   7   8   9   10   >