[PATCH 4.4 57/84] drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()

2019-06-20 Thread Greg Kroah-Hartman
From: Murray McAllister commit bcd6aa7b6cbfd6f985f606c6f76046d782905820 upstream. If SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW is called with a surface ID of SVGA3D_INVALID_ID, the srf struct will remain NULL after vmw_cmd_res_check(), leading to a null pointer dereference in vmw_view_add(). Cc:

[PATCH 4.4 55/84] KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 19ec166c3f39fe1d3789888a74cc95544ac266d4 ] kselftests exposed a problem in the s390 handling for memory slots. Right now we only do proper memory slot handling for creation of new memory slots. Neither MOVE, nor DELETION are handled properly. Let us implement those. Signed-off-b

[PATCH 4.4 40/84] ALSA: seq: Cover unsubscribe_port() in list_mutex

2019-06-20 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 7c32ae35fbf9cffb7aa3736f44dec10c944ca18e upstream. The call of unsubscribe_port() which manages the group count and module refcount from delete_and_unsubscribe_port() looks racy; it's not covered by the group list lock, and it's likely a cause of the reported unbalance

[PATCH 4.4 39/84] Revert "Bluetooth: Align minimum encryption key size for LE and BR/EDR connections"

2019-06-20 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit d016dc1bd29a2cfb0707fc6fb290ccd21f3b139c which is commit d5bb334a8e171b262e48f378bd2096c0ea458265 upstream. Lots of people have reported issues with this patch, and as there does not seem to be a fix going into Linus's kernel tree any time soon, rever

[PATCH 4.4 75/84] i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ] If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user will not be freed. Pump index up so it will be freed. Fixes: 838bfa6049fb ("i2c-dev: Add support for I2C_M_RECV_LEN") Signed-off-by: Yingjoe Chen Signed-off-by: Wolfr

[PATCH 4.4 65/84] ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 65a3c497c0e965a552008db8bc2653f62bc925a1 ] Before taking a refcount, make sure the object is not already scheduled for deletion. Same fix is needed in ipv6_flowlabel_opt() Fixes: 18367681a10b ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.") Signed-off-b

[PATCH 4.4 77/84] ia64: fix build errors by exporting paddr_to_nid()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 9a626c4a6326da4433a0d4d4a8a7d1571caf1ed3 ] Fix build errors on ia64 when DISCONTIGMEM=y and NUMA=y by exporting paddr_to_nid(). Fixes these build errors: ERROR: "paddr_to_nid" [sound/core/snd-pcm.ko] undefined! ERROR: "paddr_to_nid" [net/sunrpc/sunrpc.ko] undefined! ERROR: "pad

[PATCH 4.4 76/84] configfs: Fix use-after-free when accessing sd->s_dentry

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f6122ed2a4f9c9c1c073ddf6308d1b2ac10e0781 ] In the vfs_statx() context, during path lookup, the dentry gets added to sd->s_dentry via configfs_attach_attr(). In the end, vfs_statx() kills the dentry by calling path_put(), which invokes configfs_d_iput(). Ideally, this dentry must

[PATCH 4.4 74/84] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); ^ ./incl

[PATCH 4.4 66/84] lapb: fixed leak of control-blocks.

2019-06-20 Thread Greg Kroah-Hartman
From: Jeremy Sowden [ Upstream commit 6be8e297f9bcea666ea85ac7a6cd9d52d6deaf92 ] lapb_register calls lapb_create_cb, which initializes the control- block's ref-count to one, and __lapb_insert_cb, which increments it when adding the new block to the list of blocks. lapb_unregister calls __lapb_r

[PATCH 4.4 84/84] Abort file_remove_privs() for non-reg. files

2019-06-20 Thread Greg Kroah-Hartman
From: Alexander Lochmann commit f69e749a49353d96af1a293f56b5b56de59c668a upstream. file_remove_privs() might be called for non-regular files, e.g. blkdev inode. There is no reason to do its job on things like blkdev inodes, pipes, or cdevs. Hence, abort if file does not refer to a regular inode.

[PATCH 4.4 68/84] sunhv: Fix device naming inconsistency between sunhv_console and sunhv_reg

2019-06-20 Thread Greg Kroah-Hartman
From: John Paul Adrian Glaubitz [ Upstream commit 07a6d63eb1b54b5fb38092780fe618dfe1d96e23 ] In d5a2aa24, the name in struct console sunhv_console was changed from "ttyS" to "ttyHV" while the name in struct uart_ops sunhv_pops remained unchanged. This results in the hypervisor console device to

[PATCH 4.4 82/84] Revert "crypto: crypto4xx - properly set IV after de- and encrypt"

2019-06-20 Thread Greg Kroah-Hartman
From: Greg Kroah-Hartman This reverts commit e9a60ab1609a7d975922adad1bf9c46ac6954584 which is commit fc340115ffb8235c1bbd200c28855e6373d0dd1a upstream. Hauke writes that this breaks the build and should be reverted. Reported-by: Hauke Mehrtens Cc: Christian Lamparter Cc: Herbert Xu Cc: Sash

[PATCH 4.4 83/84] coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping

2019-06-20 Thread Greg Kroah-Hartman
From: Andrea Arcangeli commit 04f5866e41fb70690e28397487d8bd8eea7d712a upstream. The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization o

[PATCH 4.4 70/84] x86/CPU/AMD: Dont force the CPB cap when running under a hypervisor

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2ac44ab608705948564791ce1d15d43ba81a1e38 ] For F17h AMD CPUs, the CPB capability ('Core Performance Boost') is forcibly set, because some versions of that chip incorrectly report that they do not have it. However, a hypervisor may filter out the CPB capability, for good reasons

[PATCH 4.4 81/84] scsi: libsas: delete sas port if expander discover failed

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3b0541791453fbe7f42867e310e0c9eb6295364d ] The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be deleted when the expander failed to discover. This will cause resource leak and a further issue of kernel BUG like below: [159785.843156] port-2:17:29: trying

[PATCH 4.9 005/117] ARM: prevent tracing IPI_CPU_BACKTRACE

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit be167862ae7dd85c56d385209a4890678e1b0488 ] Patch series "compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING", v3. This patch (of 11): When function tracing for IPIs is enabled, we get a warning for an overflow of the ipi_types array with the IPI_CPU_BACKTRACE type as

[PATCH 4.9 004/117] ipc: prevent lockup on alloc_msg and free_msg

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit d6a2946a88f524a47cc9b79279667137899db807 ] msgctl10 of ltp triggers the following lockup When CONFIG_KASAN is enabled on large memory SMP systems, the pages initialization can take a long time, if msgctl10 requests a huge block memory, and it will block rcu scheduler, so release

[PATCH 4.9 001/117] rapidio: fix a NULL pointer dereference when create_workqueue() fails

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 23015b22e47c5409620b1726a677d69e5cd032ba ] In case create_workqueue fails, the fix releases resources and returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Acked-by: Alexandre Bounine Cc: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linu

[PATCH 4.4 72/84] perf/ring_buffer: Add ordering to rb->nest increment

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3f9fbe9bd86c534eba2faf5d840fd44c6049f50e ] Similar to how decrementing rb->next too early can cause data_head to (temporarily) be observed to go backward, so too can this happen when we increment too late. This barrier() ensures the rb->head load happens after the increment, bot

[PATCH 4.9 021/117] f2fs: fix to avoid panic in do_recover_data()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 22d61e286e2d9097dae36f75ed48801056b77cac ] As Jungyeon reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203227 - Overview When mounting the attached crafted image, following errors are reported. Additionally, it hangs on sync after trying to mount it. The imag

[PATCH 4.9 011/117] kernel/sys.c: prctl: fix false positive in validate_prctl_map()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a9e73998f9d705c94a8dca9687633adc0f24a19a ] While validating new map we require the @start_data to be strictly less than @end_data, which is fine for regular applications (this is why this nit didn't trigger for that long). These members are set from executable loaders such as el

[PATCH 4.9 020/117] ntp: Allow TAI-UTC offset to be set to zero

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fdc6bae940ee9eb869e493990540098b8c0fd6ab ] The ADJ_TAI adjtimex mode sets the TAI-UTC offset of the system clock. It is typically set by NTP/PTP implementations and it is automatically updated by the kernel on leap seconds. The initial value is zero (which applications may interp

[PATCH 4.9 008/117] mm/cma.c: fix crash on CMA allocation if bitmap allocation fails

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1df3a339074e31db95c4790ea9236874b13ccd87 ] f022d8cb7ec7 ("mm: cma: Don't crash on allocation if CMA area can't be activated") fixes the crash issue when activation fails via setting cma->count as 0, same logic exists if bitmap allocation fails. Link: http://lkml.kernel.org/r/201

[PATCH 4.9 009/117] mm/cma_debug.c: fix the break condition in cma_maxchunk_get()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f0fd50504a54f5548eb666dc16ddf8394e44e4b7 ] If not find zero bit in find_next_zero_bit(), it will return the size parameter passed in, so the start bit should be compared with bitmap_maxno rather than cma->count. Although getting maxchunk is working fine due to zero value of orde

[PATCH 4.9 026/117] watchdog: imx2_wdt: Fix set_timeout for big timeout values

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit b07e228eee69601addba98b47b1a3850569e5013 ] The documentated behavior is: if max_hw_heartbeat_ms is implemented, the minimum of the set_timeout argument and max_hw_heartbeat_ms should be used. This patch implements this behavior. Previously only the first 7bits were used and the i

[PATCH 4.9 025/117] uml: fix a boot splat wrt use of cpu_all_mask

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 689a58605b63173acb0a8cf954af6a8f60440c93 ] Memory: 509108K/542612K available (3835K kernel code, 919K rwdata, 1028K rodata, 129K init, 211K bss, 33504K reserved, 0K cma-reserved) NR_IRQS: 15 clocksource: timer: mask: 0x max_cycles: 0x1cd42e205, max_idle_ns: 8815

[PATCH 4.9 023/117] f2fs: fix to do sanity check on valid block count of segment

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit e95bcdb2fefa129f37bd9035af1d234ca92ee4ef ] As Jungyeon reported in bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203233 - Overview When mounting the attached crafted image and running program, following errors are reported. Additionally, it hangs on sync after running

[PATCH 4.9 029/117] ALSA: hda - Register irq handler after the chip initialization

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f495222e28275222ab6fd93813bd3d462e16d340 ] Currently the IRQ handler in HD-audio controller driver is registered before the chip initialization. That is, we have some window opened between the azx_acquire_irq() call and the CORB/RIRB setup. If an interrupt is triggered in this

[PATCH 4.9 028/117] iommu/vt-d: Set intel_iommu_gfx_mapped correctly

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit cf1ec4539a50bdfe688caad4615ca47646884316 ] The intel_iommu_gfx_mapped flag is exported by the Intel IOMMU driver to indicate whether an IOMMU is used for the graphic device. In a virtualized IOMMU environment (e.g. QEMU), an include-all IOMMU is used for graphic device. This flag

[PATCH 4.9 012/117] drivers: thermal: tsens: Dont print error message on -EPROBE_DEFER

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fc7d18cf6a923cde7f5e7ba2c1105bb106d3e29a ] We print a calibration failure message on -EPROBE_DEFER from nvmem/qfprom as follows: [3.003090] qcom-tsens 4a9000.thermal-sensor: version: 1.4 [3.005376] qcom-tsens 4a9000.thermal-sensor: tsens calibration failed [3.113248]

[PATCH 4.9 033/117] x86/PCI: Fix PCI IRQ routing table memory leak

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ea094d53580f40c2124cef3d072b73b2425e7bfd ] In pcibios_irq_init(), the PCI IRQ routing table 'pirq_table' is first found through pirq_find_routing_table(). If the table is not found and CONFIG_PCI_BIOS is defined, the table is then allocated in pcibios_get_irq_routing_table() usi

[PATCH 4.9 038/117] ARM: dts: imx7d: Specify IMX7D_CLK_IPG as "ipg" clock to SDMA

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 412b032a1dc72fc9d1c258800355efa6671b6315 ] Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX7D_CLK_SDMA resu

[PATCH 4.9 037/117] ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ahb" clock to SDMA

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit cc839d0f8c284fcb7591780b568f13415bbb737c ] Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6SL_CLK_SDMA res

[PATCH 4.9 014/117] mfd: intel-lpss: Set the device in reset state when init

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit dad06532292d77f37fbe831a02948a593500f682 ] In virtualized setup, when system reboots due to warm reset interrupt storm is seen. Call Trace: dump_stack+0x70/0xa5 __report_bad_irq+0x2e/0xc0 note_interrupt+0x248/0x290 ? add_interrupt_randomness+0x30/0x220 handle_irq_event_percpu+0

[PATCH 4.9 040/117] ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ipg" clock to SDMA

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 8979117765c19edc3b01cc0ef853537bf93eea4b ] Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6SX_CLK_SDMA res

[PATCH 4.9 018/117] objtool: Dont use ignore flag for fake jumps

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit e6da9567959e164f82bc81967e0d5b10dee870b4 ] The ignore flag is set on fake jumps in order to keep add_jump_destinations() from setting their jump_dest, since it already got set when the fake jump was created. But using the ignore flag is a bit of a hack. It's normally used to sk

[PATCH 4.9 016/117] perf/x86/intel: Allow PEBS multi-entry in watermark mode

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit c7a286577d7592720c2f179aadfb325a1ff48c95 ] This patch fixes a restriction/bug introduced by: 583feb08e7f7 ("perf/x86/intel: Fix handling of wakeup_events for multi-entry PEBS") The original patch prevented using multi-entry PEBS when wakeup_events != 0. However given that w

[PATCH 4.9 013/117] mfd: tps65912-spi: Add missing of table registration

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 9e364e87ad7f2c636276c773d718cda29d62b741 ] MODULE_DEVICE_TABLE(of, should be called to complete DT OF mathing mechanism and register it. Before this patch: modinfo drivers/mfd/tps65912-spi.ko | grep alias alias: spi:tps65912 After this patch: modinfo drivers/mfd/tps65

[PATCH 4.9 015/117] mfd: twl6040: Fix device init errors for ACCCTL register

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 48171d0ea7caccf21c9ee3ae75eb370f2a756062 ] I noticed that we can get a -EREMOTEIO errors on at least omap4 duovero: twl6040 0-004b: Failed to write 2d = 19: -121 And then any following register access will produce errors. There 2d offset above is register ACCCTL that gets writ

[PATCH 4.9 039/117] ARM: dts: imx6ul: Specify IMX6UL_CLK_IPG as "ipg" clock to SDMA

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 7b3132ecefdd1fcdf6b86e62021d0e55ea8034db ] Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6UL_CLK_SDMA res

[PATCH 4.9 010/117] mm/slab.c: fix an infinite loop in leaks_show()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 745e10146c31b1c6ed3326286704ae251b17f663 ] "cat /proc/slab_allocators" could hang forever on SMP machines with kmemleak or object debugging enabled due to other CPUs running do_drain() will keep making kmemleak_object or debug_objects_cache dirty and unable to escape the first lo

[PATCH 4.9 056/117] ALSA: seq: Cover unsubscribe_port() in list_mutex

2019-06-20 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 7c32ae35fbf9cffb7aa3736f44dec10c944ca18e upstream. The call of unsubscribe_port() which manages the group count and module refcount from delete_and_unsubscribe_port() looks racy; it's not covered by the group list lock, and it's likely a cause of the reported unbalance

[PATCH 4.9 054/117] ARM: exynos: Fix undefined instruction during Exynos5422 resume

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 4d8e3e951a85620272ce27f2c738a3eeef8c ] During early system resume on Exynos5422 with performance counters enabled the following kernel oops happens: Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 1433 Comm: bas

[PATCH 4.9 043/117] platform/x86: intel_pmc_ipc: adding error handling

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit e61985d0550df8c2078310202aaad9b41049c36c ] If punit or telemetry device initialization fails, pmc driver should unregister and return failure. This change is to fix a kernel panic when removing kernel module intel_pmc_ipc. Fixes: 48c1917088ba ("platform:x86: Add Intel telemetry

[PATCH 4.9 059/117] mm/list_lru.c: fix memory leak in __memcg_init_list_lru_node

2019-06-20 Thread Greg Kroah-Hartman
From: Shakeel Butt commit 3510955b327176fd4cbab5baa75b449f077722a2 upstream. Syzbot reported following memory leak: da RBX: 0003 RCX: 00441f79 BUG: memory leak unreferenced object 0x888114f26040 (size 32): comm "syz-executor626", pid 7056, jiffies 4294948701 (a

[PATCH 4.9 058/117] libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk

2019-06-20 Thread Greg Kroah-Hartman
From: Hans de Goede commit 31f6264e225fb92cf6f4b63031424f20797c297d upstream. We've received a bugreport that using LPM with ST1000LM024 drives leads to system lockups. So it seems that these models are buggy in more then 1 way. Add NOLPM quirk to the existing quirks entry for BROKEN_FPDMA_AA.

[PATCH 4.9 061/117] [PATCH] signal/ptrace: Dont leak unitialized kernel memory with PTRACE_PEEK_SIGINFO

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f6e2aa91a46d2bc79fce9b93a988dbe7655c90c0 ] Recently syzbot in conjunction with KMSAN reported that ptrace_peek_siginfo can copy an uninitialized siginfo to userspace. Inspecting ptrace_peek_siginfo confirms this. The problem is that off when initialized from args.off can be init

[PATCH 4.9 057/117] ALSA: oxfw: allow PCM capture for Stanton SCS.1m

2019-06-20 Thread Greg Kroah-Hartman
From: Takashi Sakamoto commit d8fa87c368f5b4096c4746894fdcc195da285df1 upstream. Stanton SCS.1m can transfer isochronous packet with Multi Bit Linear Audio data channels, therefore it allows software to capture PCM substream. However, ALSA oxfw driver doesn't. This commit changes the driver to

[PATCH 4.9 063/117] media: v4l2-ioctl: clear fields in s_parm

2019-06-20 Thread Greg Kroah-Hartman
From: Hans Verkuil commit 8a7c5594c02022ca5fa7fb603e11b3e1feb76ed5 upstream. Zero the reserved capture/output array. Zero the extendedmode (it is never used in drivers). Clear all flags in capture/outputmode except for V4L2_MODE_HIGHQUALITY, as that is the only valid flag. Signed-off-by: Hans

[PATCH 4.9 044/117] PCI: rcar: Fix a potential NULL pointer dereference

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f0d14edd2ba43b995bef4dd5da5ffe0ae19321a1 ] In case __get_free_pages() fails and returns NULL, fix the return value to -ENOMEM and release resources to avoid dereferencing a NULL pointer. Signed-off-by: Kangjie Lu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ulrich Hecht Revi

[PATCH 4.9 070/117] ALSA: seq: Protect in-kernel ioctl calls with mutex

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit feb689025fbb6f0aa6297d3ddf97de945ea4ad32 ] ALSA OSS sequencer calls the ioctl function indirectly via snd_seq_kernel_client_ctl(). While we already applied the protection against races between the normal ioctls and writes via the client's ioctl_mutex, this code path was left unt

[PATCH 4.9 045/117] PCI: rcar: Fix 64bit MSI message address handling

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 954b4b752a4c4e963b017ed8cef4c453c5ed308d ] The MSI message address in the RC address space can be 64 bit. The R-Car PCIe RC supports such a 64bit MSI message address as well. The code currently uses virt_to_phys(__get_free_pages()) to obtain a reserved page for the MSI message ad

[PATCH 4.9 072/117] Revert "ALSA: seq: Protect in-kernel ioctl calls with mutex"

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit f0654ba94e33699b295ce4f3dc73094db6209035 ] This reverts commit feb689025fbb6f0aa6297d3ddf97de945ea4ad32. The fix attempt was incorrect, leading to the mutex deadlock through the close of OSS sequencer client. The proper fix needs more consideration, so let's revert it now. Fix

[PATCH 4.9 071/117] ALSA: seq: Fix race of get-subscription call vs port-delete ioctls

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2eabc5ec8ab4d4748a82050dfcb994119b983750 ] The snd_seq_ioctl_get_subscription() retrieves the port subscriber information as a pointer, while the object isn't protected, hence it may be deleted before the actual reference. This race was spotted by syzkaller and may lead to a UAF

[PATCH 4.9 064/117] i2c: acorn: fix i2c warning

2019-06-20 Thread Greg Kroah-Hartman
From: Russell King commit ca21f851cc9643af049226d57fabc3c883ea648e upstream. The Acorn i2c driver (for RiscPC) triggers the "i2c adapter has no name" warning in the I2C core driver, resulting in the RTC being inaccessible. Fix this. Fixes: 2236baa75f70 ("i2c: Sanity checks on adapter registrati

Re: [GIT PULL] MMC fixes for v5.2-rc6

2019-06-20 Thread pr-tracker-bot
The pull request you sent on Thu, 20 Jun 2019 13:16:02 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git tags/mmc-v5.2-rc4 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/6331d118ac61454ee52d5f9be098e9ddab6d6572 Thank you! -- Deet-doot-dot, I am a b

[PATCH 4.9 068/117] ASoC: fsl_asrc: Fix the issue about unsupported rate

2019-06-20 Thread Greg Kroah-Hartman
From: S.j. Wang commit b06c58c2a1eed571ea2a6640fdb85b7b00196b1e upstream. When the output sample rate is [8kHz, 30kHz], the limitation of the supported ratio range is [1/24, 8]. In the driver we use (8kHz, 30kHz) instead of [8kHz, 30kHz]. So this patch is to fix this issue and the potential roun

[PATCH 4.9 046/117] video: hgafb: fix potential NULL pointer dereference

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ec7f6aad57ad29e4e66cc2e18e1e1599ddb02542 ] When ioremap fails, hga_vram should not be dereferenced. The fix check the failure to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Cc: Aditya Pakki Cc: Ferenc Bakonyi [b.zolnierkie: minor patch summary fixup] Signed-off-

[PATCH 4.9 047/117] video: imsttfb: fix potential NULL pointer dereferences

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1d84353d205a953e2381044953b7fa31c8c9702d ] In case ioremap fails, the fix releases resources and returns -ENOMEM to avoid NULL pointer dereferences. Signed-off-by: Kangjie Lu Cc: Aditya Pakki Cc: Finn Thain Cc: Rob Herring Cc: Greg Kroah-Hartman [b.zolnierkie: minor patch s

[PATCH 4.9 048/117] PCI: xilinx: Check for __get_free_pages() failure

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 699ca30162686bf305cdf94861be02eb0cf9bda2 ] If __get_free_pages() fails, return -ENOMEM to avoid a NULL pointer dereference. Signed-off-by: Kangjie Lu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Steven Price Reviewed-by: Mukesh Ojha Signed-off-by: Sasha Levin --- drivers/

[PATCH 4.9 050/117] dmaengine: idma64: Use actual device for DMA transfers

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 5ba846b1ee0792f5a596b9b0b86d6e8cdebfab06 ] Intel IOMMU, when enabled, tries to find the domain of the device, assuming it's a PCI one, during DMA operations, such as mapping or unmapping. Since we are splitting the actual PCI device to couple of children via MFD framework (see dr

[PATCH 4.9 042/117] PCI: rpadlpar: Fix leaked device_node references in add/remove paths

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fb26228bfc4ce3951544848555c0278e2832e618 ] The find_dlpar_node() helper returns a device node with its reference incremented. Both the add and remove paths use this helper for find the appropriate node, but fail to release the reference when done. Annotate the find_dlpar_node()

[PATCH 4.9 087/117] USB: serial: option: add support for Simcom SIM7500/SIM7600 RNDIS mode

2019-06-20 Thread Greg Kroah-Hartman
From: Jörgen Storvist commit 5417a7e482962952e622eabd60cd3600dd65dedf upstream. Added IDs for Simcom SIM7500/SIM7600 series cellular module in RNDIS mode. Reserved the interface for ADB. T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00

[PATCH 4.9 086/117] USB: serial: pl2303: add Allied Telesis VT-Kit3

2019-06-20 Thread Greg Kroah-Hartman
From: Chris Packham commit c5f81656a18b271976a86724dadd8344e54de74e upstream. This is adds the vendor and device id for the AT-VT-Kit3 which is a pl2303-based device. Signed-off-by: Chris Packham Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/seri

[PATCH 4.9 088/117] USB: serial: option: add Telit 0x1260 and 0x1261 compositions

2019-06-20 Thread Greg Kroah-Hartman
From: Daniele Palmas commit f3dfd4072c3ee6e287f501a18b5718b185d6a940 upstream. Added support for Telit LE910Cx 0x1260 and 0x1261 compositions. Signed-off-by: Daniele Palmas Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c |4

[PATCH 4.9 084/117] USB: Fix chipmunk-like voice when using Logitech C270 for recording audio.

2019-06-20 Thread Greg Kroah-Hartman
From: Marco Zatta commit bd21f0222adab64974b7d1b4b8c7ce6b23e9ea4d upstream. This patch fixes the chipmunk-like voice that manifets randomly when using the integrated mic of the Logitech Webcam HD C270. The issue was solved initially for this device by commit 2394d67e446b ("USB: add RESET_RESUME

[PATCH 4.9 085/117] USB: usb-storage: Add new ID to ums-realtek

2019-06-20 Thread Greg Kroah-Hartman
From: Kai-Heng Feng commit 1a6dd3fea131276a4fc44ae77b0f471b0b473577 upstream. There is one more Realtek card reader requires ums-realtek to work correctly. Add the device ID to support it. Signed-off-by: Kai-Heng Feng Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/un

[PATCH 4.9 091/117] be2net: Fix number of Rx queues used for flow hashing

2019-06-20 Thread Greg Kroah-Hartman
From: Ivan Vecera [ Upstream commit 718f4a2537089ea41903bf357071306163bc7c04 ] Number of Rx queues used for flow hashing returned by the driver is incorrect and this bug prevents user to use the last Rx queue in indirection table. Let's say we have a NIC with 6 combined queues: [root@sm-03 ~]#

[PATCH 4.9 090/117] ax25: fix inconsistent lock state in ax25_destroy_timer

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit d4d5d8e83c9616aeef28a2869cea49cc3fb35526 ] Before thread in process context uses bh_lock_sock() we must disable bh. sysbot reported : WARNING: inconsistent lock state 5.2.0-rc3+ #32 Not tainted inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. blkid/265

[PATCH 4.9 092/117] ipv6: flowlabel: fl6_sock_lookup() must use atomic_inc_not_zero

2019-06-20 Thread Greg Kroah-Hartman
From: Eric Dumazet [ Upstream commit 65a3c497c0e965a552008db8bc2653f62bc925a1 ] Before taking a refcount, make sure the object is not already scheduled for deletion. Same fix is needed in ipv6_flowlabel_opt() Fixes: 18367681a10b ("ipv6 flowlabel: Convert np->ipv6_fl_list to RCU.") Signed-off-b

[PATCH 4.9 104/117] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); ^ ./incl

[PATCH 4.9 076/117] scsi: bnx2fc: fix incorrect cast to u64 on shift operation

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit d0c0d902339249c75da85fd9257a86cbb98dfaa5 ] Currently an int is being shifted and the result is being cast to a u64 which leads to undefined behaviour if the shift is more than 31 bits. Fix this by casting the integer value 1 to u64 before the shift operation. Addresses-Coverity:

[PATCH 4.9 081/117] drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read

2019-06-20 Thread Greg Kroah-Hartman
From: Murray McAllister commit 5ed7f4b5eca11c3c69e7c8b53e4321812bc1ee1e upstream. If SVGA_3D_CMD_DX_SET_SHADER is called with a shader ID of SVGA3D_INVALID_ID, and a shader type of SVGA3D_SHADERTYPE_INVALID, the calculated binding.shader_slot will be 4294967295, leading to an out-of-bounds read

[PATCH 4.9 117/117] Abort file_remove_privs() for non-reg. files

2019-06-20 Thread Greg Kroah-Hartman
From: Alexander Lochmann commit f69e749a49353d96af1a293f56b5b56de59c668a upstream. file_remove_privs() might be called for non-regular files, e.g. blkdev inode. There is no reason to do its job on things like blkdev inodes, pipes, or cdevs. Hence, abort if file does not refer to a regular inode.

[PATCH 4.9 083/117] usb: dwc2: Fix DMA cache alignment issues

2019-06-20 Thread Greg Kroah-Hartman
From: Martin Schiller commit 4a4863bf2e7932e584a3a462d3c6daf891142ddc upstream. Insert a padding between data and the stored_xfer_buffer pointer to ensure they are not on the same cache line. Otherwise, the stored_xfer_buffer gets corrupted for IN URBs on non-cache-coherent systems. (In my case

[PATCH 4.9 098/117] selftests: netfilter: missing error check when setting up veth interface

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 82ce6eb1dd13fd12e449b2ee2c2ec051e6f52c43 ] A test for the basic NAT functionality uses ip command which needs veth device. There is a condition where the kernel support for veth is not compiled into the kernel and the test script breaks. This patch contains code for reasonable er

[PATCH 4.9 099/117] mISDN: make sure device name is NUL terminated

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit ccfb62f27beb295103e9392462b20a6ed807d0ea ] The user can change the device_name with the IMSETDEVNAME ioctl, but we need to ensure that the user's name is NUL terminated. Otherwise it could result in a buffer overflow when we copy the name back to the user with IMGETDEVINFO ioctl

[PATCH 4.9 102/117] perf/ring_buffer: Add ordering to rb->nest increment

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3f9fbe9bd86c534eba2faf5d840fd44c6049f50e ] Similar to how decrementing rb->next too early can cause data_head to (temporarily) be observed to go backward, so too can this happen when we increment too late. This barrier() ensures the rb->head load happens after the increment, bot

[PATCH 4.9 080/117] KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 19ec166c3f39fe1d3789888a74cc95544ac266d4 ] kselftests exposed a problem in the s390 handling for memory slots. Right now we only do proper memory slot handling for creation of new memory slots. Neither MOVE, nor DELETION are handled properly. Let us implement those. Signed-off-b

[PATCH 4.9 078/117] usbnet: ipheth: fix racing condition

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 94d250fae48e6f873d8362308f5c4d02cd1b1fd2 ] Fix a racing condition in ipheth.c that can lead to slow performance. Bug: In ipheth_tx(), netif_wake_queue() may be called on the callback ipheth_sndbulk_callback(), _before_ netif_stop_queue() is called. When this happens, the queue i

[PATCH 4.9 077/117] selftests/timers: Add missing fflush(stdout) calls

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit fe48319243a626c860fd666ca032daacc2ba84a5 ] When running under a pipe, some timer tests would not report output in real-time because stdout flushes were missing after printf()s that lacked a newline. This adds them to restore real-time status output that humans can enjoy. Signed-

[PATCH 4.9 082/117] drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()

2019-06-20 Thread Greg Kroah-Hartman
From: Murray McAllister commit bcd6aa7b6cbfd6f985f606c6f76046d782905820 upstream. If SVGA_3D_CMD_DX_DEFINE_RENDERTARGET_VIEW is called with a surface ID of SVGA3D_INVALID_ID, the srf struct will remain NULL after vmw_cmd_res_check(), leading to a null pointer dereference in vmw_view_add(). Cc:

[PATCH 4.9 105/117] i2c: dev: fix potential memory leak in i2cdev_ioctl_rdwr

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit a0692f0eef91354b62c2b4c94954536536be5425 ] If I2C_M_RECV_LEN check failed, msgs[i].buf allocated by memdup_user will not be freed. Pump index up so it will be freed. Fixes: 838bfa6049fb ("i2c-dev: Add support for I2C_M_RECV_LEN") Signed-off-by: Yingjoe Chen Signed-off-by: Wolfr

[PATCH 4.9 074/117] scsi: lpfc: add check for loss of ndlp when sending RRQ

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit c8cb261a072c88ca1aff0e804a30db4c7606521b ] There was a missing qualification of a valid ndlp structure when calling to send an RRQ for an abort. Add the check. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Tested-by: Bart Van Assche Signed-off-by: Martin K. Petersen

[PATCH 4.9 097/117] perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 23e3983a466cd540ffdd2bbc6e0c51e31934f941 ] This patch fixes an bug revealed by the following commit: 6b89d4c1ae85 ("perf/x86/intel: Fix INTEL_FLAGS_EVENT_CONSTRAINT* masking") That patch modified INTEL_FLAGS_EVENT_CONSTRAINT() to only look at the event code when matching a c

[PATCH 4.9 109/117] ia64: fix build errors by exporting paddr_to_nid()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 9a626c4a6326da4433a0d4d4a8a7d1571caf1ed3 ] Fix build errors on ia64 when DISCONTIGMEM=y and NUMA=y by exporting paddr_to_nid(). Fixes these build errors: ERROR: "paddr_to_nid" [sound/core/snd-pcm.ko] undefined! ERROR: "paddr_to_nid" [net/sunrpc/sunrpc.ko] undefined! ERROR: "pad

[PATCH 4.9 100/117] x86/CPU/AMD: Dont force the CPB cap when running under a hypervisor

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 2ac44ab608705948564791ce1d15d43ba81a1e38 ] For F17h AMD CPUs, the CPB capability ('Core Performance Boost') is forcibly set, because some versions of that chip incorrectly report that they do not have it. However, a hypervisor may filter out the CPB capability, for good reasons

[PATCH 4.9 101/117] perf/ring_buffer: Fix exposing a temporarily decreased data_head

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1b038c6e05ff70a1e66e3e571c2e6106bdb75f53 ] In perf_output_put_handle(), an IRQ/NMI can happen in below location and write records to the same ring buffer: ... local_dec_and_test(&rb->nest) ... <-- an IRQ/NMI can happen here

[PATCH 4.9 110/117] KVM: PPC: Book3S: Use new mutex to synchronize access to rtas token list

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1659e27d2bc1ef47b6d031abe01b467f18cb72d9 ] Currently the Book 3S KVM code uses kvm->lock to synchronize access to the kvm->arch.rtas_tokens list. Because this list is scanned inside kvmppc_rtas_hcall(), which is called with the vcpu mutex held, taking kvm->lock cause a lock inve

[PATCH 4.9 114/117] scsi: smartpqi: properly set both the DMA mask and the coherent DMA mask

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 1d94f06e7f5df4064ef336b7b710f50143b64a53 ] When SME is enabled, the smartpqi driver won't work on the HP DL385 G10 machine, which causes the failure of kernel boot because it fails to allocate pqi error buffer. Please refer to the kernel log: [9.431749] usbcore: register

[PATCH 4.9 115/117] scsi: libsas: delete sas port if expander discover failed

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3b0541791453fbe7f42867e310e0c9eb6295364d ] The sas_port(phy->port) allocated in sas_ex_discover_expander() will not be deleted when the expander failed to discover. This will cause resource leak and a further issue of kernel BUG like below: [159785.843156] port-2:17:29: trying

[PATCH 4.9 116/117] mlxsw: spectrum: Prevent force of 56G

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 275e928f19117d22f6d26dee94548baf4041b773 ] Force of 56G is not supported by hardware in Ethernet devices. This configuration fails with a bad parameter error from firmware. Add check of this case. Instead of trying to set 56G with autoneg off, return a meaningful error. Fixes:

[PATCH 4.14 01/45] perf machine: Guard against NULL in machine__exit()

2019-06-20 Thread Greg Kroah-Hartman
From: Arnaldo Carvalho de Melo commit 4a2233b194c77ae1ea8304cb7c00b551de4313f0 upstream. A recent fix for 'perf trace' introduced a bug where machine__exit(trace->host) could be called while trace->host was still NULL, so make this more robust by guarding against NULL, just like free() does. Th

[PATCH 4.9 107/117] perf data: Fix strncat may truncate build failure with recent gcc

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 97acec7df172cd1e450f81f5e293c0aa145a2797 ] This strncat() is safe because the buffer was allocated with zalloc(), however gcc doesn't know that. Since the string always has 4 non-null bytes, just use memcpy() here. CC /home/shawn/linux/tools/perf/util/data-convert-bt.o

[PATCH 4.14 16/45] powerpc/powernv: Return for invalid IMC domain

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit b59bd3527fe3c1939340df558d7f9d568fc9f882 ] Currently init_imc_pmu() can fail either because we try to register an IMC unit with an invalid domain (i.e an IMC node not supported by the kernel) or something went wrong while registering a valid IMC unit. In both the cases kernel pro

[PATCH 4.9 113/117] scsi: libcxgbi: add a check for NULL pointer in cxgbi_check_route()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit cc555759117e8349088e0c5d19f2f2a500bafdbd ] ip_dev_find() can return NULL so add a check for NULL pointer. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/cxgbi/libcxgbi.c | 4 1 file changed, 4 insertions(+) di

[PATCH 4.14 13/45] ipvs: Fix use-after-free in ip_vs_in

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 719c7d563c17b150877cee03a4b812a424989dfa ] BUG: KASAN: use-after-free in ip_vs_in.part.29+0xe8/0xd20 [ip_vs] Read of size 4 at addr 8881e9b26e2c by task sshd/5603 CPU: 0 PID: 5603 Comm: sshd Not tainted 4.19.39+ #30 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trac

[PATCH 4.14 11/45] perf/x86/intel/ds: Fix EVENT vs. UEVENT PEBS constraints

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 23e3983a466cd540ffdd2bbc6e0c51e31934f941 ] This patch fixes an bug revealed by the following commit: 6b89d4c1ae85 ("perf/x86/intel: Fix INTEL_FLAGS_EVENT_CONSTRAINT* masking") That patch modified INTEL_FLAGS_EVENT_CONSTRAINT() to only look at the event code when matching a c

[PATCH 4.14 14/45] selftests: netfilter: missing error check when setting up veth interface

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 82ce6eb1dd13fd12e449b2ee2c2ec051e6f52c43 ] A test for the basic NAT functionality uses ip command which needs veth device. There is a condition where the kernel support for veth is not compiled into the kernel and the test script breaks. This patch contains code for reasonable er

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