[PATCH AUTOSEL 5.4 203/330] proc: io_accounting: Use new infrastructure to fix deadlocks in execve

2020-09-17 Thread Sasha Levin
From: Bernd Edlinger [ Upstream commit 76518d3798855242817e8a8ed76b2d72f4415624 ] This changes do_io_accounting to use the new exec_update_mutex instead of cred_guard_mutex. This fixes possible deadlocks when the trace is accessing /proc/$pid/io for instance. This should be safe, as the

[PATCH 02/13] mm: use page_off_lru()

2020-09-17 Thread Yu Zhao
This patch replaces the only open-coded __ClearPageActive() with page_off_lru(). There is no open-coded __ClearPageUnevictable()s. Before this patch, we have: __ClearPageActive() add_page_to_lru_list() After this patch, we have: page_off_lru() if

[PATCH AUTOSEL 5.4 204/330] perf: Use new infrastructure to fix deadlocks in execve

2020-09-17 Thread Sasha Levin
From: Bernd Edlinger [ Upstream commit 6914303824bb572278568330d72fc1f8f9814e67 ] This changes perf_event_set_clock to use the new exec_update_mutex instead of cred_guard_mutex. This should be safe, as the credentials are only used for reading. Signed-off-by: Bernd Edlinger Signed-off-by:

Re: [PATCH v12 3/9] x86: kdump: use macro CRASH_ADDR_LOW_MAX in functions reserve_crashkernel[_low]()

2020-09-17 Thread Dave Young
On 09/07/20 at 09:47pm, Chen Zhou wrote: > To make the functions reserve_crashkernel[_low]() as generic, > replace some hard-coded numbers with macro CRASH_ADDR_LOW_MAX. > > Signed-off-by: Chen Zhou > --- > arch/x86/kernel/setup.c | 11 ++- > 1 file changed, 6 insertions(+), 5

[PATCH 00/13] mm: clean up some lru related pieces

2020-09-17 Thread Yu Zhao
Hi Andrew, I see you have taken this: mm: use add_page_to_lru_list()/page_lru()/page_off_lru() Do you mind dropping it? Michal asked to do a bit of additional work. So I thought I probably should create a series to do more cleanups I've been meaning to. This series contains the change in the

[PATCH AUTOSEL 5.4 206/330] nvme: Fix ctrl use-after-free during sysfs deletion

2020-09-17 Thread Sasha Levin
From: Israel Rukshin [ Upstream commit b780d7415aacec855e2f2370cbf98f918b224903 ] In case nvme_sysfs_delete() is called by the user before taking the ctrl reference count, the ctrl may be freed during the creation and cause the bug. Take the reference as soon as the controller is externally

[PATCH 10/13] mm: VM_BUG_ON lru page flags

2020-09-17 Thread Yu Zhao
Move scattered VM_BUG_ONs to two essential places that cover all lru list additions and deletions. Signed-off-by: Yu Zhao --- include/linux/mm_inline.h | 4 mm/swap.c | 2 -- mm/vmscan.c | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 11/13] mm: inline __update_lru_size()

2020-09-17 Thread Yu Zhao
All other references to the function were removed after commit a892cb6b977f ("mm/vmscan.c: use update_lru_size() in update_lru_sizes()") This change should have no side effects. Signed-off-by: Yu Zhao --- include/linux/mm_inline.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-)

[PATCH 07/13] mm: don't pass enum lru_list to del_page_from_lru_list()

2020-09-17 Thread Yu Zhao
The parameter is redundant in the sense that it can be extracted from the struct page parameter by page_lru(). To do this, we need to make sure PageActive() or PageUnevictable() is correctly set or cleared before calling the function. In check_move_unevictable_pages(), we have:

[PATCH 12/13] mm: make lruvec_lru_size() static

2020-09-17 Thread Yu Zhao
All other references to the function were removed after commit b910718a948a ("mm: vmscan: detect file thrashing at the reclaim root") This change should have no side effects. Signed-off-by: Yu Zhao --- include/linux/mmzone.h | 2 -- mm/vmscan.c| 3 ++- 2 files changed, 2

[PATCH 05/13] mm: don't pass enum lru_list to lru list addition functions

2020-09-17 Thread Yu Zhao
The enum lru_list parameter to add_page_to_lru_list() and add_page_to_lru_list_tail() is redundant in the sense that it can be extracted from the struct page parameter by page_lru(). A caveat is that we need to make sure PageActive() or PageUnevictable() is correctly set or cleared before calling

[PATCH 09/13] mm: inline page_lru_base_type()

2020-09-17 Thread Yu Zhao
We've removed all other references to this function. This change should have no side effects. Signed-off-by: Yu Zhao --- include/linux/mm_inline.h | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/include/linux/mm_inline.h

[PATCH 08/13] mm: rename page_off_lru() to __clear_page_lru_flags()

2020-09-17 Thread Yu Zhao
Rename the function according to what it really does. And make it return void since the return value is not needed anymore. If PageActive() and PageUnevictable() are both true, refuse to clear either and leave them to bad_page(). Signed-off-by: Yu Zhao --- include/linux/mm_inline.h | 29

[PATCH 04/13] mm: shuffle lru list addition and deletion functions

2020-09-17 Thread Yu Zhao
This change should have no side effects. We want it only because we prefer to avoid forward declarations in the following patches. Signed-off-by: Yu Zhao --- include/linux/mm_inline.h | 42 +++ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git

[PATCH AUTOSEL 5.4 208/330] brcmfmac: Fix double freeing in the fmac usb data path

2020-09-17 Thread Sasha Levin
From: Raveendran Somu [ Upstream commit 78179869dc3f5c0059bbf5d931a2717f1ad97ecd ] When the brcmf_fws_process_skb() fails to get hanger slot for queuing the skb, it tries to free the skb. But the caller brcmf_netdev_start_xmit() of that funciton frees the packet on error return value. This

[PATCH 13/13] mm: enlarge the int parameter of update_lru_size()

2020-09-17 Thread Yu Zhao
In update_lru_sizes(), we call update_lru_size() with a long argument, whereas the callee only takes an int parameter. Though this isn't causing any overflow I'm aware of, it's not a good idea to go through the truncation since the underlying counters are already in long. This patch enlarges all

[PATCH AUTOSEL 5.4 213/330] 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 5.4 214/330] svcrdma: Fix leak of transport addresses

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit 1a33d8a284b1e85e03b8c7b1ea8fb985fccd1d71 ] Kernel memory leak detected: unreferenced object 0x49cdf480 (size 8): comm "kworker/u8:3", pid 2086, jiffies 4297898756 (age 4269.856s) hex dump (first 8 bytes): 30 00 cd 49 88 88 ff ff

[PATCH AUTOSEL 5.4 212/330] scsi: hpsa: correct race condition in offload enabled

2020-09-17 Thread Sasha Levin
From: Don Brace [ Upstream commit 3e16e83a62edac7617bfd8dbb4e55d04ff6adbe1 ] Correct race condition where ioaccel is re-enabled before the raid_map is updated. For RAID_1, RAID_1ADM, and RAID 5/6 there is a BUG_ON called which is bad. - Change event thread to disable ioaccel only. Send all

[PATCH AUTOSEL 5.4 215/330] netfilter: nf_tables: silence a RCU-list warning in nft_table_lookup()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 0a6a9515fe390976cd762c52d8d4f446d7a14285 ] It is safe to traverse >nft.tables with >nft.commit_mutex held using list_for_each_entry_rcu(). Silence the PROVE_RCU_LIST false positive, WARNING: suspicious RCU usage net/netfilter/nf_tables_api.c:523 RCU-list

[PATCH AUTOSEL 5.4 219/330] 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 5.4 217/330] ubifs: ubifs_jnl_write_inode: Fix a memory leak bug

2020-09-17 Thread Sasha Levin
From: Zhihao Cheng [ Upstream commit 81423c78551654953d746250f1721300b470be0e ] When inodes with extended attributes are evicted, xent is not freed in one exit branch. Signed-off-by: Zhihao Cheng Fixes: 9ca2d732644484488db3112 ("ubifs: Limit number of xattrs per inode") Signed-off-by: Richard

[PATCH AUTOSEL 5.4 216/330] PCI: Use ioremap(), not phys_to_virt() for platform ROM

2020-09-17 Thread Sasha Levin
From: Mikel Rychliski [ Upstream commit 72e0ef0e5f067fd991f702f0b2635d911d0cf208 ] On some EFI systems, the video BIOS is provided by the EFI firmware. The boot stub code stores the physical address of the ROM image in pdev->rom. Currently we attempt to access this pointer using

[PATCH AUTOSEL 5.4 210/330] RDMA/rxe: Set sys_image_guid to be aligned with HW IB devices

2020-09-17 Thread Sasha Levin
From: Zhu Yanjun [ Upstream commit d0ca2c35dd15a3d989955caec02beea02f735ee6 ] The RXE driver doesn't set sys_image_guid and user space applications see zeros. This causes to pyverbs tests to fail with the following traceback, because the IBTA spec requires to have valid sys_image_guid.

[PATCH AUTOSEL 5.4 218/330] ubifs: ubifs_add_orphan: Fix a memory leak bug

2020-09-17 Thread Sasha Levin
From: Zhihao Cheng [ Upstream commit 927cc5cec35f01fe4f8af0ba80830a90b0533983 ] Memory leak occurs when files with extended attributes are added to orphan list. Signed-off-by: Zhihao Cheng Fixes: 988bec41318f3fa897e2f8 ("ubifs: orphan: Handle xattrs like files") Signed-off-by: Richard

[PATCH AUTOSEL 5.4 224/330] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-09-17 Thread Sasha Levin
From: Anju T Sudhakar [ Upstream commit a36e8ba60b991d563677227f172db69e030797e6 ] IMC(In-memory Collection Counters) does performance monitoring in two different modes, i.e accumulation mode(core-imc and thread-imc events), and trace mode(trace-imc events). A cpu thread can either be in

[PATCH AUTOSEL 5.4 220/330] 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 5.4 230/330] nvmet-rdma: fix double free of rdma queue

2020-09-17 Thread Sasha Levin
From: Israel Rukshin [ Upstream commit 21f9024355e58772ec5d7fc3534aa5e29d72a8b6 ] In case rdma accept fails at nvmet_rdma_queue_connect(), release work is scheduled. Later on, a new RDMA CM event may arrive since we didn't destroy the cm-id and call nvmet_rdma_queue_connect_fail(), which

Re: [PATCH AUTOSEL 4.19 059/206] ext4: make dioread_nolock the default

2020-09-17 Thread Eric Biggers
On Thu, Sep 17, 2020 at 10:05:35PM -0400, Sasha Levin wrote: > 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. >

[PATCH AUTOSEL 5.4 233/330] 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,

Re: [PATCH AUTOSEL 5.4 001/330] drm/v3d: don't leak bin job if v3d_job_init fails.

2020-09-17 Thread Eric Anholt
On Thu, Sep 17, 2020 at 7:01 PM Sasha Levin wrote: > > From: Iago Toral Quiroga > > [ Upstream commit 0d352a3a8a1f26168d09f7073e61bb4b328e3bb9 ] > > If the initialization of the job fails we need to kfree() it > before returning. > > Signed-off-by: Iago Toral Quiroga > Signed-off-by: Eric

[PATCH AUTOSEL 5.4 226/330] 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 5.4 228/330] mm/vmscan.c: fix data races using kswapd_classzone_idx

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 5644e1fbbfe15ad06785502bbfe5751223e5841d ] pgdat->kswapd_classzone_idx could be accessed concurrently in wakeup_kswapd(). Plain writes and reads without any lock protection result in data races. Fix them by adding a pair of READ|WRITE_ONCE() as well as saving

[PATCH AUTOSEL 5.4 229/330] SUNRPC: Don't start a timer on an already queued rpc task

2020-09-17 Thread Sasha Levin
From: Trond Myklebust [ Upstream commit 1fab7dc477241c12f977955aa6baea7938b6f08d ] Move the test for whether a task is already queued to prevent corruption of the timer list in __rpc_sleep_on_priority_timeout(). Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.4 225/330] mm/kmemleak.c: use address-of operator on section symbols

2020-09-17 Thread Sasha Levin
From: Nathan Chancellor [ Upstream commit b0d14fc43d39203ae025f20ef4d5d25d9ccf4be1 ] Clang warns: mm/kmemleak.c:1955:28: warning: array comparison always evaluates to a constant [-Wtautological-compare] if (__start_ro_after_init < _sdata || __end_ro_after_init > _edata)

[PATCH AUTOSEL 5.4 227/330] mm/swapfile: fix data races in try_to_unuse()

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit 218209487c3da2f6d861b236c11226b6eca7b7b7 ] si->inuse_pages could be accessed concurrently as noticed by KCSAN, write to 0x98b00ebd04dc of 4 bytes by task 82262 on cpu 92: swap_range_free+0xbe/0x230 swap_range_free at mm/swapfile.c:719

[PATCH AUTOSEL 5.4 238/330] 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 5.4 232/330] drm/amdgpu/sriov add amdgpu_amdkfd_pre_reset in gpu reset

2020-09-17 Thread Sasha Levin
From: Jack Zhang [ Upstream commit 04bef61e5da18c2b301c629a209ccdba4d4c6fbb ] kfd_pre_reset will free mem_objs allocated by kfd_gtt_sa_allocate Without this change, sriov tdr code path will never free those allocated memories and get memory leak. v2:add a bugfix for kiq ring test fail

[PATCH AUTOSEL 5.4 237/330] btrfs: fix setting last_trans for reloc roots

2020-09-17 Thread Sasha Levin
From: Josef Bacik [ Upstream commit aec7db3b13a07d515c15ada752a7287a44a79ea0 ] I made a mistake with my previous fix, I assumed that we didn't need to mess with the reloc roots once we were out of the part of relocation where we are actually moving the extents. The subtle thing that I missed

Re: [PATCH 6/9] f2fs: zstd: Switch to the zstd-1.4.6 API

2020-09-17 Thread Chao Yu
On 2020/9/18 10:56, Eric Biggers wrote: On Fri, Sep 18, 2020 at 09:47:32AM +0800, Chao Yu wrote: Ah, I got it. Step of enabling compressed inode is not correct, we should touch an empty file, and then use 'chattr +c' on that file to enable compression, otherwise the race condition could be

[PATCH AUTOSEL 5.4 239/330] perf stat: Force error in fallback on :k events

2020-09-17 Thread Sasha Levin
From: Stephane Eranian [ Upstream commit bec49a9e05db3dbdca696fa07c62c52638fb6371 ] When it is not possible for a non-privilege perf command to monitor at the kernel level (:k), the fallback code forces a :u. That works if the event was previously monitoring both levels. But if the event was

[PATCH AUTOSEL 5.4 250/330] dpaa2-eth: fix error return code in setup_dpni()

2020-09-17 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit 97fff7c8de1e54e5326dfeb66085796864bceb64 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller Signed-off-by: Sasha Levin ---

[PATCH AUTOSEL 5.4 252/330] devlink: Fix reporter's recovery condition

2020-09-17 Thread Sasha Levin
From: Aya Levin [ Upstream commit bea0c5c942d3b4e9fb6ed45f6a7de74c6b112437 ] Devlink health core conditions the reporter's recovery with the expiration of the grace period. This is not relevant for the first recovery. Explicitly demand that the grace period will only apply to recoveries other

[PATCH AUTOSEL 5.4 251/330] 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 5.4 249/330] sched/fair: Eliminate bandwidth race between throttling and distribution

2020-09-17 Thread Sasha Levin
From: Paul Turner [ Upstream commit e98fa02c4f2ea4991dae422ac7e34d102d2f0599 ] There is a race window in which an entity begins throttling before quota is added to the pool, but does not finish throttling until after we have finished with distribute_cfs_runtime(). This entity is not observed by

[PATCH AUTOSEL 5.4 254/330] media: venus: vdec: Init registered list unconditionally

2020-09-17 Thread Sasha Levin
From: Stanimir Varbanov [ Upstream commit bc3d870e414b42d72cd386aa20a4fc3612e4feb7 ] Presently the list initialization is done only in dynamic-resolution-change state, which leads to list corruptions and use-after-free. Init list_head unconditionally in vdec_stop_capture called by vb2

[PATCH AUTOSEL 5.4 253/330] 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 5.4 248/330] arm64: cpufeature: Relax checks for AArch32 support at EL[0-2]

2020-09-17 Thread Sasha Levin
From: Will Deacon [ Upstream commit 98448cdfe7060dd5491bfbd3f7214ffe1395d58e ] We don't need to be quite as strict about mismatched AArch32 support, which is good because the friendly hardware folks have been busy mismatching this to their hearts' content. * We don't care about EL2 or EL3

[PATCH AUTOSEL 5.4 257/330] mm/slub: fix incorrect interpretation of s->offset

2020-09-17 Thread Sasha Levin
From: Waiman Long [ Upstream commit cbfc35a48609ceac978791e3ab9dde0c01f8cb20 ] In a couple of places in the slub memory allocator, the code uses "s->offset" as a check to see if the free pointer is put right after the object. That check is no longer true with commit 3202fa62fb43 ("slub:

[PATCH AUTOSEL 5.4 247/330] sparc64: vcc: Fix error return code in vcc_probe()

2020-09-17 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit ff62255a2a5c1228a28f2bb063646f948115a309 ] Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Link:

[PATCH AUTOSEL 5.4 256/330] perf mem2node: Avoid double free related to realloc

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit 266150c94c69429cf6d18e130237224a047f5061 ] Realloc of size zero is a free not an error, avoid this causing a double free. Caught by clang's address sanitizer: ==2634==ERROR: AddressSanitizer: attempting double-free on 0x602015f0 in thread T0: #0

RE: [PATCH v3] dt-bindings: mailbox: fsl,mu: Add missing power-domains

2020-09-17 Thread Aisheng Dong
> From: Krzysztof Kozlowski > Sent: Friday, September 18, 2020 3:42 AM > > Add quite common property - power-domains - to fix dtbs_check warnings > like: > > arch/arm64/boot/dts/freescale/imx8qxp-mek.dt.yaml: > mailbox@5d28: 'power-domains' does not match any of the regexes: >

[PATCH AUTOSEL 5.4 259/330] power: supply: max17040: Correct voltage reading

2020-09-17 Thread Sasha Levin
From: Jonathan Bakker [ Upstream commit 0383024f811aa469df258039807810fc3793a105 ] According to the datasheet available at (1), the bottom four bits are always zero and the actual voltage is 1.25x this value in mV. Since the kernel API specifies that voltages should be in uV, it should report

[PATCH AUTOSEL 5.4 255/330] perf parse-events: Fix memory leaks found on parse_events

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit e8dfb81838b14f82521968343884665b996646ef ] Fix a memory leak found by applying LLVM's libfuzzer on parse_events(). Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Leo Yan Cc: Mark Rutland Cc:

[PATCH AUTOSEL 5.4 262/330] 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 5.4 260/330] 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 5.4 258/330] i2c: tegra: Restore pinmux on system resume

2020-09-17 Thread Sasha Levin
From: Thierry Reding [ Upstream commit 44c99904cf61f945d02ac9976ab10dd5ccaea393 ] Depending on the board design, the I2C controllers found on Tegra SoCs may require pinmuxing in order to function. This is done as part of the driver's runtime suspend/resume operations. However, the PM core does

[PATCH AUTOSEL 5.4 261/330] 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 5.4 273/330] fuse: update attr_version counter on fuse_notify_inval_inode()

2020-09-17 Thread Sasha Levin
From: Miklos Szeredi [ Upstream commit 5ddd9ced9aef6cfa76af27d384c17c9e2d610ce8 ] A GETATTR request can race with FUSE_NOTIFY_INVAL_INODE, resulting in the attribute cache being updated with stale information after the invalidation. Fix this by bumping the attribute version in

[PATCH AUTOSEL 5.4 277/330] scsi: cxlflash: Fix error return code in cxlflash_probe()

2020-09-17 Thread Sasha Levin
From: Wei Yongjun [ Upstream commit d0b1e4a638d670a09f42017a3e567dc846931ba8 ] Fix to return negative error code -ENOMEM from create_afu error handling case instead of 0, as done elsewhere in this function. Link: https://lore.kernel.org/r/20200428141855.88704-1-weiyongj...@huawei.com Acked-by:

[PATCH AUTOSEL 5.4 272/330] 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

Re: [PATCH 6/9] f2fs: zstd: Switch to the zstd-1.4.6 API

2020-09-17 Thread Eric Biggers
On Fri, Sep 18, 2020 at 09:47:32AM +0800, Chao Yu wrote: > Ah, I got it. > > Step of enabling compressed inode is not correct, we should touch an empty > file, and then use 'chattr +c' on that file to enable compression, otherwise > the race condition could be complicated to handle. So we need

[PATCH AUTOSEL 5.4 278/330] arm64/cpufeature: Drop TraceFilt feature exposure from ID_DFR0 register

2020-09-17 Thread Sasha Levin
From: Anshuman Khandual [ Upstream commit 1ed1b90a0594c8c9d31e8bb8be25a2b37717dc9e ] ID_DFR0 based TraceFilt feature should not be exposed to guests. Hence lets drop it. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Rutland Cc: James Morse Cc: Suzuki K Poulose Cc:

[PATCH AUTOSEL 5.4 284/330] 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 5.4 276/330] arm64: acpi: Make apei_claim_sea() synchronise with APEI's irq work

2020-09-17 Thread Sasha Levin
From: James Morse [ Upstream commit 8fcc4ae6faf8b455eeef00bc9ae70744e3b0f462 ] APEI is unable to do all of its error handling work in nmi-context, so it defers non-fatal work onto the irq_work queue. arch_irq_work_raise() sends an IPI to the calling cpu, but this is not guaranteed to be taken

[PATCH AUTOSEL 5.4 280/330] 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 5.4 271/330] svcrdma: Fix backchannel return code

2020-09-17 Thread Sasha Levin
From: Chuck Lever [ Upstream commit ea740bd5f58e2912e74f401fd01a9d6aa985ca05 ] Way back when I was writing the RPC/RDMA server-side backchannel code, I misread the TCP backchannel reply handler logic. When svc_tcp_recvfrom() successfully receives a backchannel reply, it does not return -EAGAIN.

[PATCH AUTOSEL 5.4 275/330] coresight: etm4x: Fix use-after-free of per-cpu etm drvdata

2020-09-17 Thread Sasha Levin
From: Suzuki K Poulose [ Upstream commit 3f4943d422c5febbb3c764670011a00eb2a86238 ] etm probe could be deferred due to the dependency in the trace path chain and may be retried. We need to clear the per-cpu etmdrvdata entry for the etm in case of a failure to avoid use-after-free cases as

[PATCH AUTOSEL 5.4 274/330] 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 5.4 279/330] drm/amdkfd: fix restore worker race condition

2020-09-17 Thread Sasha Levin
From: Philip Yang [ Upstream commit f7646585a30ed8ef5ab300d4dc3b0c1d6afbe71d ] In free memory of gpu path, remove bo from validate_list to make sure restore worker don't access the BO any more, then unregister bo MMU interval notifier. Otherwise, the restore worker will crash in the middle of

[PATCH AUTOSEL 5.4 285/330] usb: dwc3: Increase timeout for CmdAct cleared by device controller

2020-09-17 Thread Sasha Levin
From: Yu Chen [ Upstream commit 1c0e69ae1b9f9004fd72978612ae3463791edc56 ] If the SS PHY is in P3, there is no pipe_clk, HW may use suspend_clk for function, as suspend_clk is slow so EP command need more time to complete, e.g, imx8M suspend_clk is 32K, set ep configuration will take about

[PATCH AUTOSEL 5.4 291/330] perf parse-events: Fix incorrect conversion of 'if () free()' to 'zfree()'

2020-09-17 Thread Sasha Levin
From: Arnaldo Carvalho de Melo [ Upstream commit 7fcdccd4237724931d9773d1e3039bfe053a6f52 ] When applying a patch by Ian I incorrectly converted to zfree() an expression that involved testing some other struct member, not the one being freed, which lead to bugs reproduceable by: $ perf stat

[PATCH AUTOSEL 5.4 282/330] drm/nouveau: fix runtime pm imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit d7372dfb3f7f1602b87e0663e8b8646da23ebca7 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call 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 5.4 281/330] drm/nouveau/debugfs: fix runtime pm imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 00583fbe8031f69bba8b0a9a861efb75fb7131af ] pm_runtime_get_sync() increments the runtime PM usage counter even the call 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 5.4 289/330] 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

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2020-09-17 Thread Kehuan Feng
Sorry, guys, the experiment environment is no longer existing now. We finally use fq_codel for online product. Cong Wang 于2020年9月18日周五 上午3:52写道: > > On Sun, Sep 13, 2020 at 7:10 PM Yunsheng Lin wrote: > > > > On 2020/9/11 4:19, Cong Wang wrote: > > > On Thu, Sep 3, 2020 at 8:21 PM Kehuan Feng

[PATCH AUTOSEL 5.4 269/330] ipmi:bt-bmc: Fix error handling and status check

2020-09-17 Thread Sasha Levin
From: Tang Bin [ Upstream commit 49826937e7c7917140515aaf10c17bedcc4acaad ] If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in bt_bmc_config_irq(). And in the function bt_bmc_probe(), when get irq failed, it will print

[PATCH AUTOSEL 5.4 283/330] drm/nouveau/dispnv50: fix runtime pm imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit dc455f4c888365595c0a13da445e092422d55b8d ] pm_runtime_get_sync() increments the runtime PM usage counter even the call 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 5.4 292/330] perf evsel: Fix 2 memory leaks

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit 3efc899d9afb3d03604f191a0be9669eabbfc4aa ] If allocated, perf_pkg_mask and metric_events need freeing. Signed-off-by: Ian Rogers Reviewed-by: Andi Kleen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter

RE: [PATCHv7 00/12]PCI: dwc: Add the multiple PF support for DWC and Layerscape

2020-09-17 Thread Z.q. Hou
Hi Lorenzo, Thanks a lot for your comments! > -Original Message- > From: Lorenzo Pieralisi > Sent: 2020年9月18日 0:20 > To: Z.q. Hou > Cc: linux-...@vger.kernel.org; devicet...@vger.kernel.org; > linux-kernel@vger.kernel.org; linux-arm-ker...@lists.infradead.org; >

[PATCH AUTOSEL 5.4 288/330] gpio: rcar: Fix runtime PM imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 6f8cd246411575703d9312888b70705c396b53a9 ] 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 5.4 290/330] KVM: PPC: Book3S HV: Close race with page faults around memslot flushes

2020-09-17 Thread Sasha Levin
From: Paul Mackerras [ Upstream commit 11362b1befeadaae4d159a8cddcdaf6b8afe08f9 ] There is a potential race condition between hypervisor page faults and flushing a memslot. It is possible for a page fault to read the memslot before a memslot is updated and then write a PTE to the

[PATCH AUTOSEL 5.4 294/330] perf stat: Fix duration_time value for higher intervals

2020-09-17 Thread Sasha Levin
From: Jiri Olsa [ Upstream commit ea9eb1f456a08c18feb485894185f7a4e31cc8a4 ] Joakim reported wrong duration_time value for interval bigger than 4000 [1]. The problem is in the interval value we pass to update_stats function, which is typed as 'unsigned int' and overflows when we get over 2^32

[PATCH AUTOSEL 5.4 287/330] btrfs: fix double __endio_write_update_ordered in direct I/O

2020-09-17 Thread Sasha Levin
From: Omar Sandoval [ Upstream commit c36cac28cb94e58f7e21ff43bdc6064346dab32c ] In btrfs_submit_direct(), if we fail to allocate the btrfs_dio_private, we complete the ordered extent range. However, we don't mark that the range doesn't need to be cleaned up from btrfs_direct_IO() until later.

[PATCH AUTOSEL 5.4 297/330] 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 5.4 296/330] perf metricgroup: Free metric_events on error

2020-09-17 Thread Sasha Levin
From: Ian Rogers [ Upstream commit a159e2fe89b4d1f9fb54b0ae418b961e239bf617 ] Avoid a simple memory leak. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Cong Wang Cc: Daniel Borkmann Cc: Jin Yao Cc: Jiri Olsa Cc: John

[PATCH AUTOSEL 5.4 298/330] PCI: tegra194: Fix runtime PM imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 1c1dbb2c02623db18a50c61b175f19aead800b4e ] 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. Link:

[PATCH AUTOSEL 5.4 301/330] wlcore: fix runtime pm imbalance in wlcore_regdomain_config

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 282a04bf1d8029eb98585cb5db3fd70fe8bc91f7 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call 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 5.4 299/330] ASoC: img-i2s-out: Fix runtime PM imbalance on error

2020-09-17 Thread Sasha Levin
From: Dinghao Liu [ Upstream commit 65bd91dd6957390c42a0491b9622cf31a2cdb140 ] pm_runtime_get_sync() increments the runtime PM usage counter even the call 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 5.4 317/330] scsi: libfc: Skip additional kref updating work event

2020-09-17 Thread Sasha Levin
From: Javed Hasan [ Upstream commit 823a65409c8990f64c5693af98ce0e7819975cba ] When an rport event (RPORT_EV_READY) is updated without work being queued, avoid taking an additional reference. This issue was leading to memory leak. Trace from KMEMLEAK tool: unreferenced object

[PATCH AUTOSEL 5.4 314/330] nvme: fix possible deadlock when I/O is blocked

2020-09-17 Thread Sasha Levin
From: Sagi Grimberg [ Upstream commit 3b4b19721ec652ad2c4fe51dfbe5124212b5f581 ] Revert fab7772bfbcf ("nvme-multipath: revalidate nvme_ns_head gendisk in nvme_validate_ns") When adding a new namespace to the head disk (via nvme_mpath_set_live) we will see partition scan which triggers I/O on

[PATCH AUTOSEL 5.4 315/330] mac80211: skip mpath lookup also for control port tx

2020-09-17 Thread Sasha Levin
From: Markus Theil [ Upstream commit 5af7fef39d7952c0f5551afa7b821ee7b6c9dd3d ] When using 802.1X over mesh networks, at first an ordinary mesh peering is established, then the 802.1X EAPOL dialog happens, afterwards an authenticated mesh peering exchange (AMPE) happens, finally the peering is

[PATCH AUTOSEL 5.4 316/330] scsi: libfc: Handling of extra kref

2020-09-17 Thread Sasha Levin
From: Javed Hasan [ Upstream commit 71f2bf85e90d938d4a9ef9dd9bfa8d9b0b6a03f7 ] Handling of extra kref which is done by lookup table in case rdata is already present in list. This issue was leading to memory leak. Trace from KMEMLEAK tool: unreferenced object 0x259e8780 (size 512):

[PATCH AUTOSEL 5.4 319/330] 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 5.4 307/330] mm: memcontrol: fix stat-corrupting race in charge moving

2020-09-17 Thread Sasha Levin
From: Johannes Weiner [ Upstream commit abb242f57196dbaa108271575353a0453f6834ef ] The move_lock is a per-memcg lock, but the VM accounting code that needs to acquire it comes from the page and follows page->mem_cgroup under RCU protection. That means that the page becomes unlocked not when we

[PATCH AUTOSEL 5.4 306/330] mm/swap_state: fix a data race in swapin_nr_pages

2020-09-17 Thread Sasha Levin
From: Qian Cai [ Upstream commit d6c1f098f2a7ba62627c9bc17cda28f534ef9e4a ] "prev_offset" is a static variable in swapin_nr_pages() that can be accessed concurrently with only mmap_sem held in read mode as noticed by KCSAN, BUG: KCSAN: data-race in swap_cluster_readahead /

[PATCH AUTOSEL 5.4 303/330] 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 5.4 321/330] perf tests: Fix test 68 zstd compression for s390

2020-09-17 Thread Sasha Levin
From: Thomas Richter [ Upstream commit 463538a383a27337cb83ae195e432a839a52d639 ] Commit 5aa98879efe7 ("s390/cpum_sf: prohibit callchain data collection") prohibits call graph sampling for hardware events on s390. The information recorded is out of context and does not match. On s390 this

[PATCH AUTOSEL 5.4 318/330] 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 5.4 322/330] scsi: qla2xxx: Retry PLOGI on FC-NVMe PRLI failure

2020-09-17 Thread Sasha Levin
From: Quinn Tran [ Upstream commit 983f127603fac650fa34ee69db363e4615eaf9e7 ] Current code will send PRLI with FC-NVMe bit set for the targets which support only FCP. This may result into issue with targets which do not understand NVMe and will go into a strange state. This patch would restart

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