[PATCH 5.1 051/122] media: imx: csi: Allow unknown nearest upstream entities

2019-05-23 Thread Greg Kroah-Hartman
From: Steve Longerbeam commit 904371f90b2c0c749a5ab75478c129a4682ac3d8 upstream. On i.MX6, the nearest upstream entity to the CSI can only be the CSI video muxes or the Synopsys DW MIPI CSI-2 receiver. However the i.MX53 has no CSI video muxes or a MIPI CSI-2 receiver. So allow for the nearest

[PATCH 5.1 057/122] NFS4: Fix v4.0 client state corruption when mount

2019-05-23 Thread Greg Kroah-Hartman
From: ZhangXiaoxu commit f02f3755dbd14fb935d24b14650fff9ba92243b8 upstream. stat command with soft mount never return after server is stopped. When alloc a new client, the state of the client will be set to NFS4CLNT_LEASE_EXPIRED. When the server is stopped, the state manager will work, and ac

[PATCH 5.1 047/122] cifs: fix strcat buffer overflow and reduce raciness in smb21_set_oplock_level()

2019-05-23 Thread Greg Kroah-Hartman
From: Christoph Probst commit 6a54b2e002c9d00b398d35724c79f9fe0d9b38fb upstream. Change strcat to strncpy in the "None" case to fix a buffer overflow when cinode->oplock is reset to 0 by another thread accessing the same cinode. It is never valid to append "None" to any other message. Consolida

[PATCH 5.1 044/122] of: fix clang -Wunsequenced for be32_to_cpu()

2019-05-23 Thread Greg Kroah-Hartman
From: Phong Tran commit 440868661f36071886ed360d91de83bd67c73b4f upstream. Now, make the loop explicit to avoid clang warning. ./include/linux/of.h:238:37: warning: multiple unsequenced modifications to 'cell' [-Wunsequenced] r = (r << 32) | be32_to_cpu(*(cell++));

[PATCH 5.1 045/122] brcmfmac: Add DMI nvram filename quirk for ACEPC T8 and T11 mini PCs

2019-05-23 Thread Greg Kroah-Hartman
From: Hans de Goede commit b1a0ba8f772d7a6dcb5aa3e856f5bd8274989ebe upstream. The ACEPC T8 and T11 mini PCs contain quite generic names in the sys_vendor and product_name DMI strings, without this patch brcmfmac will try to load: "brcmfmac43455-sdio.Default string-Default string.txt" as nvram fi

[PATCH 5.1 043/122] p54: drop device reference count if fails to enable device

2019-05-23 Thread Greg Kroah-Hartman
From: Pan Bian commit 8149069db81853570a665f5e5648c0e526dc0e43 upstream. The function p54p_probe takes an extra reference count of the PCI device. However, the extra reference count is not dropped when it fails to enable the PCI device. This patch fixes the bug. Cc: sta...@vger.kernel.org Signe

[PATCH 5.1 053/122] media: imx: Rename functions that add IPU-internal subdevs

2019-05-23 Thread Greg Kroah-Hartman
From: Steve Longerbeam commit 085b26da62211cb77622008082adff56aefa771d upstream. For the functions that add and remove the internal IPU subdevice descriptors, rename them to make clear they are the subdevs internal to the IPU. Also rename the platform data structure for the internal IPU subdevic

[PATCH 5.1 041/122] dcache: sort the freeing-without-RCU-delay mess for good.

2019-05-23 Thread Greg Kroah-Hartman
From: Al Viro commit 5467a68cbf6884c9a9d91e2a89140afb1839c835 upstream. For lockless accesses to dentries we don't have pinned we rely (among other things) upon having an RCU delay between dropping the last reference and actually freeing the memory. On the other hand, for things like pipes and

[PATCH 5.1 048/122] phy: ti-pipe3: fix missing bit-wise or operator when assigning val

2019-05-23 Thread Greg Kroah-Hartman
From: Colin Ian King commit e6577cb5103b7ca7c0204c0c86ef4af8aa6288f6 upstream. There seems to be a missing bit-wise or operator when setting val, fix this by adding it in. Fixes: 2796ceb0c18a ("phy: ti-pipe3: Update pcie phy settings") Cc: sta...@vger.kernel.org # v4.19+ Signed-off-by: Colin Ia

[PATCH 5.1 050/122] media: seco-cec: fix building with RC_CORE=m

2019-05-23 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit 63604a143fe168094fbbccba56f6e3241683e399 upstream. I previously added an RC_CORE dependency here, but missed the corner case of CONFIG_VIDEO_SECO_CEC=y with CONFIG_RC_CORE=m, which still causes a link error: drivers/media/platform/seco-cec/seco-cec.o: In function `sec

[PATCH 5.1 070/122] gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6

2019-05-23 Thread Greg Kroah-Hartman
From: Chris Packham commit 259799ea5a9aa099a267f3b99e1f7078bbaf5c5e upstream. Use gen_rtx_set instead of gen_rtx_SET. The former is a wrapper macro that handles the difference between GCC versions implementing the latter. This fixes the following error on my system with g++ 5.4.0 as the host co

[PATCH 5.1 071/122] iommu/tegra-smmu: Fix invalid ASID bits on Tegra30/114

2019-05-23 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit 43a0541e312f7136e081e6bf58f6c8a2e9672688 upstream. Both Tegra30 and Tegra114 have 4 ASID's and the corresponding bitfield of the TLB_FLUSH register differs from later Tegra generations that have 128 ASID's. In a result the PTE's are now flushed correctly from TLB an

[PATCH 5.1 073/122] x86_64: Add gap to int3 to allow for call emulation

2019-05-23 Thread Greg Kroah-Hartman
From: Josh Poimboeuf commit 2700fefdb2d9751c416ad56897e27d41e409324a upstream. To allow an int3 handler to emulate a call instruction, it must be able to push a return address onto the stack. Add a gap to the stack to allow the int3 handler to push the return address and change the return from i

[PATCH 5.1 076/122] tracing: Fix partial reading of trace events id file

2019-05-23 Thread Greg Kroah-Hartman
From: Elazar Leibovich commit cbe08bcbbe787315c425dde284dcb715cfbf3f39 upstream. When reading only part of the id file, the ppos isn't tracked correctly. This is taken care by simple_read_from_buffer. Reading a single byte, and then the next byte would result EOF. While this seems like not a b

[PATCH 5.1 062/122] clk: rockchip: fix wrong clock definitions for rk3328

2019-05-23 Thread Greg Kroah-Hartman
From: Jonas Karlman commit fb903392131a324a243c7731389277db1cd9f8df upstream. This patch fixes definition of several clock gate and select register that is wrong for rk3328 referring to the TRM and vendor kernel. Also use correct number of softrst registers. Fix clock definition for: - clk_cryp

[PATCH 5.1 060/122] clk: tegra: Fix PLLM programming on Tegra124+ when PMC overrides divider

2019-05-23 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit 40db569d6769ffa3864fd1b89616b1a7323568a8 upstream. There are wrongly set parenthesis in the code that are resulting in a wrong configuration being programmed for PLLM. The original fix was made by Danny Huang in the downstream kernel. The patch was tested on Nyan Big

[PATCH 5.1 067/122] fuse: honor RLIMIT_FSIZE in fuse_file_fallocate

2019-05-23 Thread Greg Kroah-Hartman
From: Liu Bo commit 0cbade024ba501313da3b7e5dd2a188a6bc491b5 upstream. fstests generic/228 reported this failure that fuse fallocate does not honor what 'ulimit -f' has set. This adds the necessary inode_newsize_ok() check. Signed-off-by: Liu Bo Fixes: 05ba1f082300 ("fuse: add FALLOCATE opera

[PATCH 5.1 061/122] clk: mediatek: Disable tuner_en before change PLL rate

2019-05-23 Thread Greg Kroah-Hartman
From: Owen Chen commit be17ca6ac76a5cfd07cc3a0397dd05d6929fcbbb upstream. PLLs with tuner_en bit, such as APLL1, need to disable tuner_en before apply new frequency settings, or the new frequency settings (pcw) will not be applied. The tuner_en bit will be disabled during changing PLL rate and b

[PATCH 5.1 066/122] fuse: fix writepages on 32bit

2019-05-23 Thread Greg Kroah-Hartman
From: Miklos Szeredi commit 9de5be06d0a89ca97b5ab902694d42dfd2bb77d2 upstream. Writepage requests were cropped to i_size & 0x, which meant that mmaped writes to any file larger than 4G might be silently discarded. Fix by storing the file size in a properly sized variable (loff_t instead

[PATCH 5.1 059/122] clk: hi3660: Mark clk_gate_ufs_subsys as critical

2019-05-23 Thread Greg Kroah-Hartman
From: Leo Yan commit 9f77a60669d13ed4ddfa6cd7374c9d88da378ffa upstream. clk_gate_ufs_subsys is a system bus clock, turning off it will introduce lockup issue during system suspend flow. Let's mark clk_gate_ufs_subsys as critical clock, thus keeps it on during system suspend and resume. Fixes:

[PATCH 5.1 065/122] udlfb: introduce a rendering mutex

2019-05-23 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit babc250e278eac7b0e671bdaedf833759b43bb78 upstream. Rendering calls may be done simultaneously from the workqueue, dlfb_ops_write, dlfb_ops_ioctl, dlfb_ops_set_par and dlfb_dpy_deferred_io. The code is robust enough so that it won't crash on concurrent rendering. How

[PATCH 5.1 087/122] fbdev: sm712fb: fix VRAM detection, dont set SR70/71/74/75

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit dcf9070595e100942c539e229dde4770aaeaa4e9 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), the amount of Video RAM is not detected correctly by the xf86-video-siliconmotion driver. This is because sm712fb overwrites the GPR71 Scratch Pad Register, which is set b

[PATCH 5.1 088/122] fbdev: sm712fb: fix white screen of death on reboot, dont set CR3B-CR3F

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit 8069053880e0ee3a75fd6d7e0a30293265fe3de4 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with sm712fb framebuffer driver would cause a white screen of death on the next POST, presumably the proper timings for the LCD panel was not reprogrammed proper

[PATCH 5.1 090/122] fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit 9e0e59993df0601cddb95c4f6c61aa3d5e753c00 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), running fbtest or X will crash the machine instantly, because the VRAM/framebuffer is not mapped correctly. On SM712, the framebuffer starts at the beginning of address s

[PATCH 5.1 078/122] memory: tegra: Fix integer overflow on tick value calculation

2019-05-23 Thread Greg Kroah-Hartman
From: Dmitry Osipenko commit b906c056b6023c390f18347169071193fda57dde upstream. Multiplying the Memory Controller clock rate by the tick count results in an integer overflow and in result the truncated tick value is being programmed into hardware, such that the GR3D memory client performance is

[PATCH 5.1 093/122] fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit f627caf55b8e735dcec8fa6538e9668632b55276 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), blanking the display or starting the X server will crash and freeze the system, or garble the display. Experiments showed this problem can mostly be solved by adjusting t

[PATCH 5.1 089/122] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit ec1587d5073f29820e358f3a383850d61601d981 upstream. When the machine is booted in VGA mode, loading sm712fb would cause a glitch of random pixels shown on the screen. To prevent it from happening, we first clear the entire framebuffer, and we also need to stop calling smtcf

[PATCH 5.1 084/122] x86/mpx, mm/core: Fix recursive munmap() corruption

2019-05-23 Thread Greg Kroah-Hartman
From: Dave Hansen commit 5a28fc94c9143db766d1ba5480cae82d856ad080 upstream. This is a bit of a mess, to put it mildly. But, it's a bug that only seems to have showed up in 4.20 but wasn't noticed until now, because nobody uses MPX. MPX has the arch_unmap() hook inside of munmap() because MPX u

[PATCH 5.1 091/122] fbdev: sm712fb: fix support for 1024x768-16 mode

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit 6053d3a4793e5bde6299ac5388e76a3bf679ff65 upstream. In order to support the 1024x600 panel on Yeeloong Loongson MIPS laptop, the original 1024x768-16 table was modified to 1024x600-16, without leaving the original. It causes problem on x86 laptop as the 1024x768-16 support

[PATCH 5.1 094/122] PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken

2019-05-23 Thread Greg Kroah-Hartman
From: Nikolai Kostrigin commit d28ca864c493637f3c957f4ed9348a94fca6de60 upstream. ATS is broken on the Radeon R7 GPU (at least for Stoney Ridge based laptop) and causes IOMMU stalls and system failure. Disable ATS on these devices to make them usable again with IOMMU enabled. Thanks to Joerg R

[PATCH 5.1 096/122] PCI: Reset Lenovo ThinkPad P50 nvgpu at boot if necessary

2019-05-23 Thread Greg Kroah-Hartman
From: Lyude Paul commit e0547c81bfcfad01cbbfa93a5e66bb98ab932f80 upstream. On ThinkPad P50 SKUs with an Nvidia Quadro M1000M instead of the M2000M variant, the BIOS does not always reset the secondary Nvidia GPU during reboot if the laptop is configured in Hybrid Graphics mode. The reason is un

[PATCH 5.1 083/122] objtool: Allow AR to be overridden with HOSTAR

2019-05-23 Thread Greg Kroah-Hartman
From: Nathan Chancellor commit 8ea58f1e8b11cca3087b294779bf5959bf89cc10 upstream. Currently, this Makefile hardcodes GNU ar, meaning that if it is not available, there is no way to supply a different one and the build will fail. $ make AR=llvm-ar CC=clang LD=ld.lld HOSTAR=llvm-ar HOSTCC=clang

[PATCH 5.1 079/122] perf intel-pt: Fix instructions sampling rate

2019-05-23 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 7ba8fa20e26eb3c0c04d747f7fd2223694eac4d5 upstream. The timestamp used to determine if an instruction sample is made, is an estimate based on the number of instructions since the last known timestamp. A consequence is that it might go backwards, which results in extra s

[PATCH 5.1 077/122] tracing: probeevent: Fix to make the type of $comm string

2019-05-23 Thread Greg Kroah-Hartman
From: Masami Hiramatsu commit 3dd1f7f24f8ceec00bbbc364c2ac3c893f0fdc4c upstream. Fix to make the type of $comm "string". If we set the other type to $comm argument, it shows meaningless value or wrong data. Currently probe events allow us to set string array type (e.g. ":string[2]"), or other d

[PATCH 5.1 106/122] dm crypt: move detailed message into debug level

2019-05-23 Thread Greg Kroah-Hartman
From: Milan Broz commit 7a1cd7238fde6ab367384a4a2998cba48330c398 upstream. The information about tag size should not be printed without debug info set. Also print device major:minor in the error message to identify the device instance. Also use rate limiting and debug level for info about used

[PATCH 5.1 107/122] dm integrity: correctly calculate the size of metadata area

2019-05-23 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 30bba430ddf737978e40561198693ba91386dac1 upstream. When we use separate devices for data and metadata, dm-integrity would incorrectly calculate the size of the metadata device as if it had 512-byte block size - and it would refuse activation with larger block size an

[PATCH 5.1 108/122] dm ioctl: fix hang in early create error condition

2019-05-23 Thread Greg Kroah-Hartman
From: Helen Koike commit 0f41fcf78849c902ddca564f99a8e23ccfc80333 upstream. The dm_early_create() function (which deals with "dm-mod.create=" kernel command line option) calls dm_hash_insert() who gets an extra reference to the md object. In case of failure, this reference wasn't being released

[PATCH 5.1 109/122] dm mpath: always free attached_handler_name in parse_path()

2019-05-23 Thread Greg Kroah-Hartman
From: Martin Wilck commit 940bc471780b004a5277c1931f52af363c2fc9da upstream. Commit b592211c33f7 ("dm mpath: fix attached_handler_name leak and dangling hw_handler_name pointer") fixed a memory leak for the case where setup_scsi_dh() returns failure. But setup_scsi_dh may return success and not

[PATCH 5.1 098/122] PCI/AER: Change pci_aer_init() stub to return void

2019-05-23 Thread Greg Kroah-Hartman
From: Jisheng Zhang commit 31f996efbd5a7825f4d30150469e9d110aea00e8 upstream. Commit 60ed982a4e78 ("PCI/AER: Move internal declarations to drivers/pci/pci.h") changed pci_aer_init() to return "void", but didn't change the stub for when CONFIG_PCIEAER isn't enabled. Change the stub to match. Fi

[PATCH 5.1 104/122] dm init: fix max devices/targets checks

2019-05-23 Thread Greg Kroah-Hartman
From: Helen Koike commit 8e890c1ab1b1e0f765cd8da82c4dee011698a5e8 upstream. dm-init should allow up to DM_MAX_{DEVICES,TARGETS} for devices/targets, and not DM_MAX_{DEVICES,TARGETS} - 1. Fix the checks and also fix the error message when the number of devices is surpassed. Fixes: 6bbc923dfcf57

[PATCH 5.1 117/122] bpf: add map_lookup_elem_sys_only for lookups from syscall side

2019-05-23 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit c6110222c6f49ea68169f353565eb865488a8619 upstream. Add a callback map_lookup_elem_sys_only() that map implementations could use over map_lookup_elem() from system call side in case the map implementation needs to handle the latter differently than from the BPF data p

[PATCH 5.1 101/122] PCI: Work around Pericom PCIe-to-PCI bridge Retrain Link erratum

2019-05-23 Thread Greg Kroah-Hartman
From: Stefan Mätje commit 4ec73791a64bab25cabf16a6067ee478692e506d upstream. Due to an erratum in some Pericom PCIe-to-PCI bridges in reverse mode (conventional PCI on primary side, PCIe on downstream side), the Retrain Link bit needs to be cleared manually to allow the link training to complete

[PATCH 5.1 099/122] PCI: rcar: Add the initialization of PCIe link in resume_noirq()

2019-05-23 Thread Greg Kroah-Hartman
From: Kazufumi Ikeda commit be20bbcb0a8cb5597cc62b3e28d275919f3431df upstream. Reestablish the PCIe link very early in the resume process in case it went down to prevent PCI accesses from hanging the bus. Such accesses can happen early in the PCI resume process, as early as the SUSPEND_RESUME_NO

[PATCH 5.1 095/122] PCI: Mark Atheros AR9462 to avoid bus reset

2019-05-23 Thread Greg Kroah-Hartman
From: James Prestwood commit 6afb7e26978da5e86e57e540fdce65c8b04f398a upstream. When using PCI passthrough with this device, the host machine locks up completely when starting the VM, requiring a hard reboot. Add a quirk to avoid bus resets on this device. Fixes: c3e59ee4e766 ("PCI: Mark Ather

[PATCH 5.1 102/122] dm cache metadata: Fix loading discard bitset

2019-05-23 Thread Greg Kroah-Hartman
From: Nikos Tsironis commit e28adc3bf34e434b30e8d063df4823ba0f3e0529 upstream. Add missing dm_bitset_cursor_next() to properly advance the bitset cursor. Otherwise, the discarded state of all blocks is set according to the discarded state of the first block. Fixes: ae4a46a1f6 ("dm cache metada

[PATCH 5.1 121/122] ARM: dts: imx6q-logicpd: Reduce inrush current on USBH1

2019-05-23 Thread Greg Kroah-Hartman
From: Adam Ford commit 7aedca875074b33795bc77066b325898b1eb8032 upstream. Some USB peripherals draw more power, and the sourcing regulator take a little time to turn on. This patch fixes an issue where some devices occasionally do not get detected, because the power isn't quite ready when commu

[PATCH 5.1 120/122] btrfs: reloc: Fix NULL pointer dereference due to expanded reloc_root lifespan

2019-05-23 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 10995c0491204c861948c9850939a7f4e90760a4 upstream. Commit d2311e698578 ("btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots()") expands the life span of root->reloc_root. This breaks certain checs of fs_info->reloc_ctl. Before that commit, if we have a

[PATCH 5.1 118/122] bpf, lru: avoid messing with eviction heuristics upon syscall lookup

2019-05-23 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 50b045a8c0ccf44f76640ac3eea8d80ca53979a3 upstream. One of the biggest issues we face right now with picking LRU map over regular hash table is that a map walk out of user space, for example, to just dump the existing entries or to remove certain ones, will completely

[PATCH 5.1 122/122] ARM: dts: imx6q-logicpd: Reduce inrush current on start

2019-05-23 Thread Greg Kroah-Hartman
From: Adam Ford commit dbb58e291cd47e594b64293bd91a4ce40626513c upstream. The main 3.3V regulator sources a series of additional regulators. This patch adds a small delay, so when the 3.3V regulator comes on it delays a bit before the subsequent regulators can come on. This reduces the inrush cu

[PATCH 5.1 113/122] md/raid: raid5 preserve the writeback action after the parity check

2019-05-23 Thread Greg Kroah-Hartman
From: Nigel Croxon commit b2176a1dfb518d870ee073445d27055fea64dfb8 upstream. The problem is that any 'uptodate' vs 'disks' check is not precise in this path. Put a "WARN_ON(!test_bit(R5_UPTODATE, &dev->flags)" on the device that might try to kick off writes and then skip the action. Better to pr

[PATCH 5.1 092/122] fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit 4ed7d2ccb7684510ec5f7a8f7ef534bc6a3d55b2 upstream. Loongson MIPS netbooks use 1024x600 LCD panels, which is the original target platform of this driver, but nearly all old x86 laptops have 1024x768. Lighting 768 panels using 600's timings would partially garble the display

[PATCH 5.1 116/122] bpf: relax inode permission check for retrieving bpf program

2019-05-23 Thread Greg Kroah-Hartman
From: Chenbo Feng commit e547ff3f803e779a3898f1f48447b29f43c54085 upstream. For iptable module to load a bpf program from a pinned location, it only retrieve a loaded program and cannot change the program content so requiring a write permission for it might not be necessary. Also when adding or

[PATCH 5.1 115/122] driver core: Postpone DMA tear-down until after devres release for probe failure

2019-05-23 Thread Greg Kroah-Hartman
From: John Garry commit 0b777eee88d712256ba8232a9429edb17c4f9ceb upstream. In commit 376991db4b64 ("driver core: Postpone DMA tear-down until after devres release"), we changed the ordering of tearing down the device DMA ops and releasing all the device's resources; this was because the DMA ops

[PATCH 5.1 119/122] y2038: Make CONFIG_64BIT_TIME unconditional

2019-05-23 Thread Greg Kroah-Hartman
From: Arnd Bergmann commit f3d964673b2f1c5d5c68c77273efcf7103eed03b upstream. As Stepan Golosunov points out, there is a small mistake in the get_timespec64() function in the kernel. It was originally added under the assumption that CONFIG_64BIT_TIME would get enabled on all 32-bit and 64-bit ar

[PATCH 5.1 097/122] PCI: Init PCIe feature bits for managed host bridge alloc

2019-05-23 Thread Greg Kroah-Hartman
From: Jean-Philippe Brucker commit 6302bf3ef78dd210b5ff4a922afcb7d8eff8a211 upstream. Two functions allocate a host bridge: devm_pci_alloc_host_bridge() and pci_alloc_host_bridge(). At the moment, only the unmanaged one initializes the PCIe feature bits, which prevents from using features such

[PATCH 5.1 112/122] Revert "Dont jump to compute_result state from check_result state"

2019-05-23 Thread Greg Kroah-Hartman
From: Song Liu commit a25d8c327bb41742dbd59f8c545f59f3b9c39983 upstream. This reverts commit 4f4fd7c5798bbdd5a03a60f6269cf1177fbd11ef. Cc: Dan Williams Cc: Nigel Croxon Cc: Xiao Ni Signed-off-by: Song Liu Signed-off-by: Greg Kroah-Hartman --- drivers/md/raid5.c | 19 +++

[PATCH 5.1 100/122] PCI: Factor out pcie_retrain_link() function

2019-05-23 Thread Greg Kroah-Hartman
From: Stefan Mätje commit 86fa6a344209d9414ea962b1f1ac6ade9dd7563a upstream. Factor out pcie_retrain_link() to use for Pericom Retrain Link quirk. No functional change intended. Signed-off-by: Stefan Mätje Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko CC: sta...@vger.kernel.org

[PATCH 5.1 114/122] dmaengine: imx-sdma: Only check ratio on parts that support 1:1

2019-05-23 Thread Greg Kroah-Hartman
From: Angus Ainslie (Purism) commit 941acd566b1807b291bbdca31cc5158e26ffcf83 upstream. On imx8mq B0 chip, AHB/SDMA clock ratio 2:1 can't be supported, since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach to 500Mhz, so use 1:1 instead. To limit this change to the imx8mq for now

[PATCH 5.1 111/122] dm: make sure to obey max_io_len_target_boundary

2019-05-23 Thread Greg Kroah-Hartman
From: Michael Lass commit 51b86f9a8d1c4bb4e3862ee4b4c5f46072f7520d upstream. Commit 61697a6abd24 ("dm: eliminate 'split_discard_bios' flag from DM target interface") incorrectly removed code from __send_changing_extent_only() that is required to impose a per-target IO boundary on IO that exceeds

[PATCH 5.1 103/122] dm zoned: Fix zone report handling

2019-05-23 Thread Greg Kroah-Hartman
From: Damien Le Moal commit 7aedf75ff740a98f3683439449cd91c8662d03b2 upstream. The function blkdev_report_zones() returns success even if no zone information is reported (empty report). Empty zone reports can only happen if the report start sector passed exceeds the device capacity. The conditio

[PATCH 4.19 022/114] stm class: Fix channel bitmap on 32-bit systems

2019-05-23 Thread Greg Kroah-Hartman
From: Alexander Shishkin commit 51e0f227812ed81a368de54157ebe14396b4be03 upstream. Commit 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") naively calculates the channel bitmap size in 64-bit chunks regardless of the size of underlying unsigned long, making th

[PATCH 5.1 068/122] ovl: fix missing upper fs freeze protection on copy up for ioctl

2019-05-23 Thread Greg Kroah-Hartman
From: Amir Goldstein commit 3428030da004a1128cbdcf93dc03e16f184d845b upstream. Generalize the helper ovl_open_maybe_copy_up() and use it to copy up file with data before FS_IOC_SETFLAGS ioctl. The FS_IOC_SETFLAGS ioctl is a bit of an odd ball in vfs, which probably caused the confusion. File m

[PATCH 5.1 080/122] perf intel-pt: Fix improved sample timestamp

2019-05-23 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 61b6e08dc8e3ea80b7485c9b3f875ddd45c8466b upstream. The decoder uses its current timestamp in samples. Usually that is a timestamp that has already passed, but in some cases it is a timestamp for a branch that the decoder is walking towards, and consequently hasn't reac

[PATCH 5.1 074/122] x86_64: Allow breakpoints to emulate call instructions

2019-05-23 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit 4b33dadf37666c0860b88f9e52a16d07bf6d0b03 upstream. In order to allow breakpoints to emulate call instructions, they need to push the return address onto the stack. The x86_64 int3 handler adds a small gap to allow the stack to grow some. Use this gap to add the return

[PATCH 5.1 110/122] fuse: Add FOPEN_STREAM to use stream_open()

2019-05-23 Thread Greg Kroah-Hartman
From: Kirill Smelkov commit bbd84f33652f852ce5992d65db4d020aba21f882 upstream. Starting from commit 9c225f2655e3 ("vfs: atomic f_pos accesses as per POSIX") files opened even via nonseekable_open gate read and write via lock and do not allow them to be run simultaneously. This can create read vs

[PATCH 5.1 063/122] udlfb: delete the unused parameter for dlfb_handle_damage

2019-05-23 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit bd86b6c5c60711dbd4fa21bdb497a188ecb6cf63 upstream. Remove the unused parameter "data" and unused variable "ret". Signed-off-by: Mikulas Patocka Cc: Bernie Thompson Cc: Ladislav Michl Cc: Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman

[PATCH 5.1 081/122] perf intel-pt: Fix sample timestamp wrt non-taken branches

2019-05-23 Thread Greg Kroah-Hartman
From: Adrian Hunter commit 1b6599a9d8e6c9f7e9b0476012383b1777f7fc93 upstream. The sample timestamp is updated to ensure that the timestamp represents the time of the sample and not a branch that the decoder is still walking towards. The sample timestamp is updated when the decoder returns, but t

[PATCH 5.1 082/122] MIPS: perf: Fix build with CONFIG_CPU_BMIPS5000 enabled

2019-05-23 Thread Greg Kroah-Hartman
From: Florian Fainelli commit 1b1f01b653b408ebe58fec78c566d1075d285c64 upstream. arch/mips/kernel/perf_event_mipsxx.c: In function 'mipsxx_pmu_enable_event': arch/mips/kernel/perf_event_mipsxx.c:326:21: error: unused variable 'event' [-Werror=unused-variable] struct perf_event *event = contai

[PATCH 5.1 086/122] fbdev: sm712fb: fix brightness control on reboot, dont set SR30

2019-05-23 Thread Greg Kroah-Hartman
From: Yifeng Li commit 5481115e25e42b9215f2619452aa99c95f08492f upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with sm712fb framebuffer driver would cause the role of brightness up/down button to swap. Experiments showed the FPR30 register caused this behavior. Moreover,

[PATCH 5.1 105/122] dm delay: fix a crash when invalid device is specified

2019-05-23 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 81bc6d150ace6250503b825d9d0c10f7bbd24095 upstream. When the target line contains an invalid device, delay_ctr() will call delay_dtr() with NULL workqueue. Attempting to destroy the NULL workqueue causes a crash. Signed-off-by: Mikulas Patocka Cc: sta...@vger.kerne

[PATCH 5.1 064/122] udlfb: fix sleeping inside spinlock

2019-05-23 Thread Greg Kroah-Hartman
From: Mikulas Patocka commit 6b11f9d8433b471fdd3ebed232b43a4b723be6ff upstream. If a framebuffer device is used as a console, the rendering calls (copyarea, fillrect, imageblit) may be done with the console spinlock held. On udlfb, these function call dlfb_handle_damage that takes a blocking sem

[PATCH 5.1 075/122] ftrace/x86_64: Emulate call function while updating in breakpoint handler

2019-05-23 Thread Greg Kroah-Hartman
From: Peter Zijlstra commit 9e298e8604088a600d8100a111a532a9d342af09 upstream. Nicolai Stange discovered[1] that if live kernel patching is enabled, and the function tracer started tracing the same function that was patched, the conversion of the fentry call site during the translation of going

[PATCH 5.1 046/122] cifs: fix credits leak for SMB1 oplock breaks

2019-05-23 Thread Greg Kroah-Hartman
From: Ronnie Sahlberg commit d69cb728e70c40268762182a62f5d5d6fa51c5b2 upstream. For SMB1 oplock breaks we would grab one credit while sending the PDU but we would never relese the credit back since we will never receive a response to this from the server. Eventuallt this would lead to a hang onc

[PATCH 5.1 052/122] media: imx: Clear fwnode link struct for each endpoint iteration

2019-05-23 Thread Greg Kroah-Hartman
From: Steve Longerbeam commit 107927fa597c99eaeee4f51865ca0956ec71b6a2 upstream. In imx_media_create_csi_of_links(), the 'struct v4l2_fwnode_link' must be cleared for each endpoint iteration, otherwise if the remote port has no "reg" property, link.remote_port will not be reset to zero. This was

Re: [PATCH] clocksource/drivers/ixp4xx: Implement delay timer

2019-05-23 Thread Linus Walleij
On Thu, May 23, 2019 at 9:21 PM Daniel Lezcano wrote: > On 23/05/2019 20:16, Linus Walleij wrote: > > This adds delay timer functionality to the IXP4xx > > timer driver. > > > > Signed-off-by: Linus Walleij > > The patch does not apply on tip/timers/core This seems to be because tip/timers/core

[PATCH 5.1 069/122] fsnotify: fix unlink performance regression

2019-05-23 Thread Greg Kroah-Hartman
From: Amir Goldstein commit 4d8e7055a4058ee191296699803c5090e14f0dff upstream. __fsnotify_parent() has an optimization in place to avoid unneeded take_dentry_name_snapshot(). When fsnotify_nameremove() was changed not to call __fsnotify_parent(), we left out the optimization. Kernel test robot

[PATCH 5.1 058/122] PNFS fallback to MDS if no deviceid found

2019-05-23 Thread Greg Kroah-Hartman
From: Olga Kornievskaia commit b1029c9bc078a6f1515f55dd993b507dcc7e3440 upstream. If we fail to find a good deviceid while trying to pnfs instead of propogating an error back fallback to doing IO to the MDS. Currently, code with fals the IO with EINVAL. Signed-off-by: Olga Kornievskaia Fixes:

[PATCH 5.1 055/122] RDMA/mlx5: Use get_zeroed_page() for clock_info

2019-05-23 Thread Greg Kroah-Hartman
From: Jason Gunthorpe commit ddcdc368b1033e19fd3a5f750752e10e28a87826 upstream. get_zeroed_page() returns a virtual address for the page which is better than allocating a struct page and doing a permanent kmap on it. Cc: sta...@vger.kernel.org Signed-off-by: Jason Gunthorpe Reviewed-by: Haggai

[PATCH 5.1 054/122] media: imx: Dont register IPU subdevs/links if CSI port missing

2019-05-23 Thread Greg Kroah-Hartman
From: Steve Longerbeam commit dee747f88167124884a918855c1f438e2f7f39e2 upstream. The second IPU internal sub-devices were being registered and links to them created even when the second IPU is not present. This is wrong for i.MX6 S/DL and i.MX53 which have only a single IPU. Fixes: e130291212df

[PATCH 5.1 049/122] media: ov6650: Fix sensor possibly not detected on probe

2019-05-23 Thread Greg Kroah-Hartman
From: Janusz Krzysztofik commit 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 upstream. After removal of clock_start() from before soc_camera_init_i2c() in soc_camera_probe() by commit 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650 dr

[PATCH 5.1 072/122] ceph: flush dirty inodes before proceeding with remount

2019-05-23 Thread Greg Kroah-Hartman
From: Jeff Layton commit 00abf69dd24fd185982379c5cc3bb7b6d1fc upstream. xfstest generic/452 was triggering a "Busy inodes after umount" warning. ceph was allowing the mount to go read-only without first flushing out dirty inodes in the cache. Ensure we sync out the filesystem before allowing

[PATCH 5.1 039/122] md: add mddev->pers to avoid potential NULL pointer dereference

2019-05-23 Thread Greg Kroah-Hartman
From: Yufen Yu commit ee37e62191a59d253fc916b9fc763deb777211e2 upstream. When doing re-add, we need to ensure rdev->mddev->pers is not NULL, which can avoid potential NULL pointer derefence in fallowing add_bound_rdev(). Fixes: a6da4ef85cef ("md: re-add a failed disk") Cc: Xiao Ni Cc: NeilBrow

[PATCH 5.1 031/122] parisc: Use PA_ASM_LEVEL in boot code

2019-05-23 Thread Greg Kroah-Hartman
From: Helge Deller commit bdca5d64ee92abeacd6dada0bc6f6f8e6350dd67 upstream. The LEVEL define clashed with the DRBD code. Reported-by: kbuild test robot Signed-off-by: Helge Deller Cc: # v4.14+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/boot/compressed/head.S |6 +++--- 1 file

[PATCH 5.1 040/122] md: add a missing endianness conversion in check_sb_changes

2019-05-23 Thread Greg Kroah-Hartman
From: Christoph Hellwig commit ed4d0a4ea11e19863952ac6a7cea3bbb27ccd452 upstream. The on-disk value is little endian and we need to convert it to native endian before storing the value in the in-core structure. Fixes: 7564beda19b36 ("md-cluster/raid10: support add disk under grow mode") Cc: #

[PATCH 5.1 010/122] rtnetlink: always put IFLA_LINK for links with a link-netnsid

2019-05-23 Thread Greg Kroah-Hartman
From: Sabrina Dubroca [ Upstream commit feadc4b6cf42a53a8a93c918a569a0b7e62bd350 ] Currently, nla_put_iflink() doesn't put the IFLA_LINK attribute when iflink == ifindex. In some cases, a device can be created in a different netns with the same ifindex as its parent. That device will not dump i

[PATCH 5.1 034/122] stm class: Fix channel bitmap on 32-bit systems

2019-05-23 Thread Greg Kroah-Hartman
From: Alexander Shishkin commit 51e0f227812ed81a368de54157ebe14396b4be03 upstream. Commit 7bd1d4093c2f ("stm class: Introduce an abstraction for System Trace Module devices") naively calculates the channel bitmap size in 64-bit chunks regardless of the size of underlying unsigned long, making th

[PATCH 5.1 035/122] brd: re-enable __GFP_HIGHMEM in brd_insert_page()

2019-05-23 Thread Greg Kroah-Hartman
From: Hou Tao commit f6b50160a06d4a0d6a3999ab0c5aec4f52dba248 upstream. __GFP_HIGHMEM is disabled if dax is enabled on brd, however dax support for brd has been removed since commit (7a862fbbdec6 "brd: remove dax support"), so restore __GFP_HIGHMEM in brd_insert_page(). Also remove the no longe

[PATCH 5.1 011/122] tipc: switch order of device registration to fix a crash

2019-05-23 Thread Greg Kroah-Hartman
From: Junwei Hu [ Upstream commit 7e27e8d6130c5e88fac9ddec4249f7f2337fe7f8 ] When tipc is loaded while many processes try to create a TIPC socket, a crash occurs: PANIC: Unable to handle kernel paging request at virtual address "dfff221d" pc : tipc_sk_create+0x374/0x1180 [tipc] lr :

[PATCH 5.1 030/122] parisc: Allow live-patching of __meminit functions

2019-05-23 Thread Greg Kroah-Hartman
From: Helge Deller commit d19a12906e5e558c0f6b6cfece7b7caf1012ef95 upstream. When making the text sections writeable with set_kernel_text_rw(1), include all text sections including those in the __init section. Otherwise functions marked with __meminit will stay read-only. Signed-off-by: Helge D

Re: [PATCH] elf: fix "start_code" evaluation

2019-05-23 Thread Alexey Dobriyan
On Thu, May 23, 2019 at 11:44:17AM -0700, Andrew Morton wrote: > On Thu, 23 May 2019 20:57:36 +0300 Alexey Dobriyan > wrote: > > > Only executable ELF program headers should change ->start_code. > > > > ... > > > > --- a/fs/binfmt_elf.c > > +++ b/fs/binfmt_elf.c > > @@ -1026,7 +1026,7 @@ static

[PATCH 5.1 020/122] net/mlx5e: Add missing ethtool driver info for representors

2019-05-23 Thread Greg Kroah-Hartman
From: Dmytro Linkin [ Upstream commit cf83c8fdcd4756644595521f48748ec22f7efede ] For all representors added firmware version info to show in ethtool driver info. For uplink representor, because only it is tied to the pci device sysfs, added pci bus info. Fixes: ff9b85de5d5d ("net/mlx5e: Add som

[PATCH 5.0 137/139] bpf: relax inode permission check for retrieving bpf program

2019-05-23 Thread Greg Kroah-Hartman
From: Chenbo Feng commit e547ff3f803e779a3898f1f48447b29f43c54085 upstream. For iptable module to load a bpf program from a pinned location, it only retrieve a loaded program and cannot change the program content so requiring a write permission for it might not be necessary. Also when adding or

[PATCH] tracing: Use correct function name in trace_filter_add_remove_task() comment

2019-05-23 Thread Matthias Kaehlcke
The comment of trace_filter_add_remove_task() refers to the function as 'trace_pid_filter_add_remove_task', use the correct name. Signed-off-by: Matthias Kaehlcke --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trac

[PATCH 5.0 109/139] clk: sunxi-ng: nkmp: Avoid GENMASK(-1, 0)

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit 2abc330c514fe56c570bb1a6318b054b06a4f72e ] Sometimes one of the nkmp factors is unused. This means that one of the factors shift and width values are set to 0. Current nkmp clock code generates a mask for each factor with GENMASK(width + shift - 1, shift). For unused factor this

[PATCH 5.0 130/139] i2c: designware: ratelimit transfer when suspended errors

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit 6bac9bc273cdab6157ad7a2ead09400aabfc445b ] There are two problems with dev_err() here. One: It is not ratelimited. Two: We don't see which driver tried to transfer something with a suspended adapter. Switch to dev_WARN_ONCE to fix both issues. Drawback is that we don't see if mul

[PATCH 5.0 132/139] perf cs-etm: Always allocate memory for cs_etm_queue::prev_packet

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit 35bb59c10a6d0578806dd500477dae9cb4be344e ] Robert Walker reported a segmentation fault is observed when process CoreSight trace data; this issue can be easily reproduced by the command 'perf report --itrace=i1000i' for decoding tracing data. If neither the 'b' flag (synthesize b

[PATCH 5.1 016/122] flow_offload: support CVLAN match

2019-05-23 Thread Greg Kroah-Hartman
From: Edward Cree [ Upstream commit bae9ed69029c7d499c57485593b2faae475fd704 ] Plumb it through from the flow_dissector. Signed-off-by: Edward Cree Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- include/net/flow_offload.h |2 ++ net/core/flow_offload.c|7 ++

[PATCH 5.0 129/139] ufs: fix braino in ufs_get_inode_gid() for solaris UFS flavour

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit 4e9036042fedaffcd868d7f7aa948756c48c637d ] To choose whether to pick the GID from the old (16bit) or new (32bit) field, we should check if the old gid field is set to 0x. Mainline checks the old *UID* field instead - cut'n'paste from the corresponding code in ufs_get_inode_u

[PATCH 5.0 115/139] PCI: Fix issue with "pci=disable_acs_redir" parameter being ignored

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit d5bc73f34cc97c4b4b9202cc93182c2515076edf ] In most cases, kmalloc() will not be available early in boot when pci_setup() is called. Thus, the kstrdup() call that was added to fix the __initdata bug with the disable_acs_redir parameter usually returns NULL, so the parameter is di

[PATCH 5.0 117/139] mac80211: Fix kernel panic due to use of txq after free

2019-05-23 Thread Greg Kroah-Hartman
[ Upstream commit f1267cf3c01b12e0f843fb6a7450a7f0b2efab8a ] The txq of vif is added to active_txqs list for ATF TXQ scheduling in the function ieee80211_queue_skb(), but it was not properly removed before freeing the txq object. It was causing use after free of the txq objects from the active_txq

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