[PATCH 5.3 025/148] powerpc/32s: Fix boot failure with DEBUG_PAGEALLOC without KASAN.

2019-10-10 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 9d6d712fbf7766f21c838940eebcd7b4d476c5e6 upstream. When KASAN is selected, the definitive hash table has to be set up later, but there is already an early temporary one. When KASAN is not selected, there is no early hash table, so the setup of the definitive hash t

[PATCH 5.3 004/148] s390/topology: avoid firing events before kobjs are created

2019-10-10 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit f3122a79a1b0a113d3aea748e0ec26f2cb2889de upstream. arch_update_cpu_topology is first called from: kernel_init_freeable->sched_init_smp->sched_init_domains even before cpus has been registered in: kernel_init_freeable->do_one_initcall->s390_smp_init Do not trigger kob

[PATCH 5.3 019/148] ASoC: Define a set of DAPM pre/post-up events

2019-10-10 Thread Greg Kroah-Hartman
From: Oleksandr Suvorov commit cfc8f568aada98f9608a0a62511ca18d647613e2 upstream. Prepare to use SND_SOC_DAPM_PRE_POST_PMU definition to reduce coming code size and make it more readable. Cc: sta...@vger.kernel.org Signed-off-by: Oleksandr Suvorov Reviewed-by: Marcel Ziswiler Reviewed-by: Igo

[PATCH 5.3 028/148] powerpc/pseries: Fix cpu_hotplug_lock acquisition in resize_hpt()

2019-10-10 Thread Greg Kroah-Hartman
From: Gautham R. Shenoy commit c784be435d5dae28d3b03db31753dd7a18733f0c upstream. The calls to arch_add_memory()/arch_remove_memory() are always made with the read-side cpu_hotplug_lock acquired via memory_hotplug_begin(). On pSeries, arch_add_memory()/arch_remove_memory() eventually call resize

[PATCH 5.3 003/148] KVM: s390: Test for bad access register and size at the start of S390_MEM_OP

2019-10-10 Thread Greg Kroah-Hartman
From: Thomas Huth commit a13b03bbb4575b350b46090af4dfd30e735aaed1 upstream. If the KVM_S390_MEM_OP ioctl is called with an access register >= 16, then there is certainly a bug in the calling userspace application. We check for wrong access registers, but only if the vCPU was already in the acces

[PATCH 5.3 024/148] powerpc/603: Fix handling of the DIRTY flag

2019-10-10 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 415480dce2ef03bb8335deebd2f402f475443ce0 upstream. If a page is already mapped RW without the DIRTY flag, the DIRTY flag is never set and a TLB store miss exception is taken forever. This is easily reproduced with the following app: void main(void) { volat

[PATCH 5.3 000/148] 5.3.6-stable review

2019-10-10 Thread Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.3.6 release. There are 148 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know. Responses should be made by Sat 12 Oct 2019 08:29:51 AM UTC. Anything rece

[PATCH 5.3 009/148] KVM: s390: fix __insn32_query() inline assembly

2019-10-10 Thread Greg Kroah-Hartman
From: Heiko Carstens commit b1c41ac3ce569b04644bb1e3fd28926604637da3 upstream. The inline assembly constraints of __insn32_query() tell the compiler that only the first byte of "query" is being written to. Intended was probably that 32 bytes are written to. Fix and simplify the code and just us

[PATCH 5.3 008/148] Revert "s390/dasd: Add discard support for ESE volumes"

2019-10-10 Thread Greg Kroah-Hartman
From: Stefan Haberland commit 964ce509e2ded52c1a61ad86044cc4d70abd9eb8 upstream. This reverts commit 7e64db1597fe114b83fe17d0ba96c6aa5fca419a. The thin provisioning feature introduces an IOCTL and the discard support to allow userspace tools and filesystems to release unused and previously allo

[PATCH 5.3 042/148] crypto: cavium/zip - Add missing single_release()

2019-10-10 Thread Greg Kroah-Hartman
From: Wei Yongjun commit c552ffb5c93d9d65aaf34f5f001c4e7e8484ced1 upstream. When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Fixes: 09ae5d37e093 ("crypto: zip - Add Compression/Decompression statistics") Cc: Signe

[PATCH 5.3 055/148] PCI: vmd: Fix shadow offsets to reflect spec changes

2019-10-10 Thread Greg Kroah-Hartman
From: Jon Derrick commit a1a30170138c9c5157bd514ccd4d76b47060f29b upstream. The shadow offset scratchpad was moved to 0x2000-0x2010. Update the location to get the correct shadow offset. Fixes: 6788958e4f3c ("PCI: vmd: Assign membar addresses from shadow registers") Signed-off-by: Jon Derrick

Re: [PATCH v2] mm/page_isolation: fix a deadlock with printk()

2019-10-10 Thread Sergey Senozhatsky
On (10/10/19 10:21), Petr Mladek wrote: [..] > > > Considering that console.write is called from essentially arbitrary code > > > path IIUC then all the locks used in this path should be pretty much > > > tail locks or console internal ones without external dependencies. > > > > That's a good expe

[PATCH 5.3 005/148] s390/cio: avoid calling strlen on null pointer

2019-10-10 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit ea298e6ee8b34b3ed4366be7eb799d0650ebe555 upstream. Fix the following kasan finding: BUG: KASAN: global-out-of-bounds in ccwgroup_create_dev+0x850/0x1140 Read of size 1 at addr by task systemd-udevd.r/561 CPU: 30 PID: 561 Comm: systemd-udevd.r Tainted:

[PATCH 5.3 007/148] s390/dasd: Fix error handling during online processing

2019-10-10 Thread Greg Kroah-Hartman
From: Jan Höppner commit dd45483981ac62f432e073fea6e5e11200b9070d upstream. It is possible that the CCW commands for reading volume and extent pool information are not supported, either by the storage server (for dedicated DASDs) or by z/VM (for virtual devices, such as MDISKs). As a command re

[PATCH 5.3 054/148] PCI: hv: Avoid use of hv_pci_dev->pci_slot after freeing it

2019-10-10 Thread Greg Kroah-Hartman
From: Dexuan Cui commit 533ca1feed98b0bf024779a14760694c7cb4d431 upstream. The slot must be removed before the pci_dev is removed, otherwise a panic can happen due to use-after-free. Fixes: 15becc2b56c6 ("PCI: hv: Add hv_pci_remove_slots() when we unload the driver") Signed-off-by: Dexuan Cui

[PATCH 5.3 006/148] s390/cio: exclude subchannels with no parent from pseudo check

2019-10-10 Thread Greg Kroah-Hartman
From: Vasily Gorbik commit ab5758848039de9a4b249d46e4ab591197eebaf2 upstream. ccw console is created early in start_kernel and used before css is initialized or ccw console subchannel is registered. Until then console subchannel does not have a parent. For that reason assume subchannels with no

[PATCH 5.3 053/148] PCI: vmd: Fix config addressing when using bus offsets

2019-10-10 Thread Greg Kroah-Hartman
From: Jon Derrick commit e3dffa4f6c3612dea337c9c59191bd418afc941b upstream. VMD maps child device config spaces to the VMD Config BAR linearly regardless of the starting bus offset. Because of this, the config address decode must ignore starting bus offsets when mapping the BDF to the config spa

[PATCH 5.3 044/148] crypto: caam - fix concurrency issue in givencrypt descriptor

2019-10-10 Thread Greg Kroah-Hartman
From: Horia Geantă commit 48f89d2a2920166c35b1c0b69917dbb0390ebec7 upstream. IV transfer from ofifo to class2 (set up at [29][30]) is not guaranteed to be scheduled before the data transfer from ofifo to external memory (set up at [38]: [29] 10FA0004 ld: ind-nfifo (len=4) imm [30] 81F

[PATCH 5.3 046/148] crypto: ccree - use the full crypt length value

2019-10-10 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit 7a4be6c113c1f721818d1e3722a9015fe393295c upstream. In case of AEAD decryption verifcation error we were using the wrong value to zero out the plaintext buffer leaving the end of the buffer with the false plaintext. Signed-off-by: Gilad Ben-Yossef Fixes: ff27e85a85

[PATCH 5.3 049/148] power: supply: sbs-battery: only return health when battery present

2019-10-10 Thread Greg Kroah-Hartman
From: Michael Nosthoff commit fe55e770327363304c4111423e6f7ff3c650136d upstream. when the battery is set to sbs-mode and no gpio detection is enabled "health" is always returning a value even when the battery is not present. All other fields return "not present". This leads to a scenario where

[PATCH 5.3 047/148] MIPS: Treat Loongson Extensions as ASEs

2019-10-10 Thread Greg Kroah-Hartman
From: Jiaxun Yang commit d2f965549006acb865c4638f1f030ebcefdc71f6 upstream. Recently, binutils had split Loongson-3 Extensions into four ASEs: MMI, CAM, EXT, EXT2. This patch do the samething in kernel and expose them in cpuinfo so applications can probe supported ASEs at runtime. Signed-off-by

[PATCH 5.3 052/148] timer: Read jiffies once when forwarding base clk

2019-10-10 Thread Greg Kroah-Hartman
From: Li RongQing commit e430d802d6a3aaf61bd3ed03d9404888a29b9bf9 upstream. The timer delayed for more than 3 seconds warning was triggered during testing. Workqueue: events_unbound sched_tick_remote RIP: 0010:sched_tick_remote+0xee/0x100 ... Call Trace: process_one_work+0x18c/0x3a0

[PATCH 5.3 051/148] usercopy: Avoid HIGHMEM pfn warning

2019-10-10 Thread Greg Kroah-Hartman
From: Kees Cook commit 314eed30ede02fa925990f535652254b5bad6b65 upstream. When running on a system with >512MB RAM with a 32-bit kernel built with: CONFIG_DEBUG_VIRTUAL=y CONFIG_HIGHMEM=y CONFIG_HARDENED_USERCOPY=y all execve()s will fail due to argv copying into kmap()

[PATCH 5.3 048/148] power: supply: sbs-battery: use correct flags field

2019-10-10 Thread Greg Kroah-Hartman
From: Michael Nosthoff commit 99956a9e08251a1234434b492875b1eaff502a12 upstream. the type flag is stored in the chip->flags field not in the client->flags field. This currently leads to never using the ti specific health function as client->flags doesn't use that bit. So it's always falling back

[PATCH 5.3 050/148] tracing: Make sure variable reference alias has correct var_ref_idx

2019-10-10 Thread Greg Kroah-Hartman
From: Tom Zanussi commit 17f8607a1658a8e70415eef67909f990d13017b5 upstream. Original changelog from Steve Rostedt (except last sentence which explains the problem, and the Fixes: tag): I performed a three way histogram with the following commands: echo 'irq_lat u64 lat pid_t pid' > synthetic_e

[PATCH 5.3 033/148] powerpc/book3s64/radix: Rename CPU_FTR_P9_TLBIE_BUG feature flag

2019-10-10 Thread Greg Kroah-Hartman
From: Aneesh Kumar K.V commit 09ce98cacd51fcd0fa0af2f79d1e1d3192f4cbb0 upstream. Rename the #define to indicate this is related to store vs tlbie ordering issue. In the next patch, we will be adding another feature flag that is used to handles ERAT flush vs tlbie ordering issue. Fixes: a5d4b589

[PATCH 5.3 045/148] crypto: ccree - account for TEE not ready to report

2019-10-10 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit 76a95bd8f9e10cade9c4c8df93b5c20ff45dc0f5 upstream. When ccree driver runs it checks the state of the Trusted Execution Environment CryptoCell driver before proceeding. We did not account for cases where the TEE side is not ready or not available at all. Fix it by on

[PATCH 5.3 070/148] drm/i915/gvt: update vgpu workload head pointer correctly

2019-10-10 Thread Greg Kroah-Hartman
From: Xiaolin Zhang commit 0a3242bdb47713e09cb004a0ba4947d3edf82d8a upstream. when creating a vGPU workload, the guest context head pointer should be updated correctly by comparing with the exsiting workload in the guest worklod queue including the current running context. in some situation, th

Re: [PATCH net-next] genetlink: do not parse attributes for families with zero maxattr

2019-10-10 Thread Jiri Pirko
Wed, Oct 09, 2019 at 06:44:32PM CEST, mkube...@suse.cz wrote: >Commit c10e6cf85e7d ("net: genetlink: push attrbuf allocation and parsing >to a separate function") moved attribute buffer allocation and attribute >parsing from genl_family_rcv_msg_doit() into a separate function >genl_family_rcv_msg_a

[PATCH 5.3 056/148] PCI: Restore Resizable BAR size bits correctly for 1MB BARs

2019-10-10 Thread Greg Kroah-Hartman
From: Sumit Saxena commit d2182b2d4b71ff0549a07f414d921525fade707b upstream. In a Resizable BAR Control Register, bits 13:8 control the size of the BAR. The encoded values of these bits are as follows (see PCIe r5.0, sec 7.8.6.3): ValueBAR size 0 1 MB (2^20 bytes) 1 2 MB

[PATCH 5.3 068/148] drm/nouveau/kms/nv50-: Dont create MSTMs for eDP connectors

2019-10-10 Thread Greg Kroah-Hartman
From: Lyude Paul commit 698c1aa9f83b618de79e9e5e19a58f70a4a6ae0f upstream. On the ThinkPad P71, we have one eDP connector exposed along with 5 DP connectors, resulting in a total of 11 TMDS encoders. Since the GPU on this system is also capable of MST, we create an additional 4 fake MST encoders

[PATCH 5.3 066/148] drm/omap: fix max fclk divider for omap36xx

2019-10-10 Thread Greg Kroah-Hartman
From: Tomi Valkeinen commit e2c4ed148cf3ec8669a1d90dc66966028e5fad70 upstream. The OMAP36xx and AM/DM37x TRMs say that the maximum divider for DSS fclk (in CM_CLKSEL_DSS) is 32. Experimentation shows that this is not correct, and using divider of 32 breaks DSS with a flood or underflows and sync

[PATCH 5.3 057/148] selftests/tpm2: Add the missing TEST_FILES assignment

2019-10-10 Thread Greg Kroah-Hartman
From: Jarkko Sakkinen commit 981c107cbb420ee028f8ecd155352cfd6351c246 upstream. The Python files required by the selftests are not packaged because of the missing assignment to TEST_FILES. Add the assignment. Cc: sta...@vger.kernel.org Fixes: 6ea3dfe1e073 ("selftests: add TPM 2.0 tests") Signed

[PATCH 5.3 072/148] drm/i915: to make vgpu ppgtt notificaiton as atomic operation

2019-10-10 Thread Greg Kroah-Hartman
From: Xiaolin Zhang commit 9e77f5001b9833a6bdd3940df245053c2212a32b upstream. vgpu ppgtt notification was split into 2 steps, the first step is to update PVINFO's pdp register and then write PVINFO's g2v_notify register with action code to tirgger ppgtt notification to GVT side. currently these

[PATCH 5.3 059/148] watchdog: imx2_wdt: fix min() calculation in imx2_wdt_set_timeout

2019-10-10 Thread Greg Kroah-Hartman
From: Rasmus Villemoes commit 144783a80cd2cbc45c6ce17db649140b65f203dd upstream. Converting from ms to s requires dividing by 1000, not multiplying. So this is currently taking the smaller of new_timeout and 1.28e8, i.e. effectively new_timeout. The driver knows what it set max_hw_heartbeat_ms

[PATCH 5.3 069/148] drm/amd/powerplay: change metrics update period from 1ms to 100ms

2019-10-10 Thread Greg Kroah-Hartman
From: Kevin Wang commit e0e4a2ce7a059d051c66cd7c94314fef3cd91aea upstream. v2: change period from 10ms to 100ms (typo error) too high frequence to update mertrics table will cause smu firmware error,so change mertrics table update period from 1ms to 100ms (navi10, 12, 14) Signed-off-by: Kevin

[PATCH 5.3 061/148] perf stat: Fix a segmentation fault when using repeat forever

2019-10-10 Thread Greg Kroah-Hartman
From: Srikar Dronamraju commit 443f2d5ba13d65ccfd879460f77941875159d154 upstream. Observe a segmentation fault when 'perf stat' is asked to repeat forever with the interval option. Without fix: # perf stat -r 0 -I 5000 -e cycles -a sleep 10 # time counts unit events

[PATCH 5.3 063/148] drm/atomic: Reject FLIP_ASYNC unconditionally

2019-10-10 Thread Greg Kroah-Hartman
From: Daniel Vetter commit f2cbda2dba11de868759cae9c0d2bab5b8411406 upstream. It's never been wired up. Only userspace that tried to use it (and didn't actually check whether anything works, but hey it builds) is the -modesetting atomic implementation. And we just shut that up. If there's anyon

[PATCH 5.3 067/148] drm/msm/dsi: Fix return value check for clk_get_parent

2019-10-10 Thread Greg Kroah-Hartman
From: Sean Paul commit 5fb9b797d5ccf311ae4aba69e86080d47668b5f7 upstream. clk_get_parent returns an error pointer upon failure, not NULL. So the checks as they exist won't catch a failure. This patch changes the checks and the return values to properly handle an error pointer. Fixes: c4d8cfe516

[PATCH 5.3 074/148] mmc: tegra: Implement ->set_dma_mask()

2019-10-10 Thread Greg Kroah-Hartman
From: Nicolin Chen commit b960bc448a252428bacca271f3416a8bda3b599b upstream. The SDHCI controller on Tegra186 supports 40-bit addressing, which is usually enough to address all of system memory. However, if the SDHCI controller is behind an IOMMU, the address space can go beyond. This happens on

[PATCH 5.3 035/148] powerpc/mm: Fix an Oops in kasan_mmu_init()

2019-10-10 Thread Greg Kroah-Hartman
From: Christophe Leroy commit cbd18991e24fea2c31da3bb117c83e4a3538cd11 upstream. Uncompressing Kernel Image ... OK Loading Device Tree to 01ff7000, end 01fff74f ... OK [0.00] printk: bootconsole [udbg0] enabled [0.00] BUG: Unable to handle kernel data access at 0xf818c000 [

[PATCH 5.3 034/148] powerpc/mm: Add a helper to select PAGE_KERNEL_RO or PAGE_READONLY

2019-10-10 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 4c0f5d1eb4072871c34530358df45f05ab80edd6 upstream. In a couple of places there is a need to select whether read-only protection of shadow pages is performed with PAGE_KERNEL_RO or with PAGE_READONLY. Add a helper to avoid duplicating the choice. Signed-off-by: Chr

[PATCH 5.3 071/148] drm/i915/userptr: Acquire the page lock around set_page_dirty()

2019-10-10 Thread Greg Kroah-Hartman
From: Chris Wilson commit cb6d7c7dc7ff8cace666ddec66334117a6068ce2 upstream. set_page_dirty says: For pages with a mapping this should be done under the page lock for the benefit of asynchronous memory errors who prefer a consistent dirty state. This rule can be broken i

[PATCH 5.3 073/148] mac80211: keep BHs disabled while calling drv_tx_wake_queue()

2019-10-10 Thread Greg Kroah-Hartman
From: Johannes Berg commit d8dec42b5c2d2b273bc30b0e073cfbe832d69902 upstream. Drivers typically expect this, as it's the case for almost all cases where this is called (i.e. from the TX path). Also, the code in mac80211 itself (if the driver calls ieee80211_tx_dequeue()) expects this as it uses

[PATCH 5.3 062/148] drm/i915/dp: Fix dsc bpp calculations, v5.

2019-10-10 Thread Greg Kroah-Hartman
From: Maarten Lankhorst commit cffb4c3ea37248c4fc2f4ce747e5c24af88aec76 upstream. There was a integer wraparound when mode_clock became too high, and we didn't correct for the FEC overhead factor when dividing, with the calculations breaking at HBR3. As a result our calculated bpp was way too h

[PATCH 5.3 065/148] drm: mali-dp: Mark expected switch fall-through

2019-10-10 Thread Greg Kroah-Hartman
From: Anders Roxell commit 28ba1b1da49a20ba8fb767d6ddd7c521ec79a119 upstream. Now that -Wimplicit-fallthrough is passed to GCC by default, the following warnings shows up: ../drivers/gpu/drm/arm/malidp_hw.c: In function ‘malidp_format_get_bpp’: ../drivers/gpu/drm/arm/malidp_hw.c:387:8: warning:

[PATCH 5.3 075/148] mmc: sdhci: improve ADMA error reporting

2019-10-10 Thread Greg Kroah-Hartman
From: Russell King commit d1c536e3177390da43d99f20143b810c35433d1f upstream. ADMA errors are potentially data corrupting events; although we print the register state, we do not usefully print the ADMA descriptors. Worse than that, we print them by referencing their virtual address which is meani

[PATCH 5.3 076/148] mmc: sdhci-of-esdhc: set DMA snooping based on DMA coherence

2019-10-10 Thread Greg Kroah-Hartman
From: Russell King commit 121bd08b029e03404c451bb237729cdff76eafed upstream. We must not unconditionally set the DMA snoop bit; if the DMA API is assuming that the device is not DMA coherent, and the device snoops the CPU caches, the device can see stale cache lines brought in by speculative pre

[PATCH 5.3 094/148] 9p: Transport error uninitialized

2019-10-10 Thread Greg Kroah-Hartman
From: Lu Shuaibing [ Upstream commit 0ce772fe79b68f83df40f07f28207b292785c677 ] The p9_tag_alloc() does not initialize the transport error t_err field. The struct p9_req_t *req is allocated and stored in a struct p9_client variable. The field t_err is never initialized before p9_conn_cancel() ch

[PATCH v2] arm64: dts: lx2160a: add tmu device node

2019-10-10 Thread Yuantian Tang
Add the TMU (Thermal Monitoring Unit) device node to enable TMU feature. Signed-off-by: Yuantian Tang --- v2: - sort the node and use micro to replace hardcoded number .../arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 108 +++--- 1 file changed, 92 insertions(+), 16 deletions(

[PATCH 5.3 089/148] ima: always return negative code for error

2019-10-10 Thread Greg Kroah-Hartman
From: Sascha Hauer [ Upstream commit f5e1040196dbfe14c77ce3dfe3b7b08d2d961e88 ] integrity_kernel_read() returns the number of bytes read. If this is a short read then this positive value is returned from ima_calc_file_hash_atfm(). Currently this is only indirectly called from ima_calc_file_hash(

[PATCH 5.3 080/148] sched: Add __ASSEMBLY__ guards around struct clone_args

2019-10-10 Thread Greg Kroah-Hartman
From: Seth Forshee commit 61129dd29f7962f278b618a2a3e8fdb986a66dc8 upstream. The addition of struct clone_args to uapi/linux/sched.h is not protected by __ASSEMBLY__ guards, causing a failure to build from source for glibc on RISC-V. Add the guards to fix this. Fixes: 7f192e3cd316 ("fork: add c

[PATCH 5.3 095/148] 9p: avoid attaching writeback_fid on mmap with type PRIVATE

2019-10-10 Thread Greg Kroah-Hartman
From: Chengguang Xu [ Upstream commit c87a37ebd40b889178664c2c09cc187334146292 ] Currently on mmap cache policy, we always attach writeback_fid whether mmap type is SHARED or PRIVATE. However, in the use case of kata-container which combines 9p(Guest OS) with overlayfs(Host OS), this behavior wi

[PATCH 5.3 091/148] fs: nfs: Fix possible null-pointer dereferences in encode_attrs()

2019-10-10 Thread Greg Kroah-Hartman
From: Jia-Ju Bai [ Upstream commit e2751463eaa6f9fec8fea80abbdc62dbc487b3c5 ] In encode_attrs(), there is an if statement on line 1145 to check whether label is NULL: if (label && (attrmask[2] & FATTR4_WORD2_SECURITY_LABEL)) When label is NULL, it is used on lines 1178-1181: *p++ = cpu_

[PATCH 5.3 090/148] ima: fix freeing ongoing ahash_request

2019-10-10 Thread Greg Kroah-Hartman
From: Sascha Hauer [ Upstream commit 4ece3125f21b1d42b84896c5646dbf0e878464e1 ] integrity_kernel_read() can fail in which case we forward to call ahash_request_free() on a currently running request. We have to wait for its completion before we can free the request. This was observed by interrup

[PATCH 5.3 093/148] xprtrdma: Send Queue size grows after a reconnect

2019-10-10 Thread Greg Kroah-Hartman
From: Chuck Lever [ Upstream commit 98ef77d1aaa7a2f4e1b2a721faa084222021fda7 ] Eli Dorfman reports that after a series of idle disconnects, an RPC/RDMA transport becomes unusable (rdma_create_qp returns -ENOMEM). Problem was tracked down to increasing Send Queue size after each reconnect. The r

[PATCH 5.3 098/148] ceph: fix directories inode i_blkbits initialization

2019-10-10 Thread Greg Kroah-Hartman
From: Luis Henriques [ Upstream commit 750670341a24cb714e624e0fd7da30900ad93752 ] When filling an inode with info from the MDS, i_blkbits is being initialized using fl_stripe_unit, which contains the stripe unit in bytes. Unfortunately, this doesn't make sense for directories as they have fl_st

[PATCH 5.3 037/148] can: mcp251x: mcp251x_hw_reset(): allow more time after a reset

2019-10-10 Thread Greg Kroah-Hartman
From: Marc Kleine-Budde commit d84ea2123f8d27144e3f4d58cd88c9c6ddc799de upstream. Some boards take longer than 5ms to power up after a reset, so allow some retries attempts before giving up. Fixes: ff06d611a31c ("can: mcp251x: Improve mcp251x_hw_reset()") Cc: linux-stable Tested-by: Sean Nyekj

[PATCH 5.3 036/148] powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9

2019-10-10 Thread Greg Kroah-Hartman
From: Aneesh Kumar K.V commit 047e6575aec71d75b765c22111820c4776cd1c43 upstream. On POWER9, under some circumstances, a broadcast TLB invalidation will fail to invalidate the ERAT cache on some threads when there are parallel mtpidr/mtlpidr happening on other threads of the same core. This can c

[PATCH 5.3 078/148] Revert "locking/pvqspinlock: Dont wait if vCPU is preempted"

2019-10-10 Thread Greg Kroah-Hartman
From: Wanpeng Li commit 89340d0935c9296c7b8222b6eab30e67cb57ab82 upstream. This patch reverts commit 75437bb304b20 (locking/pvqspinlock: Don't wait if vCPU is preempted). A large performance regression was caused by this commit. on over-subscription scenarios. The test was run on a Xeon Skyla

[PATCH][RFC] perf/x86: avoid false-positives hard lockup

2019-10-10 Thread Li RongQing
if perf counter is used as nmi watchdog, and twice nmi in soft watchdog sample period will trigger hard lockup make sure left time is not less than soft watchdog period by compared with 3/5 period to skip forward, since soft watchdog sample period is 2/5 of watchdog_thresh, nmi watchdog sample per

[PATCH 5.3 081/148] DTS: ARM: gta04: introduce legacy spi-cs-high to make display work again

2019-10-10 Thread Greg Kroah-Hartman
From: H. Nikolaus Schaller commit f1f028ff89cb0d37db299d48e7b2ce19be040d52 upstream. commit 6953c57ab172 "gpio: of: Handle SPI chipselect legacy bindings" did introduce logic to centrally handle the legacy spi-cs-high property in combination with cs-gpios. This assumes that the polarity of the

[PATCH 5.3 092/148] xprtrdma: Toggle XPRT_CONGESTED in xprtrdmas slot methods

2019-10-10 Thread Greg Kroah-Hartman
From: Chuck Lever [ Upstream commit 395790566eec37706dedeb94779045adc3a7581e ] Commit 48be539dd44a ("xprtrdma: Introduce ->alloc_slot call-out for xprtrdma") added a separate alloc_slot and free_slot to the RPC/RDMA transport. Later, commit 75891f502f5f ("SUNRPC: Support for congestion control w

[PATCH 5.3 097/148] fuse: fix request limit

2019-10-10 Thread Greg Kroah-Hartman
From: Miklos Szeredi [ Upstream commit f22f812d5ce75a18b56073a7a63862e6ea764070 ] The size of struct fuse_req was reduced from 392B to 144B on a non-debug config, thus the sanitize_global_limit() helper was setting a larger default limit. This doesn't really reflect reduction in the memory used

[PATCH 5.3 077/148] mmc: sdhci: Let drivers define their DMA mask

2019-10-10 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 4ee7dde4c777f14cb0f98dd201491bf6cc15899b upstream. Add host operation ->set_dma_mask() so that drivers can define their own DMA masks. Signed-off-by: Adrian Hunter Tested-by: Nicolin Chen Signed-off-by: Thierry Reding Cc: sta...@vger.kernel.org # v4.15 + Signed-off

[PATCH 5.3 100/148] ceph: reconnect connection if session hang in opening state

2019-10-10 Thread Greg Kroah-Hartman
From: Erqi Chen [ Upstream commit 71a228bc8d65900179e37ac309e678f8c523f133 ] If client mds session is evicted in CEPH_MDS_SESSION_OPENING state, mds won't send session msg to client, and delayed_work skip CEPH_MDS_SESSION_OPENING state session, the session hang forever. Allow ceph_con_keepalive

[PATCH 5.3 107/148] pNFS: Ensure we do clear the return-on-close layout stateid on fatal errors

2019-10-10 Thread Greg Kroah-Hartman
From: Trond Myklebust [ Upstream commit 9c47b18cf722184f32148784189fca945a7d0561 ] IF the server rejected our layout return with a state error such as NFS4ERR_BAD_STATEID, or even a stale inode error, then we do want to clear out all the remaining layout segments and mark that stateid as invalid

[PATCH 5.3 108/148] SUNRPC: Dont try to parse incomplete RPC messages

2019-10-10 Thread Greg Kroah-Hartman
From: Trond Myklebust [ Upstream commit 9ba828861c56a21d211d5d10f5643774b1ea330d ] If the copy of the RPC reply into our buffers did not complete, and we could end up with a truncated message. In that case, just resend the call. Fixes: a0584ee9aed80 ("SUNRPC: Use struct xdr_stream when decoding

[PATCH 5.3 103/148] netfilter: nf_tables: allow lookups in dynamic sets

2019-10-10 Thread Greg Kroah-Hartman
From: Florian Westphal [ Upstream commit acab713177377d9e0889c46bac7ff0cfb9a90c4d ] This un-breaks lookups in sets that have the 'dynamic' flag set. Given this active example configuration: table filter { set set1 { type ipv4_addr size 64 flags dynamic,timeout timeout 1m }

[PATCH 5.3 106/148] perf probe: Fix to clear tev->nargs in clear_probe_trace_event()

2019-10-10 Thread Greg Kroah-Hartman
From: Masami Hiramatsu [ Upstream commit 9e6124d9d635957b56717f85219a88701617253f ] Since add_probe_trace_event() can reuse tf->tevs[i] after calling clear_probe_trace_event(), this can make perf-probe crash if the 1st attempt of probe event finding fails to find an event argument, and the 2nd a

[PATCH 5.3 102/148] watchdog: aspeed: Add support for AST2600

2019-10-10 Thread Greg Kroah-Hartman
From: Ryan Chen [ Upstream commit b3528b4874480818e38e4da019d655413c233e6a ] The ast2600 can be supported by the same code as the ast2500. Signed-off-by: Ryan Chen Signed-off-by: Joel Stanley Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20190819051738.17370-3-j...@jms.id.au Sig

[PATCH 5.3 104/148] drm/amdgpu: Fix KFD-related kernel oops on Hawaii

2019-10-10 Thread Greg Kroah-Hartman
From: Felix Kuehling [ Upstream commit dcafbd50f2e4d5cc964aae409fb5691b743fba23 ] Hawaii needs to flush caches explicitly, submitting an IB in a user VMID from kernel mode. There is no s_fence in this case. Fixes: eb3961a57424 ("drm/amdgpu: remove fence context from the job") Signed-off-by: Fel

[PATCH 5.3 105/148] drm/amdgpu: Check for valid number of registers to read

2019-10-10 Thread Greg Kroah-Hartman
From: Trek [ Upstream commit 73d8e6c7b841d9bf298c8928f228fb433676635c ] Do not try to allocate any amount of memory requested by the user. Instead limit it to 128 registers. Actually the longest series of consecutive allowed registers are 48, mmGB_TILE_MODE0-31 and mmGB_MACROTILE_MODE0-15 (0x264

[PATCH 5.3 115/148] iommu/amd: Fix downgrading default page-sizes in alloc_pte()

2019-10-10 Thread Greg Kroah-Hartman
From: Andrei Dulea [ Upstream commit 6ccb72f8374e17d60b58a7bfd5570496332c54e2 ] Downgrading an existing large mapping to a mapping using smaller page-sizes works only for the mappings created with page-mode 7 (i.e. non-default page size). Treat large mappings created with page-mode 0 (i.e. defa

[PATCH 5.3 110/148] selftests/seccomp: fix build on older kernels

2019-10-10 Thread Greg Kroah-Hartman
From: Tycho Andersen [ Upstream commit 88282297fff00796e81f5e67734a6afdfb31fbc4 ] The seccomp selftest goes to some length to build against older kernel headers, viz. all the #ifdefs at the beginning of the file. Commit 201766a20e30 ("ptrace: add PTRACE_GET_SYSCALL_INFO request") introduces som

[PATCH 5.3 082/148] xen/balloon: Set pages PageOffline() in balloon_add_region()

2019-10-10 Thread Greg Kroah-Hartman
From: David Hildenbrand commit c5ad81eb029570c5ca5859539b0679f07a776d25 upstream. We are missing a __SetPageOffline(), which is why we can get !PageOffline() pages onto the balloon list, where alloc_xenballooned_pages() will complain: page:ea0003e7ffc0 refcount:1 mapcount:0 mapping:

[PATCH 5.3 114/148] thermal_hwmon: Sanitize thermal_zone type

2019-10-10 Thread Greg Kroah-Hartman
From: Stefan Mavrodiev [ Upstream commit 8c7aa184281c01fc26f319059efb94725012921d ] When calling thermal_add_hwmon_sysfs(), the device type is sanitized by replacing '-' with '_'. However tz->type remains unsanitized. Thus calling thermal_hwmon_lookup_by_type() returns no device. And if there is

[PATCH 5.3 116/148] libnvdimm/region: Initialize bad block for volatile namespaces

2019-10-10 Thread Greg Kroah-Hartman
From: Aneesh Kumar K.V [ Upstream commit c42adf87e4e7ed77f6ffe288dc90f980d07d68df ] We do check for a bad block during namespace init and that use region bad block list. We need to initialize the bad block for volatile regions for this to work. We also observe a lockdep warning as below because

[PATCH 5.3 118/148] fuse: fix memleak in cuse_channel_open

2019-10-10 Thread Greg Kroah-Hartman
From: zhengbin [ Upstream commit 9ad09b1976c562061636ff1e01bfc3a57aebe56b ] If cuse_send_init fails, need to fuse_conn_put cc->fc. cuse_channel_open->fuse_conn_init->refcount_set(&fc->count, 1) ->fuse_dev_alloc->fuse_conn_get ->fuse_dev_free->fuse_conn_put Fix

[PATCH 5.3 112/148] ntb: point to right memory window index

2019-10-10 Thread Greg Kroah-Hartman
From: Sanjay R Mehta [ Upstream commit ae89339b08f3fe02457ec9edd512ddc3d246d0f8 ] second parameter of ntb_peer_mw_get_addr is pointing to wrong memory window index by passing "peer gidx" instead of "local gidx". For ex, "local gidx" value is '0' and "peer gidx" value is '1', then on peer side

[PATCH 5.3 109/148] pwm: stm32-lp: Add check in case requested period cannot be achieved

2019-10-10 Thread Greg Kroah-Hartman
From: Fabrice Gasnier [ Upstream commit c91e3234c6035baf5a79763cb4fcd5d23ce75c2b ] LPTimer can use a 32KHz clock for counting. It depends on clock tree configuration. In such a case, PWM output frequency range is limited. Although unlikely, nothing prevents user from requesting a PWM frequency a

[PATCH 5.3 117/148] libnvdimm: Fix endian conversion issues 

2019-10-10 Thread Greg Kroah-Hartman
From: Aneesh Kumar K.V [ Upstream commit 86aa66687442ef45909ff9814b82b4d2bb892294 ] nd_label->dpa issue was observed when trying to enable the namespace created with little-endian kernel on a big-endian kernel. That made me run `sparse` on the rest of the code and other changes are the result of

[PATCH 5.3 088/148] drivers: thermal: qcom: tsens: Fix memory leak from qfprom read

2019-10-10 Thread Greg Kroah-Hartman
From: Srinivas Kandagatla [ Upstream commit 6b8249abb093551ef173d13a25ed0044d5dd33e0 ] memory returned as part of nvmem_read via qfprom_read should be freed by the consumer once done. Existing code is not doing it so fix it. Below memory leak detected by kmemleak [] kmemleak_alloc+0x50/0x84

[PATCH 5.3 087/148] cfg80211: initialize on-stack chandefs

2019-10-10 Thread Greg Kroah-Hartman
From: Johannes Berg commit f43e5210c739fe76a4b0ed851559d6902f20ceb1 upstream. In a few places we don't properly initialize on-stack chandefs, resulting in EDMG data to be non-zero, which broke things. Additionally, in a few places we rely on the driver to init the data completely, but perhaps w

[PATCH 5.3 122/148] sched/core: Fix migration to invalid CPU in __set_cpus_allowed_ptr()

2019-10-10 Thread Greg Kroah-Hartman
From: KeMeng Shi [ Upstream commit 714e501e16cd473538b609b3e351b2cc9f7f09ed ] An oops can be triggered in the scheduler when running qemu on arm64: Unable to handle kernel paging request at virtual address 08effe40 Internal error: Oops: 9607 [#1] SMP Process migration/0 (pid: 12,

[PATCH 5.3 120/148] sched/membarrier: Call sync_core only before usermode for same mm

2019-10-10 Thread Greg Kroah-Hartman
From: Mathieu Desnoyers [ Upstream commit 2840cf02fae627860156737e83326df354ee4ec6 ] When the prev and next task's mm change, switch_mm() provides the core serializing guarantees before returning to usermode. The only case where an explicit core serialization is needed is when the scheduler keep

[PATCH 5.3 123/148] perf build: Add detection of java-11-openjdk-devel package

2019-10-10 Thread Greg Kroah-Hartman
From: Thomas Richter [ Upstream commit 815c1560bf8fd522b8d93a1d727868b910c1cc24 ] With Java 11 there is no seperate JRE anymore. Details: https://coderanch.com/t/701603/java/JRE-JDK Therefore the detection of the JRE needs to be adapted. This change works for s390 and x86. I have not test

[PATCH 5.3 121/148] sched/membarrier: Fix private expedited registration check

2019-10-10 Thread Greg Kroah-Hartman
From: Mathieu Desnoyers [ Upstream commit fc0d77387cb5ae883fd774fc559e056a8dde024c ] Fix a logic flaw in the way membarrier_register_private_expedited() handles ready state checks for private expedited sync core and private expedited registrations. If a private expedited membarrier registration

[PATCH 5.3 119/148] libnvdimm/nfit_test: Fix acpi_handle redefinition

2019-10-10 Thread Greg Kroah-Hartman
From: Nathan Chancellor [ Upstream commit 59f08896f058a92f03a0041b397a1a227c5e8529 ] After commit 62974fc389b3 ("libnvdimm: Enable unit test infrastructure compile checks"), clang warns: In file included from ../drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:15: ../drivers/nvdimm/../../

Re: [RFC/RFT][PATCH v8] cpuidle: New timer events oriented governor for tickless systems

2019-10-10 Thread Rafael J. Wysocki
On Thu, Oct 10, 2019 at 9:05 AM Doug Smythies wrote: > > On 2019.10.09 06:37 Rafael J. Wysocki wrote: > > On Wednesday, October 9, 2019 1:19:51 AM CEST Rafael J. Wysocki wrote: > >> On Tuesday, October 8, 2019 12:49:01 PM CEST Rafael J. Wysocki wrote: > >>> On Tue, Oct 8, 2019 at 11:51 AM Rafael J

[PATCH 5.3 079/148] libnvdimm/altmap: Track namespace boundaries in altmap

2019-10-10 Thread Greg Kroah-Hartman
From: Aneesh Kumar K.V commit cf387d9644d8c78721cf9b77af9f67bb5b04da16 upstream. With PFN_MODE_PMEM namespace, the memmap area is allocated from the device area. Some architectures map the memmap area with large page size. On architectures like ppc64, 16MB page for memap mapping can map 262144 p

[PATCH 5.3 084/148] ieee802154: atusb: fix use-after-free at disconnect

2019-10-10 Thread Greg Kroah-Hartman
From: Johan Hovold commit 7fd25e6fc035f4b04b75bca6d7e8daa069603a76 upstream. The disconnect callback was accessing the hardware-descriptor private data after having having freed it. Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver") Cc: stable # 4.2 Cc: Alexander Aring

[PATCH 5.3 085/148] nl80211: validate beacon head

2019-10-10 Thread Greg Kroah-Hartman
From: Johannes Berg commit f88eb7c0d002a67ef31aeb7850b42ff69abc46dc upstream. We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceedi

[PATCH 5.3 143/148] staging: erofs: fix an error handling in erofs_readdir()

2019-10-10 Thread Greg Kroah-Hartman
From: Gao Xiang commit acb383f1dcb4f1e79b66d4be3a0b6f519a957b0d upstream. Richard observed a forever loop of erofs_read_raw_page() [1] which can be generated by forcely setting ->u.i_blkaddr to 0xdeadbeef (as my understanding block layer can handle access beyond end of device correctly). After

[PATCH 5.3 138/148] tick: broadcast-hrtimer: Fix a race in bc_set_next

2019-10-10 Thread Greg Kroah-Hartman
From: Balasubramani Vivekanandan [ Upstream commit b9023b91dd020ad7e093baa5122b6968c48cc9e0 ] When a cpu requests broadcasting, before starting the tick broadcast hrtimer, bc_set_next() checks if the timer callback (bc_handler) is active using hrtimer_try_to_cancel(). But hrtimer_try_to_cancel()

[PATCH 5.3 148/148] libnvdimm: prevent nvdimm from requesting key when security is disabled

2019-10-10 Thread Greg Kroah-Hartman
From: Dave Jiang [ Upstream commit 674f31a352da5e9f621f757b9a89262f486533a0 ] Current implementation attempts to request keys from the keyring even when security is not enabled. Change behavior so when security is disabled it will skip key request. Error messages seen when no keys are installed

[PATCH 5.3 130/148] net: dsa: microchip: Always set regmap stride to 1

2019-10-10 Thread Greg Kroah-Hartman
From: Marek Vasut [ Upstream commit a3aa6e65beebf3780026753ebf39db19f4c92990 ] The regmap stride is set to 1 for regmap describing 8bit registers already. However, for 16/32/64bit registers, the stride is 2/4/8 respectively. This is not correct, as the switch protocol supports unaligned register

[PATCH 5.3 136/148] Btrfs: fix selftests failure due to uninitialized i_mode in test inodes

2019-10-10 Thread Greg Kroah-Hartman
From: Filipe Manana [ Upstream commit 9f7fec0ba89108b9385f1b9fb167861224912a4a ] Some of the self tests create a test inode, setup some extents and then do calls to btrfs_get_extent() to test that the corresponding extent maps exist and are correct. However btrfs_get_extent(), since the 5.2 merg

[PATCH 5.3 147/148] staging: erofs: detect potential multiref due to corrupted images

2019-10-10 Thread Greg Kroah-Hartman
From: Gao Xiang commit e12a0ce2fa69798194f3a8628baf6edfbd5c548f upstream. As reported by erofs-utils fuzzer, currently, multiref (ondisk deduplication) hasn't been supported for now, we should forbid it properly. Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support") Cc: #

[PATCH 5.3 139/148] perf stat: Reset previous counts on repeat with interval

2019-10-10 Thread Greg Kroah-Hartman
From: Srikar Dronamraju [ Upstream commit b63fd11cced17fcb8e133def29001b0f6aaa5e06 ] When using 'perf stat' with repeat and interval option, it shows wrong values for events. The wrong values will be shown for the first interval on the second and subsequent repetitions. Without the fix: # p

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