Merge 5.10.53 into android12-5.10-lts
Changes in 5.10.53 ARM: dts: gemini: rename mdio to the right name ARM: dts: gemini: add device_type on pci ARM: dts: rockchip: Fix thermal sensor cells o rk322x ARM: dts: rockchip: fix pinctrl sleep nodename for rk3036-kylin and rk3288 arm64: dts: rockchip: fix pinctrl sleep nodename for rk3399.dtsi ARM: dts: rockchip: Fix the timer clocks order ARM: dts: rockchip: Fix IOMMU nodes properties on rk322x ARM: dts: rockchip: Fix power-controller node names for rk3066a ARM: dts: rockchip: Fix power-controller node names for rk3188 ARM: dts: rockchip: Fix power-controller node names for rk3288 arm64: dts: rockchip: Fix power-controller node names for px30 arm64: dts: rockchip: Fix power-controller node names for rk3328 arm64: dts: rockchip: Fix power-controller node names for rk3399 reset: ti-syscon: fix to_ti_syscon_reset_data macro ARM: brcmstb: dts: fix NAND nodes names ARM: Cygnus: dts: fix NAND nodes names ARM: NSP: dts: fix NAND nodes names ARM: dts: BCM63xx: Fix NAND nodes names ARM: dts: Hurricane 2: Fix NAND nodes names ARM: dts: imx6: phyFLEX: Fix UART hardware flow control ARM: imx: pm-imx5: Fix references to imx5_cpu_suspend_info arm64: dts: rockchip: fix regulator-gpio states array ARM: dts: ux500: Fix interrupt cells ARM: dts: ux500: Rename gpio-controller node ARM: dts: ux500: Fix orientation of accelerometer ARM: dts: imx6dl-riotboard: configure PHY clock and set proper EEE value rtc: mxc_v2: add missing MODULE_DEVICE_TABLE kbuild: sink stdout from cmd for silent build ARM: dts: am57xx-cl-som-am57x: fix ti,no-reset-on-init flag for gpios ARM: dts: am437x-gp-evm: fix ti,no-reset-on-init flag for gpios ARM: dts: am335x: fix ti,no-reset-on-init flag for gpios ARM: dts: OMAP2+: Replace underscores in sub-mailbox node names arm64: dts: ti: k3-am654x/j721e/j7200-common-proc-board: Fix MCU_RGMII1_TXC direction ARM: tegra: wm8903: Fix polarity of headphones-detection GPIO in device-trees ARM: tegra: nexus7: Correct 3v3 regulator GPIO of PM269 variant arm64: dts: qcom: sc7180: Move rmtfs memory region ARM: dts: stm32: Remove extra size-cells on dhcom-pdk2 ARM: dts: stm32: Fix touchscreen node on dhcom-pdk2 ARM: dts: stm32: fix stm32mp157c-odyssey card detect pin ARM: dts: stm32: fix gpio-keys node on STM32 MCU boards ARM: dts: stm32: fix RCC node name on stm32f429 MCU ARM: dts: stm32: fix timer nodes on STM32 MCU to prevent warnings memory: tegra: Fix compilation warnings on 64bit platforms firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig firmware: arm_scmi: Fix the build when CONFIG_MAILBOX is not selected ARM: dts: bcm283x: Fix up MMC node names ARM: dts: bcm283x: Fix up GPIO LED node names arm64: dts: juno: Update SCPI nodes as per the YAML schema ARM: dts: rockchip: fix supply properties in io-domains nodes ARM: dts: stm32: fix i2c node name on stm32f746 to prevent warnings ARM: dts: stm32: move stmmac axi config in ethernet node on stm32mp15 ARM: dts: stm32: fix the Odyssey SoM eMMC VQMMC supply ARM: dts: stm32: Drop unused linux,wakeup from touchscreen node on DHCOM SoM ARM: dts: stm32: Rename spi-flash/mx66l51235l@N to flash@N on DHCOM SoM ARM: dts: stm32: fix stpmic node for stm32mp1 boards ARM: OMAP2+: Block suspend for am3 and am4 if PM is not configured soc/tegra: fuse: Fix Tegra234-only builds firmware: tegra: bpmp: Fix Tegra234-only builds arm64: dts: ls208xa: remove bus-num from dspi node arm64: dts: imx8mq: assign PCIe clocks thermal/core: Correct function name thermal_zone_device_unregister() thermal/drivers/rcar_gen3_thermal: Do not shadow rcar_gen3_ths_tj_1 thermal/drivers/imx_sc: Add missing of_node_put for loop iteration thermal/drivers/sprd: Add missing of_node_put for loop iteration kbuild: mkcompile_h: consider timestamp if KBUILD_BUILD_TIMESTAMP is set arch/arm64/boot/dts/marvell: fix NAND partitioning scheme rtc: max77686: Do not enforce (incorrect) interrupt trigger type scsi: aic7xxx: Fix unintentional sign extension issue on left shift of u8 scsi: libsas: Add LUN number check in .slave_alloc callback scsi: libfc: Fix array index out of bound exception scsi: qedf: Add check to synchronize abort and flush sched/fair: Fix CFS bandwidth hrtimer expiry type perf/x86/intel/uncore: Clean up error handling path of iio mapping thermal/core/thermal_of: Stop zone device before unregistering it s390/traps: do not test MONITOR CALL without CONFIG_BUG s390: introduce proper type handling call_on_stack() macro cifs: prevent NULL deref in cifs_compose_mount_options() firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string arm64: dts: marvell: armada-37xx: move firmware node to generic dtsi file Revert "swap: fix do_swap_page() race with swapoff" f2fs: Show casefolding support only when supported mm/thp: simplify copying of huge zero page pmd when fork mm/userfaultfd: fix uffd-wp special cases for fork() mm/page_alloc: fix memory map initialization for descending nodes usb: cdns3: Enable TDL_CHK only for OUT ep net: bcmgenet: ensure EXT_ENERGY_DET_MASK is clear net: dsa: mv88e6xxx: enable .port_set_policy() on Topaz net: dsa: mv88e6xxx: use correct .stats_set_histogram() on Topaz net: dsa: mv88e6xxx: enable .rmu_disable() on Topaz net: dsa: mv88e6xxx: enable devlink ATU hash param for Topaz net: ipv6: fix return value of ip6_skb_dst_mtu netfilter: ctnetlink: suspicious RCU usage in ctnetlink_dump_helpinfo net/sched: act_ct: fix err check for nf_conntrack_confirm vmxnet3: fix cksum offload issues for tunnels with non-default udp ports net/sched: act_ct: remove and free nf_table callbacks net: bridge: sync fdb to new unicast-filtering ports net: netdevsim: use xso.real_dev instead of xso.dev in callback functions of struct xfrmdev_ops net: bcmgenet: Ensure all TX/RX queues DMAs are disabled net: ip_tunnel: fix mtu calculation for ETHER tunnel devices net: moxa: fix UAF in moxart_mac_probe net: qcom/emac: fix UAF in emac_remove net: ti: fix UAF in tlan_remove_one net: send SYNACK packet with accepted fwmark net: validate lwtstate->data before returning from skb_tunnel_info() Revert "mm/shmem: fix shmem_swapin() race with swapoff" net: dsa: properly check for the bridge_leave methods in dsa_switch_bridge_leave() net: fddi: fix UAF in fza_probe dma-buf/sync_file: Don't leak fences on merge failure kbuild: do not suppress Kconfig prompts for silent build ARM: dts: aspeed: Fix AST2600 machines line names ARM: dts: tacoma: Add phase corrections for eMMC tcp: consistently disable header prediction for mptcp tcp: annotate data races around tp->mtu_info tcp: fix tcp_init_transfer() to not reset icsk_ca_initialized ipv6: tcp: drop silly ICMPv6 packet too big messages tcp: call sk_wmem_schedule before sk_mem_charge in zerocopy path tools: bpf: Fix error in 'make -C tools/ bpf_install' bpftool: Properly close va_list 'ap' by va_end() on error bpf: Track subprog poke descriptors correctly and fix use-after-free perf test bpf: Free obj_buf drm/panel: nt35510: Do not fail if DSI read fails udp: annotate data races around unix_sk(sk)->gso_size Linux 5.10.53 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iac8fe9cd2abb2d8dd993967205a97c89f01f3647
This commit is contained in:
36
mm/memory.c
36
mm/memory.c
@@ -734,10 +734,10 @@ out:
|
||||
|
||||
static unsigned long
|
||||
copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
||||
pte_t *dst_pte, pte_t *src_pte, struct vm_area_struct *vma,
|
||||
unsigned long addr, int *rss)
|
||||
pte_t *dst_pte, pte_t *src_pte, struct vm_area_struct *dst_vma,
|
||||
struct vm_area_struct *src_vma, unsigned long addr, int *rss)
|
||||
{
|
||||
unsigned long vm_flags = vma->vm_flags;
|
||||
unsigned long vm_flags = dst_vma->vm_flags;
|
||||
pte_t pte = *src_pte;
|
||||
struct page *page;
|
||||
swp_entry_t entry = pte_to_swp_entry(pte);
|
||||
@@ -806,6 +806,8 @@ copy_nonpresent_pte(struct mm_struct *dst_mm, struct mm_struct *src_mm,
|
||||
set_pte_at(src_mm, addr, src_pte, pte);
|
||||
}
|
||||
}
|
||||
if (!userfaultfd_wp(dst_vma))
|
||||
pte = pte_swp_clear_uffd_wp(pte);
|
||||
set_pte_at(dst_mm, addr, dst_pte, pte);
|
||||
return 0;
|
||||
}
|
||||
@@ -877,6 +879,9 @@ copy_present_page(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma
|
||||
/* All done, just insert the new page copy in the child */
|
||||
pte = mk_pte(new_page, dst_vma->vm_page_prot);
|
||||
pte = maybe_mkwrite(pte_mkdirty(pte), dst_vma->vm_flags);
|
||||
if (userfaultfd_pte_wp(dst_vma, *src_pte))
|
||||
/* Uffd-wp needs to be delivered to dest pte as well */
|
||||
pte = pte_wrprotect(pte_mkuffd_wp(pte));
|
||||
set_pte_at(dst_vma->vm_mm, addr, dst_pte, pte);
|
||||
return 0;
|
||||
}
|
||||
@@ -926,12 +931,7 @@ copy_present_pte(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
|
||||
pte = pte_mkclean(pte);
|
||||
pte = pte_mkold(pte);
|
||||
|
||||
/*
|
||||
* Make sure the _PAGE_UFFD_WP bit is cleared if the new VMA
|
||||
* does not have the VM_UFFD_WP, which means that the uffd
|
||||
* fork event is not enabled.
|
||||
*/
|
||||
if (!(vm_flags & VM_UFFD_WP))
|
||||
if (!userfaultfd_wp(dst_vma))
|
||||
pte = pte_clear_uffd_wp(pte);
|
||||
|
||||
set_pte_at(dst_vma->vm_mm, addr, dst_pte, pte);
|
||||
@@ -1006,7 +1006,8 @@ again:
|
||||
if (unlikely(!pte_present(*src_pte))) {
|
||||
entry.val = copy_nonpresent_pte(dst_mm, src_mm,
|
||||
dst_pte, src_pte,
|
||||
src_vma, addr, rss);
|
||||
dst_vma, src_vma,
|
||||
addr, rss);
|
||||
if (entry.val)
|
||||
break;
|
||||
progress += 8;
|
||||
@@ -1083,8 +1084,8 @@ copy_pmd_range(struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma,
|
||||
|| pmd_devmap(*src_pmd)) {
|
||||
int err;
|
||||
VM_BUG_ON_VMA(next-addr != HPAGE_PMD_SIZE, src_vma);
|
||||
err = copy_huge_pmd(dst_mm, src_mm,
|
||||
dst_pmd, src_pmd, addr, src_vma);
|
||||
err = copy_huge_pmd(dst_mm, src_mm, dst_pmd, src_pmd,
|
||||
addr, dst_vma, src_vma);
|
||||
if (err == -ENOMEM)
|
||||
return -ENOMEM;
|
||||
if (!err)
|
||||
@@ -3574,7 +3575,6 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
||||
{
|
||||
struct vm_area_struct *vma = vmf->vma;
|
||||
struct page *page = NULL, *swapcache;
|
||||
struct swap_info_struct *si = NULL;
|
||||
swp_entry_t entry;
|
||||
pte_t pte;
|
||||
int locked;
|
||||
@@ -3611,16 +3611,14 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Prevent swapoff from happening to us. */
|
||||
si = get_swap_device(entry);
|
||||
if (unlikely(!si))
|
||||
goto out;
|
||||
|
||||
delayacct_set_flag(DELAYACCT_PF_SWAPIN);
|
||||
page = lookup_swap_cache(entry, vma, vmf->address);
|
||||
swapcache = page;
|
||||
|
||||
if (!page) {
|
||||
struct swap_info_struct *si = swp_swap_info(entry);
|
||||
|
||||
if (data_race(si->flags & SWP_SYNCHRONOUS_IO) &&
|
||||
__swap_count(entry) == 1) {
|
||||
/* skip swapcache */
|
||||
@@ -3812,8 +3810,6 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
||||
unlock:
|
||||
pte_unmap_unlock(vmf->pte, vmf->ptl);
|
||||
out:
|
||||
if (si)
|
||||
put_swap_device(si);
|
||||
return ret;
|
||||
out_nomap:
|
||||
pte_unmap_unlock(vmf->pte, vmf->ptl);
|
||||
@@ -3825,8 +3821,6 @@ out_release:
|
||||
unlock_page(swapcache);
|
||||
put_page(swapcache);
|
||||
}
|
||||
if (si)
|
||||
put_swap_device(si);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user