[PATCH] memstick: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case alloc_ordered_workqueue fails, the fix returns ENOMEM to avoid potential NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/memstick/core/ms_block.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/memstick/core/ms_block.c b/drivers/memstick/core/ms_block.c

Re: [PATCH v4 07/15] perf tools report: Use less for scripts output

2019-03-08 Thread Feng Tang
On Fri, Mar 08, 2019 at 10:47:54AM -0300, Arnaldo Carvalho de Melo wrote: > Em Tue, Mar 05, 2019 at 06:47:50AM -0800, Andi Kleen escreveu: > > From: Andi Kleen > > > > The UI viewer for scripts output has a lot of limitations: limited size, > > no search or save function, slow, and various other

[PATCH] media: usbvision: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case usb_alloc_coherent fails, the fix returns -ENOMEM to avoid a potential NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/media/usb/usbvision/usbvision-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/usb/usbvision/usbvision-core.c

general protection fault in ipv6_rcv

2019-03-08 Thread syzbot
Hello, syzbot found the following crash on: HEAD commit:d9862cfb Merge tag 'mips_5.1' of git://git.kernel.org/pub/.. git tree: net-next console output: https://syzkaller.appspot.com/x/log.txt?x=15d1e5ad20 kernel config: https://syzkaller.appspot.com/x/.config?x=73d88a42238825ad

Re: [PATCH 5.0 00/46] 5.0.1-stable review

2019-03-08 Thread Greg Kroah-Hartman
On Sat, Mar 09, 2019 at 12:40:51PM +0530, Naresh Kamboju wrote: > On Fri, 8 Mar 2019 at 18:23, Greg Kroah-Hartman > wrote: > > > > This is the start of the stable review cycle for the 5.0.1 release. > > There are 46 patches in this series, all will be posted as a response > > to this one. If

Re: [PATCH v5] Drivers: hv: vmbus: Expose monitor data only when monitor pages are used

2019-03-08 Thread Greg KH
On Fri, Mar 08, 2019 at 05:46:11PM -0500, Kimberly Brown wrote: > static struct kobj_type vmbus_chan_ktype = { > .sysfs_ops = _chan_sysfs_ops, > .release = vmbus_chan_release, > - .default_attrs = vmbus_chan_attrs, As discussed on IRC, a kobj_type needs to get an attribute group

[PATCH] media: video-mux: fix null pointer dereferences

2019-03-08 Thread Kangjie Lu
devm_kcalloc may fail and return a null pointer. The fix returns -ENOMEM upon failures to avoid null pointer dereferences. Signed-off-by: Kangjie Lu --- drivers/media/platform/video-mux.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/video-mux.c

RE: [PATCH] virtio_pci: fix a NULL pointer reference in vp_del_vqs

2019-03-08 Thread Gonglei (Arei)
> -Original Message- > From: longpeng > Sent: Saturday, March 09, 2019 3:18 PM > To: m...@redhat.com; jasow...@redhat.com > Cc: virtualizat...@lists.linux-foundation.org; linux-kernel@vger.kernel.org; > longpeng ; Gonglei (Arei) > > Subject: [PATCH] virtio_pci: fix a NULL pointer

Re: [PATCH] net: stmmac: Avoid one more sometimes uninitialized Clang warning

2019-03-08 Thread David Miller
From: Nathan Chancellor Date: Thu, 7 Mar 2019 21:02:39 -0700 > When building with -Wsometimes-uninitialized, Clang warns: > > drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c:111:2: error: variable > 'ns' is used uninitialized whenever 'if' condition is false >

[PATCH] virtio_pci: fix a NULL pointer reference in vp_del_vqs

2019-03-08 Thread Longpeng(Mike)
From: Longpeng If the msix_affinity_masks is alloced failed, then we'll try to free some resources in vp_free_vectors() that may access it directly. We met the following stack in our production: [ 29.296767] BUG: unable to handle kernel NULL pointer dereference at (null) [ 29.311151] IP:

Re: [PATCH v4 1/2] Provide in-kernel headers for making it easy to extend the kernel

2019-03-08 Thread Greg KH
On Fri, Mar 08, 2019 at 06:59:23PM +0100, Geert Uytterhoeven wrote: > Hi Greg, > > On Fri, Mar 8, 2019 at 6:05 PM Greg KH wrote: > > On Fri, Mar 08, 2019 at 05:42:32AM -0800, Joel Fernandes wrote: > > > On Fri, Mar 8, 2019, 3:53 AM Geert Uytterhoeven > > > wrote: > > > > > It is just so much

[PATCH] media: renesas-ceu: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case of_match_device cannot find a match, the check returns -EINVAL to avoid a potential NULL pointer dereference Signed-off-by: Kangjie Lu --- drivers/media/platform/renesas-ceu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/renesas-ceu.c

Re: [PATCH 5.0 00/46] 5.0.1-stable review

2019-03-08 Thread Naresh Kamboju
On Fri, 8 Mar 2019 at 18:23, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.0.1 release. > There are 46 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > >

[PATCH] media: rcar-vin: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case of_match_node cannot find a match, the fix returns -EINVAL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/media/platform/rcar-vin/rcar-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c

[PATCH] media: vpss: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/media/platform/davinci/vpss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/davinci/vpss.c b/drivers/media/platform/davinci/vpss.c index

Re: [PATCH 5.0 00/46] 5.0.1-stable review

2019-03-08 Thread Greg Kroah-Hartman
On Fri, Mar 08, 2019 at 01:58:36PM -0700, shuah wrote: > On 3/8/19 5:49 AM, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 5.0.1 release. > > There are 46 patches in this series, all will be posted as a response > > to this one. If anyone has any issues with

Re: [PATCH 4.20 00/76] 4.20.15-stable review

2019-03-08 Thread Naresh Kamboju
On Fri, 8 Mar 2019 at 18:25, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.20.15 release. > There are 76 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > >

Re: [PATCH 4.19 00/68] 4.19.28-stable review

2019-03-08 Thread Naresh Kamboju
On Fri, 8 Mar 2019 at 18:29, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 4.19.28 release. > There are 68 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > >

[PATCH] media: rga: fix NULL pointer dereferences

2019-03-08 Thread Kangjie Lu
In case __get_free_pages fails, return -ENOMEM to avoid NULL pointer dereferences. Signed-off-by: Kangjie Lu --- drivers/media/platform/rockchip/rga/rga.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/rockchip/rga/rga.c

[PATCH] media: stv090x: add missed checks for STV090x_WRITE_DEMOD

2019-03-08 Thread Kangjie Lu
Conservatively check return value of STV090x_WRITE_DEMOD in case it fails. Signed-off-by: Kangjie Lu --- drivers/media/dvb-frontends/stv090x.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/media/dvb-frontends/stv090x.c

[PATCH] leds: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case of_match_device cannot find a match, the fixes returns -EINVAL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/leds/leds-pca9532.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/leds/leds-pca9532.c

[PATCH v5 06/15] perf tools report: Support time sort key

2019-03-08 Thread Andi Kleen
From: Andi Kleen Add a time sort key to perf report to display samples for different time quantums separately. This allows easier analysis of workloads that change over time, and also will allow looking at the context of samples. % perf record ... % perf report --sort time,overhead,symbol

[PATCH v5 11/15] perf tools report: Implement browsing of individual samples

2019-03-08 Thread Andi Kleen
From: Andi Kleen Now report can show whole time periods with perf script, but the user still has to find individual samples of interest manually. It would be expensive and complicated to search for the right samples in the whole perf file. Typically users only need to look at a small number of

[PATCH v5 02/15] perf tools script: Support insn output for normal samples

2019-03-08 Thread Andi Kleen
From: Andi Kleen perf script -F +insn was only working for PT traces because the PT instruction decoder was filling in the insn/insn_len sample attributes. Support it for non PT samples too on x86 using the existing x86 instruction decoder. This adds some extra checking to ensure that we don't

[PATCH v5 10/15] perf tools: Add utility function to print ns time stamps

2019-03-08 Thread Andi Kleen
From: Andi Kleen Add a utility function to print nanosecond timestamps. Signed-off-by: Andi Kleen --- tools/perf/util/time-utils.c | 8 tools/perf/util/time-utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/tools/perf/util/time-utils.c b/tools/perf/util/time-utils.c index

[PATCH v5 05/15] perf tools report: Parse time quantum

2019-03-08 Thread Andi Kleen
From: Andi Kleen Many workloads change over time. perf report currently aggregates the whole time range reported in perf.data. This patch adds an option for a time quantum to quantisize the perf.data over time. This just adds the option, will be used in follow on patches for a time sort key.

[PATCH v5 08/15] perf tools report: Support running scripts for current time range

2019-03-08 Thread Andi Kleen
From: Andi Kleen When using the time sort key, add new context menus to run scripts for only the currently selected time range. Compute the correct range for the selection add pass it as the --time option to perf script. Signed-off-by: Andi Kleen --- v2: Use symbol_conf.time_quantum v3: Work

[PATCH v5 03/15] perf tools script: Filter COMM/FORK/.. events by CPU

2019-03-08 Thread Andi Kleen
From: Andi Kleen The --cpu option only filtered samples. Filter other perf events, such as COMM, FORK, SWITCH by the CPU too. Reported-by: Jiri Olsa Signed-off-by: Andi Kleen --- v2: Only filter printf output --- tools/perf/builtin-script.c | 62 +++-- 1 file

[PATCH v5 04/15] perf tools report: Support nano seconds

2019-03-08 Thread Andi Kleen
From: Andi Kleen Upcoming changes add timestamp output in perf report. Add a --ns argument similar to perf script to support nanoseconds resolution when needed. Signed-off-by: Andi Kleen --- v2: Move flag into symbol_conf and change all users --- tools/perf/Documentation/perf-report.txt | 3

[PATCH v5 12/15] perf tools: Add some new tips describing the new options

2019-03-08 Thread Andi Kleen
From: Andi Kleen Signed-off-by: Andi Kleen --- v2: Even more tips. v3: Even more tips --- tools/perf/Documentation/tips.txt | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tools/perf/Documentation/tips.txt b/tools/perf/Documentation/tips.txt index 849599f39c5e..869965d629ce 100644

[PATCH v5 01/15] perf tools: Add utility function to fetch executable

2019-03-08 Thread Andi Kleen
From: Andi Kleen Add a utility function to fetch executable code. Convert one user over to it. There are more places doing that, but they do significantly different actions, so they are not easy to fit into a single library function. Signed-off-by: Andi Kleen --- tools/perf/util/Build |

[PATCH v5 14/15] perf tools script: Add array bound checking to list_scripts

2019-03-08 Thread Andi Kleen
From: Andi Kleen Don't overflow array when the scripts directory is too large, or the script file name is too long. Signed-off-by: Andi Kleen --- tools/perf/builtin-script.c | 8 ++-- tools/perf/builtin.h | 3 ++- tools/perf/ui/browsers/scripts.c | 3 ++- 3 files changed,

[PATCH v5 15/15] perf tools ui: Fix ui popup browser for many entries

2019-03-08 Thread Andi Kleen
From: Andi Kleen Fix the argv ui browser code to correctly display more entries than fit on the screen without crashing. The problem was some type confusion with pointer types in the ->seek function. Do the argv arithmetic correctly with char ** pointers. Also add some asserts to find overruns

Support sample context in perf report

2019-03-08 Thread Andi Kleen
[Changes: v5: Address review comments. Fix perf script --cpu filtering Use _NSEC defines. Fix DEBUG=0 build again Make sample context size configurable. Some minor improvements. ] We currently have two ways to look at sample data in perf: either use perf report to aggregate everything, or use

[PATCH v5 07/15] perf tools report: Use less for scripts output

2019-03-08 Thread Andi Kleen
From: Andi Kleen The UI viewer for scripts output has a lot of limitations: limited size, no search or save function, slow, and various other issues. Just use 'less' to display directly on the terminal instead. This won't work in gtk mode, but gtk doesn't support these context menus anyways.

[PATCH v5 09/15] perf tools report: Support builtin perf script in scripts menu

2019-03-08 Thread Andi Kleen
From: Andi Kleen The scripts menu traditionally only showed custom perf scripts. Allow to run standard perf script with useful default options too. - Normal perf script - perf script with assembler (needs xed installed) - perf script with source code output (needs debuginfo) - perf script with

[PATCH v5 13/15] perf tools report: Add custom scripts to script menu

2019-03-08 Thread Andi Kleen
From: Andi Kleen Add a way to define custom scripts through ~/.perfconfig, which are then added to the scripts menu. The scripts get the same arguments as perf script, in particular -i, --cpu, --tid. Signed-off-by: Andi Kleen --- tools/perf/Documentation/perf-config.txt | 8

[PATCH] isdn: mISDNinfineon: fix potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case ioremap fails, the fix returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/mISDN/mISDNinfineon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/isdn/hardware/mISDN/mISDNinfineon.c

[PATCH] isdn: hfcpci: fix potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case ioremap fails, the fix reports an error and returns. Signed-off-by: Kangjie Lu --- drivers/isdn/hardware/mISDN/hfcpci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c index ebb3fa2e1d00..b400d6528a56

[PATCH] input: pm8xxx-vibrator: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
In case of_device_get_match_data fails to find the matched data, returns -ENODEV Signed-off-by: Kangjie Lu --- drivers/input/misc/pm8xxx-vibrator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c index

[PATCH] infiniband: i40iw: fix potential NULL pointer dereferences

2019-03-08 Thread Kangjie Lu
alloc_ordered_workqueue may fail and return NULL. Let's check its return value to ensure it is not NULL so as to avoid potential NULL pointer dereferences. Signed-off-by: Kangjie Lu --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH] infiniband: cxgb4: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
get_skb may fail and return NULL. The fix returns "ENOMEM" when it fails to avoid NULL dereference. Signed-off-by: Kangjie Lu --- drivers/infiniband/hw/cxgb4/cm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index

[PATCH] iio: hmc: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
devm_regmap_init_i2c may fail and return NULL. The fix returns the error when it fails. Signed-off-by: Kangjie Lu --- drivers/iio/magnetometer/hmc5843_i2c.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/hmc5843_i2c.c

RE: [PATCH V1 07/11] mmc: cqhci: add quirk for setting DCMD CMD_TIMING

2019-03-08 Thread Sowjanya Komatineni
> On 7/03/19 8:16 PM, Sowjanya Komatineni wrote: >> >>> On 3/6/2019 6:30 PM, Adrian Hunter wrote: On 2/03/19 7:20 AM, Sowjanya Komatineni wrote: > This patch adds a quirk for setting CMD_TIMING to 1 in descriptor > for DCMD with R1B response type to allow the command to be sent to

[PATCH] iio: adc: fix a potential NULL pointer dereference

2019-03-08 Thread Kangjie Lu
devm_iio_trigger_alloc may fail and return NULL. The fix returns ENOMEM when it fails. Signed-off-by: Kangjie Lu --- drivers/iio/adc/mxs-lradc-adc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/adc/mxs-lradc-adc.c b/drivers/iio/adc/mxs-lradc-adc.c index

[PATCH] iio: max9611: fix a NULL pointer dereference

2019-03-08 Thread Kangjie Lu
of_match_device may return NULL when it fails, and in this case, there will be a NULL pointer dereference. The fix returns EINVAL when of_match_device returns NULL. Signed-off-by: Kangjie Lu --- drivers/iio/adc/max9611.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down

2019-03-08 Thread James Morris
On Fri, 8 Mar 2019, Matthew Garrett wrote: > On Fri, Mar 8, 2019 at 3:00 PM James Morris wrote: > > > > On Wed, 6 Mar 2019, Matthew Garrett wrote: > > > > > From: David Howells > > > > > > If the kernel is locked down, require that all modules have valid > > > signatures that we can verify. > >

[PATCH] hid: logitech: check the return value of create_singlethread_workqueue

2019-03-08 Thread Kangjie Lu
create_singlethread_workqueue may fail and return NULL. The fix checks if it is NULL to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/hid/hid-logitech-hidpp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-logitech-hidpp.c

[PATCH] drm: vkms: check status of alloc_ordered_workqueue

2019-03-08 Thread Kangjie Lu
alloc_ordered_workqueue may fail and return NULL. The fix returns ENOMEM when it fails to avoid potential NULL pointer dereference. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/vkms/vkms_crtc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c

[PATCH] drm: check if alloc_workqueue fails

2019-03-08 Thread Kangjie Lu
alloc_workqueue may fail. The fix checks its status. We probably need to add a return value for radeon_crtc_init, so that we can pass an error code upstream. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/radeon/radeon_display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] gpu: i915: fix a missing check of get_free_page

2019-03-08 Thread Kangjie Lu
If the allocation fails, return false to avoid potential NULL pointer dereference Signed-off-by: Kangjie Lu --- drivers/gpu/drm/i915/i915_gpu_error.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c

[PATCH] gpu: amdkfd: fix a missing check of kmemdup

2019-03-08 Thread Kangjie Lu
kmemdup could fail and return NULL. To avoid null pointer dereference, the fix checkes its return value and returns ENOMEM upon failures. Signed-off-by: Kangjie Lu --- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH] workqueue: unregister wq lockdep on error path in alloc_workqueue()

2019-03-08 Thread Kefeng Wang
On 2019/3/8 22:45, Bart Van Assche wrote: > On 3/7/19 11:37 PM, Kefeng Wang wrote: >> syzkaller report an issue "KASAN: use-after-free Read in alloc_workqueue", >> >> alloc_workqueue >>   - kzalloc wq >>   - wq_init_lockdep(wq); >>     - lockdep_register_key(>key);  // add to hlist >>   - kfree

[PATCH] gpio: add a check for the return value of ida_simple_get fails

2019-03-08 Thread Kangjie Lu
ida_simple_get may fail and return a negative error number. The fix checks its return value; if it fails, go to err_destroy. Signed-off-by: Kangjie Lu --- drivers/gpio/gpio-exar.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c index

Re: [PATCH v2 1/3] arm64: mm: use appropriate ctors for page tables

2019-03-08 Thread Yu Zhao
On Tue, Feb 26, 2019 at 03:12:31PM +, Mark Rutland wrote: > Hi, > > On Mon, Feb 18, 2019 at 04:13:17PM -0700, Yu Zhao wrote: > > For pte page, use pgtable_page_ctor(); for pmd page, use > > pgtable_pmd_page_ctor() if not folded; and for the rest (pud, > > p4d and pgd), don't use any. > > > >

[PATCH] firmware: arm_scmi: check return value of idr_find

2019-03-08 Thread Kangjie Lu
idr_find may return NULL, so check its return value and return an error code. Signed-off-by: Kangjie Lu --- drivers/firmware/arm_scmi/driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c index

RE: [RFC net-next v1 1/3] vfio/mdev: Inherit dma masks of parent device

2019-03-08 Thread Parav Pandit
> -Original Message- > From: Alex Williamson > Sent: Friday, March 8, 2019 4:33 PM > To: Parav Pandit > Cc: net...@vger.kernel.org; linux-kernel@vger.kernel.org; > michal.l...@markovi.net; da...@davemloft.net; > gre...@linuxfoundation.org; Jiri Pirko ; > kwankh...@nvidia.com; Vu Pham

Re: [PATCH v2 2/3] arm64: mm: don't call page table ctors for init_mm

2019-03-08 Thread Yu Zhao
On Tue, Feb 26, 2019 at 03:13:07PM +, Mark Rutland wrote: > Hi, > > On Mon, Feb 18, 2019 at 04:13:18PM -0700, Yu Zhao wrote: > > init_mm doesn't require page table lock to be initialized at > > any level. Add a separate page table allocator for it, and the > > new one skips page table ctors.

[PATCH] char: hpet: fix a missing check of ioremap

2019-03-08 Thread Kangjie Lu
Check if ioremap fails, and if so, return AE_ERROR. Signed-off-by: Kangjie Lu --- drivers/char/hpet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index d0ad85900b79..3a1e6b3ccd10 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@

[PATCH] can: af_can: Fix possible NULL pointer dereference in can_exit

2019-03-08 Thread Yue Haibing
From: YueHaibing Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: [#1] SMP KASAN PTI CPU: 0 PID: 9400 Comm: syz-executor.0 Tainted: G C5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),

Re: [PATCH] rcu/tree_plugin: Fix nohz status in stall warning

2019-03-08 Thread Neeraj Upadhyay
On 3/9/19 2:48 AM, Paul E. McKenney wrote: On Fri, Mar 08, 2019 at 11:51:49PM +0530, Neeraj Upadhyay wrote: Fix stall warning, to show correct nohz marker. Signed-off-by: Neeraj Upadhyay Good eyes, thank you! I applied and pushed all three with modified commit logs. Please check to

[PATCH] net: ixgbevf: fix a missing check of ixgbevf_write_msg_read_ack

2019-03-08 Thread Kangjie Lu
If ixgbevf_write_msg_read_ack fails, return its error code upstream Signed-off-by: Kangjie Lu --- drivers/net/ethernet/intel/ixgbevf/vf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c

Re: Smarter Kconfig help

2019-03-08 Thread Randy Dunlap
On 3/6/19 12:22 PM, Russell King - ARM Linux admin wrote: > On Wed, Mar 06, 2019 at 09:16:02PM +0100, Enrico Weigelt, metux IT consult > wrote: >> On 06.03.19 13:42, Russell King - ARM Linux admin wrote: >> >>> In case it isn't clear, this is the *exact* point here - I don't know> >>> whether

[PATCH 1/5] lib/sort: Make swap functions more generic

2019-03-08 Thread George Spelvin
Rather than u32_swap and u64_swap working on 4- and 8-byte objects directly, let them handle any multiple of 4 or 8 bytes. This speeds up most users of sort() by avoiding fallback to the byte copy loop. Despite what commit ca96ab859ab4 ("lib/sort: Add 64 bit swap function") claims, very few

[PATCH 4/5] lib/list_sort: Simplify and remove MAX_LIST_LENGTH_BITS

2019-03-08 Thread George Spelvin
Rather than a fixed-size array of pending sorted runs, use the ->prev links to keep track of things. This reduces stack usage, eliminates some ugly overflow handling, and reduces the code size. Also: * merge() no longer needs to handle NULL inputs, so simplify. * The same applies to

[PATCH 5/5] lib/list_sort: Optimize number of calls to comparison function

2019-03-08 Thread George Spelvin
CONFIG_RETPOLINE has severely degraded indirect function call performance, so it's worth putting some effort into reducing the number of times cmp() is called. This patch avoids badly unbalanced merges on unlucky input sizes. It slightly increases the code size, but saves an average of 0.2*n

[PATCH 2/5] lib/sort: Use more efficient bottom-up heapsort variant

2019-03-08 Thread George Spelvin
This uses fewer comparisons than the previous code (61% as many for large random inputs), but produces identical results; it actually performs the exact same series of swap operations. Standard heapsort, when sifting down, performs two comparisons per level: One to find the greater child, and a

[PATCH 3/5] lib/sort: Avoid indirect calls to built-in swap

2019-03-08 Thread George Spelvin
Similar to what's being done in the net code, this takes advantage of the fact that most invocations use only a few common swap functions, and replaces indirect calls to them with (highly predictable) conditional branches. (The downside, of course, is that if you *do* use a custom swap function,

[PATCH 0/5] lib/sort & lib/list_sort: faster and smaller

2019-03-08 Thread George Spelvin
Because CONFIG_RETPOLINE has made indirect calls much more expensive, I thought I'd try to reduce the number made by the library sort functions. The first three patches apply to lib/sort.c. Patch #1 is a simple optimization. The built-in swap has rarely-used special cases for aligned 4- and

Re: [PATCH 3/4] Add header file,Kconfig and Makefile

2019-03-08 Thread Randy Dunlap
On 3/8/19 4:35 AM, Morris Ku wrote: > This patch add header file, Kconfig and Makefile. > > Signed-off-by: Morris Ku > --- > diff --git a/char/snx/Kconfig b/char/snx/Kconfig > new file mode 100644 > index ..86f38352 > --- /dev/null > +++ b/char/snx/Kconfig > @@ -0,0 +1,15 @@ > +#

[PATCH net] staging: rtl8188eu: use is_zero_ether_addr() instead of memcmp()

2019-03-08 Thread Mao Wenan
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. Signed-off-by: Mao Wenan --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c

Re: [PATCH] arm64: dts: rockchip: Fix vcc_host1_5v GPIO polarity on rk3328-rock64

2019-03-08 Thread Katsuhiro Suzuki
Hello Mayama-san, On 2019/03/08 1:18, Tomohiro Mayama wrote: This patch makes USB ports functioning again. Signed-off-by: Tomohiro Mayama --- arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH serial v2] sc16is7xx: missing unregister/delete driver on error in sc16is7xx_init()

2019-03-08 Thread Mao Wenan
Add the missing uart_unregister_driver() and i2c_del_driver() before return from sc16is7xx_init() in the error handling case. Reviewed-by: Vladimir Zapolskiy Signed-off-by: Mao Wenan --- v1->v2: fix compile warning if CONFIG_SERIAL_SC16IS7XX_SPI is not exist. drivers/tty/serial/sc16is7xx.c |

Re: [PATCH v4 17/17] kvm: vmx: Emulate TEST_CTL MSR

2019-03-08 Thread Xiaoyao Li
Hi, Paolo, Do you have any comments on this patch? We are preparing v5 patches for split lock detection, if you have any comments about this one, please let me know. Thanks, Xiaoyao On Fri, 2019-03-01 at 18:45 -0800, Fenghua Yu wrote: > From: Xiaoyao Li > > A control bit (bit 29) in TEST_CTL

[PATCH] arm64: dts: freescale: Enable PCI-E controller for Oxalis board

2019-03-08 Thread Manivannan Sadhasivam
Enable PCI-E controller for Oxalis board based on NXP/Freescale LS1012a SoC available as the Mini PCI-E connector on the bottom side. Signed-off-by: Manivannan Sadhasivam --- arch/arm64/boot/dts/freescale/fsl-ls1012a-oxalis.dts | 4 arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 2

Re: [PATCH net] rxrpc: Fix client call queueing, waiting for channel

2019-03-08 Thread David Miller
From: David Howells Date: Sat, 09 Mar 2019 00:29:58 + > rxrpc_get_client_conn() adds a new call to the front of the waiting_calls > queue if the connection it's going to use already exists. This is bad as > it allows calls to get starved out. > > Fix this by adding to the tail instead. >

Re: [PATCH v2 01/15] ARM: actions: fix a leaked reference by adding missing of_node_put

2019-03-08 Thread Manivannan Sadhasivam
Hi Russel, On Tue, Mar 05, 2019 at 11:40:48AM +, Russell King - ARM Linux admin wrote: > On Tue, Mar 05, 2019 at 07:33:52PM +0800, Wen Yang wrote: > > The call to of_get_next_child returns a node pointer with refcount > > incremented thus it must be explicitly decremented after the last > >

r8169 only works in promisc mode

2019-03-08 Thread Alex Xu (Hello71)
After suspending, my r8169 (not actually 8169, just that driver) only receives packets when in promiscuous mode. I have tried disabling all offload features except highdma [fixed], and it doesn't fix the issue. I am using torvalds/linux, compiled about two days ago (not sure which commit). I

Re: [PATCH] proc/sysctl: Fix NULL pointer dereference in put_links

2019-03-08 Thread YueHaibing
+cc Al Viro On 2019/3/4 21:54, Yue Haibing wrote: > From: YueHaibing > > Syzkaller report this: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN PTI > CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 >

[PATCH 2/2] arm64: dts: hisilicon: Add reset properties for HI6220 I2C and SPI

2019-03-08 Thread Manivannan Sadhasivam
Both I2C and SPI needs to be taken out of reset before being used. Earlier, we relied on the bootloader to do the job but a more cleaner approach would be to handle the reset in kernel. Hence, add the reset properties to the nodes to let the corresponding drivers take the peripherals out of reset.

[PATCH 1/2] amba: Take device out of reset before reading pid and cid values

2019-03-08 Thread Manivannan Sadhasivam
For the AMBA Primecell devices having the reset lines wired, it is necessary to take them out of reset before reading the pid and cid values. Earlier we were dependent on the bootloader to do this but a more cleaner approach would be to do it in the kernel itself. Hence, this commit deasserts the

Re: [PATCH 4/4] iommu/vt-d: Remove lazy allocation of domains

2019-03-08 Thread Lu Baolu
Hi James, On 3/9/19 12:57 AM, James Sewart wrote: Hey Lu, On 8 Mar 2019, at 03:09, Lu Baolu wrote: Do you mind if I work on top of your patches for further cleanups and sign off a v2 together with you? Sure, sounds good. I’ll fixup patch 3 and have a go at integrating iommu_prepare_isa

[PATCH 0/2] Handle I2C and SPI reset on HI6220 SoC

2019-03-08 Thread Manivannan Sadhasivam
Hello, This small patchset adds the reset functionality to the I2C and SPI peripherals on HI6220 SoC from HiSilicon. Those peripherals needs to be taken out of reset before being used. But earlier we were depending on the bootloader to do the job but as suggested by Daniel Thompson, a more

Re: [PATCH] proc/sysctl: Fix NULL pointer dereference in put_links

2019-03-08 Thread YueHaibing
ping. On 2019/3/4 21:54, Yue Haibing wrote: > From: YueHaibing > > Syzkaller report this: > > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN PTI > CPU: 1 PID: 5373 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 > Hardware

Re: [PATCH V3] cros_ec: Expose sysfile to force battery cut-off on shutdown.

2019-03-08 Thread Ravi Chandra Sadineni
Hi Enric, Thanks for the review. On Thu, Mar 7, 2019 at 3:57 AM Enric Balletbo i Serra wrote: > > Hi RaviChandra, > > Some few comments below ... > > > On 5/3/19 1:53, RaviChandra Sadineni wrote: > > On chromebooks, power_manager daemon normally shutsdown(S5) the device > > when the battery

[PATCH V5] platform/chrome: mfd/cros_ec_dev: Add sysfile to force

2019-03-08 Thread RaviChandra Sadineni
On chromebooks, power_manager daemon normally shuts down(S5) the device when the battery charge falls below 4% threshold. ChromeOS EC then normally spends an hour in S5 before hibernating. If the battery charge falls below critical threshold in the mean time, EC does a battery cutoff instead of

Re: [PATCH v2] appletalk: Correctly check return value of register_snap_client

2019-03-08 Thread YueHaibing
ping. On 2019/3/7 10:22, Yue Haibing wrote: > From: YueHaibing > > register_snap_client may return NULL, all the callers > check it, but only print a warning. This will result in > NULL pointer dereference in unregister_snap_client and other > places. > > It has always been used like this

[GIT PULL] Kbuild updates for v5.1

2019-03-08 Thread Masahiro Yamada
Hi Linus, Please pull Kbuild updates for v5.1 You will see a merge conflict in ./Kbuild The fixup is available in linux-next. Thanks! The following changes since commit f17b5f06cb92ef2250513a1e154c47b78df07d40: Linux 5.0-rc4 (2019-01-27 15:18:05 -0800) are available in the git

Re: [PATCH v6 5/7] gpu: ipu-v3: ipu-ic: Add support for limited range encoding

2019-03-08 Thread Steve Longerbeam
On 3/8/19 3:57 AM, Philipp Zabel wrote: On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: Add support for the following conversions: - YUV full-range to YUV limited-range - YUV limited-range to YUV full-range - YUV limited-range to RGB full-range - RGB full-range to YUV

Re: [PATCH v6 3/7] gpu: ipu-v3: ipu-ic: Fully describe colorspace conversions

2019-03-08 Thread Steve Longerbeam
On 3/8/19 3:46 AM, Philipp Zabel wrote: On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: Only providing the input and output RGB/YUV space to the IC task init functions is not sufficient. To fully characterize a colorspace conversion, the colorspace (chromaticities), Y'CbCr

Re: [PATCH v6 2/7] gpu: ipu-v3: ipu-ic: Fix BT.601 coefficients

2019-03-08 Thread Steve Longerbeam
On 3/8/19 2:23 AM, Philipp Zabel wrote: Hi Steve, On Thu, 2019-03-07 at 15:33 -0800, Steve Longerbeam wrote: The ycbcr2rgb and inverse rgb2ycbcr tables define the BT.601 Y'CbCr encoding coefficients. The rgb2ycbcr table specifically describes the BT.601 encoding from full range RGB to full

Re: [PATCH] kbuild: Speed up install, modules_install and kernelrelease

2019-03-08 Thread Masahiro Yamada
On Sat, Mar 9, 2019 at 7:34 AM Doug Anderson wrote: > > Hi, > > On Fri, Mar 8, 2019 at 2:29 PM Guenter Roeck wrote: > > > > On Fri, Mar 8, 2019 at 1:25 PM Douglas Anderson > > wrote: > > > > > > As per the description of the old commit 3298b690b21c ("kbuild: Add a > > > cache for generated

[PATCH net] rxrpc: Fix client call queueing, waiting for channel

2019-03-08 Thread David Howells
rxrpc_get_client_conn() adds a new call to the front of the waiting_calls queue if the connection it's going to use already exists. This is bad as it allows calls to get starved out. Fix this by adding to the tail instead. Also change the other enqueue point in the same function to put it on

Re: [PATCH] mm/compaction: fix an undefined behaviour

2019-03-08 Thread Mel Gorman
On Fri, Mar 08, 2019 at 05:46:50PM -0500, Qian Cai wrote: > In a low-memory situation, cc->fast_search_fail can keep increasing as > it is unable to find an available page to isolate in > fast_isolate_freepages(). As the result, it could trigger an error > below, so just compare with the maximum

Re: [PATCH][next] net/mlx5e: Remove redundant assignment

2019-03-08 Thread Saeed Mahameed
On Tue, 2019-03-05 at 19:03 -0800, David Miller wrote: > From: Saeed Mahameed > Date: Tue, 5 Mar 2019 22:21:39 + > > > On Mon, 2019-03-04 at 08:26 +0200, Leon Romanovsky wrote: > > > On Sun, Mar 03, 2019 at 03:20:57PM +, Roi Dayan wrote: > > > > On 02/03/2019 21:39, Gustavo A. R. Silva

Re: [PATCH 1/3] dt-bindings: Add doc for the ingenic-drm driver

2019-03-08 Thread Rob Herring
On Thu, Feb 28, 2019 at 4:08 PM Paul Cercueil wrote: > > Add documentation for the devicetree bindings of the DRM driver for the > JZ47xx family of SoCs from Ingenic. > > Signed-off-by: Paul Cercueil > Tested-by: Artur Rojek > --- > .../devicetree/bindings/display/ingenic,drm.txt| 30 >

Re: [PATCH v4 4/9] staging:iio:ad7780: add chip ID values and mask

2019-03-08 Thread Renato Lui Geh
On 03/04, Ardelean, Alexandru wrote: On Sun, 2019-03-03 at 14:53 +, Jonathan Cameron wrote: [External] On Sun, 3 Mar 2019 11:01:09 -0300 Renato Lui Geh wrote: > On 03/01, Ardelean, Alexandru wrote: > > On Thu, 2019-02-28 at 11:24 -0300, Renato Lui Geh wrote: > > > > > > > > > The ad7780

Re: [PATCH v3 3/6] clk: change rates via list iteration

2019-03-08 Thread dbasehore .
On Mon, Mar 4, 2019 at 8:49 PM Derek Basehore wrote: > > This changes the clk_set_rate code to use lists instead of recursion. > While making this change, also add error handling for clk_set_rate. > This means that errors in the set_rate/set_parent/set_rate_and_parent > functions will not longer

[PATCH v3 4/4] perf script python: add printdate function to SQL exporters

2019-03-08 Thread Tony Jones
Introduce a printdate function to eliminate the repetitive use of datetime.datetime.today() in the SQL exporting scripts. Signed-off-by: Tony Jones Acked-by: Adrian Hunter --- tools/perf/scripts/python/export-to-postgresql.py | 19 +++

[PATCH v3 2/4] perf script python: add Python3 support to export-to-postgresql.py

2019-03-08 Thread Tony Jones
Support both Python2 and Python3 in the export-to-postgresql.py script. The use of 'from __future__' implies the minimum supported Python2 version is now v2.6 Signed-off-by: Tony Jones Signed-off-by: Adrian Hunter Signed-off-by: Seeteena Thoufeek ---

  1   2   3   4   5   6   7   8   9   10   >