[PATCH 5.1 092/128] btrfs: Check the first key and level for cached extent buffer

2019-05-20 Thread Greg Kroah-Hartman
From: Qu Wenruo commit 448de471cd4cab0cedd15770082567a69a784a11 upstream. [BUG] When reading a file from a fuzzed image, kernel can panic like: BTRFS warning (device loop0): csum failed root 5 ino 270 off 0 csum 0x98f94189 expected csum 0x mirror 1 assertion failed: !memcmp_extent_

[PATCH 5.1 096/128] Btrfs: do not start a transaction during fiemap

2019-05-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit 03628cdbc64db6262e50d0357960a4e9562676a1 upstream. During fiemap, for regular extents (non inline) we need to check if they are shared and if they are, set the shared bit. Checking if an extent is shared requires checking the delayed references of the currently running

[PATCH 5.1 094/128] btrfs: Honour FITRIM range constraints during free space trim

2019-05-20 Thread Greg Kroah-Hartman
From: Nikolay Borisov commit c2d1b3aae33605a61cbab445d8ae1c708ccd2698 upstream. Up until now trimming the freespace was done irrespective of what the arguments of the FITRIM ioctl were. For example fstrim's -o/-l arguments will be entirely ignored. Fix it by correctly handling those paramter. Th

[PATCH 5.1 100/128] bcache: never set KEY_PTRS of journal key to 0 in journal_reclaim()

2019-05-20 Thread Greg Kroah-Hartman
From: Coly Li commit 1bee2addc0c8470c8aaa65ef0599eeae96dd88bc upstream. In journal_reclaim() ja->cur_idx of each cache will be update to reclaim available journal buckets. Variable 'int n' is used to count how many cache is successfully reclaimed, then n is set to c->journal.key by SET_KEY_PTRS(

[PATCH 5.1 103/128] ARM: dts: imx: Fix the AR803X phy-mode

2019-05-20 Thread Greg Kroah-Hartman
From: Fabio Estevam commit 0672d22a19244cdb0e5c753125c1a55a120db5d0 upstream. Commit 6d4cd041f0af ("net: phy: at803x: disable delay only for RGMII mode") exposed an issue on imx DTS files using AR8031/AR8035 PHYs. The end result is that the boards can no longer obtain an IP address via UDHCP, f

[PATCH 5.1 098/128] Btrfs: fix race between send and deduplication that lead to failures and crashes

2019-05-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit 62d54f3a7fa27ef6a74d6cdf643ce04beba3afa7 upstream. Send operates on read only trees and expects them to never change while it is using them. This is part of its initial design, and this expection is due to two different reasons: 1) When it was introduced, no operation

[PATCH 5.1 105/128] fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount

2019-05-20 Thread Greg Kroah-Hartman
From: Jiufei Xue commit ec084de929e419e51bcdafaafe567d9e7d0273b7 upstream. synchronize_rcu() didn't wait for call_rcu() callbacks, so inode wb switch may not go to the workqueue after synchronize_rcu(). Thus previous scheduled switches was not finished even flushing the workqueue, which will ca

[PATCH 5.1 107/128] ext4: zero out the unused memory region in the extent tree block

2019-05-20 Thread Greg Kroah-Hartman
From: Sriram Rajagopalan commit 592acbf16821288ecdc4192c47e3774a4c48bb64 upstream. This commit zeroes out the unused memory region in the buffer_head corresponding to the extent metablock after writing the extent header and the corresponding extent node entries. This is done to prevent random u

[PATCH 5.1 101/128] ipmi: Add the i2c-addr property for SSIF interfaces

2019-05-20 Thread Greg Kroah-Hartman
From: Corey Minyard commit d73236383eb1cd4b7b65c33a09f0ed45f6781f40 upstream. This is required for SSIF to work. There was no way to know if the interface being added was SI or SSIF from the platform data, but that was required so the i2c-addr is only added for SSIF interfaces. So add a field

[PATCH 5.1 106/128] tty: Dont force RISCV SBI console as preferred console

2019-05-20 Thread Greg Kroah-Hartman
From: Anup Patel commit f91253a3d005796404ae0e578b3394459b5f9b71 upstream. The Linux kernel will auto-disables all boot consoles whenever it gets a preferred real console. Currently on RISC-V systems, if we have a real console which is not RISCV SBI console then boot consoles (such as earlycon=

[PATCH 5.1 112/128] ALSA: hda/realtek - Fixup headphone noise via runtime suspend

2019-05-20 Thread Greg Kroah-Hartman
From: Kailang Yang commit dad3197da7a3817f27bb24f7fd3c135ffa707202 upstream. Dell platform with ALC298. system enter to runtime suspend. Headphone had noise. Let Headset Mic not shutup will solve this issue. [ Fixed minor coding style issues by tiwai ] Signed-off-by: Kailang Yang Cc: Signed-

[PATCH 5.1 085/128] ext4: make sanity check in mballoc more strict

2019-05-20 Thread Greg Kroah-Hartman
From: Jan Kara commit 31562b954b60f02acb91b7349dc6432d3f8c3c5f upstream. The sanity check in mb_find_extent() only checked that returned extent does not extend past blocksize * 8, however it should not extend past EXT4_CLUSTERS_PER_GROUP(sb). This can happen when clusters_per_group < blocksize *

[PATCH 5.1 102/128] ipmi:ssif: compare block number correctly for multi-part return messages

2019-05-20 Thread Greg Kroah-Hartman
From: Kamlakant Patel commit 55be8658c7e2feb11a5b5b33ee031791dbd23a69 upstream. According to ipmi spec, block number is a number that is incremented, starting with 0, for each new block of message data returned using the middle transaction. Here, the 'blocknum' is data[0] which always starts fr

[PATCH 5.1 114/128] jbd2: fix potential double free

2019-05-20 Thread Greg Kroah-Hartman
From: Chengguang Xu commit 0d52154bb0a700abb459a2cbce0a30fc2549b67e upstream. When failing from creating cache jbd2_inode_cache, we will destroy the previously created cache jbd2_handle_cache twice. This patch fixes this by moving each cache initialization/destruction to its own separate, indiv

[PATCH 5.1 110/128] ext4: avoid panic during forced reboot due to aborted journal

2019-05-20 Thread Greg Kroah-Hartman
From: Jan Kara commit 2c1d0e3631e5732dba98ef49ac0bec1388776793 upstream. Handling of aborted journal is a special code path different from standard ext4_error() one and it can call panic() as well. Commit 1dc1097ff60e ("ext4: avoid panic during forced reboot") forgot to update this path so fix t

[PATCH 5.1 111/128] ALSA: hda/realtek - Corrected fixup for System76 Gazelle (gaze14)

2019-05-20 Thread Greg Kroah-Hartman
From: Jeremy Soller commit 891afcf2462d2cc4ef7caf94215358ca61fa32cb upstream. A mistake was made in the identification of the four variants of the System76 Gazelle (gaze14). This patch corrects the PCI ID of the 17-inch, GTX 1660 Ti variant from 0x8560 to 0x8551. This patch also adds the correct

[PATCH 5.1 116/128] KVM: Fix the bitmap range to copy during clear dirty

2019-05-20 Thread Greg Kroah-Hartman
From: Peter Xu commit 4ddc9204572c33f2eb91fbdb1d99d8078388b67d upstream. kvm_dirty_bitmap_bytes() will return the size of the dirty bitmap of the memslot rather than the size of bitmap passed over from the ioctl. Here for KVM_CLEAR_DIRTY_LOG we should only copy exactly the size of bitmap that co

[PATCH 5.1 115/128] Revert "KVM: nVMX: Expose RDPMC-exiting only when guest supports PMU"

2019-05-20 Thread Greg Kroah-Hartman
From: Sean Christopherson commit f93f7ede087f2edcc18e4b02310df5749a6b5a61 upstream. The RDPMC-exiting control is dependent on the existence of the RDPMC instruction itself, i.e. is not tied to the "Architectural Performance Monitoring" feature. For all intents and purposes, the control exists o

[PATCH 5.1 118/128] KVM: lapic: Busy wait for timer to expire when using hv_timer

2019-05-20 Thread Greg Kroah-Hartman
From: Sean Christopherson commit ee66e453db13d4837a0dcf9d43efa7a88603161b upstream. ...now that VMX's preemption timer, i.e. the hv_timer, also adjusts its programmed time based on lapic_timer_advance_ns. Without the delay, a guest can see a timer interrupt arrive before the requested time when

[PATCH 5.1 120/128] kbuild: turn auto.conf.cmd into a mandatory include file

2019-05-20 Thread Greg Kroah-Hartman
From: Masahiro Yamada commit d2f8ae0e4c5c754f1b2a7b8388d19a1a977e698a upstream. syncconfig is responsible for keeping auto.conf up-to-date, so if it fails for any reason, the build must be terminated immediately. However, since commit 9390dff66a52 ("kbuild: invoke syncconfig if include/config/a

[PATCH 5.1 121/128] xen/pvh: set xen_domain_type to HVM in xen_pvh_init

2019-05-20 Thread Greg Kroah-Hartman
From: Roger Pau Monne commit c9f804d64bb93c8dbf957df1d7e9de11380e522d upstream. Or else xen_domain() returns false despite xen_pvh being set. Signed-off-by: Roger Pau Monné Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky Cc: sta...@vger.kernel.org # 4.19+ Signed-off-by: Greg Kroa

[PATCH 5.1 124/128] libnvdimm/namespace: Fix label tracking error

2019-05-20 Thread Greg Kroah-Hartman
From: Dan Williams commit c4703ce11c23423d4b46e3d59aef7979814fd608 upstream. Users have reported intermittent occurrences of DIMM initialization failures due to duplicate allocations of address capacity detected in the labels, or errors of the form below, both have the same root cause. nd n

[PATCH 5.1 123/128] powerpc/32s: fix flush_hash_pages() on SMP

2019-05-20 Thread Greg Kroah-Hartman
From: Christophe Leroy commit 397d2300b08cdee052053e362018cdb6dd65eea2 upstream. flush_hash_pages() runs with data translation off, so current task_struct has to be accesssed using physical address. Fixes: f7354ccac844 ("powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU") Cc: sta...@vger

[PATCH 5.1 126/128] s390/mm: convert to the generic get_user_pages_fast code

2019-05-20 Thread Greg Kroah-Hartman
From: Martin Schwidefsky commit 1a42010cdc26bb7e5912984f3c91b8c6d55f089a upstream. Define the gup_fast_permitted to check against the asce_limit of the mm attached to the current task, then replace the s390 specific gup code with the generic implementation in mm/gup.c. Signed-off-by: Martin Sch

[PATCH 5.1 082/128] tty: vt.c: Fix TIOCL_BLANKSCREEN console blanking if blankinterval == 0

2019-05-20 Thread Greg Kroah-Hartman
From: Yifeng Li commit 75ddbc1fb11efac87b611d48e9802f6fe2bb2163 upstream. Previously, in the userspace, it was possible to use the "setterm" command from util-linux to blank the VT console by default, using the following command. According to the man page, > The force option keeps the screen b

[PATCH 5.1 127/128] ext4: unsigned int compared against zero

2019-05-20 Thread Greg Kroah-Hartman
From: Colin Ian King commit fd2f28aec991f3fbc248df211550fbdfd58c upstream. There are two cases where u32 variables n and err are being checked for less than zero error values, the checks is always false because the variables are not signed. Fix this by making the variables ints. Addresses-C

[PATCH 5.1 088/128] ext4: avoid drop reference to iloc.bh twice

2019-05-20 Thread Greg Kroah-Hartman
From: Pan Bian commit 8c380ab4b7b59c0c602743810be1b712514eaebc upstream. The reference to iloc.bh has been dropped in ext4_mark_iloc_dirty. However, the reference is dropped again if error occurs during ext4_handle_dirty_metadata, which may result in use-after-free bugs. Fixes: fb265c9cb49e("ex

[PATCH 5.1 087/128] ext4: ignore e_value_offs for xattrs with value-in-ea-inode

2019-05-20 Thread Greg Kroah-Hartman
From: Theodore Ts'o commit e5d01196c0428a206f307e9ee5f6842964098ff0 upstream. In other places in fs/ext4/xattr.c, if e_value_inum is non-zero, the code ignores the value in e_value_offs. The e_value_offs *should* be zero, but we shouldn't depend upon it, since it might not be true in a corrupte

[PATCH 5.1 128/128] ext4: fix block validity checks for journal inodes using indirect blocks

2019-05-20 Thread Greg Kroah-Hartman
From: Theodore Ts'o commit 170417c8c7bb2cbbdd949bf5c443c0c8f24a203b upstream. Commit 345c0dbf3a30 ("ext4: protect journal inode's blocks using block_validity") failed to add an exception for the journal inode in ext4_check_blockref(), which is the function used by ext4_get_branch() for indirect

[PATCH 4.9 18/44] ALSA: hda/hdmi - Consider eld_valid when reporting jack event

2019-05-20 Thread Greg Kroah-Hartman
From: Hui Wang commit 7f641e26a6df9269cb25dd7a4b0a91d6586ed441 upstream. On the machines with AMD GPU or Nvidia GPU, we often meet this issue: after s3, there are 4 HDMI/DP audio devices in the gnome-sound-setting even there is no any monitors plugged. When this problem happens, we check the /p

[PATCH 5.1 117/128] KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes

2019-05-20 Thread Greg Kroah-Hartman
From: Sean Christopherson commit 11988499e62b310f3bf6f6d0a807a06d3f9ccc96 upstream. KVM allows userspace to violate consistency checks related to the guest's CPUID model to some degree. Generally speaking, userspace has carte blanche when it comes to guest state so long as jamming invalid state

[PATCH 5.1 113/128] ALSA: hda/realtek - Fix for Lenovo B50-70 inverted internal microphone bug

2019-05-20 Thread Greg Kroah-Hartman
From: Michał Wadowski commit 56df90b631fc027fe28b70d41352d820797239bb upstream. Add patch for realtek codec in Lenovo B50-70 that fixes inverted internal microphone channel. Device IdeaPad Y410P has the same PCI SSID as Lenovo B50-70, but first one is about fix the noise and it didn't seem help

[PATCH 5.1 104/128] mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock

2019-05-20 Thread Greg Kroah-Hartman
From: Mel Gorman commit 60fce36afa9c77c7ccbf980c4f670f3be3651fce upstream. syzbot reported the following error from a tree with a head commit of baf76f0c58ae ("slip: make slhc_free() silently accept an error pointer") BUG: unable to handle kernel paging request at ea0003348000 #PF error

[PATCH 5.1 109/128] ext4: fix use-after-free in dx_release()

2019-05-20 Thread Greg Kroah-Hartman
From: Sahitya Tummala commit 08fc98a4d6424af66eb3ac4e2cedd2fc927ed436 upstream. The buffer_head (frames[0].bh) and it's corresping page can be potentially free'd once brelse() is done inside the for loop but before the for loop exits in dx_release(). It can be free'd in another context, when the

[PATCH 5.1 108/128] ext4: fix data corruption caused by overlapping unaligned and aligned IO

2019-05-20 Thread Greg Kroah-Hartman
From: Lukas Czerner commit 57a0da28ced8707cb9f79f071a016b9d005caf5a upstream. Unaligned AIO must be serialized because the zeroing of partial blocks of unaligned AIO can result in data corruption in case it's overlapping another in flight IO. Currently we wait for all unwritten extents before w

[PATCH 5.1 090/128] ext4: actually request zeroing of inode table after grow

2019-05-20 Thread Greg Kroah-Hartman
From: Kirill Tkhai commit 310a997fd74de778b9a4848a64be9cda9f18764a upstream. It is never possible, that number of block groups decreases, since only online grow is supported. But after a growing occured, we have to zero inode tables for just created new block groups. Fixes: 19c5246d2516 ("ext4

[PATCH 5.1 091/128] ext4: fix ext4_show_options for file systems w/o journal

2019-05-20 Thread Greg Kroah-Hartman
From: Debabrata Banerjee commit 50b29d8f033a7c88c5bc011abc2068b1691ab755 upstream. Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as I assume was intended, all other options were blown away leading to _ext4_show_options() output being incorrect. Fixes: 1e381f60dad9 ("ext4:

[PATCH 5.1 119/128] smb3: display session id in debug data

2019-05-20 Thread Greg Kroah-Hartman
From: Steve French commit b63a9de02d64ecd5ff0749e90253f5b30ba5b9c0 upstream. Displaying the session id in /proc/fs/cifs/DebugData is needed in order to correlate Linux client information with network and server traces for many common support scenarios. Turned out to be very important for debugg

[PATCH 5.1 099/128] bcache: fix a race between cache register and cacheset unregister

2019-05-20 Thread Greg Kroah-Hartman
From: Liang Chen commit a4b732a248d12cbdb46999daf0bf288c011335eb upstream. There is a race between cache device register and cache set unregister. For an already registered cache device, register_bcache will call bch_is_open to iterate through all cachesets and check every cache there. The race

[PATCH 5.1 125/128] s390/mm: make the pxd_offset functions more robust

2019-05-20 Thread Greg Kroah-Hartman
From: Martin Schwidefsky commit d1874a0c2805fcfa9162c972d6b7541e57adb542 upstream. Change the way how pgd_offset, p4d_offset, pud_offset and pmd_offset walk the page tables. pgd_offset now always calculates the index for the top-level page table and adds it to the pgd, this is either a segment t

[PATCH 5.1 084/128] jbd2: check superblock mapped prior to committing

2019-05-20 Thread Greg Kroah-Hartman
From: Jiufei Xue commit 742b06b5628f2cd23cb51a034cb54dc33c6162c5 upstream. We hit a BUG at fs/buffer.c:3057 if we detached the nbd device before unmounting ext4 filesystem. The typical chain of events leading to the BUG: jbd2_write_superblock submit_bh submit_bh_wbc BUG_ON(!buffer_m

[PATCH 5.1 122/128] xen/pvh: correctly setup the PV EFI interface for dom0

2019-05-20 Thread Greg Kroah-Hartman
From: Roger Pau Monne commit 72813bfbf0276a97c82af038efb5f02dcdd9e310 upstream. This involves initializing the boot params EFI related fields and the efi global variable. Without this fix a PVH dom0 doesn't detect when booted from EFI, and thus doesn't support accessing any of the EFI related d

[PATCH 5.1 086/128] ext4: protect journal inodes blocks using block_validity

2019-05-20 Thread Greg Kroah-Hartman
From: Theodore Ts'o commit 345c0dbf3a30872d9b204db96b5857cd00808cae upstream. Add the blocks which belong to the journal inode to block_validity's system zone so attempts to deallocate or overwrite the journal due a corrupted file system where the journal blocks are also claimed by another inode

[PATCH 5.1 097/128] Btrfs: do not start a transaction at iterate_extent_inodes()

2019-05-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit bfc61c36260ca990937539cd648ede3cd749bc10 upstream. When finding out which inodes have references on a particular extent, done by backref.c:iterate_extent_inodes(), from the BTRFS_IOC_LOGICAL_INO (both v1 and v2) ioctl and from scrub we use the transaction join API to g

[PATCH 5.1 093/128] btrfs: Correctly free extent buffer in case btree_read_extent_buffer_pages fails

2019-05-20 Thread Greg Kroah-Hartman
From: Nikolay Borisov commit 537f38f019fa0b762dbb4c0fc95d7fcce9db8e2d upstream. If a an eb fails to be read for whatever reason - it's corrupted on disk and parent transid/key validations fail or IO for eb pages fail then this buffer must be removed from the buffer cache. Currently the code call

[PATCH 5.1 095/128] Btrfs: send, flush dellaloc in order to avoid data loss

2019-05-20 Thread Greg Kroah-Hartman
From: Filipe Manana commit 9f89d5de8631c7930898a601b6612e271aa2261c upstream. When we set a subvolume to read-only mode we do not flush dellaloc for any of its inodes (except if the filesystem is mounted with -o flushoncommit), since it does not affect correctness for any subsequent operations -

[PATCH 5.1 042/128] crypto: arm64/aes-neonbs - dont access already-freed walk.iv

2019-05-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit 4a8108b70508df0b6c4ffa4a3974dab93dcbe851 upstream. If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() can fail afterwards, and then if the caller

[PATCH 5.1 083/128] tty/vt: fix write/write race in ioctl(KDSKBSENT) handler

2019-05-20 Thread Greg Kroah-Hartman
From: Sergei Trofimovich commit 46ca3f735f345c9d87383dd3a09fa5d43870770e upstream. The bug manifests as an attempt to access deallocated memory: BUG: unable to handle kernel paging request at 9c8735448000 #PF error: [PROT] [WRITE] PGD 288a05067 P4D 288a05067 PUD 288a07067 PMD 7f

[PATCH 5.1 045/128] mmc: tegra: fix ddr signaling for non-ddr modes

2019-05-20 Thread Greg Kroah-Hartman
From: Sowjanya Komatineni commit 92cd1667d579af5c3ef383680598a112da3695df upstream. ddr_signaling is set to true for DDR50 and DDR52 modes but is not set back to false for other modes. This programs incorrect host clock when mode change happens from DDR52/DDR50 to other SDR or HS modes like inca

[PATCH 5.1 089/128] ext4: fix use-after-free race with debug_want_extra_isize

2019-05-20 Thread Greg Kroah-Hartman
From: Barret Rhoden commit 7bc04c5c2cc467c5b40f2b03ba08da174a0d5fa7 upstream. When remounting with debug_want_extra_isize, we were not performing the same checks that we do during a normal mount. That allowed us to set a value for s_want_extra_isize that reached outside the s_inode_size. Fixes

[PATCH 5.1 044/128] dt-bindings: mmc: Add disable-cqe-dcmd property.

2019-05-20 Thread Greg Kroah-Hartman
From: Christoph Muellner commit 28f22fb755ecf9f933f045bc0afdb8140641b01c upstream. Add disable-cqe-dcmd as optional property for MMC hosts. This property allows to disable or not enable the direct command features of the command queue engine. Signed-off-by: Christoph Muellner Signed-off-by: Ph

Re: [PATCH v2] mtd: rawnand: Add Macronix NAND read retry support

2019-05-20 Thread Miquel Raynal
Hi Mason, Mason Yang wrote on Fri, 17 May 2019 14:53:21 +0800: > Add support for Macronix NAND read retry. > > Macronix NANDs support specific read operation for data recovery, > which can be enabled/disabled with a SET/GET_FEATURE. > Driver checks byte 167 of Vendor Blocks in ONFI parameter pa

[PATCH 5.1 079/128] mtd: spi-nor: intel-spi: Avoid crossing 4K address boundary on read/write

2019-05-20 Thread Greg Kroah-Hartman
From: Alexander Sverdlin commit 2b75ebeea6f4937d4d05ec4982c471cef9a29b7f upstream. It was observed that reads crossing 4K address boundary are failing. This limitation is mentioned in Intel documents: Intel(R) 9 Series Chipset Family Platform Controller Hub (PCH) Datasheet: "5.26.3 Flash Acce

[PATCH v1] device property: Add helpers to count items in an array

2019-05-20 Thread Andy Shevchenko
The usual pattern to allocate the necessary space for an array of properties is to count them fist using: count = device_property_read_uXX_array(dev, propname, NULL, 0); Introduce helpers device_property_count_uXX() to count items by supplying hard coded last two parameters to device_property_r

[PATCH 5.1 041/128] crypto: arm/aes-neonbs - dont access already-freed walk.iv

2019-05-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit 767f015ea0b7ab9d60432ff6cd06b664fd71f50f upstream. If the user-provided IV needs to be aligned to the algorithm's alignmask, then skcipher_walk_virt() copies the IV into a new aligned buffer walk.iv. But skcipher_walk_virt() can fail afterwards, and then if the caller

[PATCH 5.1 081/128] mtd: maps: Allow MTD_PHYSMAP with MTD_RAM

2019-05-20 Thread Greg Kroah-Hartman
From: Chris Packham commit d41970097f10d898cef0eb04bf53d786efd6bbbc upstream. When the physmap_of_core.c code was merged into physmap-core.c the ability to use MTD_PHYSMAP_OF with only MTD_RAM selected was lost. Restore this by adding MTD_RAM to the dependencies of MTD_PHYSMAP. Fixes: commit 64

[PATCH 5.1 067/128] crypto: ccree - add function to handle cryptocell tee fips error

2019-05-20 Thread Greg Kroah-Hartman
From: Ofir Drang commit 897ab2316910a66bb048f1c9cefa25e6a592dcd7 upstream. Adds function that checks if cryptocell tee fips error occurred and in such case triggers system error through kernel panic. Change fips function to use this new routine. Signed-off-by: Ofir Drang Signed-off-by: Gilad B

Re: [PATCH] scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

2019-05-20 Thread John Garry
On 20/05/2019 13:06, Jason Yan wrote: OK. In case of "second fanout expander...", before this, we don't attempt to discover, and just disable the PHY. In that case, is the log proper? In that case the log is not proper. I think we can directly return in the case of "second fanout expander..

[PATCH 5.1 068/128] crypto: ccree - handle tee fips error during power management resume

2019-05-20 Thread Greg Kroah-Hartman
From: Ofir Drang commit 7138377ce10455b7183c6dde4b2c51b33f464c45 upstream. in order to support cryptocell tee fips error that may occurs while cryptocell ree is suspended, an cc_tee_handle_fips_error call added to the cc_pm_resume function. Signed-off-by: Ofir Drang Signed-off-by: Gilad Ben-Y

[PATCH 5.1 055/128] ASoC: RT5677-SPI: Disable 16Bit SPI Transfers

2019-05-20 Thread Greg Kroah-Hartman
From: Curtis Malainey commit a46eb523220e242affb9a6bc9bb8efc05f4f7459 upstream. The current algorithm allows 3 types of transfers, 16bit, 32bit and burst. According to Realtek, 16bit transfers have a special restriction in that it is restricted to the memory region of 0x1802 ~ 0x18021000. Th

[PATCH 5.1 074/128] userfaultfd: use RCU to free the task struct when fork fails

2019-05-20 Thread Greg Kroah-Hartman
From: Andrea Arcangeli commit c3f3ce049f7d97cc7ec9c01cb51d9ec74e0f37c2 upstream. The task structure is freed while get_mem_cgroup_from_mm() holds rcu_read_lock() and dereferences mm->owner. get_mem_cgroup_from_mm()failing fork() ---

[PATCH 5.1 062/128] crypto: ccree - dont map MAC key on stack

2019-05-20 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit 874e163759f27e0a9988c5d1f4605e3f25564fd2 upstream. The MAC hash key might be passed to us on stack. Copy it to a slab buffer before mapping to gurantee proper DMA mapping. Signed-off-by: Gilad Ben-Yossef Cc: sta...@vger.kernel.org # v4.19+ Signed-off-by: Herbert X

[PATCH 5.1 050/128] ALSA: hda/hdmi - Read the pin sense from register when repolling

2019-05-20 Thread Greg Kroah-Hartman
From: Hui Wang commit 8c2e6728c2bf95765b724e07d0278ae97cd1ee0d upstream. The driver will check the monitor presence when resuming from suspend, starting poll or interrupt triggers. In these 3 situations, the jack_dirty will be set to 1 first, then the hda_jack.c reads the pin_sense from register

[PATCH 5.1 061/128] crypto: ccree - fix mem leak on error path

2019-05-20 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit d574b707c873d6ef1a2a155f8cfcfecd821e9a2e upstream. Fix a memory leak on the error path of IV generation code. Signed-off-by: Gilad Ben-Yossef Cc: sta...@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccr

[PATCH 5.1 052/128] ALSA: hda/realtek - EAPD turn on later

2019-05-20 Thread Greg Kroah-Hartman
From: Kailang Yang commit 607ca3bd220f4022e6f5356026b19dafc363863a upstream. Let EAPD turn on after set pin output. [ NOTE: This change is supposed to reduce the possible click noises at (runtime) PM resume. The functionality should be same (i.e. the verbs are executed correctly) no matter

[PATCH 5.1 064/128] crypto: ccree - dont map AEAD key and IV on stack

2019-05-20 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit e8662a6a5f8f7f2cadc0edb934aef622d96ac3ee upstream. The AEAD authenc key and IVs might be passed to us on stack. Copy it to a slab buffer before mapping to gurantee proper DMA mapping. Signed-off-by: Gilad Ben-Yossef Cc: sta...@vger.kernel.org # v4.19+ Signed-off-b

[PATCH 5.1 049/128] ALSA: usb-audio: Fix a memory leak bug

2019-05-20 Thread Greg Kroah-Hartman
From: Wenwen Wang commit cb5173594d50c72b7bfa14113dfc5084b4d2f726 upstream. In parse_audio_selector_unit(), the string array 'namelist' is allocated through kmalloc_array(), and each string pointer in this array, i.e., 'namelist[]', is allocated through kmalloc() in the following for loop. Then,

[PATCH 5.1 048/128] ALSA: line6: toneport: Fix broken usage of timer for delayed execution

2019-05-20 Thread Greg Kroah-Hartman
From: Takashi Iwai commit 7f84ff68be05ec7a5d2acf8fdc734fe5897af48f upstream. The line6 toneport driver has code for some delayed initialization, and this hits the kernel Oops because mutex and other sleepable functions are used in the timer callback. Fix the abuse by a delayed work instead so t

net: atm: Spectre v1 fix introduced bug in bcb964012d1b in -stable

2019-05-20 Thread Pavel Machek
In lecd_attach, if arg is < 0, it was treated as 0. Spectre v1 fix changed that. Bug does not exist in mainline AFAICT. Signed-off-by: Pavel Machek # for 4.19.y diff --git a/net/atm/lec.c b/net/atm/lec.c index ad4f829193f0..ed279cd912f4 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c @@ -731,7 +

[PATCH 5.1 009/128] ARM: dts: exynos: Fix audio routing on Odroid XU3

2019-05-20 Thread Greg Kroah-Hartman
From: Sylwester Nawrocki commit 34dc82257488ccbdfb6ecdd087b3c8b371e03ee3 upstream. Add missing audio routing entry for the capture stream, this change is required to fix audio recording on Odroid XU3/XU3-Lite. Fixes: 885b005d232c ("ARM: dts: exynos: Add support for secondary DAI to Odroid XU3"

[PATCH 5.1 005/128] arm64: dts: rockchip: fix IO domain voltage setting of APIO5 on rockpro64

2019-05-20 Thread Greg Kroah-Hartman
From: Katsuhiro Suzuki commit 798689e45190756c2eca6656ee4c624370a5012a upstream. This patch fixes IO domain voltage setting that is related to audio_gpio3d4a_ms (bit 1) of GRF_IO_VSEL. This is because RockPro64 schematics P.16 says that regulator supplies 3.0V power to APIO5_VDD. So audio_gpio3

[PATCH 5.1 007/128] ARM: dts: qcom: ipq4019: enlarge PCIe BAR range

2019-05-20 Thread Greg Kroah-Hartman
From: Christian Lamparter commit f3e35357cd460a8aeb48b8113dc4b761a7d5c828 upstream. David Bauer reported that the VDSL modem (attached via PCIe) on his AVM Fritz!Box 7530 was complaining about not having enough space in the BAR. A closer inspection of the old qcom-ipq40xx.dtsi pulled from the GL

[PATCH 5.1 030/128] crypto: ccp - Do not free psp_master when PLATFORM_INIT fails

2019-05-20 Thread Greg Kroah-Hartman
From: Singh, Brijesh commit f5a2aeb8b254c764772729a6e48d4e0c914bb56a upstream. Currently, we free the psp_master if the PLATFORM_INIT fails during the SEV FW probe. If psp_master is freed then driver does not invoke the PSP FW. As per SEV FW spec, there are several commands (PLATFORM_RESET, PLAT

[PATCH 5.1 035/128] crypto: arm64/gcm-aes-ce - fix no-NEON fallback code

2019-05-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit 580e295178402d14bbf598a5702f8e01fc59dbaa upstream. The arm64 gcm-aes-ce algorithm is failing the extra crypto self-tests following my patches to test the !may_use_simd() code paths, which previously were untested. The problem is that in the !may_use_simd() case, an odd

[PATCH 5.1 015/128] arm64: mmap: Ensure file offset is treated as unsigned

2019-05-20 Thread Greg Kroah-Hartman
From: Boyang Zhou commit f08cae2f28db24d95be5204046b60618d8de4ddc upstream. The file offset argument to the arm64 sys_mmap() implementation is scaled from bytes to pages by shifting right by PAGE_SHIFT. Unfortunately, the offset is passed in as a signed 'off_t' type and therefore large offsets (

[PATCH 5.1 017/128] arm64: compat: Reduce address limit

2019-05-20 Thread Greg Kroah-Hartman
From: Vincenzo Frascino commit d263119387de9975d2acba1dfd3392f7c5979c18 upstream. Currently, compat tasks running on arm64 can allocate memory up to TASK_SIZE_32 (UL(0x1)). This means that mmap() allocations, if we treat them as returning an array, are not compliant with the sections 6.

[PATCH 5.1 022/128] x86/MCE/AMD: Dont report L1 BTB MCA errors on some family 17h models

2019-05-20 Thread Greg Kroah-Hartman
From: Yazen Ghannam commit 71a84402b93e5fbd8f817f40059c137e10171788 upstream. AMD family 17h Models 10h-2Fh may report a high number of L1 BTB MCA errors under certain conditions. The errors are benign and can safely be ignored. However, the high error rate may cause the MCA threshold counter to

Re: [PATCH v4 3/3] i2c-ocores: sifive: add polling mode workaround for FU540-C000 SoC

2019-05-20 Thread Andrew Lunn
> @@ -406,7 +416,7 @@ static int ocores_xfer(struct i2c_adapter *adap, > { > struct ocores_i2c *i2c = i2c_get_adapdata(adap); > > - if (i2c->flags & OCORES_FLAG_POLL) > + if ((i2c->flags & (OCORES_FLAG_POLL | OCORES_FLAG_BROKEN_IRQ))) > return ocores_xfer_polling(adap

[PATCH 5.0 110/123] KVM: Fix the bitmap range to copy during clear dirty

2019-05-20 Thread Greg Kroah-Hartman
From: Peter Xu commit 4ddc9204572c33f2eb91fbdb1d99d8078388b67d upstream. kvm_dirty_bitmap_bytes() will return the size of the dirty bitmap of the memslot rather than the size of bitmap passed over from the ioctl. Here for KVM_CLEAR_DIRTY_LOG we should only copy exactly the size of bitmap that co

[PATCH 5.0 101/123] tty: Dont force RISCV SBI console as preferred console

2019-05-20 Thread Greg Kroah-Hartman
From: Anup Patel commit f91253a3d005796404ae0e578b3394459b5f9b71 upstream. The Linux kernel will auto-disables all boot consoles whenever it gets a preferred real console. Currently on RISC-V systems, if we have a real console which is not RISCV SBI console then boot consoles (such as earlycon=

[PATCH 5.0 123/123] ext4: dont update s_rev_level if not required

2019-05-20 Thread Greg Kroah-Hartman
From: Andreas Dilger commit c9e716eb9b3455a83ed7c5f5a81256a3da779a95 upstream. Don't update the superblock s_rev_level during mount if it isn't actually necessary, only if superblock features are being set by the kernel. This was originally added for ext3 since it always set the INCOMPAT_RECOVE

[PATCH 5.0 109/123] jbd2: fix potential double free

2019-05-20 Thread Greg Kroah-Hartman
From: Chengguang Xu commit 0d52154bb0a700abb459a2cbce0a30fc2549b67e upstream. When failing from creating cache jbd2_inode_cache, we will destroy the previously created cache jbd2_handle_cache twice. This patch fixes this by moving each cache initialization/destruction to its own separate, indiv

[PATCH 5.0 122/123] ext4: fix compile error when using BUFFER_TRACE

2019-05-20 Thread Greg Kroah-Hartman
From: zhangyi (F) commit ddccb6dbe780d68133191477571cb7c69e17bb8c upstream. Fix compile error below when using BUFFER_TRACE. fs/ext4/inode.c: In function ‘ext4_expand_extra_isize’: fs/ext4/inode.c:5979:19: error: request for member ‘bh’ in something not a structure or union BUFFER_TRACE(iloc

[PATCH 5.0 104/123] ext4: fix use-after-free in dx_release()

2019-05-20 Thread Greg Kroah-Hartman
From: Sahitya Tummala commit 08fc98a4d6424af66eb3ac4e2cedd2fc927ed436 upstream. The buffer_head (frames[0].bh) and it's corresping page can be potentially free'd once brelse() is done inside the for loop but before the for loop exits in dx_release(). It can be free'd in another context, when the

[PATCH 5.1 013/128] power: supply: axp288_charger: Fix unchecked return value

2019-05-20 Thread Greg Kroah-Hartman
From: Gustavo A. R. Silva commit c3422ad5f84a66739ec6a37251ca27638c85b6be upstream. Currently there is no check on platform_get_irq() return value in case it fails, hence never actually reporting any errors and causing unexpected behavior when using such value as argument for function regmap_irq

[PATCH 5.1 010/128] ARM: dts: exynos: Fix audio (microphone) routing on Odroid XU3

2019-05-20 Thread Greg Kroah-Hartman
From: Sylwester Nawrocki commit 9b23e1a3e8fde76e8cc0e366ab1ed4ffb4440feb upstream. The name of CODEC input widget to which microphone is connected through the "Headphone" jack is "IN12" not "IN1". This fixes microphone support on Odroid XU3. Cc: # v4.14+ Signed-off-by: Sylwester Nawrocki Sign

[PATCH 5.0 112/123] KVM: lapic: Busy wait for timer to expire when using hv_timer

2019-05-20 Thread Greg Kroah-Hartman
From: Sean Christopherson commit ee66e453db13d4837a0dcf9d43efa7a88603161b upstream. ...now that VMX's preemption timer, i.e. the hv_timer, also adjusts its programmed time based on lapic_timer_advance_ns. Without the delay, a guest can see a timer interrupt arrive before the requested time when

[PATCH 5.0 118/123] s390/mm: make the pxd_offset functions more robust

2019-05-20 Thread Greg Kroah-Hartman
From: Martin Schwidefsky commit d1874a0c2805fcfa9162c972d6b7541e57adb542 upstream. Change the way how pgd_offset, p4d_offset, pud_offset and pmd_offset walk the page tables. pgd_offset now always calculates the index for the top-level page table and adds it to the pgd, this is either a segment t

[PATCH 5.0 065/123] crypto: ccree - add function to handle cryptocell tee fips error

2019-05-20 Thread Greg Kroah-Hartman
From: Ofir Drang commit 897ab2316910a66bb048f1c9cefa25e6a592dcd7 upstream. Adds function that checks if cryptocell tee fips error occurred and in such case triggers system error through kernel panic. Change fips function to use this new routine. Signed-off-by: Ofir Drang Signed-off-by: Gilad B

[PATCH 5.0 057/123] bpf, arm64: remove prefetch insn in xadd mapping

2019-05-20 Thread Greg Kroah-Hartman
From: Daniel Borkmann commit 8968c67a82ab7501bc3b9439c3624a49b42fe54c upstream. Prefetch-with-intent-to-write is currently part of the XADD mapping in the AArch64 JIT and follows the kernel's implementation of atomic_add. This may interfere with other threads executing the LDXR/STXR loop, leadin

[PATCH 5.0 097/123] bcache: never set KEY_PTRS of journal key to 0 in journal_reclaim()

2019-05-20 Thread Greg Kroah-Hartman
From: Coly Li commit 1bee2addc0c8470c8aaa65ef0599eeae96dd88bc upstream. In journal_reclaim() ja->cur_idx of each cache will be update to reclaim available journal buckets. Variable 'int n' is used to count how many cache is successfully reclaimed, then n is set to c->journal.key by SET_KEY_PTRS(

[PATCH 5.0 099/123] crypto: ccm - fix incompatibility between "ccm" and "ccm_base"

2019-05-20 Thread Greg Kroah-Hartman
From: Eric Biggers commit 6a1faa4a43f5fabf9cbeaa742d916e7b5e73120f upstream. CCM instances can be created by either the "ccm" template, which only allows choosing the block cipher, e.g. "ccm(aes)"; or by "ccm_base", which allows choosing the ctr and cbcmac implementations, e.g. "ccm_base(ctr(aes

[PATCH 5.0 063/123] crypto: ccree - pm resume first enable the source clk

2019-05-20 Thread Greg Kroah-Hartman
From: Ofir Drang commit 7766dd774d80463cec7b81d90c8672af91de2da1 upstream. On power management resume function first enable the device clk source to allow access to the device registers. Signed-off-by: Ofir Drang Signed-off-by: Gilad Ben-Yossef Cc: sta...@vger.kernel.org # v4.19+ Signed-off-b

[PATCH v2] brcmfmac: fix typos in code comments

2019-05-20 Thread Weitao Hou
fix lengh to length Signed-off-by: Weitao Hou --- - fix prefix --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwil.c b/drivers/net/wireless/broadcom/brcm80211/brcmfm

[PATCH 5.0 074/123] mfd: da9063: Fix OTP control register names to match datasheets for DA9063/63L

2019-05-20 Thread Greg Kroah-Hartman
From: Steve Twiss commit 6b4814a9451add06d457e198be418bf6a3e6a990 upstream. Mismatch between what is found in the Datasheets for DA9063 and DA9063L provided by Dialog Semiconductor, and the register names provided in the MFD registers file. The changes are for the OTP (one-time-programming) cont

[PATCH 5.0 072/123] userfaultfd: use RCU to free the task struct when fork fails

2019-05-20 Thread Greg Kroah-Hartman
From: Andrea Arcangeli commit c3f3ce049f7d97cc7ec9c01cb51d9ec74e0f37c2 upstream. The task structure is freed while get_mem_cgroup_from_mm() holds rcu_read_lock() and dereferences mm->owner. get_mem_cgroup_from_mm()failing fork() ---

[PATCH 5.0 068/123] mm/huge_memory: fix vmf_insert_pfn_{pmd, pud}() crash, handle unaligned addresses

2019-05-20 Thread Greg Kroah-Hartman
From: Dan Williams commit fce86ff5802bac3a7b19db171aa1949ef9caac31 upstream. Starting with c6f3c5ee40c1 ("mm/huge_memory.c: fix modifying of page protection by insert_pfn_pmd()") vmf_insert_pfn_pmd() internally calls pmdp_set_access_flags(). That helper enforces a pmd aligned @address argument

[PATCH 5.0 059/123] crypto: ccree - fix mem leak on error path

2019-05-20 Thread Greg Kroah-Hartman
From: Gilad Ben-Yossef commit d574b707c873d6ef1a2a155f8cfcfecd821e9a2e upstream. Fix a memory leak on the error path of IV generation code. Signed-off-by: Gilad Ben-Yossef Cc: sta...@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- drivers/crypto/ccr

[PATCH 5.0 080/123] tty/vt: fix write/write race in ioctl(KDSKBSENT) handler

2019-05-20 Thread Greg Kroah-Hartman
From: Sergei Trofimovich commit 46ca3f735f345c9d87383dd3a09fa5d43870770e upstream. The bug manifests as an attempt to access deallocated memory: BUG: unable to handle kernel paging request at 9c8735448000 #PF error: [PROT] [WRITE] PGD 288a05067 P4D 288a05067 PUD 288a07067 PMD 7f

[PATCH 5.0 088/123] ext4: fix ext4_show_options for file systems w/o journal

2019-05-20 Thread Greg Kroah-Hartman
From: Debabrata Banerjee commit 50b29d8f033a7c88c5bc011abc2068b1691ab755 upstream. Instead of removing EXT4_MOUNT_JOURNAL_CHECKSUM from s_def_mount_opt as I assume was intended, all other options were blown away leading to _ext4_show_options() output being incorrect. Fixes: 1e381f60dad9 ("ext4:

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