[PATCH 4.19 21/90] x86/CPU: Add more Icelake model numbers

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit e35faeb64146f2015f2aec14b358ae508e4066db ] Add the CPUID model numbers of Icelake (ICL) desktop and server processors to the Intel family list. [ Qiuxu: Sort the macros by model number. ] Signed-off-by: Kan Liang Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andy

[PATCH 4.19 24/90] ALSA: hdac: fix memory release for SST and SOF drivers

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 6d647b736a6b1cbf2f8deab0e6a94c34a6ea9d60 ] During the integration of HDaudio support, we changed the way in which we get hdev in snd_hdac_ext_bus_device_init() to use one preallocated with devm_kzalloc(), however it still left kfree(hdev) in snd_hdac_ext_bus_device_exit(). It

[PATCH 4.19 15/90] drm/mediatek: call drm_atomic_helper_shutdown() when unbinding driver

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit cf49b24ffa62766f8f04cd1c4cf17b75d29b240a ] shutdown all CRTC when unbinding drm driver. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsin-Yi Wang Signed-off-by: CK Hu Signed-off-by: Sasha Levin ---

[PATCH 4.14 27/56] ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages

2019-07-08 Thread Greg Kroah-Hartman
From: Takashi Sakamoto commit 7fbd1753b64eafe21cf842348a40a691d0dee440 upstream. In IEC 61883-6, 8 MIDI data streams are multiplexed into single MIDI conformant data channel. The index of stream is calculated by modulo 8 of the value of data block counter. In fireworks, the value of data block

[PATCH 4.19 28/90] drm: panel-orientation-quirks: Add quirk for GPD MicroPC

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 652b8b086538c8a10de5aa5cbdaef79333b46358 ] GPD has done it again, make a nice device (good), use way too generic DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly). Because of the too generic DMI strings this entry is also doing bios-date matching, so the

[PATCH 4.19 14/90] drm/mediatek: unbind components in mtk_drm_unbind()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f0fd848342802bc0f74620d387eead53e8905804 ] Unbinding components (i.e. mtk_dsi and mtk_disp_ovl/rdma/color) will trigger master(mtk_drm)'s .unbind(), and currently mtk_drm's unbind won't actually unbind components. During the next bind, mtk_drm_kms_init() is called, and the

[PATCH 4.19 25/90] SoC: rt274: Fix internal jack assignment in set_jack callback

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 04268bf2757a125616b6c2140e6250f43b7b737a ] When we call snd_soc_component_set_jack(component, NULL, NULL) we should set rt274->jack to passed jack, so when interrupt is triggered it calls snd_soc_jack_report(rt274->jack, ...) with proper value. This fixes problem in machine

[PATCH 4.19 20/90] ASoC: sun4i-i2s: Add offset to RX channel select

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f9927000cb35f250051f0f1878db12ee2626eea1 ] Whilst testing the capture functionality of the i2s on the newer SoCs it was noticed that the recording was somewhat distorted. This was due to the offset not being set correctly on the receiver side. Signed-off-by: Marcus Cooper

[PATCH 4.19 18/90] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5628c8979642a076f91ee86c3bae5ad251639af0 ] The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error.

[PATCH 4.19 16/90] drm/mediatek: clear num_pipes when unbind driver

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit a4cd1d2b016d5d043ab2c4b9c4ec50a5805f5396 ] num_pipes is used for mutex created in mtk_drm_crtc_create(). If we don't clear num_pipes count, when rebinding driver, the count will be accumulated. From mtk_disp_mutex_get(), there can only be at most 10 mutex id. Clear this number

[PATCH 4.14 31/56] lib/mpi: Fix karactx leak in mpi_powm

2019-07-08 Thread Greg Kroah-Hartman
From: Herbert Xu commit c8ea9fce2baf7b643384f36f29e4194fa40d33a6 upstream. Sometimes mpi_powm will leak karactx because a memory allocation failure causes a bail-out that skips the freeing of karactx. This patch moves the freeing of karactx to the end of the function like everything else so

[PATCH 4.19 13/90] drm/mediatek: fix unbind functions

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8fd7a37b191f93737f6280a9b5de65f98acc12c9 ] detatch panel in mtk_dsi_destroy_conn_enc(), since .bind will try to attach it again. Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver") Signed-off-by: Hsin-Yi Wang Signed-off-by: CK Hu Signed-off-by: Sasha Levin ---

[PATCH 4.19 12/90] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5caaf29af5ca82d5da8bc1d0ad07d9e664ccf1d8 ] If spi_register_master fails in spi_bitbang_start because device_add failure, We should return the error code other than 0, otherwise calling spi_bitbang_stop may trigger NULL pointer dereference like this: BUG: KASAN: null-ptr-deref

[PATCH 4.14 52/56] svcrdma: Ignore source port when computing DRC hash

2019-07-08 Thread Greg Kroah-Hartman
From: Chuck Lever commit 1e091c3bbf51d34d5d96337a59ce5ab2ac3ba2cc upstream. The DRC appears to be effectively empty after an RPC/RDMA transport reconnect. The problem is that each connection uses a different source port, which defeats the DRC hash. Clients always have to disconnect before they

[PATCH 4.19 01/90] Bluetooth: Fix faulty expression for minimum encryption key size check

2019-07-08 Thread Greg Kroah-Hartman
From: Matias Karhumaa commit eca94432934fe5f141d084f2e36ee2c0e614cc04 upstream. Fix minimum encryption key size check so that HCI_MIN_ENC_KEY_SIZE is also allowed as stated in the comment. This bug caused connection problems with devices having maximum encryption key size of 7 octets (56-bit).

[PATCH 4.14 56/56] stable/btrfs: fix backport bug in d819d97ea025 ("btrfs: honor path->skip_locking in backref code")

2019-07-08 Thread Greg Kroah-Hartman
From: Stanislaw Gruszka Upstream commit 38e3eebff643 ("btrfs: honor path->skip_locking in backref code") was incorrectly backported to 4.14.y . It misses removal of two lines from original commit, what cause deadlock. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203993 Reported-by:

[PATCH 4.14 15/56] platform/x86: mlx-platform: Fix parent device in i2c-mux-reg device registration

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 160da20b254dd4bfc5828f12c208fa831ad4be6c ] Fix the issue found while running kernel with the option CONFIG_DEBUG_TEST_DRIVER_REMOVE. Driver 'mlx-platform' registers 'i2c_mlxcpld' device and then registers few underlying 'i2c-mux-reg' devices: priv->pdev_i2c =

[PATCH 4.14 06/56] drm/mediatek: call drm_atomic_helper_shutdown() when unbinding driver

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit cf49b24ffa62766f8f04cd1c4cf17b75d29b240a ] shutdown all CRTC when unbinding drm driver. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Hsin-Yi Wang Signed-off-by: CK Hu Signed-off-by: Sasha Levin ---

[PATCH 4.14 53/56] MIPS: Fix bounds check virt_addr_valid

2019-07-08 Thread Greg Kroah-Hartman
From: Hauke Mehrtens commit d6ed083f5cc621e15c15b56c3b585fd524dbcb0f upstream. The bounds check used the uninitialized variable vaddr, it should use the given parameter kaddr instead. When using the uninitialized value the compiler assumed it to be 0 and optimized this function to just return 0

[PATCH 4.14 54/56] MIPS: Add missing EHB in mtc0 -> mfc0 sequence.

2019-07-08 Thread Greg Kroah-Hartman
From: Dmitry Korotin commit 0b24cae4d535045f4c9e177aa228d4e97bad212c upstream. Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence. Without this execution hazard barrier it's possible for the value read back from the KScratch register to be the value from before the mtc0.

[PATCH 4.14 46/56] vhost: vsock: add weight support

2019-07-08 Thread Greg Kroah-Hartman
From: Jason Wang commit e79b431fb901ba1106670bcc80b9b617b25def7d upstream. This patch will check the weight and exit the loop if we exceeds the weight. This is useful for preventing vsock kthread from hogging cpu which is guest triggerable. The weight can help to avoid starving the request from

[PATCH 4.14 12/56] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit fbc318afadd6e7ae2252d6158cf7d0c5a2132f7d ] Gadget drivers may queue request in interrupt context. This would lead to a descriptor allocation in that context. In that case we would hit BUG_ON(in_interrupt()) in __get_vm_area_node. Also remove the unnecessary cast. Acked-by:

[PATCH 4.14 51/56] KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC

2019-07-08 Thread Greg Kroah-Hartman
From: Wanpeng Li commit bb34e690e9340bc155ebed5a3d75fc63ff69e082 upstream. Thomas reported that: | Background: | |In preparation of supporting IPI shorthands I changed the CPU offline |code to software disable the local APIC instead of just masking it. |That's done by clearing

[PATCH 4.14 48/56] tty: rocket: fix incorrect forward declaration of rp_init()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 423ea3255424b954947d167681b71ded1b8fca53 ] Make the forward declaration actually match the real function definition, something that previous versions of gcc had just ignored. This is another patch to fix new warnings from gcc-9 before I start the merge window pulls. I don't

[PATCH 4.14 47/56] vhost: scsi: add weight support

2019-07-08 Thread Greg Kroah-Hartman
From: Jason Wang commit c1ea02f15ab5efb3e93fc3144d895410bf79fcf2 upstream. This patch will check the weight and exit the loop if we exceeds the weight. This is useful for preventing scsi kthread from hogging cpu which is guest triggerable. This addresses CVE-2019-3900. Cc: Paolo Bonzini Cc:

[PATCH 4.14 11/56] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i]

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 62fd0e0a24abeebe2c19fce49dd5716d9b62042d ] There is no deallocation of fusb300->ep[i] elements, allocated at fusb300_probe. The patch adds deallocation of fusb300->ep array elements. Signed-off-by: Young Xiao <92siuy...@gmail.com> Signed-off-by: Felipe Balbi Signed-off-by:

Re: [PATCH] tpm: Document UEFI event log quirks

2019-07-08 Thread Jarkko Sakkinen
On Sun, 2019-07-07 at 12:33 -0700, Randy Dunlap wrote: > On 7/5/19 3:15 AM, Jarkko Sakkinen wrote: > > On Wed, 2019-07-03 at 09:45 -0700, Randy Dunlap wrote: > > > > +This introduces another problem: nothing guarantees that it is not > > > > +called before the stub gets to run. Thus, it needs to

[PATCH 4.14 45/56] vhost_net: fix possible infinite loop

2019-07-08 Thread Greg Kroah-Hartman
From: Jason Wang commit e2412c07f8f3040593dfb88207865a3cd58680c0 upstream. When the rx buffer is too small for a packet, we will discard the vq descriptor and retry it for the next packet: while ((sock_len = vhost_net_rx_peek_head_len(net, sock->sk,

[PATCH 4.14 10/56] ASoC: sun4i-i2s: Add offset to RX channel select

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f9927000cb35f250051f0f1878db12ee2626eea1 ] Whilst testing the capture functionality of the i2s on the newer SoCs it was noticed that the recording was somewhat distorted. This was due to the offset not being set correctly on the receiver side. Signed-off-by: Marcus Cooper

[PATCH 4.14 44/56] vhost: introduce vhost_exceeds_weight()

2019-07-08 Thread Greg Kroah-Hartman
From: Jason Wang commit e82b9b0727ff6d665fff2d326162b460dded554d upstream. We used to have vhost_exceeds_weight() for vhost-net to: - prevent vhost kthread from hogging the cpu - balance the time spent between TX and RX This function could be useful for vsock and scsi as well. So move it to

[PATCH 4.14 28/56] ALSA: line6: Fix write on zero-sized buffer

2019-07-08 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 3450121997ce872eb7f1248417225827ea249710 upstream. LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while

[PATCH 4.14 08/56] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5628c8979642a076f91ee86c3bae5ad251639af0 ] The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error.

[PATCH 4.14 39/56] mm/vmscan.c: prevent useless kswapd loops

2019-07-08 Thread Greg Kroah-Hartman
From: Shakeel Butt commit dffcac2cb88e4ec5906235d64a83d802580b119e upstream. In production we have noticed hard lockups on large machines running large jobs due to kswaps hoarding lru lock within isolate_lru_pages when sc->reclaim_idx is 0 which is a small zone. The lru was couple hundred GiBs

[PATCH 4.14 29/56] ALSA: usb-audio: fix sign unintended sign extension on left shifts

2019-07-08 Thread Greg Kroah-Hartman
From: Colin Ian King commit 2acf5a3e6e9371e63c9e4ff54d84d08f630467a0 upstream. There are a couple of left shifts of unsigned 8 bit values that first get promoted to signed ints and hence get sign extended on the shift if the top bit of the 8 bit values are set. Fix this by casting the 8 bit

[PATCH 4.14 25/56] crypto: cryptd - Fix skcipher instance memory leak

2019-07-08 Thread Greg Kroah-Hartman
From: Vincent Whitchurch commit 1a0fad630e0b7cff38e7691b28b0517cfbb0633f upstream. cryptd_skcipher_free() fails to free the struct skcipher_instance allocated in cryptd_create_skcipher(), leading to a memory leak. This is detected by kmemleak on bootup on ARM64 platforms: unreferenced object

[PATCH 4.14 22/56] drm/i915/dmc: protect against reading random memory

2019-07-08 Thread Greg Kroah-Hartman
commit bc7b488b1d1c71dc4c5182206911127bc6c410d6 upstream. While loading the DMC firmware we were double checking the headers made sense, but in no place we checked that we were actually reading memory we were supposed to. This could be wrong in case the firmware file is truncated or malformed.

[PATCH 4.14 41/56] vhost-net: set packet weight of tx polling to 2 * vq size

2019-07-08 Thread Greg Kroah-Hartman
From: haibinzhang(张海斌) commit a2ac99905f1ea8b15997a6ec39af69aa28a3653b upstream. handle_tx will delay rx for tens or even hundreds of milliseconds when tx busy polling udp packets with small length(e.g. 1byte udp payload), because setting VHOST_NET_WEIGHT takes into account only sent-bytes but

[PATCH 4.14 38/56] ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code()

2019-07-08 Thread Greg Kroah-Hartman
From: Petr Mladek commit d5b844a2cf507fc7642c9ae80a9d585db3065c28 upstream. The commit 9f255b632bf12c4dd7 ("module: Fix livepatch/ftrace module text permissions race") causes a possible deadlock between register_kprobe() and ftrace_run_update_code() when ftrace is using stop_machine(). The

[PATCH 4.14 37/56] drm/imx: only send event on crtc disable if kept disabled

2019-07-08 Thread Greg Kroah-Hartman
From: Robert Beckett commit 5aeab2bfc9ffa72d3ca73416635cb3785dfc076f upstream. The event will be sent as part of the vblank enable during the modeset if the crtc is not being kept disabled. Fixes: 5f2f911578fb ("drm/imx: atomic phase 3 step 1: Use atomic configuration") Signed-off-by: Robert

[PATCH 4.14 09/56] ASoC: sun4i-i2s: Fix sun8i tx channel offset mask

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 7e46169a5f35762f335898a75d1b8a242f2ae0f5 ] Although not causing any noticeable issues, the mask for the channel offset is covering too many bits. Signed-off-by: Marcus Cooper Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Signed-off-by: Mark Brown Signed-off-by: Sasha Levin

[PATCH 4.14 34/56] arm64: kaslr: keep modules inside module region when KASAN is enabled

2019-07-08 Thread Greg Kroah-Hartman
From: Ard Biesheuvel commit 6f496a555d93db7a11d4860b9220d904822f586a upstream. When KASLR and KASAN are both enabled, we keep the modules where they are, and randomize the placement of the kernel so it is within 2 GB of the module region. The reason for this is that putting modules in the

[PATCH 4.14 36/56] drm/imx: notify drm core before sending event during crtc disable

2019-07-08 Thread Greg Kroah-Hartman
From: Robert Beckett commit 78c68e8f5cd24bd32ba4ca1cdfb0c30cf0642685 upstream. Notify drm core before sending pending events during crtc disable. This fixes the first event after disable having an old stale timestamp by having drm_crtc_vblank_off update the timestamp to now. This was seen

[PATCH 4.14 30/56] ALSA: hda/realtek - Change front mic location for Lenovo M710q

2019-07-08 Thread Greg Kroah-Hartman
From: Dennis Wassenberg commit bef33e19203dde434bcdf21c449e3fb4f06c2618 upstream. On M710q Lenovo ThinkCentre machine, there are two front mics, we change the location for one of them to avoid conflicts. Signed-off-by: Dennis Wassenberg Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg

[PATCH 4.14 32/56] tracing/snapshot: Resize spare buffer if size changed

2019-07-08 Thread Greg Kroah-Hartman
From: Eiichi Tsukata commit 46cc0b44428d0f0e81f11ea98217fc0edfbeab07 upstream. Current snapshot implementation swaps two ring_buffers even though their sizes are different from each other, that can cause an inconsistency between the contents of buffer_size_kb file and the current buffer size.

[PATCH 4.14 23/56] ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME

2019-07-08 Thread Greg Kroah-Hartman
From: Jann Horn commit 6994eefb0053799d2e07cd140df6c2ea106c41ee upstream. Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like

[PATCH 4.9 092/102] lib/mpi: Fix karactx leak in mpi_powm

2019-07-08 Thread Greg Kroah-Hartman
From: Herbert Xu commit c8ea9fce2baf7b643384f36f29e4194fa40d33a6 upstream. Sometimes mpi_powm will leak karactx because a memory allocation failure causes a bail-out that skips the freeing of karactx. This patch moves the freeing of karactx to the end of the function like everything else so

Re: [PATCH POC] printk_ringbuffer: Alternative implementation of lockless printk ringbuffer

2019-07-08 Thread Petr Mladek
On Thu 2019-07-04 16:59:54, John Ogness wrote: > Hi Petr, > > On 2019-07-04, Petr Mladek wrote: > > This is POC that implements the lockless printk ringbuffer slightly > > different way. I believe that it is worth considering because it looks > > much easier to deal with. The reasons are: > > >

[PATCH 4.14 18/56] mm/mlock.c: change count_mm_mlocked_page_nr return type

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 0874bb49bb21bf24deda853e8bf61b8325e24bcb ] On a 64-bit machine the value of "vma->vm_end - vma->vm_start" may be negative when using 32 bit ints and the "count >> PAGE_SHIFT"'s result will be wrong. So change the local variable and return value to unsigned long to fix the

[PATCH 4.14 00/56] 4.14.133-stable review

2019-07-08 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.133 release. There are 56 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 Wed 10 Jul 2019 03:03:52 PM UTC. Anything

[PATCH 4.14 16/56] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit d477f8c202d1f0d4791ab1263ca7657bbe5cf79e ] In the case that a process is constrained by taskset(1) (i.e. sched_setaffinity(2)) to a subset of available cpus, and all of those are subsequently offlined, the scheduler will set tsk->cpus_allowed to the current value of

[PATCH 4.9 094/102] drm/imx: only send event on crtc disable if kept disabled

2019-07-08 Thread Greg Kroah-Hartman
From: Robert Beckett commit 5aeab2bfc9ffa72d3ca73416635cb3785dfc076f upstream. The event will be sent as part of the vblank enable during the modeset if the crtc is not being kept disabled. Fixes: 5f2f911578fb ("drm/imx: atomic phase 3 step 1: Use atomic configuration") Signed-off-by: Robert

[PATCH 4.14 20/56] ftrace: Fix NULL pointer dereference in free_ftrace_func_mapper()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 04e03d9a616c19a47178eaca835358610e63a1dd ] The mapper may be NULL when called from register_ftrace_function_probe() with probe->data == NULL. This issue can be reproduced as follow (it may be covered by compiler optimization sometime): / # cat

[PATCH 4.14 19/56] module: Fix livepatch/ftrace module text permissions race

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 9f255b632bf12c4dd7fc31caee89aa991ef75176 ] It's possible for livepatch and ftrace to be toggling a module's text permissions at the same time, resulting in the following panic: BUG: unable to handle page fault for address: c005b1d9 #PF: supervisor write access in

[PATCH 4.14 03/56] ASoC: soc-pcm: BE dai needs prepare when pause release after resume

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5087a8f17df868601cd7568299e91c28086d2b45 ] If playback/capture is paused and system enters S3, after system returns from suspend, BE dai needs to call prepare() callback when playback/capture is released from pause if RESUME_INFO flag is not set. Currently, the

[PATCH 4.9 095/102] btrfs: Ensure replaced device doesnt have pending chunk allocation

2019-07-08 Thread Greg Kroah-Hartman
From: Nikolay Borisov commit debd1c065d2037919a7da67baf55cc683fee09f0 upstream. Recent FITRIM work, namely bbbf7243d62d ("btrfs: combine device update operations during transaction commit") combined the way certain operations are recoded in a transaction. As a result an ASSERT was added in

[PATCH 4.9 090/102] ALSA: line6: Fix write on zero-sized buffer

2019-07-08 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 3450121997ce872eb7f1248417225827ea249710 upstream. LINE6 drivers allocate the buffers based on the value returned from usb_maxpacket() calls. The manipulated device may return zero for this, and this results in the kmalloc() with zero size (and it may succeed) while

[PATCH 4.9 093/102] drm/imx: notify drm core before sending event during crtc disable

2019-07-08 Thread Greg Kroah-Hartman
From: Robert Beckett commit 78c68e8f5cd24bd32ba4ca1cdfb0c30cf0642685 upstream. Notify drm core before sending pending events during crtc disable. This fixes the first event after disable having an old stale timestamp by having drm_crtc_vblank_off update the timestamp to now. This was seen

[PATCH 4.14 07/56] drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 2458d9d6d94be982b917e93c61a89b4426f32e31 ] mtk_dsi_stop() should be called after mtk_drm_crtc_atomic_disable(), which needs ovl irq for drm_crtc_wait_one_vblank(), since after mtk_dsi_stop() is called, ovl irq will be disabled. If drm_crtc_wait_one_vblank() is called after last

[PATCH 4.14 21/56] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 02eec6c9fc0cb13169cc97a6139771768791f92b ] In nlm_fmn_send() we have a loop which attempts to send a message multiple times in order to handle the transient failure condition of a lack of available credit. When examining the status register to detect the failure we check for a

[PATCH 4.14 02/56] ASoC : cs4265 : readable register too low

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit f3df05c805983427319eddc2411a2105ee1757cf ] The cs4265_readable_register function stopped short of the maximum register. An example bug is taken from : https://github.com/Audio-Injector/Ultra/issues/25 Where alsactl store fails with : Cannot read control '2,0,0,C Data

[PATCH 4.9 097/102] arm64, vdso: Define vdso_{start,end} as array

2019-07-08 Thread Greg Kroah-Hartman
Commit dbbb08f500d6146398b794fdc68a8e811366b451 upstream. Adjust vdso_{start|end} to be char arrays to avoid compile-time analysis that flags "too large" memcmp() calls with CONFIG_FORTIFY_SOURCE. Cc: Jisheng Zhang Acked-by: Catalin Marinas Suggested-by: Mark Rutland Signed-off-by: Kees Cook

[PATCH 4.9 099/102] IB/hfi1: Close PSM sdma_progress sleep window

2019-07-08 Thread Greg Kroah-Hartman
From: Mike Marciniszyn commit da9de5f8527f4b9efc82f967d29a583318c034c7 upstream. The call to sdma_progress() is called outside the wait lock. In this case, there is a race condition where sdma_progress() can return false and the sdma_engine can idle. If that happens, there will be no more

[PATCH 4.9 041/102] 9p: acl: fix uninitialized iattr access

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit e02a53d92e197706cad1627bd84705d4aa20a145 ] iattr is passed to v9fs_vfs_setattr_dotl which does send various values from iattr over the wire, even if it tells the server to only look at iattr.ia_valid fields this could leak some stack data. Link:

[PATCH 4.9 100/102] MIPS: Add missing EHB in mtc0 -> mfc0 sequence.

2019-07-08 Thread Greg Kroah-Hartman
From: Dmitry Korotin commit 0b24cae4d535045f4c9e177aa228d4e97bad212c upstream. Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence. Without this execution hazard barrier it's possible for the value read back from the KScratch register to be the value from before the mtc0.

[PATCH 4.9 098/102] KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC

2019-07-08 Thread Greg Kroah-Hartman
From: Wanpeng Li commit bb34e690e9340bc155ebed5a3d75fc63ff69e082 upstream. Thomas reported that: | Background: | |In preparation of supporting IPI shorthands I changed the CPU offline |code to software disable the local APIC instead of just masking it. |That's done by clearing

[PATCH 4.9 047/102] mm/page_idle.c: fix oops because end_pfn is larger than max_pfn

2019-07-08 Thread Greg Kroah-Hartman
From: Colin Ian King commit 7298e3b0a149c91323b3205d325e942c3b3b9ef6 upstream. Currently the calcuation of end_pfn can round up the pfn number to more than the actual maximum number of pfns, causing an Oops. Fix this by ensuring end_pfn is never more than max_pfn. This can be easily triggered

[PATCH 4.9 078/102] mfd: omap-usb-tll: Fix register offsets

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 993dc737c0996c163325961fb62a0ed9fd0308b4 ] gcc-8 notices that the register number calculation is wrong when the offset is an 'u8' but the number is larger than 256: drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': drivers/mfd/omap-usb-tll.c:90:46: error: overflow in

[PATCH 4.9 080/102] bug.h: work around GCC PR82365 in BUG()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 173a3efd3edb2ef6ef07471397c5f542a360e9c1 ] Looking at functions with large stack frames across all architectures led me discovering that BUG() suffers from the same problem as fortify_panic(), which I've added a workaround for already. In short, variables that go out of scope

[PATCH 4.9 045/102] fs/proc/array.c: allow reporting eip/esp for all coredumping threads

2019-07-08 Thread Greg Kroah-Hartman
From: John Ogness commit cb8f381f1613cafe3aec30809991cd56e7135d92 upstream. 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat") stopped reporting eip/esp and fd7d56270b52 ("fs/proc: Report eip/esp in /prod/PID/stat for coredumping") reintroduced the feature to fix a

[PATCH 4.9 081/102] ARC: handle gcc generated __builtin_trap for older compiler

2019-07-08 Thread Greg Kroah-Hartman
From: Vineet Gupta commit af1be2e21203867cb958aaceed5366e2e24b88e8 upstream. ARC gcc prior to GNU 2018.03 release didn't have a target specific __builtin_trap() implementation, generating default abort() call. Implement the abort() call - emulating what newer gcc does for the same, as

[PATCH 4.9 082/102] clk: sunxi: fix uninitialized access

2019-07-08 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 4e903450bcb9a6bc90733b981d7cb8b3c4996a0e upstream. gcc-8 reports an uninitialized variable access in a code path that we would see with incorrect DTB input: drivers/clk/sunxi/clk-sun8i-bus-gates.c: In function 'sun8i_h3_bus_gates_init':

[PATCH 4.9 086/102] ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME

2019-07-08 Thread Greg Kroah-Hartman
From: Jann Horn commit 6994eefb0053799d2e07cd140df6c2ea106c41ee upstream. Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like

Re: powerpc/83xx: fix use-after-free on mpc831x_usb_cfg()

2019-07-08 Thread Markus Elfring
> The np variable is still being used after the of_node_put() call, > which may result in use-after-free. > We fix this issue by calling of_node_put() after the last usage. I imagine that this commit description can be improved a bit more (by mentioning the influence of “immr_node”?). How do

[PATCH 4.9 079/102] ARC: fix allnoconfig build warning

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5464d03d92601ac2977ef605b0cbb33276567daf ] Reported-by: Dmitrii Kolesnichenko Signed-off-by: Vineet Gupta Signed-off-by: Sasha Levin --- arch/arc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index

[PATCH 4.9 074/102] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit c04e32e911653442fc834be6e92e072aeebe01a1 ] At least for ARM64 kernels compiled with the crosstoolchain from Debian/stretch or with the toolchain from kernel.org the line number is not decoded correctly by 'decode_stacktrace.sh': $ echo "[ 136.513051] f1+0x0/0xc [kcrash]" |

[PATCH 4.9 068/102] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5caaf29af5ca82d5da8bc1d0ad07d9e664ccf1d8 ] If spi_register_master fails in spi_bitbang_start because device_add failure, We should return the error code other than 0, otherwise calling spi_bitbang_stop may trigger NULL pointer dereference like this: BUG: KASAN: null-ptr-deref

[PATCH 4.9 076/102] MIPS: math-emu: do not use bools for arithmetic

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 8535f2ba0a9b971df62a5890699b9dfe2e0d5580 ] GCC-7 complains about a boolean value being used with an arithmetic AND: arch/mips/math-emu/cp1emu.c: In function 'cop1Emulate': arch/mips/math-emu/cp1emu.c:838:14: warning: '~' on a boolean expression [-Wbool-operation] fpr = (x) &

[PATCH 4.9 077/102] MIPS: netlogic: xlr: Remove erroneous check in nlm_fmn_send()

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 02eec6c9fc0cb13169cc97a6139771768791f92b ] In nlm_fmn_send() we have a loop which attempts to send a message multiple times in order to handle the transient failure condition of a lack of available credit. When examining the status register to detect the failure we check for a

[PATCH 4.9 075/102] mm/mlock.c: change count_mm_mlocked_page_nr return type

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 0874bb49bb21bf24deda853e8bf61b8325e24bcb ] On a 64-bit machine the value of "vma->vm_end - vma->vm_start" may be negative when using 32 bit ints and the "count >> PAGE_SHIFT"'s result will be wrong. So change the local variable and return value to unsigned long to fix the

[PATCH 4.9 067/102] ASoC: soc-pcm: BE dai needs prepare when pause release after resume

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5087a8f17df868601cd7568299e91c28086d2b45 ] If playback/capture is paused and system enters S3, after system returns from suspend, BE dai needs to call prepare() callback when playback/capture is released from pause if RESUME_INFO flag is not set. Currently, the

[PATCH 4.9 072/102] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit fbc318afadd6e7ae2252d6158cf7d0c5a2132f7d ] Gadget drivers may queue request in interrupt context. This would lead to a descriptor allocation in that context. In that case we would hit BUG_ON(in_interrupt()) in __get_vm_area_node. Also remove the unnecessary cast. Acked-by:

[PATCH 4.9 071/102] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i]

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 62fd0e0a24abeebe2c19fce49dd5716d9b62042d ] There is no deallocation of fusb300->ep[i] elements, allocated at fusb300_probe. The patch adds deallocation of fusb300->ep array elements. Signed-off-by: Young Xiao <92siuy...@gmail.com> Signed-off-by: Felipe Balbi Signed-off-by:

[PATCH 4.9 073/102] scsi: hpsa: correct ioaccel2 chaining

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 625d7d3518875c4d303c652a198feaa13d9f52d9 ] - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_LAST_SG for the last s/g element. - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_CHAIN when chaining. Reviewed-by: Bader Ali - Saleh Reviewed-by:

[PATCH 4.9 044/102] net/9p: include trans_common.h to fix missing prototype warning.

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 52ad259eaac0454c1ac7123e7148cf8d6e6f5301 ] This silences -Wmissing-prototypes when defining p9_release_pages. Link: http://lkml.kernel.org/r/b1c4df8f21689b10d451c28fe38e860722d20e71.1542089696.git.d...@net.com.org.es Signed-off-by: Adeodato Simó Signed-off-by: Dominique

[PATCH 4.9 070/102] ASoC: max98090: remove 24-bit format support if RJ is 0

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 5628c8979642a076f91ee86c3bae5ad251639af0 ] The supported formats are S16_LE and S24_LE now. However, by datasheet of max98090, S24_LE is only supported when it is in the right justified mode. We should remove 24-bit format if it is not in that mode to avoid triggering error.

[PATCH 4.9 043/102] 9p: p9dirent_read: check network-provided name length

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit ef5305f1f72eb1cfcda25c382bb0368509c0385b ] strcpy to dirent->d_name could overflow the buffer, use strscpy to check the provided string length and error out if the size was too big. While we are here, make the function return an error when the pdu parsing failed, instead of

[PATCH 4.9 063/102] bpf: udp: ipv6: Avoid running reuseports bpf_prog from __udp6_lib_err

2019-07-08 Thread Greg Kroah-Hartman
From: Martin KaFai Lau commit 4ac30c4b3659efac031818c418beb51e630d512d upstream. __udp6_lib_err() may be called when handling icmpv6 message. For example, the icmpv6 toobig(type=2). __udp6_lib_lookup() is then called which may call reuseport_select_sock(). reuseport_select_sock() will call

[PATCH 4.9 064/102] tipc: pass tunnel dev as NULL to udp_tunnel(6)_xmit_skb

2019-07-08 Thread Greg Kroah-Hartman
From: Xin Long commit c3bcde026684c62d7a2b6f626dc7cf763833875c upstream. udp_tunnel(6)_xmit_skb() called by tipc_udp_xmit() expects a tunnel device to count packets on dev->tstats, a perpcu variable. However, TIPC is using udp tunnel with no tunnel device, and pass the lower dev, like veth

[PATCH 4.9 061/102] net: check before dereferencing netdev_ops during busy poll

2019-07-08 Thread Greg Kroah-Hartman
From: Josh Elsasser init_dummy_netdev() leaves its netdev_ops pointer zeroed. This leads to a NULL pointer dereference when sk_busy_loop fires against an iwlwifi wireless adapter and checks napi->dev->netdev_ops->ndo_busy_poll. Avoid this by ensuring napi->dev->netdev_ops is valid before

[PATCH 4.9 042/102] 9p/rdma: remove useless check in cm_event_handler

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 473c7dd1d7b59ff8f88a5154737e3eac78a96e5b ] the client c is always dereferenced to get the rdma struct, so c has to be a valid pointer at this point. Gcc would optimize that away but let's make coverity happy... Link:

[PATCH 4.9 059/102] bonding: Always enable vlan tx offload

2019-07-08 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit 30d8177e8ac776d89d387fad547af6a0f599210e ] We build vlan on top of bonding interface, which vlan offload is off, bond mode is 802.3ad (LACP) and xmit_hash_policy is BOND_XMIT_POLICY_ENCAP34. Because vlan tx offload is off, vlan tci is cleared and skb push the

[PATCH 4.9 034/102] mac80211: drop robust management frames from unknown TA

2019-07-08 Thread Greg Kroah-Hartman
From: Johannes Berg commit 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f upstream. When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: sta...@vger.kernel.org Signed-off-by:

[PATCH 4.9 058/102] team: Always enable vlan tx offload

2019-07-08 Thread Greg Kroah-Hartman
From: YueHaibing [ Upstream commit ee4297420d56a0033a8593e80b33fcc93fda8509 ] We should rather have vlan_tci filled all the way down to the transmitting netdevice and let it do the hw/sw vlan implementation. Suggested-by: Jiri Pirko Signed-off-by: YueHaibing Signed-off-by: David S. Miller

[PATCH 4.9 052/102] af_packet: Block execution of tasks waiting for transmit to complete in AF_PACKET

2019-07-08 Thread Greg Kroah-Hartman
From: Neil Horman [ Upstream commit 89ed5b519004a7706f50b70f611edbd3aaacff2c ] When an application is run that: a) Sets its scheduler to be SCHED_FIFO and b) Opens a memory mapped AF_PACKET socket, and sends frames with the MSG_DONTWAIT flag cleared, its possible for the application to hang

[PATCH 4.9 060/102] ipv4: Use return value of inet_iif() for __raw_v4_lookup in the while loop

2019-07-08 Thread Greg Kroah-Hartman
From: Stephen Suryaputra [ Upstream commit 38c73529de13e1e10914de7030b659a2f8b01c3b ] In commit 19e4e768064a8 ("ipv4: Fix raw socket lookup for local traffic"), the dif argument to __raw_v4_lookup() is coming from the returned value of inet_iif() but the change was done only for the first

[PATCH 4.9 033/102] cfg80211: fix memory leak of wiphy device name

2019-07-08 Thread Greg Kroah-Hartman
From: Eric Biggers commit 4f488fbca2a86cc7714a128952eead92cac279ab upstream. In wiphy_new_nm(), if an error occurs after dev_set_name() and device_initialize() have already been called, it's necessary to call put_device() (via wiphy_free()) to avoid a memory leak. Reported-by:

[PATCH 4.9 051/102] cpu/speculation: Warn on unsupported mitigations= parameter

2019-07-08 Thread Greg Kroah-Hartman
From: Geert Uytterhoeven commit 1bf72720281770162c87990697eae1ba2f1d917a upstream. Currently, if the user specifies an unsupported mitigation strategy on the kernel command line, it will be ignored silently. The code will fall back to the default strategy, possibly leaving the system more

[PATCH 4.9 056/102] tipc: check msg->req data len in tipc_nl_compat_bearer_disable

2019-07-08 Thread Greg Kroah-Hartman
From: Xin Long [ Upstream commit 4f07b80c973348a99b5d2a32476a2e7877e94a05 ] This patch is to fix an uninit-value issue, reported by syzbot: BUG: KMSAN: uninit-value in memchr+0xce/0x110 lib/string.c:981 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x191/0x1f0

[PATCH 4.9 000/102] 4.9.185-stable review

2019-07-08 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.185 release. There are 102 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 Wed 10 Jul 2019 03:03:52 PM UTC. Anything

[PATCH 4.9 008/102] ARC: fix build warnings with !CONFIG_KPROBES

2019-07-08 Thread Greg Kroah-Hartman
[ Upstream commit 4c6fabda1ad1dec6d274c098ef0a91809c74f2e3 ] | CC lib/nmi_backtrace.o | In file included from ../include/linux/kprobes.h:43:0, | from ../lib/nmi_backtrace.c:17: | ../arch/arc/include/asm/kprobes.h:57:13: warning: 'trap_is_kprobe' defined but not used

<    4   5   6   7   8   9   10   11   12   13   >