summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2017-05-15Merge remote-tracking branch 'origin/tmp-285c137' into msm-4.4Kyle Yan
* origin/tmp-285c137: Linux 4.4.68 block: get rid of blk_integrity_revalidate() drm/ttm: fix use-after-free races in vm fault handling f2fs: sanity check segment count bnxt_en: allocate enough space for ->ntp_fltr_bmap ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf ipv6: initialize route null entry in addrconf_init() rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string ipv4, ipv6: ensure raw socket message is big enough to hold an IP header tcp: do not inherit fastopen_req from parent tcp: fix wraparound issue in tcp_lp bpf, arm64: fix jit branch offset related to ldimm64 tcp: do not underestimate skb->truesize in tcp_trim_head() ALSA: hda - Fix deadlock of controller device lock at unbinding staging: emxx_udc: remove incorrect __init annotations staging: wlan-ng: add missing byte order conversion brcmfmac: Make skb header writable before use brcmfmac: Ensure pointer correctly set if skb data location changes MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m serial: 8250_omap: Fix probe and remove for PM runtime phy: qcom-usb-hs: Add depends on EXTCON USB: serial: io_edgeport: fix descriptor error handling USB: serial: mct_u232: fix modem-status error handling USB: serial: quatech2: fix control-message error handling USB: serial: ftdi_sio: fix latency-timer error handling USB: serial: ark3116: fix open error handling USB: serial: ti_usb_3410_5052: fix control-message error handling USB: serial: io_edgeport: fix epic-descriptor handling USB: serial: ssu100: fix control-message error handling USB: serial: digi_acceleport: fix incomplete rx sanity check USB: serial: keyspan_pda: fix receive sanity checks usb: chipidea: Handle extcon events properly usb: chipidea: Only read/write OTGSC from one place usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths KVM: nVMX: do not leak PML full vmexit to L1 KVM: nVMX: initialize PML fields in vmcs02 Revert "KVM: nested VMX: disable perf cpuid reporting" x86/platform/intel-mid: Correct MSI IRQ line for watchdog device kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed clk: Make x86/ conditional on CONFIG_COMMON_CLK x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0 x86/ioapic: Restore IO-APIC irq_chip retrigger callback mwifiex: Avoid skipping WEP key deletion for AP mwifiex: remove redundant dma padding in AMSDU mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build leds: ktd2692: avoid harmless maybe-uninitialized warning power: supply: bq24190_charger: Handle fault before status on interrupt power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread() power: supply: bq24190_charger: Call power_supply_changed() for relevant component power: supply: bq24190_charger: Install irq_handler_thread() at end of probe() power: supply: bq24190_charger: Call set_mode_host() on pm_resume() power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING powerpc/powernv: Fix opal_exit tracepoint opcode cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode 9p: fix a potential acl leak ANDROID: android-base.cfg: remove spurious CONFIG_MODULES line ANDROID: memory_state_time: fix undefined behavior with missing DT properties ANDROID: rfkill: fix unused function warning ANDROID: make PF_KEY SHA256 use RFC-compliant truncation. ANDROID: sdcardfs: fix sdcardfs_destroy_inode for the inode RCU approach ANDROID: android-base.cfg: remove NETFILTER_XT_MATCH_QUOTA2_LOG ANDROID: sdcardfs: Don't iput if we didn't igrab ANDROID: Add untag hacks to inet_release function Change-Id: I6d750f8bb186774ff9630beeb0ed8e680af26231 Signed-off-by: Kyle Yan <kyan@codeaurora.org>
2017-05-15Merge 4.4.68 into android-4.4Greg Kroah-Hartman
Changes in 4.4.68 9p: fix a potential acl leak ARM: 8452/3: PJ4: make coprocessor access sequences buildable in Thumb2 mode cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores powerpc/powernv: Fix opal_exit tracepoint opcode power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING power: supply: bq24190_charger: Call set_mode_host() on pm_resume() power: supply: bq24190_charger: Install irq_handler_thread() at end of probe() power: supply: bq24190_charger: Call power_supply_changed() for relevant component power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread() power: supply: bq24190_charger: Handle fault before status on interrupt leds: ktd2692: avoid harmless maybe-uninitialized warning ARM: OMAP5 / DRA7: Fix HYP mode boot for thumb2 build mwifiex: debugfs: Fix (sometimes) off-by-1 SSID print mwifiex: remove redundant dma padding in AMSDU mwifiex: Avoid skipping WEP key deletion for AP x86/ioapic: Restore IO-APIC irq_chip retrigger callback x86/pci-calgary: Fix iommu_free() comparison of unsigned expression >= 0 clk: Make x86/ conditional on CONFIG_COMMON_CLK kprobes/x86: Fix kernel panic when certain exception-handling addresses are probed x86/platform/intel-mid: Correct MSI IRQ line for watchdog device Revert "KVM: nested VMX: disable perf cpuid reporting" KVM: nVMX: initialize PML fields in vmcs02 KVM: nVMX: do not leak PML full vmexit to L1 usb: host: ehci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths usb: chipidea: Only read/write OTGSC from one place usb: chipidea: Handle extcon events properly USB: serial: keyspan_pda: fix receive sanity checks USB: serial: digi_acceleport: fix incomplete rx sanity check USB: serial: ssu100: fix control-message error handling USB: serial: io_edgeport: fix epic-descriptor handling USB: serial: ti_usb_3410_5052: fix control-message error handling USB: serial: ark3116: fix open error handling USB: serial: ftdi_sio: fix latency-timer error handling USB: serial: quatech2: fix control-message error handling USB: serial: mct_u232: fix modem-status error handling USB: serial: io_edgeport: fix descriptor error handling phy: qcom-usb-hs: Add depends on EXTCON serial: 8250_omap: Fix probe and remove for PM runtime scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m MIPS: R2-on-R6 MULTU/MADDU/MSUBU emulation bugfix brcmfmac: Ensure pointer correctly set if skb data location changes brcmfmac: Make skb header writable before use staging: wlan-ng: add missing byte order conversion staging: emxx_udc: remove incorrect __init annotations ALSA: hda - Fix deadlock of controller device lock at unbinding tcp: do not underestimate skb->truesize in tcp_trim_head() bpf, arm64: fix jit branch offset related to ldimm64 tcp: fix wraparound issue in tcp_lp tcp: do not inherit fastopen_req from parent ipv4, ipv6: ensure raw socket message is big enough to hold an IP header rtnetlink: NUL-terminate IFLA_PHYS_PORT_NAME string ipv6: initialize route null entry in addrconf_init() ipv6: reorder ip6_route_dev_notifier after ipv6_dev_notf bnxt_en: allocate enough space for ->ntp_fltr_bmap f2fs: sanity check segment count drm/ttm: fix use-after-free races in vm fault handling block: get rid of blk_integrity_revalidate() Linux 4.4.68 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-05-14block: get rid of blk_integrity_revalidate()Ilya Dryomov
commit 19b7ccf8651df09d274671b53039c672a52ad84d upstream. Commit 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") introduced blk_integrity_revalidate(), which seems to assume ownership of the stable pages flag and unilaterally clears it if no blk_integrity profile is registered: if (bi->profile) disk->queue->backing_dev_info->capabilities |= BDI_CAP_STABLE_WRITES; else disk->queue->backing_dev_info->capabilities &= ~BDI_CAP_STABLE_WRITES; It's called from revalidate_disk() and rescan_partitions(), making it impossible to enable stable pages for drivers that support partitions and don't use blk_integrity: while the call in revalidate_disk() can be trivially worked around (see zram, which doesn't support partitions and hence gets away with zram_revalidate_disk()), rescan_partitions() can be triggered from userspace at any time. This breaks rbd, where the ceph messenger is responsible for generating/verifying CRCs. Since blk_integrity_{un,}register() "must" be used for (un)registering the integrity profile with the block layer, move BDI_CAP_STABLE_WRITES setting there. This way drivers that call blk_integrity_register() and use integrity infrastructure won't interfere with drivers that don't but still want stable pages. Fixes: 25520d55cdb6 ("block: Inline blk_integrity in struct gendisk") Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Mike Snitzer <snitzer@redhat.com> Tested-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> [idryomov@gmail.com: backport to < 4.11: bdi is embedded in queue] Signed-off-by: Jens Axboe <axboe@fb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-14f2fs: sanity check segment countJin Qian
commit b9dd46188edc2f0d1f37328637860bb65a771124 upstream. F2FS uses 4 bytes to represent block address. As a result, supported size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments. Signed-off-by: Jin Qian <jinqian@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-149p: fix a potential acl leakCong Wang
commit b5c66bab72a6a65edb15beb60b90d3cb84c5763b upstream. posix_acl_update_mode() could possibly clear 'acl', if so we leak the memory pointed by 'acl'. Save this pointer before calling posix_acl_update_mode() and release the memory if 'acl' really gets cleared. Link: http://lkml.kernel.org/r/1486678332-2430-1-git-send-email-xiyou.wangcong@gmail.com Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Reported-by: Mark Salyzyn <salyzyn@android.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Greg Kurz <groug@kaod.org> Cc: Eric Van Hensbergen <ericvh@gmail.com> Cc: Ron Minnich <rminnich@sandia.gov> Cc: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-11Merge "Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4'"Linux Build Service Account
2017-05-10Merge "Merge branch 'android-4.4@24ac44d' into branch 'msm-4.4'"Linux Build Service Account
2017-05-10ANDROID: sdcardfs: fix sdcardfs_destroy_inode for the inode RCU approachGao Xiang
According to the following commits, fs: icache RCU free inodes vfs: fix the stupidity with i_dentry in inode destructors sdcardfs_destroy_inode should be fixed for the fast path safety. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Change-Id: I84f43c599209d23737c7e28b499dd121cb43636d
2017-05-09Merge branch 'android-4.4@9796ea8' into branch 'msm-4.4'Blagovest Kolenichev
* refs/heads/9796ea8 Linux 4.4.67 dm ioctl: prevent stack leak in dm ioctl call nfsd: stricter decoding of write-like NFSv2/v3 ops nfsd4: minor NFSv2/v3 write decoding cleanup ext4/fscrypto: avoid RCU lookup in d_revalidate ext4 crypto: use dget_parent() in ext4_d_revalidate() ext4 crypto: revalidate dentry after adding or removing the key ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY IB/ehca: fix maybe-uninitialized warnings IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE netlink: Allow direct reclaim for fallback allocation 8250_pci: Fix potential use-after-free in error path scsi: cxlflash: Improve EEH recovery time scsi: cxlflash: Fix to avoid EEH and host reset collisions scsi: cxlflash: Scan host only after the port is ready for I/O net: tg3: avoid uninitialized variable warning mtd: avoid stack overflow in MTD CFI code drbd: avoid redefinition of BITS_PER_PAGE ALSA: ppc/awacs: shut up maybe-uninitialized warning ASoC: intel: Fix PM and non-atomic crash in bytcr drivers Handle mismatched open calls timerfd: Protect the might cancel mechanism proper ANDROID: android-base.cfg: remove USB_OTG_WAKELOCK ANDROID: android-base.cfg: remove defunct options ANDROID: arm64: suspend: Restore the UAO state ANDROID: usb: gadget: f_audio_source: disable the CPU C-states upon playback ANDROID: usb: gadget: f_mtp: Set 0xFFFFFFFF in mtp header ContainerLength field Conflicts: drivers/usb/gadget/function/f_mtp.c fs/ext4/crypto.c Change-Id: I408054176798ba49f0b62fb46a3b0d59060d108e Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-05-09ANDROID: sdcardfs: Don't iput if we didn't igrabDaniel Roseberg
If we fail to get top, top is either NULL, or igrab found that we're in the process of freeing that inode, and did not grab it. Either way, we didn't grab it, and have no business putting it. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 38117720 Change-Id: Ie2f587483b9abb5144263156a443e89bc69b767b
2017-05-08Merge 4.4.67 into android-4.4Greg Kroah-Hartman
Changes in 4.4.67: timerfd: Protect the might cancel mechanism proper Handle mismatched open calls ASoC: intel: Fix PM and non-atomic crash in bytcr drivers ALSA: ppc/awacs: shut up maybe-uninitialized warning drbd: avoid redefinition of BITS_PER_PAGE mtd: avoid stack overflow in MTD CFI code net: tg3: avoid uninitialized variable warning scsi: cxlflash: Scan host only after the port is ready for I/O scsi: cxlflash: Fix to avoid EEH and host reset collisions scsi: cxlflash: Improve EEH recovery time 8250_pci: Fix potential use-after-free in error path netlink: Allow direct reclaim for fallback allocation IB/qib: rename BITS_PER_PAGE to RVT_BITS_PER_PAGE IB/ehca: fix maybe-uninitialized warnings ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICY ext4 crypto: revalidate dentry after adding or removing the key ext4 crypto: use dget_parent() in ext4_d_revalidate() ext4/fscrypto: avoid RCU lookup in d_revalidate nfsd4: minor NFSv2/v3 write decoding cleanup nfsd: stricter decoding of write-like NFSv2/v3 ops dm ioctl: prevent stack leak in dm ioctl call Linux 4.4.67 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-05-08nfsd: stricter decoding of write-like NFSv2/v3 opsJ. Bruce Fields
commit 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 upstream. The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could be negative. Add checks to catch these. Reported-by: Tuomas Haanpää <thaan@synopsys.com> Reported-by: Ari Kauppi <ari@synopsys.com> Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08nfsd4: minor NFSv2/v3 write decoding cleanupJ. Bruce Fields
commit db44bac41bbfc0c0d9dd943092d8bded3c9db19b upstream. Use a couple shortcuts that will simplify a following bugfix. (Minor backporting required to account for a change from f34b95689d2c "The NFSv2/NFSv3 server does not handle zero length WRITE requests correctly".) Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08ext4/fscrypto: avoid RCU lookup in d_revalidateJaegeuk Kim
commit 03a8bb0e53d9562276045bdfcf2b5de2e4cff5a1 upstream. As Al pointed, d_revalidate should return RCU lookup before using d_inode. This was originally introduced by: commit 34286d666230 ("fs: rcu-walk aware d_revalidate method"). Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08ext4 crypto: use dget_parent() in ext4_d_revalidate()Theodore Ts'o
commit 3d43bcfef5f0548845a425365011c499875491b0 upstream. This avoids potential problems caused by a race where the inode gets renamed out from its parent directory and the parent directory is deleted while ext4_d_revalidate() is running. Fixes: 28b4c263961c Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08ext4 crypto: revalidate dentry after adding or removing the keyTheodore Ts'o
commit 28b4c263961c47da84ed8b5be0b5116bad1133eb upstream. Add a validation check for dentries for encrypted directory to make sure we're not caching stale data after a key has been added or removed. Also check to make sure that status of the encryption key is updated when readdir(2) is executed. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08ext4: require encryption feature for EXT4_IOC_SET_ENCRYPTION_POLICYRichard Weinberger
commit 9a200d075e5d05be1fcad4547a0f8aee4e2f9a04 upstream. ...otherwise an user can enable encryption for certain files even when the filesystem is unable to support it. Such a case would be a filesystem created by mkfs.ext4's default settings, 1KiB block size. Ext4 supports encyption only when block size is equal to PAGE_SIZE. But this constraint is only checked when the encryption feature flag is set. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08Handle mismatched open callsSachin Prabhu
commit 38bd49064a1ecb67baad33598e3d824448ab11ec upstream. A signal can interrupt a SendReceive call which result in incoming responses to the call being ignored. This is a problem for calls such as open which results in the successful response being ignored. This results in an open file resource on the server. The patch looks into responses which were cancelled after being sent and in case of successful open closes the open fids. For this patch, the check is only done in SendReceive2() RH-bz: 1403319 Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Acked-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-08timerfd: Protect the might cancel mechanism properThomas Gleixner
commit 1e38da300e1e395a15048b0af1e5305bd91402f6 upstream. The handling of the might_cancel queueing is not properly protected, so parallel operations on the file descriptor can race with each other and lead to list corruptions or use after free. Protect the context for these operations with a seperate lock. The wait queue lock cannot be reused for this because that would create a lock inversion scenario vs. the cancel lock. Replacing might_cancel with an atomic (atomic_t or atomic bit) does not help either because it still can race vs. the actual list operation. Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: "linux-fsdevel@vger.kernel.org" Cc: syzkaller <syzkaller@googlegroups.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1701311521430.3457@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-04Merge branch 'android-4.4@24ac44d' into branch 'msm-4.4'Blagovest Kolenichev
* refs/heads/tmp-24ac44d Linux 4.4.66 ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram ARCv2: save r30 on kernel entry as gcc uses it for code-gen nfsd: check for oversized NFSv2/v3 arguments Input: i8042 - add Clevo P650RS to the i8042 reset list p9_client_readdir() fix MIPS: Avoid BUG warning in arch_check_elf MIPS: KGDB: Use kernel context for sleeping threads ALSA: seq: Don't break snd_use_lock_sync() loop by timeout ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type ipv6: check raw payload size correctly in ioctl ipv6: check skb->protocol before lookup for nexthop macvlan: Fix device ref leak when purging bc_queue ip6mr: fix notification device destruction netpoll: Check for skb->queue_mapping net: ipv6: RTF_PCPU should not be settable from userspace dp83640: don't recieve time stamps twice tcp: clear saved_syn in tcp_disconnect() sctp: listen on the sock only when it's state is listening or closed net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given l2tp: fix PPP pseudo-wire auto-loading l2tp: take reference on sessions being dumped net/packet: fix overflow in check for tp_reserve net/packet: fix overflow in check for tp_frame_nr l2tp: purge socket queues in the .destruct() callback net: phy: handle state correctly in phy_stop_machine net: neigh: guard against NULL solicit() method sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write() sparc64: kern_addr_valid regression xen/x86: don't lose event interrupts usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize regulator: core: Clear the supply pointer if enabling fails RDS: Fix the atomicity for congestion map update net_sched: close another race condition in tcf_mirred_release() net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata MIPS: Fix crash registers on non-crashing CPUs md:raid1: fix a dead loop when read from a WriteMostly disk ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea() drm/amdgpu: fix array out of bounds crypto: testmgr - fix out of bound read in __test_aead() clk: sunxi: Add apb0 gates for H3 ARM: OMAP2+: timer: add probe for clocksources xc2028: unlock on error in xc2028_set_config() f2fs: do more integrity verification for superblock net: pppolac/pppopns: Add back the msg_flags Conflicts: drivers/regulator/core.c Change-Id: I8e7b279efa442a0338ee735d27ff3ebe866a8dee Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-05-04Merge "fs/mbcache: fix use after free issue in mb_cache_shrink_scan()"Linux Build Service Account
2017-05-03Merge "Merge branch 'android-4.4@e4528dd' into branch 'msm-4.4'"Linux Build Service Account
2017-05-04fs/mbcache: fix use after free issue in mb_cache_shrink_scan()Sahitya Tummala
Fix the below potential race between these two contexts - mb_cache_entry_get() and mb_cache_shrink_scan(), which results into use after free issue. task a: mb_cache_shrink_scan() |--if(!list_empty(&mb_cache_lru_list)) |--get the ce entry |--list_del_init(&ce->e_lru_list); |--check ce->e_used, ce->e_queued, ce->e_refcnt and continue -> gets prempted here task b: ext4_xattr_release_block() |--mb_cache_entry_get() |--get ce from hlist_bl_for_each_entry() |--increment ce->e_used and list_del_init(&ce->e_lru_list) |--mb_cache_entry_free() |--hlist_bl_lock(ce->e_block_hash_p); -> results into use after free Also, fix similar potential race between mb_cache_entry_alloc() and mb_cache_entry_get() in case if cache->c_max_entries is reached. Change-Id: I01049bae5d914cfb8494ab299ec2e068745d1110 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-05-03Merge 4.4.66 into android-4.4Greg Kroah-Hartman
Changes in 4.4.66: f2fs: do more integrity verification for superblock xc2028: unlock on error in xc2028_set_config() ARM: OMAP2+: timer: add probe for clocksources clk: sunxi: Add apb0 gates for H3 crypto: testmgr - fix out of bound read in __test_aead() drm/amdgpu: fix array out of bounds ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea() md:raid1: fix a dead loop when read from a WriteMostly disk MIPS: Fix crash registers on non-crashing CPUs net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata net_sched: close another race condition in tcf_mirred_release() RDS: Fix the atomicity for congestion map update regulator: core: Clear the supply pointer if enabling fails usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize xen/x86: don't lose event interrupts sparc64: kern_addr_valid regression sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write() net: neigh: guard against NULL solicit() method net: phy: handle state correctly in phy_stop_machine l2tp: purge socket queues in the .destruct() callback net/packet: fix overflow in check for tp_frame_nr net/packet: fix overflow in check for tp_reserve l2tp: take reference on sessions being dumped l2tp: fix PPP pseudo-wire auto-loading net: ipv4: fix multipath RTM_GETROUTE behavior when iif is given sctp: listen on the sock only when it's state is listening or closed tcp: clear saved_syn in tcp_disconnect() dp83640: don't recieve time stamps twice net: ipv6: RTF_PCPU should not be settable from userspace netpoll: Check for skb->queue_mapping ip6mr: fix notification device destruction macvlan: Fix device ref leak when purging bc_queue ipv6: check skb->protocol before lookup for nexthop ipv6: check raw payload size correctly in ioctl ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type ALSA: seq: Don't break snd_use_lock_sync() loop by timeout MIPS: KGDB: Use kernel context for sleeping threads MIPS: Avoid BUG warning in arch_check_elf p9_client_readdir() fix Input: i8042 - add Clevo P650RS to the i8042 reset list nfsd: check for oversized NFSv2/v3 arguments ARCv2: save r30 on kernel entry as gcc uses it for code-gen ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram Linux 4.4.66 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-05-02nfsd: check for oversized NFSv2/v3 argumentsJ. Bruce Fields
commit e6838a29ecb484c97e4efef9429643b9851fba6e upstream. A client can append random data to the end of an NFSv2 or NFSv3 RPC call without our complaining; we'll just stop parsing at the end of the expected data and ignore the rest. Encoded arguments and replies are stored together in an array of pages, and if a call is too large it could leave inadequate space for the reply. This is normally OK because NFS RPC's typically have either short arguments and long replies (like READ) or long arguments and short replies (like WRITE). But a client that sends an incorrectly long reply can violate those assumptions. This was observed to cause crashes. Also, several operations increment rq_next_page in the decode routine before checking the argument size, which can leave rq_next_page pointing well past the end of the page array, causing trouble later in svc_free_pages. So, following a suggestion from Neil Brown, add a central check to enforce our expectation that no NFSv2/v3 call has both a large call and a large reply. As followup we may also want to rewrite the encoding routines to check more carefully that they aren't running off the end of the page array. We may also consider rejecting calls that have any extra garbage appended. That would be safer, and within our rights by spec, but given the age of our server and the NFS protocol, and the fact that we've never enforced this before, we may need to balance that against the possibility of breaking some oddball client. Reported-by: Tuomas Haanpää <thaan@synopsys.com> Reported-by: Ari Kauppi <ari@synopsys.com> Reviewed-by: NeilBrown <neilb@suse.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-02ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea()Theodore Ts'o
commit 9e92f48c34eb2b9af9d12f892e2fe1fce5e8ce35 upstream. We aren't checking to see if the in-inode extended attribute is corrupted before we try to expand the inode's extra isize fields. This can lead to potential crashes caused by the BUG_ON() check in ext4_xattr_shift_entries(). Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-02f2fs: do more integrity verification for superblockChao Yu
commit 9a59b62fd88196844cee5fff851bee2cfd7afb6e upstream. Do more sanity check for superblock during ->mount. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-02Merge "fs: ecryptfs: Cache to be cleared after file write"Linux Build Service Account
2017-05-02Merge branch 'android-4.4@e4528dd' into branch 'msm-4.4'Blagovest Kolenichev
* refs/heads/tmp-e4528dd: Linux 4.4.65 perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race ping: implement proper locking staging/android/ion : fix a race condition in the ion driver vfio/pci: Fix integer overflows, bitmask check tipc: check minimum bearer MTU netfilter: nfnetlink: correctly validate length of batch messages xc2028: avoid use after free mnt: Add a per mount namespace limit on the number of mounts tipc: fix socket timer deadlock tipc: fix random link resets while adding a second bearer gfs2: avoid uninitialized variable warning hostap: avoid uninitialized variable use in hfa384x_get_rid tty: nozomi: avoid a harmless gcc warning tipc: correct error in node fsm tipc: re-enable compensation for socket receive buffer double counting tipc: make dist queue pernet tipc: make sure IPv6 header fits in skb headroom ANDROID: uid_sys_stats: fix access of task_uid(task) BACKPORT: f2fs: sanity check log_blocks_per_seg Linux 4.4.64 tipc: fix crash during node removal block: fix del_gendisk() vs blkdev_ioctl crash x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions hv: don't reset hv_context.tsc_page on crash Drivers: hv: balloon: account for gaps in hot add regions Drivers: hv: balloon: keep track of where ha_region starts Tools: hv: kvp: ensure kvp device fd is closed on exec kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction ubi/upd: Always flush after prepared for an update mac80211: reject ToDS broadcast data frames mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card ACPI / power: Avoid maybe-uninitialized warning Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled VSOCK: Detach QP check should filter out non matching QPs. Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg() Drivers: hv: get rid of timeout in vmbus_open() Drivers: hv: don't leak memory in vmbus_establish_gpadl() s390/mm: fix CMMA vs KSM vs others CIFS: remove bad_network_name flag cifs: Do not send echoes before Negotiate is complete ring-buffer: Have ring_buffer_iter_empty() return true when empty tracing: Allocate the snapshot buffer before enabling probe KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings KEYS: Change the name of the dead type to ".dead" to prevent user access KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings ANDROID: sdcardfs: Call lower fs's revalidate ANDROID: sdcardfs: Avoid setting GIDs outside of valid ranges ANDROID: sdcardfs: Copy meta-data from lower inode Revert "Revert "Android: sdcardfs: Don't do d_add for lower fs"" ANDROID: sdcardfs: Use filesystem specific hash ANDROID: AVB error handler to invalidate vbmeta partition. ANDROID: Update init/do_mounts_dm.c to the latest ChromiumOS version. Revert "[RFC]cgroup: Change from CAP_SYS_NICE to CAP_SYS_RESOURCE for cgroup migration permissions" Conflicts: drivers/md/Makefile Change-Id: I8f5ed53cb8b6cc66914f10c6ac820003b87b8759 Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-05-02fs: ecryptfs: Cache to be cleared after file writeNeeraj Soni
This ensures that caches are maintained and no stale data is present. Change-Id: Ie8e92197a5a4179d422a523d3d6dad48bdf0b5d2 Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2017-04-30Merge 4.4.65 into android-4.4Greg Kroah-Hartman
Changes in 4.4.65: tipc: make sure IPv6 header fits in skb headroom tipc: make dist queue pernet tipc: re-enable compensation for socket receive buffer double counting tipc: correct error in node fsm tty: nozomi: avoid a harmless gcc warning hostap: avoid uninitialized variable use in hfa384x_get_rid gfs2: avoid uninitialized variable warning tipc: fix random link resets while adding a second bearer tipc: fix socket timer deadlock mnt: Add a per mount namespace limit on the number of mounts xc2028: avoid use after free netfilter: nfnetlink: correctly validate length of batch messages tipc: check minimum bearer MTU vfio/pci: Fix integer overflows, bitmask check staging/android/ion : fix a race condition in the ion driver ping: implement proper locking perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Linux 4.4.65 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-04-30mnt: Add a per mount namespace limit on the number of mountsEric W. Biederman
commit d29216842a85c7970c536108e093963f02714498 upstream. CAI Qian <caiqian@redhat.com> pointed out that the semantics of shared subtrees make it possible to create an exponentially increasing number of mounts in a mount namespace. mkdir /tmp/1 /tmp/2 mount --make-rshared / for i in $(seq 1 20) ; do mount --bind /tmp/1 /tmp/2 ; done Will create create 2^20 or 1048576 mounts, which is a practical problem as some people have managed to hit this by accident. As such CVE-2016-6213 was assigned. Ian Kent <raven@themaw.net> described the situation for autofs users as follows: > The number of mounts for direct mount maps is usually not very large because of > the way they are implemented, large direct mount maps can have performance > problems. There can be anywhere from a few (likely case a few hundred) to less > than 10000, plus mounts that have been triggered and not yet expired. > > Indirect mounts have one autofs mount at the root plus the number of mounts that > have been triggered and not yet expired. > > The number of autofs indirect map entries can range from a few to the common > case of several thousand and in rare cases up to between 30000 and 50000. I've > not heard of people with maps larger than 50000 entries. > > The larger the number of map entries the greater the possibility for a large > number of active mounts so it's not hard to expect cases of a 1000 or somewhat > more active mounts. So I am setting the default number of mounts allowed per mount namespace at 100,000. This is more than enough for any use case I know of, but small enough to quickly stop an exponential increase in mounts. Which should be perfect to catch misconfigurations and malfunctioning programs. For anyone who needs a higher limit this can be changed by writing to the new /proc/sys/fs/mount-max sysctl. Tested-by: CAI Qian <caiqian@redhat.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> [bwh: Backported to 4.4: adjust context] Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-30gfs2: avoid uninitialized variable warningArnd Bergmann
commit 67893f12e5374bbcaaffbc6e570acbc2714ea884 upstream. We get a bogus warning about a potential uninitialized variable use in gfs2, because the compiler does not figure out that we never use the leaf number if get_leaf_nr() returns an error: fs/gfs2/dir.c: In function 'get_first_leaf': fs/gfs2/dir.c:802:9: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized] fs/gfs2/dir.c: In function 'dir_split_leaf': fs/gfs2/dir.c:1021:8: warning: 'leaf_no' may be used uninitialized in this function [-Wmaybe-uninitialized] Changing the 'if (!error)' to 'if (!IS_ERR_VALUE(error))' is sufficient to let gcc understand that this is exactly the same condition as in IS_ERR() so it can optimize the code path enough to understand it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28Merge "Merge branch 'android-4.4@b834e92' into branch 'msm-4.4'"Linux Build Service Account
2017-04-27Merge "fs/dcache: Fix indefinite wait in d_invalidate()"Linux Build Service Account
2017-04-27BACKPORT: f2fs: sanity check log_blocks_per_segJin Qian
f2fs currently only supports 4KB block size and 2MB segment size. Sanity check log_blocks_per_seg == 9, i.e. 2MB/4KB = (1 << 9) Partially (cherry-picked from commit 9a59b62fd88196844cee5fff851bee2cfd7afb6e) f2fs: do more integrity verification for superblock Do more sanity check for superblock during ->mount. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Bug: 36817013 Change-Id: I0be52e54fba82083068337ceb9f7ad985a87319f Signed-off-by: Jin Qian <jinqian@google.com>
2017-04-27Merge "Merge branch 'android-4.4@c71ad0f' into branch 'msm-4.4'"Linux Build Service Account
2017-04-27Merge 4.4.64 into android-4.4Greg Kroah-Hartman
Changes in 4.4.64: KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings KEYS: Change the name of the dead type to ".dead" to prevent user access KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings tracing: Allocate the snapshot buffer before enabling probe ring-buffer: Have ring_buffer_iter_empty() return true when empty cifs: Do not send echoes before Negotiate is complete CIFS: remove bad_network_name flag s390/mm: fix CMMA vs KSM vs others Drivers: hv: don't leak memory in vmbus_establish_gpadl() Drivers: hv: get rid of timeout in vmbus_open() Drivers: hv: vmbus: Reduce the delay between retries in vmbus_post_msg() VSOCK: Detach QP check should filter out non matching QPs. Input: elantech - add Fujitsu Lifebook E547 to force crc_enabled ACPI / power: Avoid maybe-uninitialized warning mmc: sdhci-esdhc-imx: increase the pad I/O drive strength for DDR50 card mac80211: reject ToDS broadcast data frames ubi/upd: Always flush after prepared for an update powerpc/kprobe: Fix oops when kprobed on 'stdu' instruction x86/mce/AMD: Give a name to MCA bank 3 when accessed with legacy MSRs kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd Tools: hv: kvp: ensure kvp device fd is closed on exec Drivers: hv: balloon: keep track of where ha_region starts Drivers: hv: balloon: account for gaps in hot add regions hv: don't reset hv_context.tsc_page on crash x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions block: fix del_gendisk() vs blkdev_ioctl crash tipc: fix crash during node removal Linux 4.4.64 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2017-04-27CIFS: remove bad_network_name flagGermano Percossi
commit a0918f1ce6a43ac980b42b300ec443c154970979 upstream. STATUS_BAD_NETWORK_NAME can be received during node failover, causing the flag to be set and making the reconnect thread always unsuccessful, thereafter. Once the only place where it is set is removed, the remaining bits are rendered moot. Removing it does not prevent "mount" from failing when a non existent share is passed. What happens when the share really ceases to exist while the share is mounted is undefined now as much as it was before. Signed-off-by: Germano Percossi <germano.percossi@citrix.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-27cifs: Do not send echoes before Negotiate is completeSachin Prabhu
commit 62a6cfddcc0a5313e7da3e8311ba16226fe0ac10 upstream. commit 4fcd1813e640 ("Fix reconnect to not defer smb3 session reconnect long after socket reconnect") added support for Negotiate requests to be initiated by echo calls. To avoid delays in calling echo after a reconnect, I added the patch introduced by the commit b8c600120fc8 ("Call echo service immediately after socket reconnect"). This has however caused a regression with cifs shares which do not have support for echo calls to trigger Negotiate requests. On connections which need to call Negotiation, the echo calls trigger an error which triggers a reconnect which in turn triggers another echo call. This results in a loop which is only broken when an operation is performed on the cifs share. For an idle share, it can DOS a server. The patch uses the smb_operation can_echo() for cifs so that it is called only if connection has been already been setup. kernel bz: 194531 Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Tested-by: Jonathan Liu <net147@gmail.com> Acked-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-26ANDROID: sdcardfs: Call lower fs's revalidateDaniel Rosenberg
We should be calling the lower filesystem's revalidate inside of sdcardfs's revalidate, as wrapfs does. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35766959 Change-Id: I939d1c4192fafc1e21678aeab43fe3d588b8e2f4
2017-04-26ANDROID: sdcardfs: Avoid setting GIDs outside of valid rangesDaniel Rosenberg
When setting up the ownership of files on the lower filesystem, ensure that these values are in reasonable ranges for apps. If they aren't, default to AID_MEDIA_RW Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 37516160 Change-Id: I0bec76a61ac72aff0b993ab1ad04be8382178a00
2017-04-26ANDROID: sdcardfs: Copy meta-data from lower inodeDaniel Rosenberg
From wrapfs commit 3ee9b365e38c ("Wrapfs: properly copy meta-data after AIO operations from lower inode") Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 35766959 Change-Id: I9a789222e27a17b8d85ce61c45397d1839f9a675
2017-04-26Revert "Revert "Android: sdcardfs: Don't do d_add for lower fs""Daniel Rosenberg
This reverts commit ffa75fdb9c408f49b9622b6d55752ed99ff61488. Turns out we just needed the right hash. Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 37231161 Change-Id: I6a6de7f7df99ad42b20fa062913b219f64020c31
2017-04-26ANDROID: sdcardfs: Use filesystem specific hashDaniel Rosenberg
We weren't accounting for FS specific hash functions, causing us to miss negative dentries for any FS that had one. Similar to a patch from esdfs commit 75bd25a9476d ("esdfs: support lower's own hash") Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I32d1ba304d728e0ca2648cacfb4c2e441ae63608
2017-04-25Merge branch 'android-4.4@b834e92' into branch 'msm-4.4'Blagovest Kolenichev
* refs/heads/tmp-b834e92 Revert "USB: gadget: u_ether: Fix data stall issue in RNDIS tethering mode" Linux 4.4.63 MIPS: fix Select HAVE_IRQ_EXIT_ON_IRQ_STACK patch. sctp: deny peeloff operation on asocs with threads sleeping on it net: ipv6: check route protocol when deleting routes tty/serial: atmel: RS485 half duplex w/DMA: enable RX after TX is done SUNRPC: fix refcounting problems with auth_gss messages. ibmveth: calculate gso_segs for large packets catc: Use heap buffer for memory size test catc: Combine failure cleanup code in catc_probe() rtl8150: Use heap buffers for all register access pegasus: Use heap buffers for all register access virtio-console: avoid DMA from stack dvb-usb-firmware: don't do DMA on stack dvb-usb: don't use stack for firmware load mm: Tighten x86 /dev/mem with zeroing reads rtc: tegra: Implement clock handling platform/x86: acer-wmi: setup accelerometer when machine has appropriate notify event ext4: fix inode checksum calculation problem if i_extra_size is small dvb-usb-v2: avoid use-after-free ath9k: fix NULL pointer dereference crypto: ahash - Fix EINPROGRESS notification callback powerpc: Disable HFSCR[TM] if TM is not supported zram: do not use copy_page with non-page aligned address kvm: fix page struct leak in handle_vmon Revert "MIPS: Lantiq: Fix cascaded IRQ setup" char: lack of bool string made CONFIG_DEVPORT always on char: Drop bogus dependency of DEVPORT on !M68K ftrace: Fix removing of second function probe irqchip/irq-imx-gpcv2: Fix spinlock initialization libnvdimm: fix reconfig_mutex, mmap_sem, and jbd2_handle lockdep splat xen, fbfront: fix connecting to backend scsi: sd: Fix capacity calculation with 32-bit sector_t scsi: sd: Consider max_xfer_blocks if opt_xfer_blocks is unusable scsi: sr: Sanity check returned mode data iscsi-target: Drop work-around for legacy GlobalSAN initiator iscsi-target: Fix TMR reference leak during session shutdown acpi, nfit, libnvdimm: fix interleave set cookie calculation (64-bit comparison) x86/vdso: Plug race between mapping and ELF header setup x86/vdso: Ensure vdso32_enabled gets set to valid values only perf/x86: Avoid exposing wrong/stale data in intel_pmu_lbr_read_32() Input: xpad - add support for Razer Wildcat gamepad CIFS: store results of cifs_reopen_file to avoid infinite wait drm/nouveau/mmu/nv4a: use nv04 mmu rather than the nv44 one drm/nouveau/mpeg: mthd returns true on success now thp: fix MADV_DONTNEED vs clear soft dirty race cgroup, kthread: close race window where new kthreads can be migrated to non-root cgroups ANDROID: uid_sys_stats: reduce update_io_stats overhead UPSTREAM: char: lack of bool string made CONFIG_DEVPORT always on UPSTREAM: char: Drop bogus dependency of DEVPORT on !M68K Revert "Android: sdcardfs: Don't do d_add for lower fs" ANDROID: usb: gadget: fix MTP enumeration issue under super speed mode Android: sdcardfs: Don't complain in fixup_lower_ownership Android: sdcardfs: Don't do d_add for lower fs ANDROID: sdcardfs: ->iget fixes Android: sdcardfs: Change cache GID value BACKPORT: [UPSTREAM] ext2: convert to mbcache2 BACKPORT [UPSTREAM] ext4: convert to mbcache2 BACKPORT: [UPSTREAM] mbcache2: reimplement mbcache Linux 4.4.62 ibmveth: set correct gso_size and gso_type net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions net/mlx4_core: Fix racy CQ (Completion Queue) free net/mlx4_en: Fix bad WQE issue usb: hub: Wait for connection to be reestablished after port reset blk-mq: Avoid memory reclaim when remapping queues net/packet: fix overflow in check for priv area size crypto: caam - fix RNG deinstantiation error checking MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK MIPS: Switch to the irq_stack in interrupts MIPS: Only change $28 to thread_info if coming from user mode MIPS: Stack unwinding while on IRQ stack MIPS: Introduce irq_stack mtd: bcm47xxpart: fix parsing first block after aligned TRX usb: dwc3: gadget: delay unmap of bounced requests drm/i915: Stop using RP_DOWN_EI on Baytrail drm/i915: Avoid tweaking evaluation thresholds on Baytrail v3 UPSTREAM: net: socket: Make unnecessarily global sockfs_setattr() static UPSTREAM: net: ipv4: Don't crash if passing a null sk to ip_do_redirect. UPSTREAM: net/packet: fix overflow in check for priv area size Linux 4.4.61 mm/mempolicy.c: fix error handling in set_mempolicy and mbind. MIPS: Flush wrong invalid FTLB entry for huge page MIPS: Lantiq: fix missing xbar kernel panic MIPS: End spinlocks with .insn MIPS: ralink: Fix typos in rt3883 pinctrl MIPS: Force o32 fp64 support on 32bit MIPS64r6 kernels s390/uaccess: get_user() should zero on failure (again) s390/decompressor: fix initrd corruption caused by bss clear nios2: reserve boot memory for device tree powerpc: Don't try to fix up misaligned load-with-reservation instructions powerpc/mm: Add missing global TLB invalidate if cxl is active metag/usercopy: Add missing fixups metag/usercopy: Fix src fixup in from user rapf loops metag/usercopy: Set flags before ADDZ metag/usercopy: Zero rest of buffer from copy_from_user metag/usercopy: Add early abort to copy_to_user metag/usercopy: Fix alignment error checking metag/usercopy: Drop unused macros ring-buffer: Fix return value check in test_ringbuffer() ptrace: fix PTRACE_LISTEN race corrupting task->state Reset TreeId to zero on SMB2 TREE_CONNECT iio: bmg160: reset chip when probing arm/arm64: KVM: Take mmap_sem in kvm_arch_prepare_memory_region arm/arm64: KVM: Take mmap_sem in stage2_unmap_vm staging: android: ashmem: lseek failed due to no FMODE_LSEEK. sysfs: be careful of error returns from ops->show() drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl() drm/vmwgfx: Remove getparam error message drm/ttm, drm/vmwgfx: Relax permission checking when opening surfaces drm/vmwgfx: avoid calling vzalloc with a 0 size in vmw_get_cap_3d_ioctl() drm/vmwgfx: NULL pointer dereference in vmw_surface_define_ioctl() drm/vmwgfx: Type-check lookups of fence objects Revert "Revert "Revert "CHROMIUM: android: binder: Fix potential scheduling-while-atomic""" ANDROID: sdcardfs: Directly pass lower file for mmap UPSTREAM: checkpatch: special audit for revert commit line UPSTREAM: PM / sleep: make PM notifiers called symmetrically Revert "Revert "CHROMIUM: android: binder: Fix potential scheduling-while-atomic"" Linux 4.4.60 padata: avoid race in reordering blk: Ensure users for current->bio_list can see the full list. blk: improve order of bio handling in generic_make_request() power: reset: at91-poweroff: timely shutdown LPDDR memories KVM: kvm_io_bus_unregister_dev() should never fail rtc: s35390a: improve irq handling rtc: s35390a: implement reset routine as suggested by the reference rtc: s35390a: make sure all members in the output are set rtc: s35390a: fix reading out alarm MIPS: Lantiq: Fix cascaded IRQ setup mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() drm/radeon: Override fpfn for all VRAM placements in radeon_evict_flags KVM: x86: clear bus pointer when destroyed USB: fix linked-list corruption in rh_call_control() tty/serial: atmel: fix TX path in atmel_console_write() tty/serial: atmel: fix race condition (TX+DMA) ACPI: Do not create a platform_device for IOAPIC/IOxAPIC ACPI: Fix incompatibility with mcount-based function graph tracing ASoC: atmel-classd: fix audio clock rate ALSA: hda - fix a problem for lineout on a Dell AIO machine ALSA: seq: Fix race during FIFO resize scsi: libsas: fix ata xfer length scsi: sg: check length passed to SG_NEXT_CMD_LEN scsi: mpt3sas: fix hang on ata passthrough commands xen/setup: Don't relocate p2m over existing one libceph: force GFP_NOIO for socket allocations Linux 4.4.59 sched/rt: Add a missing rescheduling point fscrypt: remove broken support for detecting keyring key revocation metag/ptrace: Reject partial NT_METAG_RPIPE writes metag/ptrace: Provide default TXSTATUS for short NT_PRSTATUS metag/ptrace: Preserve previous registers for short regset write sparc/ptrace: Preserve previous registers for short regset write mips/ptrace: Preserve previous registers for short regset write h8300/ptrace: Fix incorrect register transfer count c6x/ptrace: Remove useless PTRACE_SETREGSET implementation pinctrl: qcom: Don't clear status bit on irq_unmask virtio_balloon: init 1st buffer in stats vq xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window xfrm: policy: init locks early Conflicts: drivers/scsi/sd.c drivers/usb/gadget/function/f_mtp.c drivers/usb/gadget/function/u_ether.c Change-Id: I80501cf02d04204f8c0f3a7f5a036eaa4d54546e Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-04-25fs/dcache: Fix indefinite wait in d_invalidate()Sahitya Tummala
In the path of task exit, the proc dentries corresponding to this task will be killed by moving it to a shrink list. If those dentries are already claimed by another task for shrinking, the exiting task waits in a tight loop until those dentries are killed. This can potentially result in a deadlock if those dentries are corresponding to an RT task but the task which is shrinking those dentries is a lower priority task. Fix this by not doing tight loop, if our dentries are claimed by other task. Change-Id: If6848521469db7dea2bbba0dbaf8597094716267 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2017-04-24Merge "ANDROID: fix acl leaks"Linux Build Service Account
2017-04-21Merge "FROMLIST: 9p: fix a potential acl leak"Linux Build Service Account
2017-04-21ANDROID: fix acl leaksMark Salyzyn
Fixes regressions associated with commit 073931017b49 ("posix_acl: Clear SGID bit when setting file permissions") Signed-off-by: Mark Salyzyn <salyzyn@google.com> Bug: 32458736 Change-Id: I6ee127dfdf3594d24ccd8560541ac554c5b05eb6 [d-cagle@codeaurora.org: Resolve merge conflicts] Git-repo: https://android.googlesource.com/kernel/msm/ Git-commit: 74d0e4d3d96d0ca82d39635318a69d55e966b767 Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>