[PATCH 4.19 001/113] hvsock: fix epollout hang from race condition

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit cb359b60416701c8bed82fec79de25a144beb893 ] Currently, hvsock can enter into a state where epoll_wait on EPOLLOUT will not return even when the hvsock socket is writable, under some race condition. This can happen under the following sequence: - fd = socket(hvsocket) - fd_out = du

[PATCH 4.14 270/293] sh: prevent warnings when using iounmap

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 733f0025f0fb43e382b84db0930ae502099b7e62 ] When building drm/exynos for sh, as part of an allmodconfig build, the following warning triggered: exynos7_drm_decon.c: In function `decon_remove': exynos7_drm_decon.c:769:24: warning: unused variable `ctx' struct decon_context

[PATCH 4.14 272/293] 9p: pass the correct prototype to read_cache_page

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.kernel.org/r/20190520055731.2

[PATCH 4.14 276/293] locking/lockdep: Fix lock used or unused stats error

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 68d41d8c94a31dfb8233ab90b9baf41a2ed2da68 ] The stats variable nr_unused_locks is incremented every time a new lock class is register and decremented when the lock is first used in __lock_acquire(). And after all, it is shown and checked in lockdep_stats. However, under configura

[PATCH 4.14 287/293] fpga-manager: altera-ps-spi: Fix build error

2019-07-29 Thread Greg Kroah-Hartman
From: YueHaibing commit 3d139703d397f6281368047ba7ad1c8bf95aa8ab upstream. If BITREVERSE is m and FPGA_MGR_ALTERA_PS_SPI is y, build fails: drivers/fpga/altera-ps-spi.o: In function `altera_ps_write': altera-ps-spi.c:(.text+0x4ec): undefined reference to `byte_rev_table' Select BITREVERSE to f

[PATCH 4.14 286/293] binder: prevent transactions to context manager from its own process.

2019-07-29 Thread Greg Kroah-Hartman
From: Hridya Valsaraju commit 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec upstream. Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the

[PATCH 4.14 288/293] hpet: Fix division by zero in hpet_time_div()

2019-07-29 Thread Greg Kroah-Hartman
From: Kefeng Wang commit 0c7d37f4d9b8446956e97b7c5e61173cdb7c8522 upstream. The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero CPU:

[PATCH 4.14 290/293] ALSA: hda - Add a conexant codec entry to let mute led work

2019-07-29 Thread Greg Kroah-Hartman
From: Hui Wang commit 3f8809499bf02ef7874254c5e23fc764a47a21a0 upstream. This conexant codec isn't in the supported codec list yet, the hda generic driver can drive this codec well, but on a Lenovo machine with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI to make the leds work. A

[PATCH 4.14 275/293] mm/mmu_notifier: use hlist_add_head_rcu()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 543bdb2d825fe2400d6e951f1786d92139a16931 ] Make mmu_notifier_register() safer by issuing a memory barrier before registering a new notifier. This fixes a theoretical bug on weakly ordered CPUs. For example, take this simplified use of notifiers by a driver: my_struct->

[PATCH 4.14 273/293] mm/gup.c: mark undo_dev_pagemap as __maybe_unused

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 790c73690c2bbecb3f6f8becbdb11ddc9bcff8cc ] Several mips builds generate the following build warning. mm/gup.c:1788:13: warning: 'undo_dev_pagemap' defined but not used The function is declared unconditionally but only called from behind various ifdefs. Mark it __maybe_unused.

[PATCH 4.19 007/113] tty: max310x: Fix invalid baudrate divisors calculator

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 35240ba26a932b279a513f66fa4cabfd7af55221 ] Current calculator doesn't do it' job quite correct. First of all the max310x baud-rates generator supports the divisor being less than 16. In this case the x2/x4 modes can be used to double or quadruple the reference frequency. But the

[PATCH 4.19 017/113] drm/bridge: tc358767: read display_props in get_modes()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 3231573065ad4f4ecc5c9147b24f29f846dc0c2f ] We need to know the link bandwidth to filter out modes we cannot support, so we need to have read the display props before doing the filtering. To ensure we have up to date display props, call tc_get_display_props() in the beginning of

[PATCH 4.19 008/113] pinctrl: rockchip: fix leaked of_node references

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 3c89c70634bb0b6f48512de873e7a45c7e1fbaa5 ] The call to of_parse_phandle returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings: ./drivers/pinctrl/pinctrl-rockchip.c:3221:2-8

[PATCH 4.19 018/113] drm/bridge: sii902x: pixel clock unit is 10kHz instead of 1kHz

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 8dbfc5b65023b67397aca28e8adb25c819f6398c ] The pixel clock unit in the first two registers (0x00 and 0x01) of sii9022 is 10kHz, not 1kHz as in struct drm_display_mode. Division by 10 fixes the issue. Signed-off-by: Jyri Sarha Reviewed-by: Andrzej Hajda Reviewed-by: Laurent Pin

[PATCH 4.19 029/113] drm/amd/display: fix compilation error

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 88099f53cc3717437f5fc9cf84205c5b65118377 ] this patch fixes below compilation error drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c: In function ‘dcn10_apply_ctx_for_surface’: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2378:3: error:

[PATCH 4.19 030/113] powerpc/pseries/mobility: prevent cpu hotplug during DT update

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e59a175faa8df9d674247946f2a5a9c29c835725 ] CPU online/offline code paths are sensitive to parts of the device tree (various cpu node properties, cache nodes) that can be changed as a result of a migration. Prevent CPU hotplug while the device tree potentially is inconsistent. F

[PATCH 4.19 016/113] PCI: Return error if cannot probe VF

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 76002d8b48c4b08c9bd414517dd295e132ad910b ] Commit 0e7df22401a3 ("PCI: Add sysfs sriov_drivers_autoprobe to control VF driver binding") allows the user to specify that drivers for VFs of a PF should not be probed, but it actually causes pci_device_probe() to return success back to

[PATCH 4.19 020/113] drm/crc-debugfs: User irqsafe spinlock in drm_crtc_add_crc_entry

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1882018a70e06376234133e69ede9dd743b4dbd9 ] We can be called from any context, we need to be prepared. Noticed this while hacking on vkms, which calls this function from a normal worker. Which really upsets lockdep. Cc: Rodrigo Siqueira Cc: Tomeu Vizoso Cc: Emil Velikov Cc: B

[PATCH 4.19 002/113] drm/panel: simple: Fix panel_simple_dsi_probe

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7ad9db66fafb0f0ad53fd2a66217105da5ddeffe ] In case mipi_dsi_attach() fails remove the registered panel to avoid added panel without corresponding device. Signed-off-by: Peter Ujfalusi Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/2019022608

[PATCH 4.19 044/113] iio: iio-utils: Fix possible incorrect mask calculation

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 208a68c8393d6041a9086299f3d7943d44d6 ] On some machines, iio-sensor-proxy was returning all 0's for IIO sensor values. It turns out that the bits_used for this sensor is 32, which makes the mask calculation: *mask = (1 << 32) - 1; If the compiler interprets the 1 literals a

[PATCH 4.19 041/113] kbuild: Add -Werror=unknown-warning-option to CLANG_FLAGS

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 589834b3a0097a4908f4112eac0ca2feb486fa32 ] In commit ebcc5928c5d9 ("arm64: Silence gcc warnings about arch ABI drift"), the arm64 Makefile added -Wno-psabi to KBUILD_CFLAGS, which is a GCC only option so clang rightfully complains: warning: unknown warning option '-Wno-psabi' [-

Re: [PATCH v2 1/7] ASoC: fsl_sai: Add registers definition for multiple datalines

2019-07-29 Thread Nicolin Chen
On Sun, Jul 28, 2019 at 10:24:23PM +0300, Daniel Baluta wrote: > SAI IP supports up to 8 data lines. The configuration of > supported number of data lines is decided at SoC integration > time. > > This patch adds definitions for all related data TX/RX registers: > * TDR0..7, Transmit data re

Re: [PATCH 03/14] sched,fair: redefine runnable_load_avg as the sum of task_h_load

2019-07-29 Thread Peter Zijlstra
On Mon, Jul 22, 2019 at 01:33:37PM -0400, Rik van Riel wrote: > @@ -3012,25 +2983,24 @@ static inline int throttled_hierarchy(struct cfs_rq > *cfs_rq); > static void update_cfs_group(struct sched_entity *se) > { > struct cfs_rq *gcfs_rq = group_cfs_rq(se); > - long shares, runnable; >

[PATCH 4.19 053/113] um: Silence lockdep complaint about mmap_sem

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 80bf6ceaf9310b3f61934c69b382d4912deee049 ] When we get into activate_mm(), lockdep complains that we're doing something strange: WARNING: possible circular locking dependency detected 5.1.0-10252-gb00152307319-dirty #121 Not tainted --

[PATCH 4.19 047/113] recordmcount: Fix spurious mcount entries on powerpc

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 80e5302e4bc85a6b685b7668c36c6487b5f90e9a ] An impending change to enable HAVE_C_RECORDMCOUNT on powerpc leads to warnings such as the following: # modprobe kprobe_example ftrace-powerpc: Not expected bl: opcode is 3c4c0001 WARNING: CPU: 0 PID: 227 at kernel/trace/ftrace.c:

[PATCH 4.19 042/113] genksyms: Teach parser about 128-bit built-in types

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a222061b85234d8a44486a46bd4df7e2cda52385 ] __uint128_t crops up in a few files that export symbols to modules, so teach genksyms about it and the other GCC built-in 128-bit integer types so that we don't end up skipping the CRC generation for some symbols due to the parser failin

[PATCH 4.19 049/113] mfd: core: Set fwnode for created devices

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit c176c6d7e932662668bcaec2d763657096589d85 ] The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert Hanco

Re: [PATCH v12 0/6] Add utilization clamping support (CGroups API)

2019-07-29 Thread Tejun Heo
Hello, Looks good to me. On cgroup side, Acked-by: Tejun Heo Thanks. -- tejun

[PATCH 4.19 060/113] IB/ipoib: Add child to parent list only if device initialized

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 91b01061fef9c57d2f5b712a6322ef51061f4efd ] Despite failure in ipoib_dev_init() we continue with initialization flow and creation of child device. It causes to the situation where this child device is added too early to parent device list. Change the logic, so in case of failure

[PATCH 1/1] psi: do not require setsched permission from the trigger creator

2019-07-29 Thread Suren Baghdasaryan
When a process creates a new trigger by writing into /proc/pressure/* files, permissions to write such a file should be used to determine whether the process is allowed to do so or not. Current implementation would also require such a process to have setsched capability. Setting of psi trigger thre

[PATCH 4.19 069/113] perf top: Fix potential NULL pointer dereference detected by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 111442cfc8abdeaa7ec1407f07ef7b3e5f76654e ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/builtin-top.c:109 perf_top__parse_source() warn: variable dereferenced before check 'he' (see line 103) tools/perf/builtin-

[PATCH 4.19 058/113] IB/mlx5: Fixed reporting counters on 2nd port for Dual port RoCE

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 2f40cf30c8644360d37287861d5288f00eab35e5 ] Currently during dual port IB device registration in below code flow, ib_register_device() ib_device_register_sysfs() ib_setup_port_attrs() add_port() get_counter_table() get_perf_mad() process_

[PATCH 4.19 064/113] kallsyms: exclude kasan local symbols on s390

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 33177f01ca3fe550146bb9001bec2fd806b2f40c ] gcc asan instrumentation emits the following sequence to store frame pc when the kernel is built with CONFIG_RELOCATABLE: debug/vsprintf.s: .section.data.rel.ro.local,"aw" .align 8 .LC3: .quad .LASANPC4

[PATCH 4.19 083/113] mm/kmemleak.c: fix check for softirq context

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 6ef9056952532c3b746de46aa10d45b4d7797bd8 ] in_softirq() is a wrong predicate to check if we are in a softirq context. It also returns true if we have BH disabled, so objects are falsely stamped with "softirq" comm. The correct predicate is in_serving_softirq(). If user does ca

[PATCH 4.19 039/113] PCI: sysfs: Ignore lockdep for remove attribute

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit dc6b698a86fe40a50525433eb8e92a267847f6f9 ] With CONFIG_PROVE_LOCKING=y, using sysfs to remove a bridge with a device below it causes a lockdep warning, e.g., # echo 1 > /sys/class/pci_bus/:00/device/:00:00.0/remove WARNI

[PATCH 4.19 035/113] mmc: sdhci: sdhci-pci-o2micro: Check if controller supports 8-bit width

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit de23f0b757766d9fae59df97da6e8bdc5b231351 ] The O2 controller supports 8-bit EMMC access. JESD84-B51 section A.6.3.a defines the bus testing procedure that `mmc_select_bus_width()` implements. This is used to determine the actual bus width of the eMMC. Signed-off-by: Raul E Rang

[PATCH 4.19 087/113] memcg, fsnotify: no oom-kill for remote memcg charging

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ec165450968b26298bd1c373de37b0ab6d826b33 ] Commit d46eb14b735b ("fs: fsnotify: account fsnotify metadata to kmemcg") added remote memcg charging for fanotify and inotify event objects. The aim was to charge the memory to the listener who is interested in the events but without t

[PATCH 4.19 109/113] ALSA: hda - Add a conexant codec entry to let mute led work

2019-07-29 Thread Greg Kroah-Hartman
From: Hui Wang commit 3f8809499bf02ef7874254c5e23fc764a47a21a0 upstream. This conexant codec isn't in the supported codec list yet, the hda generic driver can drive this codec well, but on a Lenovo machine with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI to make the leds work. A

[PATCH 4.19 098/113] usb: wusbcore: fix unbalanced get/put cluster_id

2019-07-29 Thread Greg Kroah-Hartman
From: Phong Tran commit f90bf1ece48a736097ea224430578fe586a9544c upstream. syzboot reported that https://syzkaller.appspot.com/bug?extid=fd2bd7df88c606eea4ef There is not consitency parameter in cluste_id_get/put calling. In case of getting the id with result is failure, the wusbhc->cluster_id

[PATCH 4.19 091/113] proc: use down_read_killable mmap_sem for /proc/pid/clear_refs

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit c46038017fbdcac627b670c9d4176f1d0c2f5fa3 ] Do not remain stuck forever if something goes wrong. Using a killable lock permits cleanup of stuck tasks and simplifies investigation. Replace the only unkillable mmap_sem lock in clear_refs_write(). Link: http://lkml.kernel.org/r/15

[PATCH 4.19 103/113] binder: prevent transactions to context manager from its own process.

2019-07-29 Thread Greg Kroah-Hartman
From: Hridya Valsaraju commit 49ed96943a8e0c62cc5a9b0a6cfc88be87d1fcec upstream. Currently, a transaction to context manager from its own process is prevented by checking if its binder_proc struct is the same as that of the sender. However, this would not catch cases where the process opens the

[PATCH 4.19 099/113] usb: pci-quirks: Correct AMD PLL quirk detection

2019-07-29 Thread Greg Kroah-Hartman
From: Ryan Kennedy commit f3dccdaade4118070a3a47bef6b18321431f9ac6 upstream. The AMD PLL USB quirk is incorrectly enabled on newer Ryzen chipsets. The logic in usb_amd_find_chipset_info currently checks for unaffected chipsets rather than affected ones. This broke once a new chipset was added in

[PATCH 4.19 075/113] powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 9e005b761e7ad153dcf40a6cba1d681fe0830ac6 ] The next commit will make the way of passing CONFIG options more robust. Unfortunately, it would uncover another hidden issue; without this commit, skiroot_defconfig would be broken like this: | WRAParch/powerpc/boot/zImage.pserie

[PATCH 4.19 096/113] mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1e426fe28261b03f297992e89da3320b42816f4e ] This function is used by ptrace and proc files like /proc/pid/cmdline and /proc/pid/environ. Access_remote_vm never returns error codes, all errors are ignored and only size of successfully read data is returned. So, if current task wa

[PATCH 4.19 111/113] powerpc/tm: Fix oops on sigreturn on systems without TM

2019-07-29 Thread Greg Kroah-Hartman
From: Michael Neuling commit f16d80b75a096c52354c6e0a574993f3b0dfbdfe upstream. On systems like P9 powernv where we have no TM (or P8 booted with ppc_tm=off), userspace can construct a signal context which still has the MSR TS bits set. The kernel tries to restore this context which results in t

Re: [net-next 1/2] ipvs: batch __ip_vs_cleanup

2019-07-29 Thread Julian Anastasov
Hello, On Thu, 18 Jul 2019, Haishuang Yan wrote: > As the following benchmark testing results show, there is a little > performance improvement: OK, can you send v2 after removing the LIST_HEAD(list) from both patches, I guess, it is not needed. If you prefer, you can include

[PATCH 5.2 017/215] f2fs: fix to check layout on last valid checkpoint park

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 5dae2d39074dde941cc3150dcbb7840d88179743 ] As Ju Hyung reported: " I was semi-forced today to use the new kernel and test f2fs. My Ubuntu initramfs got a bit wonky and I had to boot into live CD and fix some stuffs. The live CD was using 4.15 kernel, and just mounting the f2fs

Re: [patch 00/12] (hr)timers: Prepare for PREEMPT_RT support

2019-07-29 Thread Peter Zijlstra
On Fri, Jul 26, 2019 at 08:30:48PM +0200, Thomas Gleixner wrote: > The following series brings the bulk of PREEMPT_RT specific changes for the > (hr)timer code: > > - Handle timer deletion correctly under RT to avoid priority inversion > and life locks > > This mechanism might be useful

[PATCH 5.2 029/215] drm/amdkfd: Fix a potential memory leak

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e73390d181103a19eec2f25559a0570e9fe0 ] Free mqd_mem_obj it GTT buffer allocation for MQD+control stack fails. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/am

[PATCH 5.2 010/215] ipmi_si: fix unexpected driver unregister warning

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 2f66353963043e1d8dfacfbdf509acc5d3be7698 ] If ipmi_si_platform_init()->platform_driver_register() fails, platform_driver_unregister() called unconditionally will trigger following warning, ipmi_platform: Unable to register driver: -12 [ cut here ] Unexpec

[PATCH 5.2 020/215] drm/amd/display: Fill prescale_params->scale for RGB565

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1352c779cb74d427f4150cbe779a2f7886f70cae ] [Why] An assertion is thrown when using SURFACE_PIXEL_FORMAT_GRPH_RGB565 formats on DCE since the prescale_params->scale wasn't being filled. Found by a dmesg-fail when running the igt@kms_plane@pixel-format-pipe-a-planes test on Baffin

[PATCH 5.2 022/215] drm/msm/a6xx: Avoid freeing gmu resources multiple times

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 606ec90fc2266284f584a96ebf7f874589f56251 ] The driver checks for gmu->mmio as a sign that the device has been initialized, however there are failures in probe below the mmio init. If one of those is hit, mmio will be non-null but freed. In that case, a6xx_gmu_probe will return a

[PATCH 4.19 105/113] mei: me: add mule creek canyon (EHL) device ids

2019-07-29 Thread Greg Kroah-Hartman
From: Alexander Usyskin commit 1be8624a0cbef720e8da39a15971e01abffc865b upstream. Add Mule Creek Canyon (PCH) MEI device ids for Elkhart Lake (EHL) Platform. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Cc: stable Link: https://lore.kernel.org/r/20190712095814.20746-1-tomas.

[PATCH 4.19 106/113] hpet: Fix division by zero in hpet_time_div()

2019-07-29 Thread Greg Kroah-Hartman
From: Kefeng Wang commit 0c7d37f4d9b8446956e97b7c5e61173cdb7c8522 upstream. The base value in do_div() called by hpet_time_div() is truncated from unsigned long to uint32_t, resulting in a divide-by-zero exception. UBSAN: Undefined behaviour in ../drivers/char/hpet.c:572:2 division by zero CPU:

[PATCH 4.19 113/113] access: avoid the RCU grace period for the temporary subjective credentials

2019-07-29 Thread Greg Kroah-Hartman
From: Linus Torvalds commit d7852fbd0f0423937fa287a598bfde188bb68c22 upstream. It turns out that 'access()' (and 'faccessat()') can cause a lot of RCU work because it installs a temporary credential that gets allocated and freed for each system call. The allocation and freeing overhead is mostl

[PATCH 4.19 072/113] perf hists browser: Fix potential NULL pointer dereference found by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ceb75476db1617a88cc29b09839acacb69aa076e ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/ui/browsers/hists.c:641 hist_browser__run() error: we previously assumed 'hbt' could be null (see line 625) tools/perf/ui/b

[PATCH 4.19 112/113] libnvdimm/bus: Stop holding nvdimm_bus_list_mutex over __nd_ioctl()

2019-07-29 Thread Greg Kroah-Hartman
From: Dan Williams commit b70d31d054ee3a6fc1034b9d7fc0ae1e481aa018 upstream. In preparation for fixing a deadlock between wait_for_bus_probe_idle() and the nvdimm_bus_list_mutex arrange for __nd_ioctl() without nvdimm_bus_list_mutex held. This also unifies the 'dimm' and 'bus' level ioctls into

[PATCH 5.2 007/215] iio: adc: stm32-dfsdm: missing error case during probe

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit d2fc0156963cae8f1eec8e2dd645fbbf1e1c1c8e ] During probe, check the devm_ioremap_resource() error value. Also return the devm_clk_get() error value instead of -EINVAL. Signed-off-by: Fabien Dessenne Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron Signed-off-by: Sasha

Re: [RFC 3/9] workqueue: require CPU hotplug read exclusion for apply_workqueue_attrs

2019-07-29 Thread Tejun Heo
On Thu, Jul 25, 2019 at 05:24:59PM -0400, Daniel Jordan wrote: > Change the calling convention for apply_workqueue_attrs to require CPU > hotplug read exclusion. > > Avoids lockdep complaints about nested calls to get_online_cpus in a > future patch where padata calls apply_workqueue_attrs when ch

[PATCH 5.2 055/215] drm/amd/display: Update link rate from DPCD 10

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 53c81fc7875bc2dca358485dac3999e14ec91a00 ] [WHY] Some panels return a link rate of 0 (unknown) in DPCD 0. In this case, an appropriate mode cannot be set, and certain panels will show corruption as they are forced to use a mode they do not support. [HOW] Read DPCD 10 in the case

[PATCH 5.2 040/215] f2fs: Fix accounting for unusable blocks

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit a4c3ecaaadac5693f555cfef1c9eecf4c39df818 ] Fixes possible underflows when dealing with unusable blocks. Signed-off-by: Daniel Rosenberg Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/f2fs.h | 15 ++- 1 file changed, 10 ins

Re: [patch 0/8] core, x86: Preparatory steps for RT

2019-07-29 Thread Peter Zijlstra
On Fri, Jul 26, 2019 at 11:19:36PM +0200, Thomas Gleixner wrote: > CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by > CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same > functionality which today depends on CONFIG_PREEMPT. > > The following series adjusts the core and x86 code

Re: [RFC 2/9] workqueue: unconfine alloc/apply/free_workqueue_attrs()

2019-07-29 Thread Tejun Heo
On Thu, Jul 25, 2019 at 05:24:58PM -0400, Daniel Jordan wrote: > padata will use these these interfaces in a later patch, so unconfine them. > > Signed-off-by: Daniel Jordan Acked-by: Tejun Heo Thanks. -- tejun

[PATCH 5.2 058/215] phy: renesas: rcar-gen2: Fix memory leak at error paths

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit d4a36e82924d3305a17ac987a510f3902df5a4b2 ] This patch fixes memory leak at error paths of the probe function. In for_each_child_of_node, if the loop returns, the driver should call of_put_node() before returns. Reported-by: Julia Lawall Fixes: 1233f59f745b237 ("phy: Renesas R-C

[PATCH 5.2 049/215] memstick: Fix error cleanup path of memstick_init

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 65f1a0d39c289bb6fc85635528cd36c4b07f560e ] If bus_register fails. On its error handling path, it has cleaned up what it has done. There is no need to call bus_unregister again. Otherwise, if bus_unregister is called, issues such as null-ptr-deref will arise. Syzkaller report thi

[PATCH 5.2 048/215] drm/omap: dont check dispc timings for DSI

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ad9df7d91b4a6e8f4b20c2bf539ac09b3b2ad6eb ] While most display types only forward their VM to the DISPC, this is not true for DSI. DSI calculates the VM for DISPC based on its own, but it's not identical. Actually the DSI VM is not even a valid DISPC VM making this check fail. Let

[PATCH 5.2 054/215] drm/amd/display: Always allocate initial connector state state

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f04bee34d6e35df26cbb2d65e801adfd0d8fe20d ] [Why] Unlike our regular connectors, MST connectors don't start off with an initial connector state. This causes a NULL pointer dereference to occur when attaching the bpc property since it tries to modify the connector state. We need a

[PATCH 5.2 068/215] serial: uartps: Use the same dynamic major number for all ports

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit ab262666018de6f4e206b021386b93ed0c164316 ] Let kernel to find out major number dynamically for the first device and then reuse it for other instances. This fixes the issue that each uart is registered with a different major number. After the patch: crw---1 root root

[PATCH 5.2 053/215] PCI: endpoint: Allocate enough space for fixed size BAR

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f16fb16ed16c7f561e9c41c9ae4107c7f6aa553c ] PCI endpoint test function code should honor the .bar_fixed_size parameter from underlying endpoint controller drivers or results may be unexpected. In pci_epf_test_alloc_space(), check if BAR being used for test register space is a fix

[PATCH 5.2 034/215] staging: kpc2000: report error status to spi core

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 9164f336311863d3e9f80840f4a1cce2aee293bd ] There is an error condition that's not reported to the spi core in kp_spi_transfer_one_message(). It should restore status value to m->status, and return it in error path. Signed-off-by: Mao Wenan Signed-off-by: Greg Kroah-Hartman Sig

[PATCH 5.2 064/215] drm/rockchip: Properly adjust to a true clock in adjusted_mode

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 99b9683f2142b20bad78e61f7f829e8714e45685 ] When fixing up the clock in vop_crtc_mode_fixup() we're not doing it quite correctly. Specifically if we've got the true clock 26667 Hz, we'll perform this calculation: 26667 / 1000 => 26 Later when we try to set the clo

[PATCH 5.2 067/215] serial: imx: fix locking in set_termios()

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 4e828c3e09201512be5ee162393f334321f7cf01 ] imx_uart_set_termios() called imx_uart_rts_active(), or imx_uart_rts_inactive() before taking port->port.lock. As a consequence, sport->port.mctrl that these functions modify could have been changed without holding port->port.lock. Mov

[PATCH 5.2 037/215] drm/amd/display: Reset planes for color management changes

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7316c4ad299663a16ca9ce13e5e817b4ca760809 ] [Why] For commits with allow_modeset=false and CRTC degamma changes the planes aren't reset. This results in incorrect rendering. [How] Reset the planes when color management has changed on the CRTC. Technically this will include regamm

[PATCH 5.2 039/215] drm/amd/display: Increase Backlight Gain Step Size

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e25228b02e4833e5b0fdd262801a2ae6cc72b39d ] [Why] Some backlight tests fail due to backlight settling taking too long. This happens because the step size used to change backlight levels is too small. [How] 1. Change the size of the backlight gain step size 2. Change how DMCU firm

[PATCH 5.2 030/215] drm/amdkfd: Fix sdma queue map issue

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 065e4bdfa1f3ab2884c110394d8b7e7ebe3b988c ] Previous codes assumes there are two sdma engines. This is not true e.g., Raven only has 1 SDMA engine. Fix the issue by using sdma engine number info in device_info. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by:

[PATCH 5.2 082/215] i2c: stm32f7: fix the get_irq error cases

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 79b4499524ed659fb76323efc30f3dc03967c88f ] During probe, return the "get_irq" error value instead of -EINVAL which allows the driver to be deferred probed if needed. Fix also the case where of_irq_get() returns a negative value. Note : On failure of_irq_get() returns 0 or a negat

[PATCH 5.2 086/215] phy: meson-g12a-usb3-pcie: disable locking for cr_regmap

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 5fc2aa3ec9efad97dd7c316f3c8e4c6268bbed9b ] Locking is not needed for the phy_g12a_usb3_pcie_cr_bus_read/write() and currently it causes the following BUG because of the usage of the regmap_read_poll_timeout() running in spinlock_irq, configured by regmap fast_io. Simply disable

[PATCH 5.2 106/215] RDMA/i40iw: Set queue pair state when being queried

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 2e67e775845373905d2c2aecb9062c2c4352a535 ] The API for ib_query_qp requires the driver to set qp_state and cur_qp_state on return, add the missing sets. Fixes: d37498417947 ("i40iw: add files for iwarp interface") Signed-off-by: Changcheng Liu Acked-by: Shiraz Saleem Reviewed-

[PATCH 5.2 078/215] drm/msm: Depopulate platform on probe failure

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 4368a1539c6b41ac3cddc06f5a5117952998804c ] add_display_components() calls of_platform_populate, and we depopluate on pdev remove, but not when probe fails. So if we get a probe deferral in one of the components, we won't depopulate the platform. This causes the core to keep refer

[PATCH 5.2 091/215] powerpc/xmon: Fix disabling tracing while in xmon

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit aaf06665f7ea3ee9f9754e16c1a507a89f1de5b1 ] Commit ed49f7fd6438d ("powerpc/xmon: Disable tracing when entering xmon") added code to disable recording trace entries while in xmon. The commit introduced a variable 'tracing_enabled' to record if tracing was enabled on xmon entry, and

[PATCH 5.2 113/215] KVM: nVMX: Stash L1s CR3 in vmcs01.GUEST_CR3 on nested entry w/o EPT

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f087a02941feacf7d6f097522bc67c602fda18e6 ] KVM does not have 100% coverage of VMX consistency checks, i.e. some checks that cause VM-Fail may only be detected by hardware during a nested VM-Entry. In such a case, KVM must restore L1's state to the pre-VM-Enter state as L2's stat

[PATCH 5.2 081/215] PCI: sysfs: Ignore lockdep for remove attribute

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit dc6b698a86fe40a50525433eb8e92a267847f6f9 ] With CONFIG_PROVE_LOCKING=y, using sysfs to remove a bridge with a device below it causes a lockdep warning, e.g., # echo 1 > /sys/class/pci_bus/:00/device/:00:00.0/remove WARNI

[PATCH 5.2 131/215] RDMA/core: Fix race when resolving IP address

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit d8d9ec7dc5abbb3f11d866e983c4984f5c2de9d6 ] Use the neighbour lock when copying the MAC address from the neighbour data struct in dst_fetch_ha. When not using the lock, it is possible for the function to race with neigh_update(), causing it to copy an torn MAC address: rdma_reso

[PATCH 5.2 134/215] nvme-tcp: dont use sendpage for SLAB pages

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 37c15219599f7a4baa73f6e3432afc69ba7cc530 ] According to commit a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") and previous discussion, tcp_sendpage should not be used for pages that is managed by SLAB, as SLAB is not taking page reference counters into c

[PATCH 5.2 130/215] perf intel-bts: Fix potential NULL pointer dereference found by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 1d481458816d9424c8a05833ce0ebe72194a350e ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/util/intel-bts.c:898 intel_bts_process_auxtrace_info() error: we previously assumed 'session->itrace_synth_opts' could be null

[PATCH 5.2 139/215] block: init flush rq ref count to 1

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit b554db147feea39617b533ab6bca247c91c6198a ] We discovered a problem in newer kernels where a disconnect of a NBD device while the flush request was pending would result in a hang. This is because the blk mq timeout handler does if (!refcount_inc_not_zero(&rq->ref))

[PATCH 5.2 150/215] mm/kmemleak.c: fix check for softirq context

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 6ef9056952532c3b746de46aa10d45b4d7797bd8 ] in_softirq() is a wrong predicate to check if we are in a softirq context. It also returns true if we have BH disabled, so objects are falsely stamped with "softirq" comm. The correct predicate is in_serving_softirq(). If user does ca

[PATCH 5.2 147/215] block/bio-integrity: fix a memory leak bug

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit e7bf90e5afe3aa1d1282c1635a49e17a32c4ecec ] In bio_integrity_prep(), a kernel buffer is allocated through kmalloc() to hold integrity metadata. Later on, the buffer will be attached to the bio structure through bio_integrity_add_page(), which returns the number of bytes of integri

[PATCH 5.2 141/215] f2fs: fix to avoid long latency during umount

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 6e0cd4a9dd4df1a0afcb454f1e654b5c80685913 ] In umount, we give an constand time to handle pending discard, previously, in __issue_discard_cmd() we missed to check timeout condition in loop, result in delaying long time, fix it. Signed-off-by: Heng Xiao [Chao Yu: add commit messa

[PATCH 5.2 146/215] platform/x86: Fix PCENGINES_APU2 Kconfig warning

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 7d67c8ac25fbc66ee254aa3e33329d1c9bc152ce ] Fix Kconfig warning for PCENGINES_APU2 symbol: WARNING: unmet direct dependencies detected for GPIO_AMD_FCH Depends on [n]: GPIOLIB [=n] && HAS_IOMEM [=y] Selected by [y]: - PCENGINES_APU2 [=y] && X86 [=y] && X86_PLATFORM_DEVICES

[PATCH 5.2 151/215] 9p: pass the correct prototype to read_cache_page

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f053cbd4366051d7eb6ba1b8d529d20f719c2963 ] Fix the callback 9p passes to read_cache_page to actually have the proper type expected. Casting around function pointers can easily hide typing bugs, and defeats control flow protection. Link: http://lkml.kernel.org/r/20190520055731.2

[PATCH 00/24] LPUART fixes and improvements

2019-07-29 Thread Andrey Smirnov
Everyone: This series contains fixes/improvements to LPUART dirver I came up with recently as well as fixes picked up from Toradex and NXP Vybrid repos. Feedback is welcome! Thanks, Andrey Smirnov Andrey Smirnov (22): tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer tty: serial: fsl

[PATCH 01/24] tty: serial: fsl_lpuart: fix framing error handling when using DMA

2019-07-29 Thread Andrey Smirnov
From: Stefan Agner When using DMA framing error get cleared properly. However, due to the additional read from the data register, an underflow in the receive FIFO buffer occurs (the FIFO pointer gets out of sync). Clear the FIFO in case an underflow has occurred. Also disable the receiver during

[PATCH 5.2 152/215] mm/mincore.c: fix race between swapoff and mincore

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit aeb309b81c6bada783c3695528a3e10748e97285 ] Via commit 4b3ef9daa4fc ("mm/swap: split swap cache into 64MB trunks"), after swapoff, the address_space associated with the swap device will be freed. So swap_address_space() users which touch the address_space need some kind of mechan

[PATCH 10/24] tty: serial: fsl_lpuart: Drop no-op bit opearation

2019-07-29 Thread Andrey Smirnov
The check for termios->c_cflag & CRTSCTS ensure that if we reach else branch, CRTSCTS in termios->c_cflag is already going to be cleard. Doing so explicitly there is not necessary. Drop it. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory Tusar Cc:

[PATCH 5.2 118/215] PCI: mobiveil: Use the 1st inbound window for MEM inbound transactions

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit f7fee1b42fe4f8171a4b1cad05c61907c33c53f6 ] The inbound and outbound windows have completely separate control registers sets in the host controller MMIO space. Windows control register are accessed through an MMIO base address and an offset that depends on the window index. Since

[PATCH 15/24] tty: serial: fsl_lpuart: Use cpu_relax() instead of barrier()

2019-07-29 Thread Andrey Smirnov
Use cpu_relax() instead of barrier() in a tight polling loops to make them a bit more idiomatic. Should also improve things on ARM64 a bit since cpu_relax() will expand into "yield" instruction there. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Bhuvanchandra DV Cc: Chris Healy Cc: Cory

[PATCH 5.2 120/215] perf stat: Fix use-after-freed pointer detected by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit c74b05030edb3b52f4208d8415b8c933bc509a29 ] Based on the following report from Smatch, fix the use-after-freed pointer. tools/perf/builtin-stat.c:1353 add_default_attributes() warn: passing freed memory 'str'. The pointer 'str' has been freed but later it is still passed int

[PATCH 5.2 122/215] perf top: Fix potential NULL pointer dereference detected by the smatch tool

2019-07-29 Thread Greg Kroah-Hartman
[ Upstream commit 111442cfc8abdeaa7ec1407f07ef7b3e5f76654e ] Based on the following report from Smatch, fix the potential NULL pointer dereference check. tools/perf/builtin-top.c:109 perf_top__parse_source() warn: variable dereferenced before check 'he' (see line 103) tools/perf/builtin-

[PATCH 13/24] tty: serial: fsl_lpuart: Use appropriate lpuart32_* I/O funcs

2019-07-29 Thread Andrey Smirnov
When dealing with 32-bit variant of LPUART IP block appropriate I/O helpers have to be used to properly deal with endianness differences. Change all of the offending code to do that. Fixes: a5fa2660d787 ("tty/serial/fsl_lpuart: Add CONSOLE_POLL support for lpuart32.") Signed-off-by: Andrey Smirnov

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