[PATCH 5.4 042/214] usb: typec: tcpm: During PR_SWAP, source caps should be sent only after tSwapSourceStart

2020-11-03 Thread Greg Kroah-Hartman
From: Badhri Jagan Sridharan [ Upstream commit 6bbe2a90a0bb4af8dd99c3565e907fe9b5e7fd88 ] The patch addresses the compliance test failures while running TD.PD.CP.E3, TD.PD.CP.E4, TD.PD.CP.E5 of the "Deterministic PD Compliance MOI" test plan published in https://www.usb.org/usbc. For a product

[PATCH 5.4 045/214] mmc: via-sdmmc: Fix data race bug

2020-11-03 Thread Greg Kroah-Hartman
From: Madhuparna Bhowmik [ Upstream commit 87d7ad089b318b4f319bf57f1daa64eb6d1d10ad ] via_save_pcictrlreg() should be called with host->lock held as it writes to pm_pcictrl_reg, otherwise there can be a race condition between via_sd_suspend() and via_sdc_card_detect(). The same pattern is used

[PATCH 5.4 031/214] ARM: 8997/2: hw_breakpoint: Handle inexact watchpoint addresses

2020-11-03 Thread Greg Kroah-Hartman
From: Douglas Anderson [ Upstream commit 22c9e58299e5f18274788ce54c03d4fb761e3c5d ] This is commit fdfeff0f9e3d ("arm64: hw_breakpoint: Handle inexact watchpoint addresses") but ported to arm32, which has the same problem. This problem was found by Android CTS tests, notably the

[PATCH 5.4 046/214] drm/bridge/synopsys: dsi: add support for non-continuous HS clock

2020-11-03 Thread Greg Kroah-Hartman
From: Antonio Borneo [ Upstream commit c6d94e37bdbb6dfe7e581e937a915ab58399b8a5 ] Current code enables the HS clock when video mode is started or to send out a HS command, and disables the HS clock to send out a LP command. This is not what DSI spec specify. Enable HS clock either in command

[PATCH 5.4 057/214] USB: adutux: fix debugging

2020-11-03 Thread Greg Kroah-Hartman
From: Oliver Neukum [ Upstream commit c56150c1bc8da5524831b1dac2eec3c67b89f587 ] Handling for removal of the controller was missing at one place. Add it. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20200917112600.26508-1-oneu...@suse.com Signed-off-by: Greg Kroah-Hartman

[PATCH 5.4 067/214] drivers/net/wan/hdlc_fr: Correctly handle special skb->protocol values

2020-11-03 Thread Greg Kroah-Hartman
From: Xie He [ Upstream commit 8306266c1d51aac9aa7aa907fe99032a58c6382c ] The fr_hard_header function is used to prepend the header to skbs before transmission. It is used in 3 situations: 1) When a control packet is generated internally in this driver; 2) When a user sends an skb on an

[PATCH 5.4 033/214] power: supply: bq27xxx: report "not charging" on all types

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit 7bf738ba110722b63e9dc8af760d3fb2aef25593 ] Commit 6f24ff97e323 ("power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor") and commit d74534c27775 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") added support for

[PATCH 5.4 062/214] arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE

2020-11-03 Thread Greg Kroah-Hartman
From: Zhengyuan Liu [ Upstream commit a194c5f2d2b3a05428805146afcabe5140b5d378 ] The @node passed to cpumask_of_node() can be NUMA_NO_NODE, in that case it will trigger the following WARN_ON(node >= nr_node_ids) due to mismatched data types of @node and @nr_node_ids. Actually we should return

[PATCH 5.4 069/214] ACPI: HMAT: Fix handling of changes from ACPI 6.2 to ACPI 6.3

2020-11-03 Thread Greg Kroah-Hartman
From: Jonathan Cameron [ Upstream commit 2c5b9bde95c96942f2873cea6ef383c02800e4a8 ] In ACPI 6.3, the Memory Proximity Domain Attributes Structure changed substantially. One of those changes was that the flag for "Memory Proximity Domain field is valid" was deprecated. This was because the

[PATCH 5.4 035/214] video: fbdev: pvr2fb: initialize variables

2020-11-03 Thread Greg Kroah-Hartman
From: Tom Rix [ Upstream commit 8e1ba47c60bcd325fdd097cd76054639155e5d2e ] clang static analysis reports this repesentative error pvr2fb.c:1049:2: warning: 1st function call argument is an uninitialized value [core.CallAndMessage] if (*cable_arg) ^~~ Problem is

[PATCH 5.4 065/214] ACPI: Add out of bounds and numa_off protections to pxm_to_node()

2020-11-03 Thread Greg Kroah-Hartman
From: Jonathan Cameron [ Upstream commit 8a3decac087aa897df5af04358c2089e52e70ac4 ] The function should check the validity of the pxm value before using it to index the pxm_to_node_map[] array. Whilst hardening this code may be good in general, the main intent here is to enable following

[PATCH 5.4 036/214] ath10k: start recovery process when payload length exceeds max htc length for sdio

2020-11-03 Thread Greg Kroah-Hartman
From: Wen Gong [ Upstream commit 2fd3c8f34d08af0a6236085f9961866ad92ef9ec ] When simulate random transfer fail for sdio write and read, it happened "payload length exceeds max htc length" and recovery later sometimes. Test steps: 1. Add config and update kernel: CONFIG_FAIL_MMC_REQUEST=y

[PATCH 5.4 039/214] selftests/x86/fsgsbase: Reap a forgotten child

2020-11-03 Thread Greg Kroah-Hartman
From: Andy Lutomirski [ Upstream commit ab2dd173330a3f07142e68cd65682205036cd00f ] The ptrace() test forgot to reap its child. Reap it. Signed-off-by: Andy Lutomirski Signed-off-by: Ingo Molnar Link:

[PATCH 5.4 061/214] SUNRPC: Mitigate cond_resched() in xprt_transmit()

2020-11-03 Thread Greg Kroah-Hartman
From: Chuck Lever [ Upstream commit 6f9f17287e78e5049931af2037b15b26d134a32a ] The original purpose of this expensive call is to prevent a long queue of requests from blocking other work. The cond_resched() call is unnecessary after just a single send operation. For longer queues, instead of

[PATCH 5.4 068/214] bus/fsl_mc: Do not rely on caller to provide non NULL mc_io

2020-11-03 Thread Greg Kroah-Hartman
From: Diana Craciun [ Upstream commit 5026cf605143e764e1785bbf9158559d17f8d260 ] Before destroying the mc_io, check first that it was allocated. Reviewed-by: Laurentiu Tudor Acked-by: Laurentiu Tudor Signed-off-by: Diana Craciun Link:

[PATCH 5.4 030/214] f2fs: handle errors of f2fs_get_meta_page_nofail

2020-11-03 Thread Greg Kroah-Hartman
From: Jaegeuk Kim [ Upstream commit 86f33603f8c51537265ff7ac0320638fd2cbdb1b ] First problem is we hit BUG_ON() in f2fs_get_sum_page given EIO on f2fs_get_meta_page_nofail(). Quick fix was not to give any error with infinite loop, but syzbot caught a case where it goes to that loop from fuzzed

Directory category for accessory drivers

2020-11-03 Thread Amy Parker
I'm currently working on improving some accessory drivers to hopefully submit to a future kernel tree. The drivers are assorted for headphones, mice, keyboards, and other assorted accessories. Which driver category or folder would this fall under, or would they require their own new folder on the

[PATCH 5.4 083/214] gfs2: use-after-free in sysfs deregistration

2020-11-03 Thread Greg Kroah-Hartman
From: Jamie Iles [ Upstream commit c2a04b02c060c4858762edce4674d5cba3e5a96f ] syzkaller found the following splat with CONFIG_DEBUG_KOBJECT_RELEASE=y: Read of size 1 at addr 28e896b8 by task kworker/1:2/228 CPU: 1 PID: 228 Comm: kworker/1:2 Tainted: G S5.9.0-rc8+

[PATCH 5.4 038/214] drm/brige/megachips: Add checking if ge_b850v3_lvds_init() is working correctly

2020-11-03 Thread Greg Kroah-Hartman
From: Nadezda Lutovinova [ Upstream commit f688a345f0d7a6df4dd2aeca8e4f3c05e123a0ee ] If ge_b850v3_lvds_init() does not allocate memory for ge_b850v3_lvds_ptr, then a null pointer dereference is accessed. The patch adds checking of the return value of ge_b850v3_lvds_init(). Found by Linux

[PATCH 5.4 090/214] ARM: dts: s5pv210: move fixed clocks under root node

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit d38cae370e5f2094cbc38db3082b8e9509ae52ce ] The fixed clocks are kept under dedicated 'external-clocks' node, thus a fake 'reg' was added. This is not correct with dtschema as fixed-clock binding does not have a 'reg' property. Moving fixed clocks

[PATCH 5.4 093/214] nbd: make the config put is called before the notifying the waiter

2020-11-03 Thread Greg Kroah-Hartman
From: Xiubo Li [ Upstream commit 87aac3a80af5cbad93e63250e8a1e19095ba0d30 ] There has one race case for ceph's rbd-nbd tool. When do mapping it may fail with EBUSY from ioctl(nbd, NBD_DO_IT), but actually the nbd device has already unmaped. It dues to if just after the wake_up(), the

[PATCH 5.4 089/214] ARM: dts: s5pv210: remove DMA controller bus node name to fix dtschema warnings

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit ea4e792f3c8931fffec4d700cf6197d84e9f35a6 ] There is no need to keep DMA controller nodes under AMBA bus node. Remove the "amba" node to fix dtschema warnings like: amba: $nodename:0: 'amba' does not match

Re: [RFC PATCH 13/22] x86/fpu/xstate: Expand dynamic user state area on first use

2020-11-03 Thread Dave Hansen
On 11/3/20 1:32 PM, Bae, Chang Seok wrote: > On Wed, 2020-10-14 at 09:29 -0700, Dave Hansen wrote: >> On 10/14/20 9:10 AM, Andy Lutomirski wrote: >>> I was suggesting something a little bit different. We'd keep XMM, >>> YMM, ZMM, etc state stored exactly the way we do now and, for >>> AMX-using

[PATCH v3 3/3] reboot: refactor and comment the cpu selection code

2020-11-03 Thread Matteo Croce
From: Matteo Croce Small improvements to the code, without changing the way it works: - use a local variable, to avoid a small time lapse where reboot_cpu can have an invalid value - comment the code which is not easy to understand at a glance - merge two identical code blocks into one -

[PATCH 5.4 087/214] ARM: dts: omap4: Fix sgx clock rate for 4430

2020-11-03 Thread Greg Kroah-Hartman
From: Tony Lindgren [ Upstream commit 19d3e9a0bdd57b90175f30390edeb06851f5f9f3 ] We currently have a different clock rate for droid4 compared to the stock v3.0.8 based Android Linux kernel: # cat /sys/kernel/debug/clk/dpll_*_m7x2_ck/clk_rate 26667 30720 # cat

[PATCH 5.4 082/214] KVM: PPC: Book3S HV: Do not allocate HPT for a nested guest

2020-11-03 Thread Greg Kroah-Hartman
From: Fabiano Rosas [ Upstream commit 05e6295dc7de859c9d56334805485c4d20bebf25 ] The current nested KVM code does not support HPT guests. This is informed/enforced in some ways: - Hosts < P9 will not be able to enable the nested HV feature; - The nested hypervisor MMU capabilities will not

Re: [RFC]: userspace memory reaping

2020-11-03 Thread Suren Baghdasaryan
On Tue, Nov 3, 2020 at 1:32 PM Minchan Kim wrote: > > On Tue, Nov 03, 2020 at 10:35:50AM +0100, Michal Hocko wrote: > > On Mon 02-11-20 12:29:24, Suren Baghdasaryan wrote: > > [...] > > > To follow up on this. Should I post an RFC implementing SIGKILL_SYNC > > > which in addition to sending a

[PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number

2020-11-03 Thread Matteo Croce
From: Matteo Croce Limit the CPU number to num_possible_cpus(), because setting it to a value lower than INT_MAX but higher than NR_CPUS produces the following error on reboot and shutdown: BUG: unable to handle page fault for address: 90ab1bb0 #PF: supervisor read access in

[PATCH 0/2] prevent potential access of uninitialized members in can_rcv() and canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
In both can_rcv(), and canfd_rcv(), when skb->len = 0, cfd->len (which is uninitialized) is accessed by pr_warn_once(). Performing the validation check for cfd->len separately, after the validation check for skb->len is done, resolves this issue in both instances, without compromising the

[PATCH 5.4 100/214] selftests/x86/fsgsbase: Test PTRACE_PEEKUSER for GSBASE with invalid LDT GS

2020-11-03 Thread Greg Kroah-Hartman
From: Andy Lutomirski commit 1b9abd1755ad947d7c9913e92e7837b533124c90 upstream. This tests commit: 8ab49526b53d ("x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task") Unpatched kernels will OOPS. Signed-off-by: Andy Lutomirski Signed-off-by: Ingo Molnar Cc: sta...@vger.kernel.org

[PATCH 5.4 092/214] ARM: dts: s5pv210: remove dedicated audio-subsystem node

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski [ Upstream commit 6c17a2974abf68a58517f75741b15c4aba42b4b8 ] The 'audio-subsystem' node is an artificial creation, not representing real hardware. The hardware is described by its nodes - AUDSS clock controller and I2S0. Remove the 'audio-subsystem' node along with

[PATCH 1/2] can: af_can: prevent potential access of uninitialized member in can_rcv()

2020-11-03 Thread Anant Thazhemadam
In can_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CAN_MAX_DLEN) separately after the skb->len's condition is checked,

[PATCH v3 0/3] fix parsing of reboot= cmdline

2020-11-03 Thread Matteo Croce
From: Matteo Croce The parsing of the reboot= cmdline has two major errors: - a missing bound check can crash the system on reboot - parsing of the cpu number only works if specified last Fix both, along with a small code refactor. v2->v3: Revert the offending commit first, then fix the other

[PATCH 2/2] can: af_can: prevent potential access of uninitialized member in canfd_rcv()

2020-11-03 Thread Anant Thazhemadam
In canfd_rcv(), cfd->len is uninitialized when skb->len = 0, and this uninitialized cfd->len is accessed nonetheless by pr_warn_once(). Fix this uninitialized variable access by checking cfd->len's validity condition (cfd->len > CANFD_MAX_DLEN) separately after the skb->len's condition is

[PATCH v3 1/3] Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"

2020-11-03 Thread Matteo Croce
From: Matteo Croce This reverts commit 616feab753972b9751308f3cd2a68fc57eae8edb. kstrtoint() and simple_strtoul() have a subtle difference which makes them non interchangeable: if a non digit character is found amid the parsing, the former will return an error, while the latter will just stop

[PATCH 5.4 097/214] mmc: sdhci: Add LTR support for some Intel BYT based controllers

2020-11-03 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 46f4a69ec8ed6ab9f6a6172afe50df792c8bc1b6 upstream. Some Intel BYT based host controllers support the setting of latency tolerance. Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The raw register values are also exposed via debugfs. Intel EHL

[PATCH 5.4 098/214] mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN

2020-11-03 Thread Greg Kroah-Hartman
From: Raul E Rangel commit f23cc3ba491af77395cea3f9d51204398729f26b upstream. This change fixes HS400 tuning for devices with invalid presets. SDHCI presets are not currently used for eMMC HS/HS200/HS400, but are used for DDR52. The HS400 retuning sequence is:

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
On 11/3/20 1:15 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 12:57:33PM -0800, Dongli Zhang wrote: >> On 11/3/20 12:35 PM, Matthew Wilcox wrote: >>> On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: However, once kernel is not under memory pressure any longer (suppose

[PATCH 5.4 099/214] seccomp: Make duplicate listener detection non-racy

2020-11-03 Thread Greg Kroah-Hartman
From: Jann Horn commit dfe719fef03d752f1682fa8aeddf30ba501c8555 upstream. Currently, init_listener() tries to prevent adding a filter with SECCOMP_FILTER_FLAG_NEW_LISTENER if one of the existing filters already has a listener. However, this check happens without holding any lock that would

Re: [PATCH 4.19 034/191] fscrypt: fix race where ->lookup() marks plaintext dentry as ciphertext

2020-11-03 Thread Eric Biggers
Looks like something went wrong with formatting the email addresses that receive these emails. The Cc line has: Cc: Greg Kroah-Hartman , "linux-fscr...@vger.kernel.org, linux-e...@vger.kernel.org, linux-f2fs-de...@lists.sourceforge.net, linux-...@lists.infradead.org, Theodore

[PATCH 5.4 074/214] md/bitmap: md_bitmap_get_counter returns wrong blocks

2020-11-03 Thread Greg Kroah-Hartman
From: Zhao Heming [ Upstream commit d837f7277f56e70d82b3a4a037d744854e62f387 ] md_bitmap_get_counter() has code: ``` if (bitmap->bp[page].hijacked || bitmap->bp[page].map == NULL) csize = ((sector_t)1) << (bitmap->chunkshift + PAGE_COUNTER_SHIFT - 1);

[PATCH 5.4 102/214] perf/x86/amd/ibs: Dont include randomized bits in get_ibs_op_count()

2020-11-03 Thread Greg Kroah-Hartman
From: Kim Phillips commit 680d69635005ba0e58fe3f4c52fc162b8fc743b0 upstream. get_ibs_op_count() adds hardware's current count (IbsOpCurCnt) bits to its count regardless of hardware's valid status. According to the PPR for AMD Family 17h Model 31h B0 55803 Rev 0.54, if the counter rolls over,

[PATCH 5.4 105/214] extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski commit 6aaad58c872db062f7ea2761421ca748bd0931cc upstream. The driver uses atomic version of gpiod_set_value() without any real reason. It is called in a workqueue under mutex so it could sleep there. Changing it to "can_sleep" flavor allows to use the driver with all

[PATCH 5.4 103/214] perf/x86/amd/ibs: Fix raw sample data accumulation

2020-11-03 Thread Greg Kroah-Hartman
From: Kim Phillips commit 36e1be8ada994d509538b3b1d0af8b63c351e729 upstream. Neither IbsBrTarget nor OPDATA4 are populated in IBS Fetch mode. Don't accumulate them into raw sample user data in that case. Also, in Fetch mode, add saving the IBS Fetch Control Extended MSR. Technically, there is

[PATCH 5.4 104/214] spi: sprd: Release DMA channel also on probe deferral

2020-11-03 Thread Greg Kroah-Hartman
From: Krzysztof Kozlowski commit 687a2e76186dcfa42f22c14b655c3fb159839e79 upstream. If dma_request_chan() for TX channel fails with EPROBE_DEFER, the RX channel would not be released and on next re-probe it would be requested second time. Fixes: 386119bc7be9 ("spi: sprd: spi: sprd: Add DMA

[PATCH 5.4 106/214] leds: bcm6328, bcm6358: use devres LED registering function

2020-11-03 Thread Greg Kroah-Hartman
From: Marek BehĂșn commit ff5c89d44453e7ad99502b04bf798a3fc32c758b upstream. These two drivers do not provide remove method and use devres for allocation of other resources, yet they use led_classdev_register instead of the devres variant, devm_led_classdev_register. Fix this. Signed-off-by:

[PATCH 5.4 077/214] clk: ti: clockdomain: fix static checker warning

2020-11-03 Thread Greg Kroah-Hartman
From: Tero Kristo [ Upstream commit b7a7943fe291b983b104bcbd2f16e8e896f56590 ] Fix a memory leak induced by not calling clk_put after doing of_clk_get. Reported-by: Dan Murphy Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200907082600.454-3-t-kri...@ti.com Signed-off-by:

[PATCH 5.4 111/214] ACPI / extlog: Check for RDMSR failure

2020-11-03 Thread Greg Kroah-Hartman
From: Ben Hutchings commit 7cecb47f55e00282f972a1e0b09136c8cd938221 upstream. extlog_init() uses rdmsrl() to read an MSR, which on older CPUs provokes a error message at boot: unchecked MSR access error: RDMSR from 0x179 at rIP: 0xcd047307 (native_read_msr+0x7/0x40) Use rdmsrl_safe()

[PATCH 5.4 108/214] fs: Dont invalidate page buffers in block_write_full_page()

2020-11-03 Thread Greg Kroah-Hartman
From: Jan Kara commit 6dbf7bb555981fb5faf7b691e8f6169fc2b2e63b upstream. If block_write_full_page() is called for a page that is beyond current inode size, it will truncate page buffers for the page and return 0. This logic has been added in 2.5.62 in commit 81eb69062588 ("fix ext3 BUG due to

Re: [RFC PATCH] .clang-format: Remove conditional comments

2020-11-03 Thread Miguel Ojeda
Hi Joe, On Tue, Nov 3, 2020 at 7:29 PM Joe Perches wrote: > > Now that the clang minimum supported version is > 10.0, enable the > commented out conditional reformatting key:value lines in the file. > > Signed-off-by: Joe Perches > --- > > Hey Miguel. > > I don't use this, but on its face it

Re: [RFC]: userspace memory reaping

2020-11-03 Thread Minchan Kim
On Tue, Nov 03, 2020 at 10:35:50AM +0100, Michal Hocko wrote: > On Mon 02-11-20 12:29:24, Suren Baghdasaryan wrote: > [...] > > To follow up on this. Should I post an RFC implementing SIGKILL_SYNC > > which in addition to sending a kill signal would also reap the > > victim's mm in the context of

[PATCH 5.4 110/214] ACPI: button: fix handling lid state changes when input device closed

2020-11-03 Thread Greg Kroah-Hartman
From: dmitry.torok...@gmail.com commit 21988a8e51479ceffe7b0568b170effabb708dfe upstream. The original intent of 84d3f6b76447 was to delay evaluating lid state until all drivers have been loaded, with input device being opened from userspace serving as a signal for this condition. Let's ensure

[PATCH 5.4 080/214] drivers: watchdog: rdc321x_wdt: Fix race condition bugs

2020-11-03 Thread Greg Kroah-Hartman
From: Madhuparna Bhowmik [ Upstream commit 4b2e7f99cdd314263c9d172bc17193b8b6bba463 ] In rdc321x_wdt_probe(), rdc321x_wdt_device.queue is initialized after misc_register(), hence if ioctl is called before its initialization which can call rdc321x_wdt_start() function, it will see an

Re: [RFC PATCH 13/22] x86/fpu/xstate: Expand dynamic user state area on first use

2020-11-03 Thread Bae, Chang Seok
On Wed, 2020-10-14 at 09:29 -0700, Dave Hansen wrote: > On 10/14/20 9:10 AM, Andy Lutomirski wrote: > > > > I was suggesting something a little bit different. We'd keep XMM, > > YMM, ZMM, etc state stored exactly the way we do now and, for > > AMX-using tasks, we would save the AMX state in an

[PATCH 5.4 076/214] rpmsg: glink: Use complete_all for open states

2020-11-03 Thread Greg Kroah-Hartman
From: Chris Lew [ Upstream commit 4fcdaf6e28d11e2f3820d54dd23cd12a47ddd44e ] The open_req and open_ack completion variables are the state variables to represet a remote channel as open. Use complete_all so there are no races with waiters and using completion_done. Signed-off-by: Chris Lew

[PATCH 5.4 075/214] bnxt_en: Log unknown link speed appropriately.

2020-11-03 Thread Greg Kroah-Hartman
From: Michael Chan [ Upstream commit 8eddb3e7ce124dd6375d3664f1aae13873318b0f ] If the VF virtual link is set to always enabled, the speed may be unknown when the physical link is down. The driver currently logs the link speed as 4294967295 Mbps which is SPEED_UNKNOWN. Modify the link up log

[PATCH 5.4 078/214] asm-generic/io.h: Fix !CONFIG_GENERIC_IOMAP pci_iounmap() implementation

2020-11-03 Thread Greg Kroah-Hartman
From: Lorenzo Pieralisi [ Upstream commit f5810e5c329238b8553ebd98b914bdbefd8e6737 ] For arches that do not select CONFIG_GENERIC_IOMAP, the current pci_iounmap() function does nothing causing obvious memory leaks for mapped regions that are backed by MMIO physical space. In order to detect if

[PATCH 5.4 107/214] media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect

2020-11-03 Thread Greg Kroah-Hartman
From: Hans de Goede commit 93df48d37c3f03886d84831992926333e7810640 upstream. uvc_ctrl_add_info() calls uvc_ctrl_get_flags() which will override the fixed-up flags set by uvc_ctrl_fixup_xu_info(). uvc_ctrl_init_xu_ctrl() already calls uvc_ctrl_get_flags() before calling uvc_ctrl_add_info(), so

[PATCH 5.4 109/214] NFS: fix nfs_path in case of a rename retry

2020-11-03 Thread Greg Kroah-Hartman
From: Ashish Sangwan commit 247db73560bc3e5aef6db50c443c3c0db115bc93 upstream. We are generating incorrect path in case of rename retry because we are restarting from wrong dentry. We should restart from the dentry which was received in the call to nfs_path. CC: sta...@vger.kernel.org

[PATCH 5.4 122/214] btrfs: qgroup: fix wrong qgroup metadata reserve for delayed inode

2020-11-03 Thread Greg Kroah-Hartman
From: Qu Wenruo commit b4c5d8fdfff3e2b6c4fa4a5043e8946dff500f8c upstream. For delayed inode facility, qgroup metadata is reserved for it, and later freed. However we're freeing more bytes than we reserved. In btrfs_delayed_inode_reserve_metadata(): num_bytes =

Re: [PATCH 3/3] i2c: owl: Enable asynchronous probing

2020-11-03 Thread Wolfram Sang
On Fri, Oct 09, 2020 at 12:44:41AM +0300, Cristian Ciocaltea wrote: > Speed up the boot process by using the asynchronous probing feature > supported by the recent kernels. > > For SBCs based on the Actions Semi S500 SoC, the overall boot time is > expected to be reduced by 200-300 ms. > >

[PATCH 5.4 128/214] btrfs: tree-checker: fix false alert caused by legacy btrfs root item

2020-11-03 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 1465af12e254a68706e110846f59cf0f09683184 upstream. Commit 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check") introduced btrfs root item size check, however btrfs root item has two versions, the legacy one which just ends before generation_v2 member, is smaller than

[PATCH 5.4 125/214] btrfs: send, orphanize first all conflicting inodes when processing references

2020-11-03 Thread Greg Kroah-Hartman
From: Filipe Manana commit 98272bb77bf4cc20ed1ffca89832d713e70ebf09 upstream. When doing an incremental send it is possible that when processing the new references for an inode we end up issuing rename or link operations that have an invalid path, which contains the orphanized name of a

[PATCH 5.4 124/214] btrfs: reschedule if necessary when logging directory items

2020-11-03 Thread Greg Kroah-Hartman
From: Filipe Manana commit bb56f02f26fe23798edb1b2175707419b28c752a upstream. Logging directories with many entries can take a significant amount of time, and in some cases monopolize a cpu/core for a long time if the logging task doesn't happen to block often enough. Johannes and Lu Fengqi

[PATCH 5.4 127/214] btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send()

2020-11-03 Thread Greg Kroah-Hartman
From: Denis Efremov commit 8eb2fd00153a3a96a19c62ac9c6d48c2efebe5e8 upstream. btrfs_ioctl_send() used open-coded kvzalloc implementation earlier. The code was accidentally replaced with kzalloc() call [1]. Restore the original code by using kvzalloc() to allocate sctx->clone_roots. [1]

Re: [PATCH 2/3] i2c: owl: Add support for atomic transfers

2020-11-03 Thread Wolfram Sang
On Fri, Oct 09, 2020 at 12:44:40AM +0300, Cristian Ciocaltea wrote: > Atomic transfers are required to properly power off a machine through > an I2C controlled PMIC, such as the Actions Semi ATC260x series. > > System shutdown may happen with interrupts being disabled and, as a > consequence, the

[PATCH 5.4 071/214] drm/amd/display: HDMI remote sink need mode validation for Linux

2020-11-03 Thread Greg Kroah-Hartman
From: Fangzhi Zuo [ Upstream commit 95d620adb48f7728e67d82f56f756e8d451cf8d2 ] [Why] Currently mode validation is bypassed if remote sink exists. That leads to mode set issue when a BW bottle neck exists in the link path, e.g., a DP-to-HDMI converter that only supports HDMI 1.4. Any invalid

[PATCH 5.4 123/214] btrfs: improve device scanning messages

2020-11-03 Thread Greg Kroah-Hartman
From: Anand Jain commit 79dae17d8d44b2d15779e332180080af45df5352 upstream. Systems booting without the initramfs seems to scan an unusual kind of device path (/dev/root). And at a later time, the device is updated to the correct path. We generally print the process name and PID of the process

[PATCH 5.4 079/214] net: 9p: initialize sun_server.sun_path to have addrs value only when addr is valid

2020-11-03 Thread Greg Kroah-Hartman
From: Anant Thazhemadam [ Upstream commit 7ca1db21ef8e0e6725b4d25deed1ca196f7efb28 ] In p9_fd_create_unix, checking is performed to see if the addr (passed as an argument) is NULL or not. However, no check is performed to see if addr is a valid address, i.e., it doesn't entirely consist of only

Re: [PATCH] net: ipv6: remove redundant blank in ip6_frags_ns_sysctl_register

2020-11-03 Thread Jakub Kicinski
On Mon, 2 Nov 2020 22:24:03 +0800 Menglong Dong wrote: > From: Menglong Dong > > This blank seems redundant. > > Signed-off-by: Menglong Dong It is redundant but cleanup like this is not worth the potential conflicts when backporting fixes.

[PATCH 5.4 126/214] btrfs: send, recompute reference path after orphanization of a directory

2020-11-03 Thread Greg Kroah-Hartman
From: Filipe Manana commit 9c2b4e0347067396ceb3ae929d6888c81d610259 upstream. During an incremental send, when an inode has multiple new references we might end up emitting rename operations for orphanizations that have a source path that is no longer valid due to a previous orphanization of

[PATCH 5.4 113/214] ACPI: debug: dont allow debugging when ACPI is disabled

2020-11-03 Thread Greg Kroah-Hartman
From: Jamie Iles commit 0fada277147ffc6d694aa32162f51198d4f10d94 upstream. If ACPI is disabled then loading the acpi_dbg module will result in the following splat when lock debugging is enabled. DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:938

[PATCH 5.4 133/214] usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC

2020-11-03 Thread Greg Kroah-Hartman
From: Sandeep Singh commit 2a632815683d2d34df52b701a36fe5ac6654e719 upstream. On some platform of AMD, S3 fails with HCE and SRE errors. To fix this, need to disable a bit which is enable in sparse controller. Cc: sta...@vger.kernel.org #v4.19+ Signed-off-by: Sanket Goswami Signed-off-by:

Re: [RFC PATCH] mm: memcg/slab: Stop reparented obj_cgroups from charging root

2020-11-03 Thread Roman Gushchin
On Tue, Nov 03, 2020 at 02:22:21PM +0100, Michal Hocko wrote: > Hi, > I am sorry but I was quite busy at the time this has been discussed. > Now that I got to this thread finally I am wondering whether this > resp. other root cgroup exceptions have any follow up. I'll address a feedback I've got

Re: [PATCH v5 15/15] PCI: Revoke mappings like devmem

2020-11-03 Thread Bjorn Helgaas
On Fri, Oct 30, 2020 at 11:08:15AM +0100, Daniel Vetter wrote: > Since 3234ac664a87 ("/dev/mem: Revoke mappings when a driver claims > the region") /dev/kmem zaps ptes when the kernel requests exclusive > acccess to an iomem region. And with CONFIG_IO_STRICT_DEVMEM, this is > the default for all

[PATCH 5.4 131/214] btrfs: fix use-after-free on readahead extent after failure to create it

2020-11-03 Thread Greg Kroah-Hartman
From: Filipe Manana commit 83bc1560e02e25c6439341352024ebe8488f4fbd upstream. If we fail to find suitable zones for a new readahead extent, we end up leaving a stale pointer in the global readahead extents radix tree (fs_info->reada_tree), which can trigger the following trace later on:

[PATCH 5.4 130/214] btrfs: tree-checker: validate number of chunk stripes and parity

2020-11-03 Thread Greg Kroah-Hartman
From: Daniel Xu commit 85d07fbe09efd1c529ff3e025e2f0d2c6c96a1b7 upstream. If there's no parity and num_stripes < ncopies, a crafted image can trigger a division by zero in calc_stripe_length(). The image was generated through fuzzing. CC: sta...@vger.kernel.org # 5.4+ Reviewed-by: Qu Wenruo

[PATCH 5.4 129/214] btrfs: cleanup cow block on error

2020-11-03 Thread Greg Kroah-Hartman
From: Josef Bacik commit 572c83acdcdafeb04e70aa46be1fa539310be20c upstream. In fstest btrfs/064 a transaction abort in __btrfs_cow_block could lead to a system lockup. It gets stuck trying to write back inodes, and the write back thread was trying to lock an extent buffer: $ cat

[PATCH 5.4 134/214] usb: dwc3: pci: Allow Elkhart Lake to utilize DSM method for PM functionality

2020-11-03 Thread Greg Kroah-Hartman
From: Raymond Tan commit a609ce2a13360d639b384b6ca783b38c1247f2db upstream. Similar to some other IA platforms, Elkhart Lake too depends on the PMU register write to request transition of Dx power state. Thus, we add the PCI_DEVICE_ID_INTEL_EHLLP to the list of devices that shall execute the

[PATCH 5.4 137/214] usb: dwc3: core: add phy cleanup for probe error handling

2020-11-03 Thread Greg Kroah-Hartman
From: Li Jun commit 03c1fd622f72c7624c81b64fdba4a567ae5ee9cb upstream. Add the phy cleanup if dwc3 mode init fail, which is the missing part of de-init for dwc3 core init. Fixes: c499ff71ff2a ("usb: dwc3: core: re-factor init and exit paths") Cc: Signed-off-by: Li Jun Signed-off-by: Felipe

[PATCH 5.4 132/214] btrfs: fix readahead hang and use-after-free after removing a device

2020-11-03 Thread Greg Kroah-Hartman
From: Filipe Manana commit 66d204a16c94f24ad08290a7663ab67e7fc04e82 upstream. Very sporadically I had test case btrfs/069 from fstests hanging (for years, it is not a recent regression), with the following traces in dmesg/syslog: [162301.160628] BTRFS info (device sdc): dev_replace from

[PATCH 5.4 114/214] PCI/ACPI: Whitelist hotplug ports for D3 if power managed by ACPI

2020-11-03 Thread Greg Kroah-Hartman
From: Lukas Wunner commit c6e331312ebfb52b7186e5d82d517d68b4d2f2d8 upstream. Recent laptops with dual AMD GPUs fail to suspend the discrete GPU, thus causing lockups on system sleep and high power consumption at runtime. The discrete GPU would normally be suspended to D3cold by turning off ACPI

[PATCH 5.4 135/214] usb: dwc3: ep0: Fix ZLP for OUT ep0 requests

2020-11-03 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit 66706077dc89c66a4777a4c6298273816afb848c upstream. The current ZLP handling for ep0 requests is only for control IN requests. For OUT direction, DWC3 needs to check and setup for MPS alignment. Usually, control OUT requests can indicate its transfer size via the

Re: [PATCH] ACPI: Remove trailing whitespace

2020-11-03 Thread Maximilian Luz
On 11/3/20 10:12 PM, Bjorn Helgaas wrote: On Mon, Nov 02, 2020 at 02:36:41PM +0100, Maximilian Luz wrote: Remove trailing whitespace and fix some whitespace inconsitencies while at it. I'm OK with this as long as somebody fixes the s/inconsitencies/inconsistencies/ Sorry about that, I can

[PATCH 5.4 139/214] usb: dwc3: gadget: Resume pending requests after CLEAR_STALL

2020-11-03 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit c503672abe1348f10f5a54a662336358c6e1a297 upstream. The function driver may queue new requests right after halting the endpoint (i.e. queue new requests while the endpoint is stalled). There's no restriction preventing it from doing so. However, dwc3 currently drops

Re: [PATCH 1/1] mm: avoid re-using pfmemalloc page in page_frag_alloc()

2020-11-03 Thread Dongli Zhang
Hi Matthew, On 11/3/20 12:35 PM, Matthew Wilcox wrote: > On Tue, Nov 03, 2020 at 11:32:39AM -0800, Dongli Zhang wrote: >> The ethernet driver may allocates skb (and skb->data) via napi_alloc_skb(). >> This ends up to page_frag_alloc() to allocate skb->data from >> page_frag_cache->va. >> >>

[PATCH 5.4 136/214] usb: dwc3: gadget: Check MPS of the request length

2020-11-03 Thread Greg Kroah-Hartman
From: Thinh Nguyen commit ca3df3468eec87f6374662f7de425bc44c3810c1 upstream. When preparing for SG, not all the entries are prepared at once. When resume, don't use the remaining request length to calculate for MPS alignment. Use the entire request->length to do that. Cc:

[PATCH 5.4 138/214] usb: dwc3: core: dont trigger runtime pm when remove driver

2020-11-03 Thread Greg Kroah-Hartman
From: Li Jun commit 266d0493900ac5d6a21cdbe6b1624ed2da94d47a upstream. No need to trigger runtime pm in driver removal, otherwise if user disable auto suspend via sys file, runtime suspend may be entered, which will call dwc3_core_exit() again and there will be clock disable not balance

[PATCH 5.4 142/214] usb: typec: tcpm: reset hard_reset_count for any disconnect

2020-11-03 Thread Greg Kroah-Hartman
From: Li Jun commit 2d9c6442a9c81f4f8dee678d0b3c183173ab1e2d upstream. Current tcpm_detach() only reset hard_reset_count if port->attached is true, this may cause this counter clear is missed if the CC disconnect event is generated after tcpm_port_reset() is done by other events, e.g. VBUS off

[PATCH 5.4 144/214] drm/i915: Force VTd workarounds when running as a guest OS

2020-11-03 Thread Greg Kroah-Hartman
From: Chris Wilson commit 8195400f7ea95399f721ad21f4d663a62c65036f upstream. If i915.ko is being used as a passthrough device, it does not know if the host is using intel_iommu. Mixing the iommu and gfx causes a few issues (such as scanout overfetch) which we need to workaround inside the

[PATCH 5.4 115/214] ACPI: EC: PM: Flush EC work unconditionally after wakeup

2020-11-03 Thread Greg Kroah-Hartman
From: Rafael J. Wysocki commit 5e92442bb4121562231e6daf8a2d1306cb5f8805 upstream. Commit 607b9df63057 ("ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive") has been reported to cause some power button wakeup events to be missed on some systems, so modify acpi_ec_dispatch_gpe() to

[PATCH 5.4 145/214] vt: keyboard, simplify vt_kdgkbsent

2020-11-03 Thread Greg Kroah-Hartman
From: Jiri Slaby commit 6ca03f90527e499dd5e32d6522909e2ad390896b upstream. Use 'strlen' of the string, add one for NUL terminator and simply do 'copy_to_user' instead of the explicit 'for' loop. This makes the KDGKBSENT case more compact. The only thing we need to take care about is NULL

[PATCH 5.4 146/214] vt: keyboard, extend func_buf_lock to readers

2020-11-03 Thread Greg Kroah-Hartman
From: Jiri Slaby commit 82e61c3909db51d91b9d3e2071557b6435018b80 upstream. Both read-side users of func_table/func_buf need locking. Without that, one can easily confuse the code by repeatedly setting altering strings like: while (1) for (a = 0; a < 2; a++) { struct

[PATCH 5.4 117/214] acpi-cpufreq: Honor _PSD table setting on new AMD CPUs

2020-11-03 Thread Greg Kroah-Hartman
From: Wei Huang commit 5368512abe08a28525d9b24abbfc2a72493e8dba upstream. acpi-cpufreq has a old quirk that overrides the _PSD table supplied by BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) now accurately reports the P-state dependency of CPU cores. Hence this quirk

[PATCH 5.4 121/214] PM: runtime: Remove link state checks in rpm_get/put_supplier()

2020-11-03 Thread Greg Kroah-Hartman
From: Xiang Chen commit d12544fb2aa9944b180c35914031a8384ab082c1 upstream. To support runtime PM for hisi SAS driver (the driver is in directory drivers/scsi/hisi_sas), we add device link between scsi_device->sdev_gendev (consumer device) and hisi_hba->dev(supplier device) with flags

[PATCH 5.4 172/214] ubifs: mount_ubifs: Release authentication resource in error handling path

2020-11-03 Thread Greg Kroah-Hartman
From: Zhihao Cheng commit e2a05cc7f8229e150243cdae40f2af9021d67a4a upstream. Release the authentication related resource in some error handling branches in mount_ubifs(). Signed-off-by: Zhihao Cheng Cc: # 4.20+ Fixes: d8a22773a12c6d7 ("ubifs: Enable authentication support") Reviewed-by:

[PATCH 5.4 120/214] scsi: qla2xxx: Fix crash on session cleanup with unload

2020-11-03 Thread Greg Kroah-Hartman
From: Quinn Tran commit 50457dab670f396557e60c07f086358460876353 upstream. On unload, session cleanup prematurely gave the signal for driver unload path to advance. Link: https://lore.kernel.org/r/20200929102152.32278-6-njav...@marvell.com Fixes: 726b85487067 ("qla2xxx: Add framework for async

[PATCH 5.4 153/214] iio:adc:ti-adc12138 Fix alignment issue with timestamp

2020-11-03 Thread Greg Kroah-Hartman
From: Jonathan Cameron commit 293e809b2e8e608b65a949101aaf7c0bd1224247 upstream. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver

[PATCH 5.4 119/214] scsi: mptfusion: Fix null pointer dereferences in mptscsih_remove()

2020-11-03 Thread Greg Kroah-Hartman
From: Helge Deller commit 2f4843b172c2c0360ee7792ad98025fae7baefde upstream. The mptscsih_remove() function triggers a kernel oops if the Scsi_Host pointer (ioc->sh) is NULL, as can be seen in this syslog: ioc0: LSI53C1030 B2: Capabilities={Initiator,Target} Begin: Waiting for root file

[PATCH 5.4 152/214] iio:adc:ti-adc0832 Fix alignment issue with timestamp

2020-11-03 Thread Greg Kroah-Hartman
From: Jonathan Cameron commit 39e91f3be4cba51c1560bcda3a343ed1f64dc916 upstream. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver

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