mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge 5.4.52 into android11-5.4
Changes in 5.4.52 KVM: s390: reduce number of IO pins to 1 spi: spi-fsl-dspi: Adding shutdown hook spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer regmap: fix alignment issue perf/x86/rapl: Move RAPL support to common x86 code perf/x86/rapl: Fix RAPL config variable bug ARM: dts: omap4-droid4: Fix spi configuration and increase rate drm/ttm: Fix dma_fence refcnt leak when adding move fence drm/tegra: hub: Do not enable orphaned window group gpu: host1x: Detach driver on unregister drm: mcde: Fix display initialization problem ASoC: SOF: Intel: add PCI ID for CometLake-S ALSA: hda: Intel: add missing PCI IDs for ICL-H, TGL-H and EKL spi: spidev: fix a race between spidev_release and spidev_remove spi: spidev: fix a potential use-after-free in spidev_release() net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy net: ethernet: mvneta: Add 2500BaseX support for SoCs without comphy ixgbe: protect ring accesses with READ- and WRITE_ONCE i40e: protect ring accesses with READ- and WRITE_ONCE ibmvnic: continue to init in CRQ reset returns H_CLOSED powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL iommu/vt-d: Don't apply gfx quirks to untrusted devices drm: panel-orientation-quirks: Add quirk for Asus T101HA panel drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003 s390/kasan: fix early pgm check handler execution cifs: update ctime and mtime during truncate ARM: imx6: add missing put_device() call in imx6q_suspend_init() scsi: mptscsih: Fix read sense data size usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work block: release bip in a right way in error path nvme-rdma: assign completion vector correctly x86/entry: Increase entry_stack size to a full page sched/core: Check cpus_mask, not cpus_ptr in __set_cpus_allowed_ptr(), to fix mask corruption net: qrtr: Fix an out of bounds read qrtr_endpoint_post() gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2 gpio: pca953x: Fix GPIO resource leak on Intel Galileo Gen 2 nl80211: don't return err unconditionally in nl80211_start_ap() drm/mediatek: Check plane visibility in atomic_update bpf, sockmap: RCU splat with redirect and strparser error or TLS bpf, sockmap: RCU dereferenced psock may be used outside RCU block netfilter: ipset: call ip_set_free() instead of kfree() net: mvneta: fix use of state->speed net: cxgb4: fix return error value in t4_prep_fw IB/sa: Resolv use-after-free in ib_nl_make_request() net: dsa: microchip: set the correct number of ports netfilter: conntrack: refetch conntrack after nf_conntrack_update() perf report TUI: Fix segmentation fault in perf_evsel__hists_browse() perf intel-pt: Fix recording PEBS-via-PT with registers perf intel-pt: Fix PEBS sample for XMM registers smsc95xx: check return value of smsc95xx_reset smsc95xx: avoid memory leak in smsc95xx_bind net: hns3: add a missing uninit debugfs when unload driver net: hns3: fix use-after-free when doing self test ALSA: compress: fix partial_drain completion state RDMA/siw: Fix reporting vendor_part_id arm64: kgdb: Fix single-step exception handling oops nbd: Fix memory leak in nbd_add_socket cxgb4: fix all-mask IP address comparison IB/mlx5: Fix 50G per lane indication qed: Populate nvm-file attributes while reading nvm config partition. net/mlx5: Fix eeprom support for SFP module net/mlx5e: Fix 50G per lane indication bnxt_en: fix NULL dereference in case SR-IOV configuration fails net: macb: fix wakeup test in runtime suspend/resume routines net: macb: mark device wake capable when "magic-packet" property present net: macb: fix call to pm_runtime in the suspend/resume functions mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON() mlxsw: pci: Fix use-after-free in case of failed devlink reload IB/hfi1: Do not destroy hfi1_wq when the device is shut down IB/hfi1: Do not destroy link_wq when the device is shut down ALSA: opl3: fix infoleak in opl3 ALSA: hda - let hs_mic be picked ahead of hp_mic ALSA: usb-audio: add quirk for MacroSilicon MS2109 ALSA: usb-audio: Add implicit feedback quirk for RTX6001 ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VC ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VC KVM: arm64: Fix definition of PAGE_HYP_DEVICE KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART KVM: arm64: Annotate hyp NMI-related functions as __always_inline KVM: x86: bit 8 of non-leaf PDPEs is not reserved KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode KVM: x86: Mark CR4.TSD as being possibly owned by the guest KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE kallsyms: Refactor kallsyms_show_value() to take cred module: Refactor section attr into bin attribute module: Do not expose section addresses to non-CAP_SYSLOG kprobes: Do not expose probe addresses to non-CAP_SYSLOG bpf: Check correct cred for CAP_SYSLOG in bpf_dump_raw_ok() Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb" btrfs: fix fatal extent_buffer readahead vs releasepage race btrfs: fix double put of block group with nocow drm/radeon: fix double free drm/amdgpu: don't do soft recovery if gpu_recovery=0 dm: use noio when sending kobject event mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE ARC: elf: use right ELF_ARCH s390/setup: init jump labels before command line parsing s390/mm: fix huge pte soft dirty copying blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight() dm writecache: reject asynchronous pmem devices perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result pwm: jz4740: Fix build failure s390: Change s390_kernel_write() return type to match memcpy() s390/maccess: add no DAT mode to kernel_write Linux 5.4.52 Signed-off-by: Greg Kroah-Hartman <[email protected]> Change-Id: Ib10c465a3556b5c55d6d6c2ec37b6061b32ca75f
This commit is contained in:
commit
c7725aece3
116 changed files with 1025 additions and 491 deletions
|
|
@ -5025,25 +5025,28 @@ struct extent_buffer *alloc_dummy_extent_buffer(struct btrfs_fs_info *fs_info,
|
|||
static void check_buffer_tree_ref(struct extent_buffer *eb)
|
||||
{
|
||||
int refs;
|
||||
/* the ref bit is tricky. We have to make sure it is set
|
||||
* if we have the buffer dirty. Otherwise the
|
||||
* code to free a buffer can end up dropping a dirty
|
||||
* page
|
||||
/*
|
||||
* The TREE_REF bit is first set when the extent_buffer is added
|
||||
* to the radix tree. It is also reset, if unset, when a new reference
|
||||
* is created by find_extent_buffer.
|
||||
*
|
||||
* Once the ref bit is set, it won't go away while the
|
||||
* buffer is dirty or in writeback, and it also won't
|
||||
* go away while we have the reference count on the
|
||||
* eb bumped.
|
||||
* It is only cleared in two cases: freeing the last non-tree
|
||||
* reference to the extent_buffer when its STALE bit is set or
|
||||
* calling releasepage when the tree reference is the only reference.
|
||||
*
|
||||
* We can't just set the ref bit without bumping the
|
||||
* ref on the eb because free_extent_buffer might
|
||||
* see the ref bit and try to clear it. If this happens
|
||||
* free_extent_buffer might end up dropping our original
|
||||
* ref by mistake and freeing the page before we are able
|
||||
* to add one more ref.
|
||||
* In both cases, care is taken to ensure that the extent_buffer's
|
||||
* pages are not under io. However, releasepage can be concurrently
|
||||
* called with creating new references, which is prone to race
|
||||
* conditions between the calls to check_buffer_tree_ref in those
|
||||
* codepaths and clearing TREE_REF in try_release_extent_buffer.
|
||||
*
|
||||
* So bump the ref count first, then set the bit. If someone
|
||||
* beat us to it, drop the ref we added.
|
||||
* The actual lifetime of the extent_buffer in the radix tree is
|
||||
* adequately protected by the refcount, but the TREE_REF bit and
|
||||
* its corresponding reference are not. To protect against this
|
||||
* class of races, we call check_buffer_tree_ref from the codepaths
|
||||
* which trigger io after they set eb->io_pages. Note that once io is
|
||||
* initiated, TREE_REF can no longer be cleared, so that is the
|
||||
* moment at which any such race is best fixed.
|
||||
*/
|
||||
refs = atomic_read(&eb->refs);
|
||||
if (refs >= 2 && test_bit(EXTENT_BUFFER_TREE_REF, &eb->bflags))
|
||||
|
|
@ -5493,6 +5496,11 @@ int read_extent_buffer_pages(struct extent_buffer *eb, int wait, int mirror_num)
|
|||
clear_bit(EXTENT_BUFFER_READ_ERR, &eb->bflags);
|
||||
eb->read_mirror = 0;
|
||||
atomic_set(&eb->io_pages, num_reads);
|
||||
/*
|
||||
* It is possible for releasepage to clear the TREE_REF bit before we
|
||||
* set io_pages. See check_buffer_tree_ref for a more detailed comment.
|
||||
*/
|
||||
check_buffer_tree_ref(eb);
|
||||
for (i = 0; i < num_pages; i++) {
|
||||
page = eb->pages[i];
|
||||
|
||||
|
|
|
|||
|
|
@ -1657,12 +1657,8 @@ out_check:
|
|||
ret = fallback_to_cow(inode, locked_page, cow_start,
|
||||
found_key.offset - 1,
|
||||
page_started, nr_written);
|
||||
if (ret) {
|
||||
if (nocow)
|
||||
btrfs_dec_nocow_writers(fs_info,
|
||||
disk_bytenr);
|
||||
if (ret)
|
||||
goto error;
|
||||
}
|
||||
cow_start = (u64)-1;
|
||||
}
|
||||
|
||||
|
|
@ -1678,9 +1674,6 @@ out_check:
|
|||
ram_bytes, BTRFS_COMPRESS_NONE,
|
||||
BTRFS_ORDERED_PREALLOC);
|
||||
if (IS_ERR(em)) {
|
||||
if (nocow)
|
||||
btrfs_dec_nocow_writers(fs_info,
|
||||
disk_bytenr);
|
||||
ret = PTR_ERR(em);
|
||||
goto error;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2270,6 +2270,15 @@ set_size_out:
|
|||
if (rc == 0) {
|
||||
cifsInode->server_eof = attrs->ia_size;
|
||||
cifs_setsize(inode, attrs->ia_size);
|
||||
|
||||
/*
|
||||
* The man page of truncate says if the size changed,
|
||||
* then the st_ctime and st_mtime fields for the file
|
||||
* are updated.
|
||||
*/
|
||||
attrs->ia_ctime = attrs->ia_mtime = current_time(inode);
|
||||
attrs->ia_valid |= ATTR_CTIME | ATTR_MTIME;
|
||||
|
||||
cifs_truncate_page(inode->i_mapping, inode->i_size);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue