[PATCH AUTOSEL 4.9 55/90] serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout

2020-09-17 Thread Sasha Levin
From: Vignesh Raghavendra [ Upstream commit 7cf4df30a98175033e9849f7f16c46e96ba47f41 ] Terminate and flush DMA internal buffers, before pushing RX data to higher layer. Otherwise, this will lead to data corruption, as driver would end up pushing stale buffer data to higher layer while actual

[PATCH AUTOSEL 4.9 51/90] tpm: ibmvtpm: Wait for buffer to be set before proceeding

2020-09-17 Thread Sasha Levin
From: Stefan Berger [ Upstream commit d8d74ea3c00214aee1e1826ca18e77944812b9b4 ] Synchronize with the results from the CRQs before continuing with the initialization. This avoids trying to send TPM commands while the rtce buffer has not been allocated, yet. This patch fixes an existing race

[PATCH AUTOSEL 4.9 56/90] cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn

2020-09-17 Thread Sasha Levin
From: Pratik Rajesh Sampat [ Upstream commit d95fe371ecd28901f11256c610b988ed44e36ee2 ] The patch avoids allocating cpufreq_policy on stack hence fixing frame size overflow in 'powernv_cpufreq_work_fn' Fixes: 227942809b52 ("cpufreq: powernv: Restore cpu frequency to policy->cur on

Re: [linux-next PATCH] rapidio: Fix error handling path

2020-09-17 Thread Souptick Joarder
Hi Dan, On Thu, Sep 17, 2020 at 6:10 PM Dan Carpenter wrote: > > On Wed, Sep 16, 2020 at 01:02:32PM +0300, Dan Carpenter wrote: > > On Wed, Sep 16, 2020 at 09:12:17AM +0530, Souptick Joarder wrote: > > > There is an error when pin_user_pages_fast() returns -ERRNO and > > > inside error handling

[PATCH AUTOSEL 4.9 57/90] tools: gpio-hammer: Avoid potential overflow in main

2020-09-17 Thread Sasha Levin
From: Gabriel Ravier [ Upstream commit d1ee7e1f5c9191afb69ce46cc7752e4257340a31 ] If '-o' was used more than 64 times in a single invocation of gpio-hammer, this could lead to an overflow of the 'lines' array. This commit fixes this by avoiding the overflow and giving a proper diagnostic back

[PATCH AUTOSEL 4.9 65/90] KVM: Remove CREATE_IRQCHIP/SET_PIT2 race

2020-09-17 Thread Sasha Levin
From: Steve Rutherford [ Upstream commit 7289fdb5dcdbc5155b5531529c44105868a762f2 ] Fixes a NULL pointer dereference, caused by the PIT firing an interrupt before the interrupt table has been initialized. SET_PIT2 can race with the creation of the IRQchip. In particular, if SET_PIT2 is called

[PATCH AUTOSEL 4.9 64/90] serial: uartps: Wait for tx_empty in console setup

2020-09-17 Thread Sasha Levin
From: Raviteja Narayanam [ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ] On some platforms, the log is corrupted while console is being registered. It is observed that when set_termios is called, there are still some bytes in the FIFO to be transmitted. So, wait for tx_empty

[PATCH AUTOSEL 4.9 61/90] ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor

2020-09-17 Thread Sasha Levin
From: Andreas Steinmetz [ Upstream commit 5c6cd7021a05a02fcf37f360592d7c18d4d807fb ] The Miditech MIDIFACE 16x16 (USB ID 1290:1749) has more than one extra endpoint descriptor. The first extra descriptor is: 0x06 0x30 0x00 0x00 0x00 0x00 As the code in snd_usbmidi_get_ms_info() looks only at

[PATCH AUTOSEL 4.9 60/90] ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len

2020-09-17 Thread Sasha Levin
From: Liu Song [ Upstream commit acc5af3efa303d5f36cc8c0f61716161f6ca1384 ] In “ubifs_check_node”, when the value of "node_len" is abnormal, the code will goto label of "out_len" for execution. Then, in the following "ubifs_dump_node", if inode type is "UBIFS_DATA_NODE", in "print_hex_dump", an

[PATCH AUTOSEL 4.9 77/90] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks

[PATCH AUTOSEL 4.9 67/90] drivers: char: tlclk.c: Avoid data race between init and interrupt handler

2020-09-17 Thread Sasha Levin
From: Madhuparna Bhowmik [ Upstream commit 44b8fb6eaa7c3fb770bf1e37619cdb3902cca1fc ] After registering character device the file operation callbacks can be called. The open callback registers interrupt handler. Therefore interrupt handler can execute in parallel with rest of the init function.

[PATCH AUTOSEL 4.9 71/90] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of

[PATCH AUTOSEL 4.9 69/90] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm

[PATCH AUTOSEL 4.9 75/90] fuse: don't check refcount after stealing page

2020-09-17 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit 32f98877c57bee6bc27f443a96f49678a2cd6a50 ] page_count() is unstable. Unless there has been an RCU grace period between when the page was removed from the page cache and now, a speculative reference may exist from the page cache. Reported-by: Matthew

[PATCH AUTOSEL 4.9 76/90] USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int

2020-09-17 Thread Sasha Levin
From: Colin Ian King [ Upstream commit a7f40c233a6b0540d28743267560df9cfb571ca9 ] The comparison of hcd->irq to less than zero for an error check will never be true because hcd->irq is an unsigned int. Fix this by assigning the int retval to the return of platform_get_irq and checking this for

[PATCH AUTOSEL 4.9 66/90] bdev: Reduce time holding bd_mutex in sync in blkdev_close()

2020-09-17 Thread Sasha Levin
From: Douglas Anderson [ Upstream commit b849dd84b6ccfe32622988b79b7b073861fcf9f7 ] While trying to "dd" to the block device for a USB stick, I encountered a hung task warning (blocked for > 120 seconds). I managed to come up with an easy way to reproduce this on my system (where /dev/sdb is

[PATCH AUTOSEL 4.9 78/90] printk: handle blank console arguments passed in.

2020-09-17 Thread Sasha Levin
From: Shreyas Joshi [ Upstream commit 48021f98130880dd74286459a1ef48b5e9bc374f ] If uboot passes a blank string to console_setup then it results in a trashed memory. Ultimately, the kernel crashes during freeing up the memory. This fix checks if there is a blank parameter being passed to

[PATCH AUTOSEL 4.9 81/90] perf util: Fix memory leak of prefix_if_not_in

2020-09-17 Thread Sasha Levin
From: Xie XiuQi [ Upstream commit 07e9a6f538cbeecaf5c55b6f2991416f873cdcbd ] Need to free "str" before return when asprintf() failed to avoid memory leak. Signed-off-by: Xie XiuQi Cc: Alexander Shishkin Cc: Hongbo Yao Cc: Jiri Olsa Cc: Li Bin Cc: Mark Rutland Cc: Namhyung Kim Link:

[PATCH AUTOSEL 4.4 01/64] scsi: aacraid: fix illegal IO beyond last LBA

2020-09-17 Thread Sasha Levin
From: Balsundar P [ Upstream commit c86fbe484c10b2cd1e770770db2d6b2c88801c1d ] The driver fails to handle data when read or written beyond device reported LBA, which triggers kernel panic Link: https://lore.kernel.org/r/1571120524-6037-2-git-send-email-balsunda...@microsemi.com Signed-off-by:

[PATCH AUTOSEL 4.9 74/90] ALSA: hda: Fix potential race in unsol event handler

2020-09-17 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit c637fa151259c0f74665fde7cba5b7eac1417ae5 ] The unsol event handling code has a loop retrieving the read/write indices and the arrays without locking while the append to the array may happen concurrently. This may lead to some inconsistency. Although there

[PATCH AUTOSEL 4.9 79/90] btrfs: don't force read-only after error in drop snapshot

2020-09-17 Thread Sasha Levin
From: David Sterba [ Upstream commit 7c09c03091ac562ddca2b393e5d65c1d37da79f1 ] Deleting a subvolume on a full filesystem leads to ENOSPC followed by a forced read-only. This is not a transaction abort and the filesystem is otherwise ok, so the error should be just propagated to the callers.

[PATCH AUTOSEL 4.9 80/90] vfio/pci: fix memory leaks of eventfd ctx

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 1518ac272e789cae8c555d69951b032a275b7602 ] Finished a qemu-kvm (-device vfio-pci,host=0001:01:00.0) triggers a few memory leaks after a while because vfio_pci_set_ctx_trigger_single() calls eventfd_ctx_fdget() without the matching eventfd_ctx_put() later. Fix it

[PATCH AUTOSEL 4.9 89/90] selftests/x86/syscall_nt: Clear weird flags after each test

2020-09-17 Thread Sasha Levin
From: Andy Lutomirski [ Upstream commit a61fa2799ef9bf6c4f54cf7295036577cececc72 ] Clear the weird flags before logging to improve strace output -- logging results while, say, TF is set does no one any favors. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link:

[PATCH AUTOSEL 4.9 88/90] cifs: Fix double add page to memcg when cifs_readpages

2020-09-17 Thread Sasha Levin
From: Zhang Xiaoxu [ Upstream commit 95a3d8f3af9b0d63b43f221b630beaab9739d13a ] When xfstests generic/451, there is an BUG at mm/memcontrol.c: page:ea000560f2c0 refcount:2 mapcount:0 mapping:8544e0ea index:0xf mapping->aops:cifs_addr_ops dentry

[PATCH AUTOSEL 4.9 87/90] vfio/pci: Clear error and request eventfd ctx after releasing

2020-09-17 Thread Sasha Levin
From: Alex Williamson [ Upstream commit 5c5866c593bbd444d0339ede6a8fb5f14ff66d72 ] The next use of the device will generate an underflow from the stale reference. Cc: Qian Cai Fixes: 1518ac272e78 ("vfio/pci: fix memory leaks of eventfd ctx") Reported-by: Daniel Wagner Reviewed-by: Cornelia

[PATCH AUTOSEL 4.9 85/90] mtd: parser: cmdline: Support MTD names containing one or more colons

2020-09-17 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit eb13fa0227417e84aecc3bd9c029d376e33474d3 ] Looks like some drivers define MTD names with a colon in it, thus making mtdpart= parsing impossible. Let's fix the parser to gracefully handle that case: the last ':' in a partition definition sequence is

[PATCH AUTOSEL 4.4 02/64] m68k: q40: Fix info-leak in rtc_ioctl

2020-09-17 Thread Sasha Levin
From: Fuqian Huang [ Upstream commit 7cf78b6b12fd5550545e4b73b35dca18bd46b44c ] When the option is RTC_PLL_GET, pll will be copied to userland via copy_to_user. pll is initialized using mach_get_rtc_pll indirect call and mach_get_rtc_pll is only assigned with function q40_get_rtc_pll in

[PATCH AUTOSEL 4.9 82/90] perf kcore_copy: Fix module map when there are no modules loaded

2020-09-17 Thread Sasha Levin
From: Adrian Hunter [ Upstream commit 61f82e3fb697a8e85f22fdec786528af73dc36d1 ] In the absence of any modules, no "modules" map is created, but there are other executable pages to map, due to eBPF JIT, kprobe or ftrace. Map them by recognizing that the first "module" symbol is not necessarily

[PATCH AUTOSEL 4.4 03/64] gma/gma500: fix a memory disclosure bug due to uninitialized bytes

2020-09-17 Thread Sasha Levin
From: Kangjie Lu [ Upstream commit 57a25a5f754ce27da2cfa6f413cfd366f878db76 ] `best_clock` is an object that may be sent out. Object `clock` contains uninitialized bytes that are copied to `best_clock`, which leads to memory disclosure and information leak. Signed-off-by: Kangjie Lu

[PATCH AUTOSEL 4.9 84/90] ceph: fix potential race in ceph_check_caps

2020-09-17 Thread Sasha Levin
From: Jeff Layton [ Upstream commit dc3da0461cc4b76f2d0c5b12247fcb3b520edbbf ] Nothing ensures that session will still be valid by the time we dereference the pointer. Take and put a reference. In principle, we should always be able to get a reference here, but throw a warning if that's ever

[PATCH AUTOSEL 4.4 05/64] ata: sata_mv, avoid trigerrable BUG_ON

2020-09-17 Thread Sasha Levin
From: Jiri Slaby [ Upstream commit e9f691d899188679746eeb96e6cb520459eda9b4 ] There are several reports that the BUG_ON on unsupported command in mv_qc_prep can be triggered under some circumstances: https://bugzilla.suse.com/show_bug.cgi?id=1110252

[PATCH AUTOSEL 4.4 08/64] mfd: mfd-core: Protect against NULL call-back function pointer

2020-09-17 Thread Sasha Levin
From: Lee Jones [ Upstream commit b195e101580db390f50b0d587b7f66f241d2bc88 ] If a child device calls mfd_cell_{en,dis}able() without an appropriate call-back being set, we are likely to encounter a panic. Avoid this by adding suitable checking. Signed-off-by: Lee Jones Reviewed-by: Daniel

Re: [PATCH 0/2] Update CascadelakeX and SkylakeX events list

2020-09-17 Thread Jin, Yao
Hi Ian, On 9/18/2020 9:36 AM, Ian Rogers wrote: On Thu, Sep 17, 2020, 6:21 PM Jin, Yao wrote: Hi Arnaldo, On 9/7/2020 4:01 PM, Jin, Yao wrote: Hi Arnaldo, On 7/17/2020 2:06 PM, Jin, Yao wrote: Hi, On 6/17/2020 3:38 AM, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 16, 2020 at 02:27:40PM

[PATCH AUTOSEL 4.4 04/64] ASoC: kirkwood: fix IRQ error handling

2020-09-17 Thread Sasha Levin
From: Russell King [ Upstream commit 175fc928198236037174e5c5c066fe3c4691903e ] Propagate the error code from request_irq(), rather than returning -EBUSY. Signed-off-by: Russell King Link: https://lore.kernel.org/r/e1iniqh-tw...@rmk-pc.armlinux.org.uk Signed-off-by: Mark Brown

[PATCH AUTOSEL 4.4 17/64] tracing: Set kernel_stack's caller size properly

2020-09-17 Thread Sasha Levin
From: Josef Bacik [ Upstream commit cbc3b92ce037f5e7536f6db157d185cd8b8f615c ] I noticed when trying to use the trace-cmd python interface that reading the raw buffer wasn't working for kernel_stack events. This is because it uses a stubbed version of __dynamic_array that doesn't do the

[PATCH AUTOSEL 4.4 13/64] neigh_stat_seq_next() should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 1e3f9f073c47bee7c23e77316b07bc12338c5bba ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

[PATCH AUTOSEL 4.4 12/64] kernel/sys.c: avoid copying possible padding bytes in copy_to_user

2020-09-17 Thread Sasha Levin
From: Joe Perches [ Upstream commit 5e1aada08cd19ea652b2d32a250501d09b02ff2e ] Initialization is not guaranteed to zero padding bytes so use an explicit memset instead to avoid leaking any kernel content in any possible padding bytes. Link:

[PATCH AUTOSEL 4.4 10/64] bcache: fix a lost wake-up problem caused by mca_cannibalize_lock

2020-09-17 Thread Sasha Levin
From: Guoju Fang [ Upstream commit 34cf78bf34d48dfeeadb44f9841d7864997a ] This patch fix a lost wake-up problem caused by the race between mca_cannibalize_lock and bch_cannibalize_unlock. Consider two processes, A and B. Process A is executing mca_cannibalize_lock, while process B takes

[PATCH AUTOSEL 4.4 18/64] ext4: make dioread_nolock the default

2020-09-17 Thread Sasha Levin
From: Theodore Ts'o [ Upstream commit 244adf6426ee31a83f397b700d964cff12a247d3 ] This fixes the direct I/O versus writeback race which can reveal stale data, and it improves the tail latency of commits on slow devices. Link: https://lore.kernel.org/r/20200125022254.1101588-1-ty...@mit.edu

[PATCH AUTOSEL 4.4 15/64] seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier

2020-09-17 Thread Sasha Levin
From: Marco Elver [ Upstream commit bf07132f96d426bcbf2098227fb680915cf44498 ] This patch proposes to require marked atomic accesses surrounding raw_write_seqcount_barrier. We reason that otherwise there is no way to guarantee propagation nor atomicity of writes before/after the barrier [1].

[PATCH AUTOSEL 4.4 09/64] tracing: Adding NULL checks for trace_array descriptor pointer

2020-09-17 Thread Sasha Levin
From: Divya Indi [ Upstream commit 953ae45a0c25e09428d4a03d7654f97ab8a36647 ] As part of commit f45d1225adb0 ("tracing: Kernel access to Ftrace instances") we exported certain functions. Here, we are adding some additional NULL checks to ensure safe usage by users of these APIs. Link:

Re: [PATCH v2 -next] vdpa: mlx5: change Kconfig depends to fix build errors

2020-09-17 Thread Jason Wang
1 deletion(-) --- linux-next-20200917.orig/drivers/vdpa/Kconfig +++ linux-next-20200917/drivers/vdpa/Kconfig @@ -31,7 +31,7 @@ config IFCVF config MLX5_VDPA bool "MLX5 VDPA support library for ConnectX devices" - depends on MLX5_CORE + depends on VHOST &&

[PATCH AUTOSEL 4.4 21/64] mm: pagewalk: fix termination condition in walk_pte_range()

2020-09-17 Thread Sasha Levin
From: Steven Price [ Upstream commit c02a98753e0a36ba65a05818626fa6adeb4e7c97 ] If walk_pte_range() is called with a 'end' argument that is beyond the last page of memory (e.g. ~0UL) then the comparison between 'addr' and 'end' will always fail and the loop will be infinite. Instead change

[PATCH AUTOSEL 4.4 16/64] ACPI: EC: Reference count query handlers under lock

2020-09-17 Thread Sasha Levin
From: "Rafael J. Wysocki" [ Upstream commit 3df663a147fe077a6ee8444ec626738946e65547 ] There is a race condition in acpi_ec_get_query_handler() theoretically allowing query handlers to go away before refernce counting them. In order to avoid it, call kref_get() on query handlers under

[PATCH AUTOSEL 4.4 11/64] xfs: fix attr leaf header freemap.size underflow

2020-09-17 Thread Sasha Levin
From: Brian Foster [ Upstream commit 2a2b5932db67586bacc560cc065d62faece5b996 ] The leaf format xattr addition helper xfs_attr3_leaf_add_work() adjusts the block freemap in a couple places. The first update drops the size of the freemap that the caller had already selected to place the xattr

[PATCH AUTOSEL 4.4 30/64] Bluetooth: guard against controllers sending zero'd events

2020-09-17 Thread Sasha Levin
From: Alain Michaud [ Upstream commit 08bb4da90150e2a225f35e0f642cdc463958d696 ] Some controllers have been observed to send zero'd events under some conditions. This change guards against this condition as well as adding a trace to facilitate diagnosability of this condition. Signed-off-by:

[PATCH AUTOSEL 4.4 29/64] media: go7007: Fix URB type for interrupt handling

2020-09-17 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit a3ea410cac41b19a5490aad7fe6d9a9a772e646e ] Josef reported that his old-and-good Plextor ConvertX M402U video converter spews lots of WARNINGs on the recent kernels, and it turned out that the device uses a bulk endpoint for interrupt handling just like 2250

[PATCH AUTOSEL 4.4 22/64] Bluetooth: prefetch channel before killing sock

2020-09-17 Thread Sasha Levin
From: Hillf Danton [ Upstream commit 2a154903cec20fb64ff4d7d617ca53c16f8fd53a ] Prefetch channel before killing sock in order to fix UAF like BUG: KASAN: use-after-free in l2cap_sock_release+0x24c/0x290 net/bluetooth/l2cap_sock.c:1212 Read of size 8 at addr 8880944904a0 by task

[PATCH AUTOSEL 4.4 28/64] dmaengine: tegra-apb: Prevent race conditions on channel's freeing

2020-09-17 Thread Sasha Levin
From: Dmitry Osipenko [ Upstream commit 8e84172e372bdca20c305d92d51d33640d2da431 ] It's incorrect to check the channel's "busy" state without taking a lock. That shouldn't cause any real troubles, nevertheless it's always better not to have any race conditions in the code. Signed-off-by:

[PATCH AUTOSEL 4.4 27/64] drm/omap: fix possible object reference leak

2020-09-17 Thread Sasha Levin
From: Wen Yang [ Upstream commit 47340e46f34a3b1d80e40b43ae3d7a8da34a3541 ] The call to of_find_matching_node returns a node pointer with refcount incremented thus it must be explicitly decremented after the last usage. Detected by coccinelle with the following warnings:

[PATCH AUTOSEL 4.4 31/64] drm/amdgpu: increase atombios cmd timeout

2020-09-17 Thread Sasha Levin
From: John Clements [ Upstream commit 1b3460a8b19688ad3033b75237d40fa580a5a953 ] mitigates race condition on BACO reset between GPU bootcode and driver reload Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 4.4 33/64] media: tda10071: fix unsigned sign extension overflow

2020-09-17 Thread Sasha Levin
From: Colin Ian King [ Upstream commit a7463e2dc698075132de9905b89f495df888bb79 ] The shifting of buf[3] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to an unsigned long. In the unlikely event that the the top bit of buf[3] is set then all then all the

Re: [linux-next PATCH] rapidio: Fix error handling path

2020-09-17 Thread Souptick Joarder
On Thu, Sep 17, 2020 at 11:17 PM John Hubbard wrote: > > On 9/17/20 10:34 AM, Ira Weiny wrote: > > On Thu, Sep 17, 2020 at 03:39:51PM +0300, Dan Carpenter wrote: > >> On Wed, Sep 16, 2020 at 01:02:32PM +0300, Dan Carpenter wrote: > >>> On Wed, Sep 16, 2020 at 09:12:17AM +0530, Souptick Joarder

[PATCH AUTOSEL 4.4 26/64] scsi: lpfc: Fix RQ buffer leakage when no IOCBs available

2020-09-17 Thread Sasha Levin
From: James Smart [ Upstream commit 39c4f1a965a9244c3ba60695e8ff8da065ec6ac4 ] The driver is occasionally seeing the following SLI Port error, requiring reset and reinit: Port Status Event: ... error 1=0x52004a01, error 2=0x218 The failure means an RQ timeout. That is, the adapter had

[PATCH AUTOSEL 4.4 32/64] Bluetooth: L2CAP: handle l2cap config request during open state

2020-09-17 Thread Sasha Levin
From: Howard Chung [ Upstream commit 96298f640104e4cd9a913a6e50b0b981829b94ff ] According to Core Spec Version 5.2 | Vol 3, Part A 6.1.5, the incoming L2CAP_ConfigReq should be handled during OPEN state. The section below shows the btmon trace when running L2CAP/COS/CFD/BV-12-C before and

[PATCH AUTOSEL 4.4 34/64] tpm: ibmvtpm: Wait for buffer to be set before proceeding

2020-09-17 Thread Sasha Levin
From: Stefan Berger [ Upstream commit d8d74ea3c00214aee1e1826ca18e77944812b9b4 ] Synchronize with the results from the CRQs before continuing with the initialization. This avoids trying to send TPM commands while the rtce buffer has not been allocated, yet. This patch fixes an existing race

[PATCH AUTOSEL 4.4 43/64] KVM: Remove CREATE_IRQCHIP/SET_PIT2 race

2020-09-17 Thread Sasha Levin
From: Steve Rutherford [ Upstream commit 7289fdb5dcdbc5155b5531529c44105868a762f2 ] Fixes a NULL pointer dereference, caused by the PIT firing an interrupt before the interrupt table has been initialized. SET_PIT2 can race with the creation of the IRQchip. In particular, if SET_PIT2 is called

[PATCH AUTOSEL 4.4 42/64] serial: uartps: Wait for tx_empty in console setup

2020-09-17 Thread Sasha Levin
From: Raviteja Narayanam [ Upstream commit 42e11948ddf68b9f799cad8c0ddeab0a39da33e8 ] On some platforms, the log is corrupted while console is being registered. It is observed that when set_termios is called, there are still some bytes in the FIFO to be transmitted. So, wait for tx_empty

[PATCH AUTOSEL 4.4 40/64] mm/filemap.c: clear page error before actual read

2020-09-17 Thread Sasha Levin
From: Xianting Tian [ Upstream commit faffdfa04fa11ccf048cebdde73db41ede0679e0 ] Mount failure issue happens under the scenario: Application forked dozens of threads to mount the same number of cramfs images separately in docker, but several mounts failed with high probability. Mount failed

[PATCH AUTOSEL 4.4 35/64] tracing: Use address-of operator on section symbols

2020-09-17 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit bf2cbe044da275021b2de5917240411a19e5c50d ] Clang warns: ../kernel/trace/trace.c:9335:33: warning: array comparison always evaluates to true [-Wtautological-compare] if (__stop___trace_bprintk_fmt != __start___trace_bprintk_fmt)

[PATCH AUTOSEL 4.4 41/64] mm/mmap.c: initialize align_offset explicitly for vm_unmapped_area

2020-09-17 Thread Sasha Levin
From: Jaewon Kim [ Upstream commit 09ef5283fd96ac424ef0e569626f359bf9ab86c9 ] On passing requirement to vm_unmapped_area, arch_get_unmapped_area and arch_get_unmapped_area_topdown did not set align_offset. Internally on both unmapped_area and unmapped_area_topdown, if info->align_mask is 0,

[PATCH AUTOSEL 4.4 46/64] dt-bindings: sound: wm8994: Correct required supplies based on actual implementaion

2020-09-17 Thread Sasha Levin
From: Krzysztof Kozlowski [ Upstream commit 8c149b7d75e53be47648742f40fc90d9fc6fa63a ] The required supplies in bindings were actually not matching implementation making the bindings incorrect and misleading. The Linux kernel driver requires all supplies to be present. Also for wlf,wm8994

[PATCH AUTOSEL 4.4 44/64] bdev: Reduce time holding bd_mutex in sync in blkdev_close()

2020-09-17 Thread Sasha Levin
From: Douglas Anderson [ Upstream commit b849dd84b6ccfe32622988b79b7b073861fcf9f7 ] While trying to "dd" to the block device for a USB stick, I encountered a hung task warning (blocked for > 120 seconds). I managed to come up with an easy way to reproduce this on my system (where /dev/sdb is

[PATCH AUTOSEL 4.4 45/64] drivers: char: tlclk.c: Avoid data race between init and interrupt handler

2020-09-17 Thread Sasha Levin
From: Madhuparna Bhowmik [ Upstream commit 44b8fb6eaa7c3fb770bf1e37619cdb3902cca1fc ] After registering character device the file operation callbacks can be called. The open callback registers interrupt handler. Therefore interrupt handler can execute in parallel with rest of the init function.

[PATCH AUTOSEL 4.4 47/64] atm: fix a memory leak of vcc->user_back

2020-09-17 Thread Sasha Levin
From: Cong Wang [ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ] In lec_arp_clear_vccs() only entry->vcc is freed, but vcc could be installed on entry->recv_vcc too in lec_vcc_added(). This fixes the following memory leak: unreferenced object 0x8880d9266b90 (size 16): comm

[PATCH AUTOSEL 4.4 48/64] phy: samsung: s5pv210-usb2: Add delay after reset

2020-09-17 Thread Sasha Levin
From: Jonathan Bakker [ Upstream commit 05942b8c36c7eb5d3fc5e375d4b0d0c49562e85d ] The USB phy takes some time to reset, so make sure we give it to it. The delay length was taken from the 4x12 phy driver. This manifested in issues with the DWC2 driver since commit fe369e1826b3 ("usb: dwc2:

[PATCH AUTOSEL 4.4 39/64] ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor

2020-09-17 Thread Sasha Levin
From: Andreas Steinmetz [ Upstream commit 5c6cd7021a05a02fcf37f360592d7c18d4d807fb ] The Miditech MIDIFACE 16x16 (USB ID 1290:1749) has more than one extra endpoint descriptor. The first extra descriptor is: 0x06 0x30 0x00 0x00 0x00 0x00 As the code in snd_usbmidi_get_ms_info() looks only at

[PATCH AUTOSEL 4.4 49/64] Bluetooth: Handle Inquiry Cancel error after Inquiry Complete

2020-09-17 Thread Sasha Levin
From: Sonny Sasaka [ Upstream commit adf1d6926444029396861413aba8a0f2a805742a ] After sending Inquiry Cancel command to the controller, it is possible that Inquiry Complete event comes before Inquiry Cancel command complete event. In this case the Inquiry Cancel command will have status of

[PATCH AUTOSEL 4.4 50/64] USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe()

2020-09-17 Thread Sasha Levin
From: Tang Bin [ Upstream commit c856b4b0fdb5044bca4c0acf9a66f3b5cc01a37a ] If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in mv_ehci_probe(). And when get irq failed, the function platform_get_irq() logs an error message,

[PATCH AUTOSEL 4.4 61/64] mtd: parser: cmdline: Support MTD names containing one or more colons

2020-09-17 Thread Sasha Levin
From: Boris Brezillon [ Upstream commit eb13fa0227417e84aecc3bd9c029d376e33474d3 ] Looks like some drivers define MTD names with a colon in it, thus making mtdpart= parsing impossible. Let's fix the parser to gracefully handle that case: the last ':' in a partition definition sequence is

[PATCH AUTOSEL 4.4 54/64] USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int

2020-09-17 Thread Sasha Levin
From: Colin Ian King [ Upstream commit a7f40c233a6b0540d28743267560df9cfb571ca9 ] The comparison of hcd->irq to less than zero for an error check will never be true because hcd->irq is an unsigned int. Fix this by assigning the int retval to the return of platform_get_irq and checking this for

Re: [vhost next 0/2] mlx5 vdpa fix netdev status

2020-09-17 Thread Jason Wang
On 2020/9/17 下午8:13, Eli Cohen wrote: Hi Michael, the following two patches aim to fix a failure to set the vdpa driver status bit VIRTIO_NET_S_LINK_UP thus causing failure to bring the link up. I break it to two patches: 1. Introduce proper mlx5 API to set 16 bit status fields per virtio

[PATCH AUTOSEL 4.4 36/64] serial: 8250_omap: Fix sleeping function called from invalid context during probe

2020-09-17 Thread Sasha Levin
From: Peter Ujfalusi [ Upstream commit 4ce35a3617c0ac758c61122b2218b6c8c9ac9398 ] When booting j721e the following bug is printed: [1.154821] BUG: sleeping function called from invalid context at kernel/sched/completion.c:99 [1.154827] in_atomic(): 0, irqs_disabled(): 128, non_block:

[PATCH AUTOSEL 4.4 56/64] printk: handle blank console arguments passed in.

2020-09-17 Thread Sasha Levin
From: Shreyas Joshi [ Upstream commit 48021f98130880dd74286459a1ef48b5e9bc374f ] If uboot passes a blank string to console_setup then it results in a trashed memory. Ultimately, the kernel crashes during freeing up the memory. This fix checks if there is a blank parameter being passed to

[PATCH AUTOSEL 4.4 52/64] ALSA: hda: Fix potential race in unsol event handler

2020-09-17 Thread Sasha Levin
From: Takashi Iwai [ Upstream commit c637fa151259c0f74665fde7cba5b7eac1417ae5 ] The unsol event handling code has a loop retrieving the read/write indices and the arrays without locking while the append to the array may happen concurrently. This may lead to some inconsistency. Although there

[PATCH AUTOSEL 4.4 57/64] vfio/pci: fix memory leaks of eventfd ctx

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 1518ac272e789cae8c555d69951b032a275b7602 ] Finished a qemu-kvm (-device vfio-pci,host=0001:01:00.0) triggers a few memory leaks after a while because vfio_pci_set_ctx_trigger_single() calls eventfd_ctx_fdget() without the matching eventfd_ctx_put() later. Fix it

[PATCH AUTOSEL 4.4 51/64] tty: serial: samsung: Correct clock selection logic

2020-09-17 Thread Sasha Levin
From: Jonathan Bakker [ Upstream commit 7d31676a8d91dd18e08853efd1cb26961a38c6a6 ] Some variants of the samsung tty driver can pick which clock to use for their baud rate generation. In the DT conversion, a default clock was selected to be used if a specific one wasn't assigned and then a

[PATCH AUTOSEL 4.4 59/64] mtd: rawnand: omap_elm: Fix runtime PM imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 37f7212148cf1d796135cdf8d0c7fee13067674b ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao

[PATCH AUTOSEL 4.4 53/64] fuse: don't check refcount after stealing page

2020-09-17 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit 32f98877c57bee6bc27f443a96f49678a2cd6a50 ] page_count() is unstable. Unless there has been an RCU grace period between when the page was removed from the page cache and now, a speculative reference may exist from the page cache. Reported-by: Matthew

[PATCH AUTOSEL 4.4 55/64] e1000: Do not perform reset in reset_task if we are already down

2020-09-17 Thread Sasha Levin
From: Alexander Duyck [ Upstream commit 49ee3c2ab5234757bfb56a0b3a3cb422f427e3a3 ] We are seeing a deadlock in e1000 down when NAPI is being disabled. Looking over the kernel function trace of the system it appears that the interface is being closed and then a reset is hitting which deadlocks

[PATCH AUTOSEL 4.4 58/64] perf kcore_copy: Fix module map when there are no modules loaded

2020-09-17 Thread Sasha Levin
From: Adrian Hunter [ Upstream commit 61f82e3fb697a8e85f22fdec786528af73dc36d1 ] In the absence of any modules, no "modules" map is created, but there are other executable pages to map, due to eBPF JIT, kprobe or ftrace. Map them by recognizing that the first "module" symbol is not necessarily

[PATCH AUTOSEL 4.4 64/64] vfio/pci: fix racy on error and request eventfd ctx

2020-09-17 Thread Sasha Levin
From: Zeng Tao [ Upstream commit b872d0640840018669032b20b6375a478ed1f923 ] The vfio_pci_release call will free and clear the error and request eventfd ctx while these ctx could be in use at the same time in the function like vfio_pci_request, and it's expected to protect them under the

[PATCH AUTOSEL 4.4 63/64] vfio/pci: Clear error and request eventfd ctx after releasing

2020-09-17 Thread Sasha Levin
From: Alex Williamson [ Upstream commit 5c5866c593bbd444d0339ede6a8fb5f14ff66d72 ] The next use of the device will generate an underflow from the stale reference. Cc: Qian Cai Fixes: 1518ac272e78 ("vfio/pci: fix memory leaks of eventfd ctx") Reported-by: Daniel Wagner Reviewed-by: Cornelia

[PATCH AUTOSEL 4.4 60/64] ceph: fix potential race in ceph_check_caps

2020-09-17 Thread Sasha Levin
From: Jeff Layton [ Upstream commit dc3da0461cc4b76f2d0c5b12247fcb3b520edbbf ] Nothing ensures that session will still be valid by the time we dereference the pointer. Take and put a reference. In principle, we should always be able to get a reference here, but throw a warning if that's ever

[PATCH AUTOSEL 4.4 37/64] SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'

2020-09-17 Thread Sasha Levin
From: Christophe JAILLET [ Upstream commit b25b60d7bfb02a74bc3c2d998e09aab159df8059 ] 'maxlen' is the total size of the destination buffer. There is only one caller and this value is 256. When we compute the size already used and what we would like to add in the buffer, the trailling NULL

[PATCH AUTOSEL 4.4 62/64] x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline

2020-09-17 Thread Sasha Levin
From: Thomas Gleixner [ Upstream commit a7ef9ba986b5fae9d80f8a7b31db0423687efe4e ] Prevent the compiler from uninlining and creating traceable/probable functions as this is invoked _after_ context tracking switched to CONTEXT_USER and rcu idle. Signed-off-by: Thomas Gleixner Reviewed-by:

[PATCH AUTOSEL 4.4 25/64] selinux: sel_avc_get_stat_idx should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit 8d269a8e2a8f0bca89022f4ec98de460acb90365 ] If seq_file .next function does not change position index, read after some lseek can generate unexpected output. $ dd if=/sys/fs/selinux/avc/cache_stats # usual output lookups hits misses allocations reclaims

[PATCH AUTOSEL 4.4 23/64] skbuff: fix a data race in skb_queue_len()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 ] sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0x8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96:

[PATCH AUTOSEL 4.4 19/64] ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter

2020-09-17 Thread Sasha Levin
From: Mert Dirik [ Upstream commit 5b362498a79631f283578b64bf6f4d15ed4cc19a ] Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as

[PATCH AUTOSEL 4.4 24/64] audit: CONFIG_CHANGE don't log internal bookkeeping as an event

2020-09-17 Thread Sasha Levin
From: Steve Grubb [ Upstream commit 70b3eeed49e8190d97139806f6fbaf8964306cdb ] Common Criteria calls out for any action that modifies the audit trail to be recorded. That usually is interpreted to mean insertion or removal of rules. It is not required to log modification of the inode

[PATCH AUTOSEL 4.4 38/64] ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len

2020-09-17 Thread Sasha Levin
From: Liu Song [ Upstream commit acc5af3efa303d5f36cc8c0f61716161f6ca1384 ] In “ubifs_check_node”, when the value of "node_len" is abnormal, the code will goto label of "out_len" for execution. Then, in the following "ubifs_dump_node", if inode type is "UBIFS_DATA_NODE", in "print_hex_dump", an

[PATCH AUTOSEL 4.4 14/64] rt_cpu_seq_next should increase position index

2020-09-17 Thread Sasha Levin
From: Vasily Averin [ Upstream commit a3ea86739f1bc7e121d921842f0f4a8ab1af94d9 ] if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: David

Re: [PATCH RFC 2/4] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-17 Thread Wei Yang
On Wed, Sep 16, 2020 at 08:34:09PM +0200, David Hildenbrand wrote: >__putback_isolated_page() already documents that pages will be placed to >the tail of the freelist - this is, however, not the case for >"order >= MAX_ORDER - 2" (see buddy_merge_likely()) - which should be >the case for all

[PATCH AUTOSEL 4.9 90/90] vfio/pci: fix racy on error and request eventfd ctx

2020-09-17 Thread Sasha Levin
From: Zeng Tao [ Upstream commit b872d0640840018669032b20b6375a478ed1f923 ] The vfio_pci_release call will free and clear the error and request eventfd ctx while these ctx could be in use at the same time in the function like vfio_pci_request, and it's expected to protect them under the

[PATCH AUTOSEL 4.9 73/90] tty: serial: samsung: Correct clock selection logic

2020-09-17 Thread Sasha Levin
From: Jonathan Bakker [ Upstream commit 7d31676a8d91dd18e08853efd1cb26961a38c6a6 ] Some variants of the samsung tty driver can pick which clock to use for their baud rate generation. In the DT conversion, a default clock was selected to be used if a specific one wasn't assigned and then a

Re: [PATCH RESEND v3 0/5] media: uvcvideo: Fix race conditions

2020-09-17 Thread Guenter Roeck
Hi Laurent, On 9/17/20 5:47 AM, Laurent Pinchart wrote: > Hi Guenter, > > On Wed, Sep 16, 2020 at 07:25:42PM -0700, Guenter Roeck wrote: >> Something seems to have gone wrong with v3 of this patch series. >> I am sure I sent it out, but I don't find it anywhere. >> Resending. Sorry for any

[PATCH AUTOSEL 4.9 83/90] mtd: rawnand: omap_elm: Fix runtime PM imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 37f7212148cf1d796135cdf8d0c7fee13067674b ] pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao

[PATCH AUTOSEL 4.9 70/90] phy: samsung: s5pv210-usb2: Add delay after reset

2020-09-17 Thread Sasha Levin
From: Jonathan Bakker [ Upstream commit 05942b8c36c7eb5d3fc5e375d4b0d0c49562e85d ] The USB phy takes some time to reset, so make sure we give it to it. The delay length was taken from the 4x12 phy driver. This manifested in issues with the DWC2 driver since commit fe369e1826b3 ("usb: dwc2:

[PATCH AUTOSEL 4.4 07/64] mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup()

2020-09-17 Thread Sasha Levin
From: Hou Tao [ Upstream commit 03976af89e3bd9489d542582a325892e6a8cacc0 ] Else there may be a double-free problem, because cfi->cfiq will be freed by mtd_do_chip_probe() if both the two invocations of check_cmd_set() return failure. Signed-off-by: Hou Tao Reviewed-by: Richard Weinberger

[PATCH AUTOSEL 4.4 20/64] Bluetooth: Fix refcount use-after-free issue

2020-09-17 Thread Sasha Levin
From: Manish Mandlik [ Upstream commit 6c08fc896b60893c5d673764b0668015d76df462 ] There is no lock preventing both l2cap_sock_release() and chan->ops->close() from running at the same time. If we consider Thread A running l2cap_chan_timeout() and Thread B running l2cap_sock_release(), expected

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