[PATCH 5.0 34/93] perf list: Dont forget to drop the reference to the allocated thread_map

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 39df730b09774bd860e39ea208a48d15078236cb ] Detected via gcc's ASan: Direct leak of 2048 byte(s) in 64 object(s) allocated from: 6 #0 0x7f606512e370 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xee370) 7 #1 0x556b0f1d7ddd in thread_map__rea

[PATCH 5.0 10/93] ALSA: echoaudio: add a check for ioremap_nocache

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6ade657d6125ec3ec07f95fa51e28138aef6208f ] In case ioremap_nocache fails, the fix releases chip and returns an error code upstream to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/echoaudio/echo

[PATCH 5.0 57/93] x86/hyperv: Prevent potential NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 534c89c22e26b183d838294f0937ee092c82ad3a ] The page allocation in hv_cpu_init() can fail, but the code does not have a check for that. Add a check and return -ENOMEM when the allocation fails. [ tglx: Massaged changelog ] Signed-off-by: Kangjie Lu Signed-off-by: Thomas Gleixn

[PATCH 5.0 31/93] scsi: core: Also call destroy_rcu_head() for passthrough requests

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit db983f6eef57a9d78af79bc32389b7e60eb3c47d ] cmd->rcu is initialized by scsi_initialize_rq(). For passthrough requests, blk_get_request() calls scsi_initialize_rq(). For filesystem requests, scsi_init_command() calls scsi_initialize_rq(). Make sure that destroy_rcu_head() is called

[PATCH 5.0 56/93] x86/hpet: Prevent potential NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2e84f116afca3719c9d0a1a78b47b48f75fd5724 ] hpet_virt_address may be NULL when ioremap_nocache fail, but the code lacks a check. Add a check to prevent NULL pointer dereference. Signed-off-by: Aditya Pakki Signed-off-by: Thomas Gleixner Cc: k...@umn.edu Cc: Borislav Petkov Cc

[PATCH 5.0 72/93] net: hns3: Fix NULL deref when unloading driver

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit c8a8045b2d0a974149d65bbe6a7acbcde93cf85b ] When the driver is unloading, if there is a calling of ndo_open occurs between phy_disconnect() and unregister_netdev(), it will end up causing the kernel to eventually hit a NULL deref: [14942.417828] Unable to handle kernel NULL point

[PATCH 5.0 79/93] f2fs: sync filesystem after roll-forward recovery

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 812a95977fd2f0d1f220c716a98a7f22e22f488d ] Some works after roll-forward recovery can get an error which will release all the data structures. Let's flush them in order to make it clean. One possible corruption came from: [ 90.400500] list_del corruption. prev->next should be

[PATCH 5.0 73/93] crypto: axis - fix for recursive locking from bottom half

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit c34a83820f59bb275e5f2d55cd5ea99c64f6ef23 ] Clients may submit a new requests from the completion callback context. The driver was not prepared to receive a request in this state because it already held the request queue lock and a recursive lock error is triggered. Now all compl

[PATCH 5.0 78/93] PCI/ASPM: Save LTR Capability for suspend/resume

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit dbbfadf2319005cf528b0f15f12a05d4e4644303 ] Latency Tolerance Reporting (LTR) allows Endpoints and Switch Upstream Ports to report their latency requirements to upstream components. If ASPM L1 PM substates are enabled, the LTR information helps determine when a Link enters L1.2 [

[PATCH 5.0 81/93] platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 238f9c11351f8af8534ae0318b4d9acc77b09ee8 ] On some platforms such as HP Elite-x2-1013-g3, the platform BIOS enforces XTAL to remain off before S0ix state can be achieved. This may not be optimum when we want to enable use cases like Low Power Audio, Wake on Voice etc which always

[PATCH 5.0 76/93] coresight: cpu-debug: Support for CA73 CPUs

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a0f890aba2be33377f4eb24e13633c4a76a68f38 ] This patch is to add the AMBA device ID for CA73 CPU, so that CPU debug module can be initialized successfully when a SoC contain CA73 CPUs. This patch has been verified on 96boards Hikey960. Signed-off-by: Leo Yan Signed-off-by: Math

[PATCH 5.0 64/93] fix incorrect error code mapping for OBJECTID_NOT_FOUND

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 85f9987b236cf46e06ffdb5c225cf1f3c0acb789 ] It was mapped to EIO which can be confusing when user space queries for an object GUID for an object for which the server file system doesn't support (or hasn't saved one). As Amir Goldstein suggested this is similar to ENOATTR (equival

[PATCH 5.0 85/93] cifs: return -ENODATA when deleting an xattr that does not exist

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2109464184919f81efd593b4008291448c522815 ] BUGZILLA: https://bugzilla.kernel.org/show_bug.cgi?id=202007 When deleting an xattr/EA: SMB2/3 servers will return SUCCESS when clients delete non-existing EAs. This means that we need to first QUERY the server and check if the EA exist

[PATCH 5.0 86/93] lib/div64.c: off by one in shift

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cdc94a37493135e355dfc0b0e086d84e3eadb50d ] fls counts bits starting from 1 to 32 (returns 0 for zero argument). If we add 1 we shift right one bit more and loose precision from divisor, what cause function incorect results with some numbers. Corrected code was tested in user-sp

[PATCH 5.0 84/93] appletalk: Fix use-after-free in atalk_proc_exit

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6377f787aeb945cae7abbb6474798de129e1f3ac ] KASAN report this: BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71 Read of size 8 at addr 8881f41fe5b0 by task syz-executor.0/2806 CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45 Hard

[PATCH 5.0 87/93] rxrpc: Fix client call connect/disconnect race

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 930c9f9125c85b5134b3e711bc252ecc094708e3 ] rxrpc_disconnect_client_call() reads the call's connection ID protocol value (call->cid) as part of that function's variable declarations. This is bad because it's not inside the locked section and so may race with someone granting use

[PATCH 5.0 89/93] f2fs: fix to use kvfree instead of kzfree

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2a6a7e722e7a78d774ce02b847c5b183a3ff2672 ] As Jiqun Li reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202747 System can panic due to using wrong allocate/free function pair in xattr interface: - use kvmalloc to allocate memory - use kzfree to free memory Let

[PATCH 5.0 65/93] cifs: Fix slab-out-of-bounds when tracing SMB tcon

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 68ddb496800acdb46172b4981dc3753ea9b39c25 ] This patch fixes the following KASAN report: [ 779.044746] BUG: KASAN: slab-out-of-bounds in string+0xab/0x180 [ 779.044750] Read of size 1 at addr 88814f327968 by task trace-cmd/2812 [ 779.044756] CPU: 1 PID: 2812 Comm: trace-c

[PATCH 5.0 90/93] f2fs: fix to add refcount once page is tagged PG_private

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 240a59156d9bcfabceddb66be449e7b32fb5dc4a ] As Gao Xiang reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202749 f2fs may skip pageout() due to incorrect page reference count. The problem here is that MM defined the rule [1] very clearly that once page was set

[PATCH 5.0 67/93] ext4: prohibit fstrim in norecovery mode

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 18915b5873f07e5030e6fb108a050fa7c71c59fb ] The ext4 fstrim implementation uses the block bitmaps to find free space that can be discarded. If we haven't replayed the journal, the bitmaps will be stale and we absolutely *cannot* use stale metadata to zap the underlying storage.

[PATCH 5.0 70/93] drm/amdgpu: psp_ring_destroy cause psp->km_ring.ring_mem NULL

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 14d20ec7f31ef96a2e7dcf7880b13dde1d473b56 ] psp_ring_destroy inside psp_load_fw cause psp->km_ring.ring_mem NULL. Call Trace occurred when psp_cmd_submit. should be psp_ring_stop instead. Reviewed-by: Xiangliang Yu Signed-off-by: Wentao Lou Signed-off-by: Alex Deucher Signed-o

[PATCH 5.0 91/93] include/linux/swap.h: use offsetof() instead of custom __swapoffset macro

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a4046c06be50a4f01d435aa7fe57514818e6cc82 ] Use offsetof() to calculate offset of a field to take advantage of compiler built-in version when possible, and avoid UBSAN warning when compiling with Clang: UBSAN: Undefined behaviour in mm/swapfile.c:3010:38 member access within

[PATCH 5.0 68/93] lkdtm: Print real addresses

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4c411157a42f122051ae3469bee0b5cabe89e139 ] Today, when doing a lkdtm test before the readiness of the random generator, (ptrval) is printed instead of the address at which it perform the fault: [ 1597.337030] lkdtm: Performing direct entry EXEC_USERSPACE [ 1597.337142] lkdtm: at

[PATCH 5.0 66/93] x86/gart: Exclude GART aperture from kcore

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ffc8599aa9763f39f6736a79da4d1575e7006f9a ] On machines where the GART aperture is mapped over physical RAM, /proc/kcore contains the GART aperture range. Accessing the GART range via /proc/kcore results in a kernel crash. vmcore used to have the same issue, until it was fixed wi

[PATCH 5.0 93/93] IB/hfi1: Failed to drain send queue when QP is put into error state

2019-04-18 Thread Greg Kroah-Hartman
From: Kaike Wan commit 662d66466637862ef955f7f6e78a286d8cf0ebef upstream. When a QP is put into error state, all pending requests in the send work queue should be drained. The following sequence of events could lead to a failure, causing a request to hang: (1) The QP builds a packet and tries t

[PATCH 5.0 69/93] lkdtm: Add tests for NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 59a12205d3c32aee4c13ca36889fdf7cfed31126 ] Introduce lkdtm tests for NULL pointer dereference: check access or exec at NULL address, since these errors tend to be reported differently from the general fault error text. For example from x86: pr_alert("BUG: unable to handle ke

[PATCH 5.0 62/93] x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e898e69d6b9475bf123f99b3c5d1a67bb7cb2361 ] When building with -Wsometimes-uninitialized, Clang warns: arch/x86/kernel/hw_breakpoint.c:355:2: warning: variable 'align' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] The default cannot be reache

[PATCH 5.0 83/93] drm/amdkfd: use init_mqd function to allocate object for hid_mqd (CI)

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cac734c2dbd2514f14c8c6a17caba1990d83bf1d ] if use the legacy method to allocate object, when mqd_hiq need to run uninit code, it will be cause WARNING call trace. eg: (s3 suspend test) [ 34.918944] Call Trace: [ 34.918948] [] dump_stack+0x19/0x1b [ 34.918950] [] __warn+0

[PATCH 5.0 88/93] f2fs: fix to dirty inode for i_mode recovery

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ca597bddedd94906cd761d8be6a3ad21292725de ] As Seulbae Kim reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202637 We didn't recover permission field correctly after sudden power-cut, the reason is in setattr we didn't add inode into global dirty list once i_mod

[PATCH 5.0 92/93] bpf: fix use after free in bpf_evict_inode

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 1da6c4d9140cb7c13e87667dc4e1488d6c8fc10f ] syzkaller was able to generate the following UAF in bpf: BUG: KASAN: use-after-free in lookup_last fs/namei.c:2269 [inline] BUG: KASAN: use-after-free in path_lookupat.isra.43+0x9f8/0xc00 fs/namei.c:2318 Read of size 1 at addr ff

[PATCH 5.0 82/93] ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 143c2a89e0e5fda6c6fd08d7bc1126438c19ae90 ] When running kprobe on -rt kernel, the below bug is caught: |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 |in_atomic(): 1, irqs_disabled(): 128, pid: 14, name: migration/0 |Preemption disabled at:[

Re: [PATCH 4/5] mm: rework non-root kmem_cache lifecycle management

2019-04-18 Thread Roman Gushchin
On Thu, Apr 18, 2019 at 07:05:24AM -0700, Shakeel Butt wrote: > On Wed, Apr 17, 2019 at 8:07 PM Roman Gushchin wrote: > > > > On Wed, Apr 17, 2019 at 06:55:12PM -0700, Shakeel Butt wrote: > > > On Wed, Apr 17, 2019 at 5:39 PM Roman Gushchin wrote: > > > > > > > > On Wed, Apr 17, 2019 at 04:41:01P

[PATCH 4.14 61/92] drm/panel: panel-innolux: set display off in innolux_panel_unprepare

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 46f3ceaffa81e846677bca8668e0ad40e643cffd ] Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable() to innolux_panel_unprepare(), so they are consistent with innolux_panel_enable() and innolux_panel_prepare(). This also fixes some mode check and irq timeout issue in MTK

Re: [PATCH v2 20/36] coresight: Make device to CPU mapping generic

2019-04-18 Thread Mathieu Poirier
On Mon, Apr 15, 2019 at 05:04:03PM +0100, Suzuki K Poulose wrote: > The CoreSight components ETM and CPU-Debug are always associated > with CPUs. Replace the of_coresight_get_cpu() with a platform > agnostic helper, in preparation to add ACPI support. > > Cc: Mathieu Poirier > Signed-off-by: Suzu

Re: pull-request: wireless-drivers-next 2019-04-18

2019-04-18 Thread David Miller
From: Kalle Valo Date: Thu, 18 Apr 2019 16:48:20 +0300 > here's a pull request to net-next for v5.2, more info below. But do note > that this time we have two trivial conflicts in iwlwifi, here are > Stephen's example resolutions: > > https://lkml.kernel.org/r/20190415120133.40c0f...@canb.auug.o

[PATCH 5.0 71/93] drm/panel: panel-innolux: set display off in innolux_panel_unprepare

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 46f3ceaffa81e846677bca8668e0ad40e643cffd ] Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable() to innolux_panel_unprepare(), so they are consistent with innolux_panel_enable() and innolux_panel_prepare(). This also fixes some mode check and irq timeout issue in MTK

Re: [PATCH 12/21] dma-iommu: factor atomic pool allocations into helpers

2019-04-18 Thread Robin Murphy
On 18/04/2019 17:35, Christoph Hellwig wrote: On Thu, Apr 18, 2019 at 04:06:56PM +0100, Robin Murphy wrote: OK, I'm still looking at mmap and get_sgtable, but for now I've pushed out a partial branch that consolidates alloc and free in a way which makes sense to me: git://linux-arm.org/linux

[PATCH 4.19 093/110] drm/panel: panel-innolux: set display off in innolux_panel_unprepare

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 46f3ceaffa81e846677bca8668e0ad40e643cffd ] Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable() to innolux_panel_unprepare(), so they are consistent with innolux_panel_enable() and innolux_panel_prepare(). This also fixes some mode check and irq timeout issue in MTK

Re: [PATCH 4.19 005/110] perf data: Dont store auxtrace index for directory data file

2019-04-18 Thread Dan Rue
On Thu, Apr 18, 2019 at 07:55:54PM +0200, Greg Kroah-Hartman wrote: > [ Upstream commit cd3dd8dd8ff62374d90cb3f2e54b8c94106c7810 ] > > We can't store the auxtrace index when we store into multiple files, > because we keep only offset for it, not the file. > > The auxtrace data will be processed c

Re: [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-18 Thread Dan Williams
On Thu, Apr 18, 2019 at 9:18 AM Christoph Hellwig wrote: > > On Thu, Apr 18, 2019 at 09:05:05AM -0700, Dan Williams wrote: > > > > I'd either add a comment about avoiding retpoline overhead here or just > > > > make ->flush == NULL mean generic_nvdimm_flush(). Just so that people > > > > don't >

[PATCH 5.0 80/93] drm/nouveau/volt/gf117: fix speedo readout register

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fc782242749fa4235592854fafe1a1297583c1fb ] GF117 appears to use the same register as GK104 (but still with the general Fermi readout mechanism). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs Signed-off-by: Sa

[PATCH 5.0 35/93] perf tools: Fix errors under optimization level -Og

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 11c1ea6f1a9bc97bf857fd12f72eacb6c69794e2 ] Optimization level '-Og' offers a reasonable level of optimization while maintaining fast compilation and a good debugging experience. This patch tries to make it work. $ make DEBUG=1 EXTRA_CFLAGS='-Og' bench/epoll-ctl.c: In functio

[PATCH 5.0 77/93] PCI: Blacklist power management of Gigabyte X299 DESIGNARE EX PCIe ports

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 85b0cae89d5266e6a7abb2e83c6f716326fc494c ] Gigabyte X299 DESIGNARE EX motherboard has one PCIe root port that is connected to an Alpine Ridge Thunderbolt controller. This port has slot implemented bit set in the config space but other than that it is not hotplug capable in the s

[PATCH 5.0 75/93] RDMA/hns: Fix the Oops during rmmod or insmod ko when reset occurs

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d061effc36f7bd38a12912977a37a50ac9140d11 ] In the reset process, the hns3 NIC driver notifies the RoCE driver to perform reset related processing by calling the .reset_notify() interface registered by the RoCE driver in hip08 SoC. In the current version, if a reset occurs simult

[PATCH 5.0 26/93] scsi: iscsi: flush running unbind operations when removing a session

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 165aa2bfb42904b1bec4bf2fa257c8c603c14a06 ] In some cases, the iscsi_remove_session() function is called while an unbind_work operation is still running. This may cause a situation where sysfs objects are removed in an incorrect order, triggering a kernel warning. [ 605.249442]

[PATCH 5.0 74/93] Revert "ACPI / EC: Remove old CLEAR_ON_RESUME quirk"

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit b6a3e1475b0220378ad32bdf4d8692f058b1fc03 ] On some Samsung hardware, it is necessary to clear events accumulated by the EC during sleep. These ECs stop reporting GPEs until they are manually polled, if too many events are accumulated. Thus the CLEAR_ON_RESUME quirk is introduced

[PATCH 5.0 33/93] perf stat: Fix --no-scale

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 75998bb263bf48c1c85d78cd2d2f3a97d3747cab ] The -c option to enable multiplex scaling has been useless for quite some time because scaling is default. It's only useful as --no-scale to disable scaling. But the non scaling code path has bitrotted and doesn't print anything because

[PATCH 5.0 30/93] tools/power turbostat: return the exit status of a command

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2a95496634a017c19641f26f00907af75b962f01 ] turbostat failed to return a non-zero exit status even though the supplied command (turbostat ) failed. Currently when turbostat forks a command it returns zero instead of the actual exit status of the command. Modify the code to retur

[PATCH 5.0 59/93] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs Signed-off-by: Sasha Levin --- drivers/gpu/dr

[PATCH 5.0 45/93] perf evsel: Free evsel->counts in perf_evsel__exit()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 42dfa451d825a2ad15793c476f73e7bbc0f9d312 ] Using gcc's ASan, Changbin reports: = ==7494==ERROR: LeakSanitizer: detected memory leaks Direct leak of 48 byte(s) in 1 object(s) allocated from: #0 0x7f0333a

[PATCH 5.0 55/93] irqchip/mbigen: Dont clear eventid when freeing an MSI

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit fca269f201a8d9985c0a31fb60b15d4eb57cef80 ] mbigen_write_msg clears eventid bits of a mbigen register when free a interrupt, because msi_domain_deactivate memset struct msg to zero. Then multiple mbigen pins with zero eventid will report the same interrupt number. The eventid cle

[PATCH 5.0 29/93] x86/mm: Dont leak kernel addresses

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a3151724437f54076cc10bc02b1c4f0003ae36cd ] Since commit: ad67b74d2469d9b8 ("printk: hash addresses printed with %p") at boot "ptrval" is printed instead of actual addresses: found SMP MP-table at [mem 0x000f5cc0-0x000f5ccf] mapped at [(ptrval)] Instead

[PATCH 5.0 47/93] perf tests: Fix memory leak by expr__find_other() in test__expr()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit f97a8991d3b998e518f56794d879f645964de649 ] = ==7506==ERROR: LeakSanitizer: detected memory leaks Direct leak of 13 byte(s) in 3 object(s) allocated from: #0 0x7f03339d6070 in __interceptor_strdup (/usr/

[PATCH 5.0 54/93] irqchip/stm32: Dont set rising configuration registers at init

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6a77623d78b307b34d4cf7886da6a907689bf388 ] The rising configuration status register (rtsr) is not banked. As it is shared with the co-processor, it should not be written at probe time, else the co-processor configuration will be lost. Fixes: f9fc1745501e ("irqchip/stm32: Add hos

Re: [PATCH 1/5] glibc: Perform rseq(2) registration at C startup and thread creation (v8)

2019-04-18 Thread Mathieu Desnoyers
- On Apr 18, 2019, at 1:37 PM, Szabolcs Nagy szabolcs.n...@arm.com wrote: > On 18/04/2019 18:10, Mathieu Desnoyers wrote: >> >> - On Apr 18, 2019, at 12:07 PM, Szabolcs Nagy szabolcs.n...@arm.com >> wrote: >> >>> On 18/04/2019 16:41, Mathieu Desnoyers wrote: - On Apr 18, 2019,

[PATCH 5.0 28/93] sched/core: Fix buffer overflow in cgroup2 property cpu.max

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 4c47acd8248fc6dc519fb4e08d1522105b7a ] Add limit into sscanf format string for on-stack buffer. Signed-off-by: Konstantin Khlebnikov Signed-off-by: Peter Zijlstra (Intel) Acked-by: Tejun Heo Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc

Re: [PATCH 4.14 57/92] iommu/dmar: Fix buffer overflow during PCI bus notification

2019-04-18 Thread Gustavo A. R. Silva
[+cc Kees] On 4/18/19 12:57 PM, Greg Kroah-Hartman wrote: > [ Upstream commit cffaaf0c816238c45cd2d06913476c83eb50f682 ] > > Commit 57384592c433 ("iommu/vt-d: Store bus information in RMRR PCI > device path") changed the type of the path data, however, the change in > path type was not reflected

[PATCH 5.0 50/93] PM / Domains: Avoid a potential deadlock

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2071ac985d37efe496782c34318dbead93beb02f ] Lockdep warns that prepare_lock and genpd->mlock can cause a deadlock the deadlock scenario is like following: First thread is probing cs2000 cs2000_probe() clk_register() __clk_core_init() clk_prepare_lock()

[PATCH 5.0 52/93] drm/exynos/mixer: fix MIXER shadow registry synchronisation code

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6a3b45ada960ac475ec2b4103d43e57943b2b8d3 ] MIXER on Exynos5 SoCs uses different synchronisation method than Exynos4 to update internal state (shadow registers). Apparently the driver implements it incorrectly. The rule should be as follows: - do not request updating registers unt

[PATCH 5.0 41/93] perf hist: Add missing map__put() in error case

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cb6186aeffda4d27e56066c79e9579e7831541d3 ] We need to map__put() before returning from failure of sample__resolve_callchain(). Detected with gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Krister Johansen Cc: Na

[PATCH 5.0 49/93] ACPI / utils: Drop reference in test for device presence

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 54e3aca84e571559915998aa6cc05e5ac37c043b ] When commit 8661423eea1a ("ACPI / utils: Add new acpi_dev_present helper") introduced acpi_dev_present(), it missed the fact that bus_find_device() took a reference on the device found by it and the callers of acpi_dev_present() don't dr

[PATCH 5.0 44/93] perf top: Fix global-buffer-overflow issue

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 1e5b0cf8672e622257df024074e6e09bfbcb7750 ] The array str[] should have six elements. = ==4322==ERROR: AddressSanitizer: global-buffer-overflow on address 0x56463844e300 at pc 0x564637e7ad0d bp 0x7f30c8c89d10 sp

[PATCH 5.0 39/93] perf top: Delete the evlist before perf_session, fixing heap-use-after-free issue

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 0dba9e4be95b59e77060645ca8e37ca3231061f5 ] The evlist should be destroyed before the perf session. Detected with gcc's ASan: = ==27350==ERROR: AddressSanitizer: heap-use-after-free on address 0x62b02e38 at

[PATCH 5.0 53/93] irqchip/stm32: Dont clear rising/falling config registers at init

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 0dda09666f50eae9c5b794dd89b1fd8a8d89d714 ] Falling and rising configuration and status registers are not banked. As they are shared with M4 co-processor, they should not be cleared at probe time, else M4 co-processor configuration will be lost. Fixes: f9fc1745501e ("irqchip/stm3

[PATCH 5.0 36/93] perf config: Fix an error in the config template documentation

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9b40dff7ba3caaf0d1919f98e136fa3400bd34aa ] The option 'sort-order' should be 'sort_order'. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Fixes:

[PATCH 5.0 00/93] 5.0.9-stable review

2019-04-18 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.0.9 release. There are 93 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. Responses should be made by Sat Apr 20 16:03:33 UTC 2019. Anything received

[PATCH 5.0 03/93] inotify: Fix fsnotify_mark refcount leak in inotify_update_existing_watch()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 62c9d2674b31d4c8a674bee86b7edc6da2803aea ] Commit 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inotify_add_watch()") forgot to call fsnotify_put_mark() with IN_MASK_CREATE after fsnotify_find_mark() Fixes: 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inoti

[PATCH 5.0 09/93] ext4: report real fs size after failed resize

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6c7328400e0488f7d49e19e02290ba343b6811b2 ] Currently when the file system resize using ext4_resize_fs() fails it will report into log that "resized filesystem to ". However this may not be true in the case of failure. Use the current block count as returned by ext4_blocks_count

[PATCH 5.0 24/93] thermal/int340x_thermal: fix mode setting

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ] int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-

[PATCH 5.0 16/93] mmc: davinci: remove extraneous __init annotation

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9ce58dd7d9da3ca0d7cb8c9568f1c6f4746da65a ] Building with clang finds a mistaken __init tag: WARNING: vmlinux.o(.text+0x5e4250): Section mismatch in reference from the function davinci_mmcsd_probe() to the function .init.text:init_mmcsd_host() The function davinci_mmcsd_probe()

[PATCH 4.9 30/50] 9p: do not trust pdu content for stat item size

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2803cf4379ed252894f046cb8812a48db35294e3 ] v9fs_dir_readdir() could deadloop if a struct was sent with a size set to -2 Link: http://lkml.kernel.org/r/1536134432-11997-1-git-send-email-asmad...@codewreck.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88021 Signed-off

[PATCH 4.9 31/50] 9p locks: add mount option for lock retry interval

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 5e172f75e51e3de1b4274146d9b990f803cb5c2a ] The default P9_LOCK_TIMEOUT can be too long for some users exporting a local file system to a guest VM (30s), make this configurable at mount time. Link: http://lkml.kernel.org/r/1536295827-3181-1-git-send-email-asmad...@codewreck.org

[PATCH 4.9 25/50] x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit e898e69d6b9475bf123f99b3c5d1a67bb7cb2361 ] When building with -Wsometimes-uninitialized, Clang warns: arch/x86/kernel/hw_breakpoint.c:355:2: warning: variable 'align' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] The default cannot be reache

[PATCH 4.9 28/50] gpio: pxa: handle corner case of unprobed device

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9ce3ebe973bf4073426f35f282c6b955ed802765 ] In the corner case where the gpio driver probe fails, for whatever reason, the suspend and resume handlers will still be called as they have to be registered as syscore operations. This applies as well when no probe was called while the

[PATCH 4.9 50/50] net: stmmac: Set dma ring length before enabling the DMA

2019-04-18 Thread Greg Kroah-Hartman
From: Lars Persson This was fixed in upstream by commit 7d9e6c5afab6 ("net: stmmac: Integrate XGMAC into main driver flow") that is a new feature commit. We found a race condition in the DMA init sequence that hits if the PHY already has link up during stmmac_hw_setup. Since the ring length was

[PATCH 5.0 21/93] thermal: samsung: Fix incorrect check after code merge

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 3b5236cc5d086dd3ddd01113ee9255421aab9fab ] Merge commit 19785cf93b6c ("Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal") broke the code introduced by commit ffe6e16f14fa ("thermal: exynos: Reduce severity of too early temperature r

[PATCH 5.0 19/93] paride/pcd: cleanup queues when detection fails

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 81b74ac68c28fddb3589ad5d4d5e587baf4bb781 ] The driver allocates queues for all the units it potentially supports. But if we fail to detect any drives, then we fail loading the module without cleaning up those queues. This is now evident with the switch to blk-mq, though the bug h

[PATCH 4.9 46/50] lib/div64.c: off by one in shift

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cdc94a37493135e355dfc0b0e086d84e3eadb50d ] fls counts bits starting from 1 to 32 (returns 0 for zero argument). If we add 1 we shift right one bit more and loose precision from divisor, what cause function incorect results with some numbers. Corrected code was tested in user-sp

[PATCH 4.9 39/50] crypto: sha256/arm - fix crash bug in Thumb2 build

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 69216a545cf81b2b32d01948f7039315abaf75a0 ] The SHA256 code we adopted from the OpenSSL project uses a rather peculiar way to take the address of the round constant table: it takes the address of the sha256_block_data_order() routine, and substracts a constant known quantity to ar

[PATCH 4.9 38/50] kernel: hung_task.c: disable on suspend

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit a1c6ca3c6de763459a6e93b644ec6518c890ba1c ] It is possible to observe hung_task complaints when system goes to suspend-to-idle state: # echo freeze > /sys/power/state PM: Syncing filesystems ... done. Freezing user space processes ... (elapsed 0.001 seconds) done. OOM killer

[PATCH 4.9 36/50] ACPI / SBS: Fix GPE storm on recent MacBookPros

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit ca1721c5bee77105829cbd7baab8ee0eab85b06d ] On Apple machines, plugging-in or unplugging the power triggers a GPE for the EC. Since these machines expose an SBS device, this GPE ends up triggering the acpi_sbs_callback(). This in turn tries to get the status of the SBS charger. Ho

[PATCH 4.9 41/50] iommu/dmar: Fix buffer overflow during PCI bus notification

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit cffaaf0c816238c45cd2d06913476c83eb50f682 ] Commit 57384592c433 ("iommu/vt-d: Store bus information in RMRR PCI device path") changed the type of the path data, however, the change in path type was not reflected in size calculations. Update to use the correct type and prevent a b

[PATCH 4.9 32/50] f2fs: fix to do sanity check with current segment number

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 042be0f849e5fc24116d0afecfaf926eed5cac63 ] https://bugzilla.kernel.org/show_bug.cgi?id=200219 Reproduction way: - mount image - run poc code - umount image F2FS-fs (loop1): Bitmap was wrongly set, blk:15364 [ cut here ] kernel BUG at /home/yuchao/git/dev

[PATCH 4.9 35/50] ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6862fdf2201ab67cd962dbf0643d37db909f4860 ] "S3C2410 PM Suspend Memory CRC" feature (controlled by SAMSUNG_PM_CHECK config option) is incompatible with highmem (uses phys_to_virt() instead of proper mapping) which is used by the majority of Exynos boards. The issue manifests itsel

[PATCH 4.9 23/50] x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 18fb053f9b827bd98cfc64f2a35df8ab19745a1d ] There are comments in processor-cyrix.h advising you to _not_ make calls using the deprecated macros in this style: setCx86_old(CX86_CCR4, getCx86_old(CX86_CCR4) | 0x80); This is because it expands the macro into a non-functioning ca

[PATCH 4.9 19/50] perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 93faa52e8371f0291ee1ff4994edae2b336b6233 ] = ==7497==ERROR: LeakSanitizer: detected memory leaks Direct leak of 40 byte(s) in 1 object(s) allocated from: #0 0x7f0333a88f30 in __interceptor_malloc (/usr/

[PATCH 4.9 20/50] perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d982b33133284fa7efa0e52ae06b88f9be3ea764 ] = ==20875==ERROR: LeakSanitizer: detected memory leaks Direct leak of 1160 byte(s) in 1 object(s) allocated from: #0 0x7f1b6fc84138 in calloc (/usr/lib/x86_64-

[PATCH 4.9 05/50] ALSA: echoaudio: add a check for ioremap_nocache

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6ade657d6125ec3ec07f95fa51e28138aef6208f ] In case ioremap_nocache fails, the fix releases chip and returns an error code upstream to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/echoaudio/echo

[PATCH 4.9 07/50] IB/mlx4: Fix race condition between catas error reset and aliasguid flows

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 587443e7773e150ae29e643ee8f41a1eed226565 ] Code review revealed a race condition which could allow the catas error flow to interrupt the alias guid query post mechanism at random points. Thiis is fixed by doing cancel_delayed_work_sync() instead of cancel_delayed_work() during th

[PATCH 4.9 04/50] ext4: report real fs size after failed resize

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 6c7328400e0488f7d49e19e02290ba343b6811b2 ] Currently when the file system resize using ext4_resize_fs() fails it will report into log that "resized filesystem to ". However this may not be true in the case of failure. Use the current block count as returned by ext4_blocks_count

[PATCH 4.14 79/92] bpf: enable access to ax register also from verifier rewrite

2019-04-18 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 9b73bfdd08e73231d6a90ae6db4b46b3fbf56c30 upstream. Right now we are using BPF ax register in JIT for constant blinding as well as in interpreter as temporary variable. Verifier will not be able to use it simply because its use will get overridden from the former in b

[PATCH 4.9 12/50] tools/power turbostat: return the exit status of a command

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 2a95496634a017c19641f26f00907af75b962f01 ] turbostat failed to return a non-zero exit status even though the supplied command (turbostat ) failed. Currently when turbostat forks a command it returns zero instead of the actual exit status of the command. Modify the code to retur

[PATCH 4.9 11/50] thermal/int340x_thermal: fix mode setting

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 396ee4d0cd52c13b3f6421b8d324d65da5e7e409 ] int3400 only pushes the UUID into the firmware when the mode is flipped to "enable". The current code only exposes the mode flag if the firmware supports the PASSIVE_1 UUID, which not all machines do. Remove the restriction. Signed-off-

[PATCH 4.14 75/92] bpf: fix verifier NULL pointer dereference

2019-04-18 Thread Greg Kroah-Hartman
From: Craig Gallek commit 8c01c4f896aa3404af948880dcb29a2d51c833dc upstream. do_check() can fail early without allocating env->cur_state under memory pressure. Syzkaller found the stack below on the linux-next tree because of this. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be cau

[PATCH 4.9 16/50] perf top: Fix error handling in cmd_top()

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 70c819e4bf1c5f492768b399d898d458ccdad2b6 ] We should go to the cleanup path, to avoid leaks, detected using gcc's ASan. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMwa

[PATCH 4.14 92/92] [PATCH 4.19.y 2/2] mm: hide incomplete nr_indirectly_reclaimable in sysfs

2019-04-18 Thread Greg Kroah-Hartman
From: Konstantin Khlebnikov In upstream branch this fixed by commit b29940c1abd7 ("mm: rename and change semantics of nr_indirectly_reclaimable_bytes"). This fixes /sys/devices/system/node/node*/vmstat format: ... nr_dirtied 6613155 nr_written 5796802 11089216 ... Cc: # 4.19.y Fixes: 7aaf772

[PATCH 4.9 13/50] perf config: Fix an error in the config template documentation

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 9b40dff7ba3caaf0d1919f98e136fa3400bd34aa ] The option 'sort-order' should be 'sort_order'. Signed-off-by: Changbin Du Reviewed-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Milian Wolff Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Fixes:

[PATCH 4.14 74/92] bpf: fix verifier memory leaks

2019-04-18 Thread Greg Kroah-Hartman
From: Alexei Starovoitov commit 1969db47f8d0e800397abd4ee4e8d27d2b578587 upstream. fix verifier memory leaks Fixes: 638f5b90d460 ("bpf: reduce verifier memory consumption") Signed-off-by: Alexei Starovoitov Signed-off-by: David S. Miller Signed-off-by: Balbir Singh Signed-off-by: Greg Kroah-

[PATCH 4.9 02/50] perf/core: Restore mmap record type correctly

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit d9c1bb2f6a2157b38e8eb63af437cb22701d31ee ] On mmap(), perf_events generates a RECORD_MMAP record and then checks which events are interested in this record. There are currently 2 versions of mmap records: RECORD_MMAP and RECORD_MMAP2. MMAP2 is larger. The event configuration cont

[PATCH 5.0 13/93] drm/udl: use drm_gem_object_put_unlocked.

2019-04-18 Thread Greg Kroah-Hartman
[ Upstream commit 8f3b487685b2acf71b42bb30d68fd9271bec8695 ] When Daniel removed struct_mutex he didn't fix this call to the unlocked variant which is required since we no longer use struct mutex. This fixes a bunch of: WARNING: CPU: 4 PID: 1370 at drivers/gpu/drm/drm_gem.c:931 drm_gem_object_pu

<    2   3   4   5   6   7   8   9   10   >