Linux 5.15.68
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.68 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/arm64/silicon-errata.rst | 2 Makefile | 5 arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 21 - arch/arm/boot/dts/at91-sama5d2_icp.dts | 21 - arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi | 10 arch/arm/mach-at91/pm.c | 36 + arch/arm/mach-at91/pm_suspend.S | 24 - arch/arm64/Kconfig | 19 arch/arm64/kernel/cacheinfo.c | 6 arch/arm64/kernel/cpu_errata.c | 9 arch/arm64/kernel/cpufeature.c | 5 arch/arm64/kernel/hibernate.c | 5 arch/arm64/kernel/mte.c | 9 arch/arm64/kernel/topology.c | 32 + arch/arm64/mm/copypage.c | 9 arch/arm64/mm/mteswap.c | 9 arch/arm64/tools/cpucaps | 1 arch/mips/loongson32/ls1c/board.c | 1 arch/parisc/include/asm/bitops.h | 8 arch/parisc/kernel/head.S | 43 ++ arch/s390/kernel/nmi.c | 2 arch/s390/kernel/setup.c | 1 drivers/cpufreq/cpufreq.c | 2 drivers/firmware/efi/capsule-loader.c | 31 - drivers/firmware/efi/libstub/Makefile | 7 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 1 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 drivers/gpu/drm/bridge/display-connector.c | 86 ++++ drivers/gpu/drm/drm_gem.c | 17 drivers/gpu/drm/drm_internal.h | 4 drivers/gpu/drm/drm_prime.c | 20 drivers/gpu/drm/i915/display/intel_dp_link_training.c | 22 + drivers/gpu/drm/radeon/radeon_device.c | 3 drivers/hwmon/mr75203.c | 72 ++- drivers/hwmon/tps23861.c | 10 drivers/infiniband/core/cma.c | 4 drivers/infiniband/core/umem_odp.c | 2 drivers/infiniband/hw/hns/hns_roce_hw_v2.h | 2 drivers/infiniband/hw/hns/hns_roce_qp.c | 7 drivers/infiniband/hw/irdma/uk.c | 4 drivers/infiniband/hw/irdma/verbs.c | 7 drivers/infiniband/hw/mlx5/mad.c | 6 drivers/infiniband/sw/siw/siw_qp_tx.c | 18 drivers/infiniband/ulp/rtrs/rtrs-clt.c | 9 drivers/infiniband/ulp/rtrs/rtrs-srv.c | 14 drivers/infiniband/ulp/srp/ib_srp.c | 3 drivers/iommu/amd/iommu.c | 3 drivers/iommu/intel/iommu.c | 28 + drivers/md/md.c | 1 drivers/net/ethernet/intel/i40e/i40e.h | 14 drivers/net/ethernet/intel/i40e/i40e_client.c | 5 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 drivers/net/ethernet/intel/i40e/i40e_main.c | 23 - drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 drivers/net/ethernet/intel/iavf/iavf_main.c | 14 drivers/net/ethernet/intel/ice/ice_main.c | 2 drivers/net/phy/meson-gxl.c | 8 drivers/net/wireless/intel/iwlegacy/4965-rs.c | 5 drivers/net/wireless/microchip/wilc1000/netdev.h | 1 drivers/net/wireless/microchip/wilc1000/sdio.c | 39 + drivers/net/wireless/microchip/wilc1000/wlan.c | 15 drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c | 10 drivers/net/xen-netback/xenbus.c | 2 drivers/nvme/host/tcp.c | 7 drivers/nvme/target/core.c | 6 drivers/nvme/target/zns.c | 17 drivers/parisc/ccio-dma.c | 11 drivers/regulator/core.c | 9 drivers/scsi/lpfc/lpfc_init.c | 5 drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 drivers/scsi/qla2xxx/qla_target.c | 10 drivers/scsi/ufs/ufshcd.c | 9 drivers/soc/bcm/brcmstb/pm/pm-arm.c | 50 +- drivers/soc/imx/gpcv2.c | 5 drivers/tee/tee_shm.c | 1 drivers/vfio/vfio_iommu_type1.c | 12 drivers/video/fbdev/chipsfb.c | 1 drivers/video/fbdev/core/fbsysfs.c | 4 fs/afs/flock.c | 2 fs/afs/fsclient.c | 2 fs/afs/internal.h | 3 fs/afs/rxrpc.c | 7 fs/afs/yfsclient.c | 3 fs/btrfs/zoned.c | 15 fs/debugfs/inode.c | 22 + fs/erofs/internal.h | 29 - fs/nfs/dir.c | 16 fs/nfs/file.c | 15 fs/nfs/inode.c | 27 - fs/nfs/write.c | 6 include/linux/buffer_head.h | 11 include/linux/debugfs.h | 6 include/linux/nfs_fs.h | 48 +- include/linux/skbuff.h | 49 +- include/linux/udp.h | 1 include/net/udp_tunnel.h | 4 include/soc/at91/sama7-ddr.h | 12 kernel/cgroup/cgroup.c | 85 +++- kernel/cgroup/cpuset.c | 3 kernel/dma/swiotlb.c | 5 kernel/fork.c | 1 kernel/kprobes.c | 1 kernel/sched/debug.c | 2 kernel/trace/trace_events_trigger.c | 3 mm/kmemleak.c | 8 net/bridge/br_netfilter_hooks.c | 2 net/bridge/br_netfilter_ipv6.c | 1 net/core/datagram.c | 2 net/core/skbuff.c | 5 net/ipv4/tcp.c | 2 net/ipv4/tcp_input.c | 25 - net/ipv4/udp.c | 2 net/ipv4/udp_tunnel_core.c | 1 net/ipv6/seg6.c | 5 net/ipv6/udp.c | 5 net/netfilter/nf_conntrack_irc.c | 5 net/netfilter/nf_conntrack_proto_tcp.c | 31 + net/netfilter/nf_tables_api.c | 4 net/rxrpc/ar-internal.h | 1 net/rxrpc/local_object.c | 1 net/rxrpc/peer_event.c | 293 ++++++++++++-- net/rxrpc/rxkad.c | 2 net/sched/sch_sfb.c | 13 net/tipc/monitor.c | 2 sound/core/oss/pcm_oss.c | 6 sound/drivers/aloop.c | 7 sound/pci/emu10k1/emupcm.c | 2 sound/soc/atmel/mchp-spdiftx.c | 10 sound/soc/qcom/sm8250.c | 1 sound/usb/card.c | 2 sound/usb/endpoint.c | 23 - sound/usb/endpoint.h | 6 sound/usb/pcm.c | 14 sound/usb/quirks.c | 2 sound/usb/stream.c | 9 tools/perf/builtin-script.c | 3 tools/perf/util/machine.c | 3 141 files changed, 1344 insertions(+), 496 deletions(-)
[email protected] (1):
wifi: wilc1000: fix DMA on stack objects
Alex Williamson (1):
vfio/type1: Unpin zero pages
Alexander Gordeev (1):
s390/boot: fix absolute zero lowcore corruption on boot
Alexandru Gagniuc (1):
hwmon: (tps23861) fix byte order in resistance register
Andrew Halaney (1):
regulator: core: Clean up on enable failure
Ard Biesheuvel (1):
efi: libstub: Disable struct randomization
Arnaldo Carvalho de Melo (1):
perf machine: Use path__join() to compose a path instead of snprintf(dir, '/', filename)
Bart Van Assche (2):
scsi: ufs: core: Reduce the power mode change timeout
nvmet: fix a use-after-free
Candice Li (1):
drm/amdgpu: Check num_gfx_rings for gfx v9_0 rb setup.
Chao Gao (1):
swiotlb: avoid potential left shift overflow
Chengchang Tang (1):
RDMA/hns: Fix supported page size
Chris Mi (1):
RDMA/mlx5: Set local port to one when accessing counters
Christian A. Ehrhardt (1):
kprobes: Prohibit probes in gate area
Claudiu Beznea (8):
ARM: at91: pm: fix self-refresh for sama7g5
ARM: at91: pm: fix DDR recalibration when resuming from backup and self-refresh
ARM: dts: at91: sama5d27_wlsom1: specify proper regulator output ranges
ARM: dts: at91: sama5d2_icp: specify proper regulator output ranges
ARM: dts: at91: sama5d27_wlsom1: don't keep ldo2 enabled all the time
ARM: dts: at91: sama5d2_icp: don't keep vdd_other enabled all the time
ASoC: mchp-spdiftx: remove references to mchp_i2s_caps
ARM: at91: ddr: remove CONFIG_SOC_SAMA7 dependency
Dan Carpenter (1):
tipc: fix shift wrapping bug in map_get()
David Howells (3):
rxrpc: Fix ICMP/ICMP6 error handling
rxrpc: Fix an insufficiently large sglist in rxkad_verify_packet_2()
afs: Use the operation issue time instead of the reply time for callbacks
David Leadbeater (1):
netfilter: nf_conntrack_irc: Fix forged IP logic
David Lebrun (1):
ipv6: sr: fix out-of-bounds read when setting HMAC data.
David Sloan (1):
md: Flush workqueue md_rdev_misc_wq in md_alloc()
Dennis Maisenbacher (1):
nvmet: fix mar and mor off-by-one errors
Dongxiang Ke (1):
ALSA: usb-audio: Fix an out-of-bounds bug in __snd_usb_parse_audio_interface()
Eliav Farber (5):
hwmon: (mr75203) fix VM sensor allocation when "intel,vm-map" not defined
hwmon: (mr75203) update pvt->v_num and vm_num to the actual number of used sensors
hwmon: (mr75203) fix voltage equation for negative source input
hwmon: (mr75203) fix multi-channel voltage reading
hwmon: (mr75203) enable polling for all VM channels
Eric Dumazet (1):
tcp: TX zerocopy should not sense pfmemalloc status
Florian Westphal (1):
netfilter: conntrack: work around exceeded receive window
Gao Xiang (1):
erofs: fix pcluster use-after-free on UP platforms
Greg Kroah-Hartman (4):
debugfs: add debugfs_lookup_and_remove() sched/debug: fix dentry leak in update_sched_domain_debugfs drm/amd/display: fix memory leak when using debugfs_lookup() Linux 5.15.68
Guixin Liu (1):
scsi: megaraid_sas: Fix double kfree()
Harsh Modi (1):
netfilter: br_netfilter: Drop dst references before setting.
Heiner Kallweit (1):
Revert "net: phy: meson-gxl: improve link-up behavior"
Helge Deller (2):
Revert "parisc: Show error if wrong 32/64-bit compiler is being used"
parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines
Hyunwoo Kim (1):
efi: capsule-loader: Fix use-after-free in efi_capsule_write
Ionela Voinescu (1):
arm64: errata: add detection for AMEVCNTR01 incrementing incorrectly
Ivan Vecera (2):
i40e: Fix kernel crash during module removal
iavf: Detach device during reset task
Jack Wang (2):
RDMA/rtrs-clt: Use the right sg_cnt after ib_dma_map_sg RDMA/rtrs-srv: Pass the correct number of entries for dma mapped SGL
Jakub Kicinski (1):
net: wwan: iosm: remove pointless null check
Jeffy Chen (1):
drm/gem: Fix GEM handle release errors
Jens Wiklander (1):
tee: fix compiler warning in tee_shm_register()
John Sperbeck (1):
iommu/amd: use full 64-bit value in build_completion_wait()
Li Qiong (1):
parisc: ccio-dma: Handle kmalloc failure in ccio_init_resources()
Liang He (1):
soc: brcmstb: pm-arm: Fix refcount leak and __iomem leak bugs
Linus Torvalds (1):
fs: only do a memory barrier for the first set_buffer_uptodate()
Linus Walleij (1):
RDMA/siw: Pass a pointer to virt_to_page()
Lu Baolu (1):
iommu/vt-d: Correctly calculate sagaw value of IOMMU
Lukasz Luba (1):
cpufreq: check only freq_table in __resolve_freq()
Marco Felsch (1):
ARM: dts: imx6qdl-kontron-samx6i: remove duplicated node
Marek Vasut (1):
soc: imx: gpcv2: Assert reset before ungating clock
Mark Brown (1):
arm64/bti: Disable in kernel BTI when cross section thunks are broken
Masahiro Yamada (1):
kbuild: disable header exports for UML in a straightforward way
Masami Hiramatsu (Google) (1):
tracing: Fix to check event_mutex is held while accessing trigger list
Michael Guralnik (1):
RDMA/cma: Fix arguments order in net device validation
Michal Swiatkowski (1):
ice: use bitmap_free instead of devm_kfree
Nathan Chancellor (1):
ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion
Neal Cardwell (1):
tcp: fix early ETIMEDOUT after spurious non-SACK RTO
Neil Armstrong (1):
drm/bridge: display-connector: implement bus fmts callbacks
Pablo Neira Ayuso (1):
netfilter: nf_tables: clean up hook list when offload flags check fails
Pattara Teerapong (1):
ALSA: aloop: Fix random zeros in capture data when using jiffies timer
Paul Durrant (1):
xen-netback: only remove 'hotplug-status' when the vif is actually destroyed
Pavel Begunkov (1):
net: introduce __skb_fill_page_desc_noacc
Przemyslaw Patynowski (2):
i40e: Refactor tc mqprio checks
i40e: Fix ADQ rate limiting for PF
Qu Huang (1):
drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly
Sagi Grimberg (2):
nvme-tcp: fix UAF when detecting digest errors
nvme-tcp: fix regression that causes sporadic requests to time out
Sasha Levin (1):
Revert "arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags""
Shigeru Yoshida (1):
fbdev: fbcon: Destroy mutex on freeing struct fb_info
Shin'ichiro Kawasaki (1):
btrfs: zoned: set pseudo max append zone limit in zone emulation mode
Sindhu-Devale (3):
RDMA/irdma: Report the correct max cqes from query device RDMA/irdma: Return correct WC error for bind operation failure RDMA/irdma: Report RNR NAK generation in device caps
Sreekanth Reddy (1):
scsi: mpt3sas: Fix use-after-free warning
Srinivas Kandagatla (1):
ASoC: qcom: sm8250: add missing module owner
Stanislaw Gruszka (1):
wifi: iwlegacy: 4965: corrected fix for potential off-by-one overflow in il4965_rs_fill_link_cmd()
Sudeep Holla (1):
arm64: cacheinfo: Fix incorrect assignment of signed error value to unsigned fw_level
Takashi Iwai (4):
ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
ALSA: usb-audio: Split endpoint setups for hw_params and prepare
ALSA: usb-audio: Inform the delayed registration more properly
ALSA: usb-audio: Register card again for iface over delayed_register option
Tasos Sahanidis (1):
ALSA: emu10k1: Fix out of bounds access in snd_emu10k1_pcm_channel_alloc()
Tejun Heo (2):
cgroup: Elide write-locking threadgroup_rwsem when updating csses on an empty subtree
cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock
Toke Høiland-Jørgensen (2):
sch_sfb: Don't assume the skb is still around after enqueueing to child
sch_sfb: Also store skb len before calling child enqueue
Tony Battersby (1):
scsi: qla2xxx: Disable ATIO interrupt coalesce for quad port ISP27XX
Trond Myklebust (3):
NFS: Further optimisations for 'ls -l'
NFS: Save some space in the inode
NFS: Fix another fsync() issue after a server reboot
Ville Syrjälä (1):
drm/i915: Implement WaEdpLinkRateDataReload
Wenpeng Liang (1):
RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift
Yang Ling (1):
MIPS: loongson32: ls1c: Fix hang during startup
Yang Yingliang (2):
fbdev: chipsfb: Add missing pci_disable_device() in chipsfb_pci_init()
scsi: lpfc: Add missing destroy_workqueue() in error path
Yee Lee (1):
Revert "mm: kmemleak: take a full lowmem check in kmemleak_*_phys()"
YiPeng Chai (1):
drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini
Yishai Hadas (1):
IB/core: Fix a nested dead lock as part of ODP flow
Zhengjun Xing (1):
perf script: Fix Cannot print 'iregs' field for hybrid systems
Zhenneng Li (1):
drm/radeon: add a force flush to delay work when radeon
lily (1):
net/core/skbuff: Check the return value of skb_copy_bits()
[email protected] (1):
RDMA/srp: Set scmnd->result only when scmnd is not NULL
Greg Kroah-Hartman
maintainerDocumentation/arm64/silicon-errata.rst +2 -0
@@ -94,6 +94,8 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A510 | #2441009 | ARM64_ERRATUM_2441009 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Cortex-A510 | #2457168 | ARM64_ERRATUM_2457168 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 | +----------------+-----------------+-----------------+-----------------------------+ | ARM | Neoverse-N1 | #1349291 | N/A |
Makefile +2 -3
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 67 +SUBLEVEL = 68 EXTRAVERSION = NAME = Trick or Treat
@@ -1332,8 +1332,7 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj PHONY += headers headers: $(version_h) scripts_unifdef uapi-asm-generic archheaders archscripts - $(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \ - $(error Headers not exportable for the $(SRCARCH) architecture)) + $(if $(filter um, $(SRCARCH)), $(error Headers not exportable for UML)) $(Q)$(MAKE) $(hdr-inst)=include/uapi $(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi
arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +10 -11
@@ -68,8 +68,8 @@ mcp16502@5b { regulators { vdd_3v3: VDD_IO { regulator-name = "VDD_IO"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -87,8 +87,8 @@ regulator-state-mem { vddio_ddr: VDD_DDR { regulator-name = "VDD_DDR"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -110,8 +110,8 @@ regulator-state-mem { vdd_core: VDD_CORE { regulator-name = "VDD_CORE"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -152,8 +152,8 @@ regulator-state-mem { LDO1 { regulator-name = "LDO1"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-always-on; regulator-state-standby {
@@ -167,9 +167,8 @@ regulator-state-mem { LDO2 { regulator-name = "LDO2"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; - regulator-always-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; regulator-state-standby { regulator-on-in-suspend;
arch/arm/boot/dts/at91-sama5d2_icp.dts +10 -11
@@ -197,8 +197,8 @@ mcp16502@5b { regulators { vdd_io_reg: VDD_IO { regulator-name = "VDD_IO"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -216,8 +216,8 @@ regulator-state-mem { VDD_DDR { regulator-name = "VDD_DDR"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1350000>; + regulator-max-microvolt = <1350000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -235,8 +235,8 @@ regulator-state-mem { VDD_CORE { regulator-name = "VDD_CORE"; - regulator-min-microvolt = <600000>; - regulator-max-microvolt = <1850000>; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1250000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; regulator-always-on;
@@ -258,7 +258,6 @@ VDD_OTHER { regulator-max-microvolt = <1850000>; regulator-initial-mode = <2>; regulator-allowed-modes = <2>, <4>; - regulator-always-on; regulator-state-standby { regulator-on-in-suspend;
@@ -273,8 +272,8 @@ regulator-state-mem { LDO1 { regulator-name = "LDO1"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; regulator-always-on; regulator-state-standby {
@@ -288,8 +287,8 @@ regulator-state-mem { LDO2 { regulator-name = "LDO2"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <3700000>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; regulator-always-on; regulator-state-standby {
arch/arm/boot/dts/imx6qdl-kontron-samx6i.dtsi +0 -10
@@ -51,16 +51,6 @@ reg_3p3v_s0: regulator-3p3v-s0 { vin-supply = <®_3p3v_s5>; }; - reg_3p3v_s0: regulator-3p3v-s0 { - compatible = "regulator-fixed"; - regulator-name = "V_3V3_S0"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - regulator-boot-on; - vin-supply = <®_3p3v_s5>; - }; - reg_3p3v_s5: regulator-3p3v-s5 { compatible = "regulator-fixed"; regulator-name = "V_3V3_S5";
arch/arm/mach-at91/pm.c +32 -4
@@ -350,9 +350,41 @@ extern u32 at91_pm_suspend_in_sram_sz;static int at91_suspend_finish (unsigned long val) { +unsigned char modified_gray_code[] = { +0x00 ,0x01 ,0x02 ,0x03 ,0x06 ,0x07 ,0x04 ,0x05 ,0x0c ,0x0d , +0x0e ,0x0f ,0x0a ,0x0b ,0x08 ,0x09 ,0x18 ,0x19 ,0x1a ,0x1b , +0x1e ,0x1f ,0x1c ,0x1d ,0x14 ,0x15 ,0x16 ,0x17 ,0x12 ,0x13 , +0x10 ,0x11 , + }; +unsigned int tmp, index;int i;if (soc_pm.data.mode ==AT91_PM_BACKUP && soc_pm.data.ramc_phy) { +/* +* Bootloader will perform DDR recalibration and will try to +* restore the ZQ0SR0 with the value saved here. But the +* calibration is buggy and restoring some values from ZQ0SR0 +* is forbidden and risky thus we need to provide processed +* values for these (modified gray code values). +*/ + tmp =readl (soc_pm.data.ramc_phy +DDR3PHY_ZQ0SR0 ); + +/* Store pull-down output impedance select. */ + index = (tmp >>DDR3PHY_ZQ0SR0_PDO_OFF ) &0x1f ; + soc_pm.bu->ddr_phy_calibration[0 ] = modified_gray_code[index]; + +/* Store pull-up output impedance select. */ + index = (tmp >>DDR3PHY_ZQ0SR0_PUO_OFF ) &0x1f ; + soc_pm.bu->ddr_phy_calibration[0 ] |= modified_gray_code[index]; + +/* Store pull-down on-die termination impedance select. */ + index = (tmp >>DDR3PHY_ZQ0SR0_PDODT_OFF ) &0x1f ; + soc_pm.bu->ddr_phy_calibration[0 ] |= modified_gray_code[index]; + +/* Store pull-up on-die termination impedance select. */ + index = (tmp >>DDR3PHY_ZQ0SRO_PUODT_OFF ) &0x1f ; + soc_pm.bu->ddr_phy_calibration[0 ] |= modified_gray_code[index]; +/* * The 1st 8 words of memory might get corrupted in the process * of DDR PHY recalibration; it is saved here in securam and it
@@ -841,10 +873,6 @@ static int __init at91_pm_backup_init(void)of_scan_flat_dt (at91_pm_backup_scan_memcs, &located);if (!located) goto securam_fail; - -/* DDR3PHY_ZQ0SR0 */ - soc_pm.bu->ddr_phy_calibration[0 ] =readl (soc_pm.data.ramc_phy + -0x188 ); }return 0 ;
arch/arm/mach-at91/pm_suspend.S +17 -7
@@ -172,9 +172,15 @@ sr_ena_2: /* Put DDR PHY's DLL in bypass mode for non-backup modes. */ cmp r7, #AT91_PM_BACKUP beq sr_ena_3 - ldr tmp1, [r3, #DDR3PHY_PIR] - orr tmp1, tmp1, #DDR3PHY_PIR_DLLBYP - str tmp1, [r3, #DDR3PHY_PIR] + + /* Disable DX DLLs. */ + ldr tmp1, [r3, #DDR3PHY_DX0DLLCR] + orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX0DLLCR] + + ldr tmp1, [r3, #DDR3PHY_DX1DLLCR] + orr tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX1DLLCR] sr_ena_3: /* Power down DDR PHY data receivers. */
@@ -221,10 +227,14 @@ sr_ena_3: bic tmp1, tmp1, #DDR3PHY_DSGCR_ODTPDD_ODT0 str tmp1, [r3, #DDR3PHY_DSGCR] - /* Take DDR PHY's DLL out of bypass mode. */ - ldr tmp1, [r3, #DDR3PHY_PIR] - bic tmp1, tmp1, #DDR3PHY_PIR_DLLBYP - str tmp1, [r3, #DDR3PHY_PIR] + /* Enable DX DLLs. */ + ldr tmp1, [r3, #DDR3PHY_DX0DLLCR] + bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX0DLLCR] + + ldr tmp1, [r3, #DDR3PHY_DX1DLLCR] + bic tmp1, tmp1, #DDR3PHY_DXDLLCR_DLLDIS + str tmp1, [r3, #DDR3PHY_DX1DLLCR] /* Enable quasi-dynamic programming. */ mov tmp1, #0
arch/arm64/Kconfig +19 -0
@@ -683,6 +683,23 @@ config ARM64_ERRATUM_2441009 If unsure, say Y. +config ARM64_ERRATUM_2457168 + bool "Cortex-A510: 2457168: workaround for AMEVCNTR01 incrementing incorrectly" + depends on ARM64_AMU_EXTN + default y + help + This option adds the workaround for ARM Cortex-A510 erratum 2457168. + + The AMU counter AMEVCNTR01 (constant counter) should increment at the same rate + as the system counter. On affected Cortex-A510 cores AMEVCNTR01 increments + incorrectly giving a significantly higher output value. + + Work around this problem by returning 0 when reading the affected counter in + key locations that results in disabling all users of this counter. This effect + is the same to firmware disabling affected counters. + + If unsure, say Y. + config CAVIUM_ERRATUM_22375 bool "Cavium erratum 22375, 24313" default y
@@ -1626,6 +1643,8 @@ config ARM64_BTI_KERNEL depends on CC_HAS_BRANCH_PROT_PAC_RET_BTI # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94697 depends on !CC_IS_GCC || GCC_VERSION >= 100100 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671 + depends on !CC_IS_GCC # https://github.com/llvm/llvm-project/commit/a88c722e687e6780dcd6a58718350dc76fcc4cc9 depends on !CC_IS_CLANG || CLANG_VERSION >= 120000 depends on (!FUNCTION_GRAPH_TRACER || DYNAMIC_FTRACE_WITH_REGS)
arch/arm64/kernel/cacheinfo.c +5 -1
@@ -45,7 +45,8 @@ static void ci_leaf_init(struct cacheinfo *this_leaf,int init_cache_level (unsigned int cpu) { -unsigned int ctype, level, leaves, fw_level; +unsigned int ctype, level, leaves; +int fw_level;struct cpu_cacheinfo *this_cpu_ci =get_cpu_cacheinfo (cpu);for (level =1 , leaves =0 ; level <=MAX_CACHE_LEVEL ; level++) {
@@ -63,6 +64,9 @@ int init_cache_level(unsigned int cpu)else fw_level =acpi_find_last_cache_level (cpu); +if (fw_level <0 ) +return fw_level; +if (level < fw_level) {/* * some external caches not specified in CLIDR_EL1
arch/arm64/kernel/cpu_errata.c +9 -0
@@ -550,6 +550,15 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .capability = ARM64_WORKAROUND_NVIDIA_CARMEL_CNP, ERRATA_MIDR_ALL_VERSIONS(MIDR_NVIDIA_CARMEL), }, +#endif +#ifdef CONFIG_ARM64_ERRATUM_2457168 + { + .desc = "ARM erratum 2457168", + .capability = ARM64_WORKAROUND_2457168, + .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE, + /* Cortex-A510 r0p0-r1p1 */ + CAP_MIDR_RANGE(MIDR_CORTEX_A510, 0, 0, 1, 1) + }, #endif { }
arch/arm64/kernel/cpufeature.c +4 -1
@@ -1736,7 +1736,10 @@ static void cpu_amu_enable(struct arm64_cpu_capabilities const *cap)pr_info ("detected CPU%d: Activity Monitors Unit (AMU)\n" ,smp_processor_id ());cpumask_set_cpu (smp_processor_id (), &amu_cpus); -update_freq_counters_refs (); + +/* 0 reference values signal broken/disabled counters */ +if (!this_cpu_has_cap (ARM64_WORKAROUND_2457168 )) +update_freq_counters_refs (); } }
arch/arm64/kernel/hibernate.c +5 -0
@@ -326,6 +326,11 @@ static void swsusp_mte_restore_tags(void)unsigned long pfn = xa_state.xa_index;struct page *page =pfn_to_online_page (pfn); +/* +* It is not required to invoke page_kasan_tag_reset(page) +* at this point since the tags stored in page->flags are +* already restored. +*/ mte_restore_page_tags (page_address (page), tags);mte_free_tag_storage (tags);
arch/arm64/kernel/mte.c +9 -0
@@ -44,6 +44,15 @@ static void mte_sync_page_tags(struct page *page, pte_t old_pte,if (!pte_is_tagged)return ; +page_kasan_tag_reset (page); +/* +* We need smp_wmb() in between setting the flags and clearing the +* tags because if another thread reads page->flags and builds a +* tagged address out of it, there is an actual dependency to the +* memory access, but on the current thread we do not guarantee that +* the new page->flags are visible before the tags were updated. +*/ +smp_wmb ();mte_clear_page_tags (page_address (page)); }
arch/arm64/kernel/topology.c +30 -2
@@ -308,12 +308,25 @@ core_initcall(init_amu_fie);static void cpu_read_corecnt (void *val) { +/* +* A value of 0 can be returned if the current CPU does not support AMUs +* or if the counter is disabled for this CPU. A return value of 0 at +* counter read is properly handled as an error case by the users of the +* counter. +*/ *(u64 *)val =read_corecnt (); }static void cpu_read_constcnt (void *val) { - *(u64 *)val =read_constcnt (); +/* +* Return 0 if the current CPU is affected by erratum 2457168. A value +* of 0 is also returned if the current CPU does not support AMUs or if +* the counter is disabled. A return value of 0 at counter read is +* properly handled as an error case by the users of the counter. +*/ + *(u64 *)val =this_cpu_has_cap (ARM64_WORKAROUND_2457168 ) ? +0UL :read_constcnt (); } static inline
@@ -340,7 +353,22 @@ int counters_read_on_cpu(int cpu, smp_call_func_t func, u64 *val)*/ bool cpc_ffh_supported (void ) { -return freq_counters_valid (get_cpu_with_amu_feat ()); +int cpu =get_cpu_with_amu_feat (); + +/* +* FFH is considered supported if there is at least one present CPU that +* supports AMUs. Using FFH to read core and reference counters for CPUs +* that do not support AMUs, have counters disabled or that are affected +* by errata, will result in a return value of 0. +* +* This is done to allow any enabled and valid counters to be read +* through FFH, knowing that potentially returning 0 as counter value is +* properly handled by the users of these counters. +*/ +if ((cpu >= nr_cpu_ids) || !cpumask_test_cpu (cpu, cpu_present_mask)) +return false; + +return true; }int cpc_read_ffh (int cpu,struct cpc_reg *reg,u64 *val)
arch/arm64/mm/copypage.c +9 -0
@@ -23,6 +23,15 @@ void copy_highpage(struct page *to, struct page *from)if (system_supports_mte () &&test_bit (PG_mte_tagged, &from->flags)) {set_bit (PG_mte_tagged, &to->flags); +page_kasan_tag_reset (to); +/* +* We need smp_wmb() in between setting the flags and clearing the +* tags because if another thread reads page->flags and builds a +* tagged address out of it, there is an actual dependency to the +* memory access, but on the current thread we do not guarantee that +* the new page->flags are visible before the tags were updated. +*/ +smp_wmb ();mte_copy_page_tags (kto, kfrom); } }
arch/arm64/mm/mteswap.c +9 -0
@@ -53,6 +53,15 @@ bool mte_restore_tags(swp_entry_t entry, struct page *page)if (!tags)return false; +page_kasan_tag_reset (page); +/* +* We need smp_wmb() in between setting the flags and clearing the +* tags because if another thread reads page->flags and builds a +* tagged address out of it, there is an actual dependency to the +* memory access, but on the current thread we do not guarantee that +* the new page->flags are visible before the tags were updated. +*/ +smp_wmb ();mte_restore_page_tags (page_address (page), tags);return true;
arch/arm64/tools/cpucaps +1 -0
@@ -54,6 +54,7 @@ WORKAROUND_1418040 WORKAROUND_1463225 WORKAROUND_1508412 WORKAROUND_1542419 +WORKAROUND_2457168 WORKAROUND_CAVIUM_23154 WORKAROUND_CAVIUM_27456 WORKAROUND_CAVIUM_30115
arch/mips/loongson32/ls1c/board.c +0 -1
@@ -15,7 +15,6 @@ static struct platform_device *ls1c_platform_devices[] __initdata = {static int __init ls1c_platform_init (void ) {ls1x_serial_set_uartclk (&ls1x_uart_pdev); -ls1x_rtc_set_extclk (&ls1x_rtc_pdev);return platform_add_devices (ls1c_platform_devices,ARRAY_SIZE (ls1c_platform_devices));
arch/parisc/include/asm/bitops.h +0 -8
@@ -12,14 +12,6 @@#include <asm/barrier.h> #include <linux/atomic.h> -/* compiler build environment sanity checks: */ -#if !defined(CONFIG_64BIT ) && defined(__LP64__) -#error "Please use 'ARCH=parisc' to build the 32-bit kernel." -#endif -#if defined(CONFIG_64BIT ) && !defined(__LP64__) -#error "Please use 'ARCH=parisc64' to build the 64-bit kernel." -#endif -/* See http://marc.theaimsgroup.com/?t=108826637900003 for discussion * on use of volatile and __*_bit() (set/clear/change): * *_bit() want use of volatile.
arch/parisc/kernel/head.S +42 -1
55 lines not on this page · raw message
arch/s390/kernel/nmi.c +1 -1
@@ -62,7 +62,7 @@ static inline unsigned long nmi_get_mcesa_size(void)* The structure is required for machine check happening early in * the boot process. */ -static struct mcesa boot_mcesa__initdata __aligned(MCESA_MAX_SIZE) ; +static struct mcesa boot_mcesa__aligned(MCESA_MAX_SIZE) ;void __init nmi_alloc_boot_cpu (struct lowcore *lc) {
arch/s390/kernel/setup.c +1 -0
@@ -484,6 +484,7 @@ static void __init setup_lowcore_dat_off(void)put_abs_lowcore (restart_data, lc->restart_data);put_abs_lowcore (restart_source, lc->restart_source);put_abs_lowcore (restart_psw, lc->restart_psw); +put_abs_lowcore (mcesad, lc->mcesad); lc->spinlock_lockval =arch_spin_lockval (0 ); lc->spinlock_index =0 ;
drivers/cpufreq/cpufreq.c +1 -1
@@ -532,7 +532,7 @@ static unsigned int __resolve_freq(struct cpufreq_policy *policy, target_freq =clamp_val (target_freq, policy->min, policy->max); -if (!cpufreq_driver->target_index) +if (!policy->freq_table)return target_freq; idx =cpufreq_frequency_table_target (policy, target_freq, relation);
drivers/firmware/efi/capsule-loader.c +7 -24
@@ -242,29 +242,6 @@ static ssize_t efi_capsule_write(struct file *file, const char __user *buff,return ret; } -/** -* efi_capsule_flush - called by file close or file flush -* @file: file pointer -* @id: not used -* -* If a capsule is being partially uploaded then calling this function -* will be treated as upload termination and will free those completed -* buffer pages and -ECANCELED will be returned. -**/ -static int efi_capsule_flush (struct file *file,fl_owner_t id) -{ -int ret =0 ; -struct capsule_info *cap_info = file->private_data; - -if (cap_info->index >0 ) { -pr_err ("capsule upload not complete\n" ); -efi_free_all_buff_pages (cap_info); - ret = -ECANCELED ; - } - -return ret; -} -/** * efi_capsule_release - called by file close * @inode: not used
@@ -277,6 +254,13 @@ static int efi_capsule_release(struct inode *inode, struct file *file) {struct capsule_info *cap_info = file->private_data; +if (cap_info->index >0 && + (cap_info->header.headersize ==0 || + cap_info->count < cap_info->total_size)) { +pr_err ("capsule upload not complete\n" ); +efi_free_all_buff_pages (cap_info); + } +kfree (cap_info->pages);kfree (cap_info->phys);kfree (file->private_data);
@@ -324,7 +308,6 @@ static const struct file_operations efi_capsule_fops = { .owner = THIS_MODULE, .open = efi_capsule_open, .write = efi_capsule_write, - .flush = efi_capsule_flush, .release = efi_capsule_release, .llseek = no_llseek, };
drivers/firmware/efi/libstub/Makefile +7 -0
@@ -37,6 +37,13 @@ KBUILD_CFLAGS := $(cflags-y) -Os -DDISABLE_BRANCH_PROFILING \ $(call cc-option,-fno-addrsig) \ -D__DISABLE_EXPORTS +# +# struct randomization only makes sense for Linux internal types, which the EFI +# stub code never touches, so let's turn off struct randomization for the stub +# altogether +# +KBUILD_CFLAGS := $(filter-out $(RANDSTRUCT_CFLAGS), $(KBUILD_CFLAGS)) + # remove SCS flags from all objects in this directory KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_SCS), $(KBUILD_CFLAGS)) # disable LTO
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -0
@@ -2729,6 +2729,9 @@ static int psp_hw_fini(void *handle)psp_rap_terminate (psp);psp_dtm_terminate (psp);psp_hdcp_terminate (psp); + +if (adev->gmc.xgmi.num_physical_nodes >1 ) +psp_xgmi_terminate (psp); }psp_asd_unload (psp);
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +1 -1
@@ -723,7 +723,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)amdgpu_put_xgmi_hive (hive); } -return psp_xgmi_terminate (&adev->psp); +return 0 ; }static int amdgpu_xgmi_ras_late_init (struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +2 -1
@@ -2624,7 +2624,8 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)gfx_v9_0_tiling_mode_table_init (adev); -gfx_v9_0_setup_rb (adev); +if (adev->gfx.num_gfx_rings) +gfx_v9_0_setup_rb (adev);gfx_v9_0_get_cu_info (adev, &adev->gfx.cu_info); adev->gfx.config.db_debug2 =RREG32_SOC15 (GC ,0 , mmDB_DEBUG2);
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c +1 -0
@@ -176,6 +176,7 @@ static void mmhub_v1_0_init_cache_regs(struct amdgpu_device *adev) tmp =REG_SET_FIELD (tmp,VM_L2_CNTL2 ,INVALIDATE_L2_CACHE ,1 );WREG32_SOC15 (MMHUB ,0 , mmVM_L2_CNTL2, tmp); + tmp = mmVM_L2_CNTL3_DEFAULT;if (adev->gmc.translate_further) { tmp =REG_SET_FIELD (tmp,VM_L2_CNTL3 ,BANK_SELECT ,12 ); tmp = REG_SET_FIELD(tmp, VM_L2_CNTL3,
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
@@ -3007,7 +3007,7 @@ void crtc_debugfs_init(struct drm_crtc *crtc) &crc_win_y_end_fops);debugfs_create_file_unsafe ("crc_win_update" ,0644 , dir, crtc, &crc_win_update_fops); - + dput(dir); }#endif /*
drivers/gpu/drm/bridge/display-connector.c +86 -0
102 lines not on this page · raw message
drivers/gpu/drm/drm_gem.c +1 -16
@@ -167,21 +167,6 @@ void drm_gem_private_object_init(struct drm_device *dev, }EXPORT_SYMBOL (drm_gem_private_object_init); -static void -drm_gem_remove_prime_handles (struct drm_gem_object *obj,struct drm_file *filp) -{ -/* -* Note: obj->dma_buf can't disappear as long as we still hold a -* handle reference in obj->handle_count. -*/ -mutex_lock (&filp->prime.lock); -if (obj->dma_buf) { -drm_prime_remove_buf_handle_locked (&filp->prime, - obj->dma_buf); - } -mutex_unlock (&filp->prime.lock); -} -/** * drm_gem_object_handle_free - release resources bound to userspace handles * @obj: GEM object to clean up.
@@ -252,7 +237,7 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)if (obj->funcs->close) obj->funcs->close (obj, file_priv); -drm_gem_remove_prime_handles (obj, file_priv); +drm_prime_remove_buf_handle (&file_priv->prime, id);drm_vma_node_revoke (&obj->vma_node, file_priv);drm_gem_object_handle_put_unlocked (obj);
drivers/gpu/drm/drm_internal.h +2 -2
@@ -74,8 +74,8 @@ int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,void drm_prime_init_file_private (struct drm_prime_file_private *prime_fpriv);void drm_prime_destroy_file_private (struct drm_prime_file_private *prime_fpriv); -void drm_prime_remove_buf_handle_locked (struct drm_prime_file_private *prime_fpriv, -struct dma_buf *dma_buf); +void drm_prime_remove_buf_handle (struct drm_prime_file_private *prime_fpriv, +uint32_t handle);/* drm_drv.c */ struct drm_minor *drm_minor_acquire (unsigned int minor_id);
drivers/gpu/drm/drm_prime.c +12 -8
@@ -187,29 +187,33 @@ static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fprireturn -ENOENT ; } -void drm_prime_remove_buf_handle_locked (struct drm_prime_file_private *prime_fpriv, -struct dma_buf *dma_buf) +void drm_prime_remove_buf_handle (struct drm_prime_file_private *prime_fpriv, +uint32_t handle) {struct rb_node *rb; - rb = prime_fpriv->dmabufs.rb_node; +mutex_lock (&prime_fpriv->lock); + + rb = prime_fpriv->handles.rb_node;while (rb) {struct drm_prime_member *member; - member = rb_entry(rb, struct drm_prime_member, dmabuf_rb); -if (member->dma_buf == dma_buf) { + member = rb_entry(rb, struct drm_prime_member, handle_rb); +if (member->handle == handle) {rb_erase (&member->handle_rb, &prime_fpriv->handles);rb_erase (&member->dmabuf_rb, &prime_fpriv->dmabufs); -dma_buf_put (dma_buf); +dma_buf_put (member->dma_buf);kfree (member); -return ; - }else if (member->dma_buf < dma_buf) { +break ; + }else if (member->handle < handle) { rb = rb->rb_right; }else { rb = rb->rb_left; } } + +mutex_unlock (&prime_fpriv->lock); }void drm_prime_init_file_private (struct drm_prime_file_private *prime_fpriv)
drivers/gpu/drm/i915/display/intel_dp_link_training.c +22 -0
@@ -475,6 +475,28 @@ intel_dp_prepare_link_train(struct intel_dp *intel_dp,intel_dp_compute_rate (intel_dp, crtc_state->port_clock, &link_bw, &rate_select); +/* +* WaEdpLinkRateDataReload +* +* Parade PS8461E MUX (used on varius TGL+ laptops) needs +* to snoop the link rates reported by the sink when we +* use LINK_RATE_SET in order to operate in jitter cleaning +* mode (as opposed to redriver mode). Unfortunately it +* loses track of the snooped link rates when powered down, +* so we need to make it re-snoop often. Without this high +* link rates are not stable. +*/ +if (!link_bw) { +struct intel_connector *connector = intel_dp->attached_connector; +__le16 sink_rates[DP_MAX_SUPPORTED_RATES ]; + +drm_dbg_kms (&i915->drm,"[CONNECTOR:%d:%s] Reloading eDP link rates\n" , + connector->base.base.id, connector->base.name); + +drm_dp_dpcd_read (&intel_dp->aux,DP_SUPPORTED_LINK_RATES , + sink_rates,sizeof (sink_rates)); + } +if (link_bw)drm_dbg_kms (&i915->drm,"Using LINK_BW_SET value %02x\n" , link_bw);
drivers/gpu/drm/radeon/radeon_device.c +3 -0
@@ -1617,6 +1617,9 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend,if (r) {/* delay GPU reset to resume */ radeon_fence_driver_force_completion (rdev, i); + }else { +/* finish executing delayed work */ +flush_delayed_work (&rdev->fence_drv[i].lockup_work); } }
drivers/hwmon/mr75203.c +50 -22
151 lines not on this page · raw message
drivers/hwmon/tps23861.c +6 -4
@@ -489,18 +489,20 @@ static char *tps23861_port_poe_plus_status(struct tps23861_data *data, int port)static int tps23861_port_resistance (struct tps23861_data *data,int port) { -u16 regval; +unsigned int raw_val; +__le16 regval;regmap_bulk_read (data->regmap,PORT_1_RESISTANCE_LSB +PORT_N_RESISTANCE_LSB_OFFSET * (port -1 ), ®val,2 ); -switch (FIELD_GET (PORT_RESISTANCE_RSN_MASK , regval)) { + raw_val =le16_to_cpu (regval); +switch (FIELD_GET (PORT_RESISTANCE_RSN_MASK , raw_val)) {case PORT_RESISTANCE_RSN_OTHER : -return (FIELD_GET (PORT_RESISTANCE_MASK , regval) *RESISTANCE_LSB ) /10000 ; +return (FIELD_GET (PORT_RESISTANCE_MASK , raw_val) *RESISTANCE_LSB ) /10000 ;case PORT_RESISTANCE_RSN_LOW : -return (FIELD_GET (PORT_RESISTANCE_MASK , regval) *RESISTANCE_LSB_LOW ) /10000 ; +return (FIELD_GET (PORT_RESISTANCE_MASK , raw_val) *RESISTANCE_LSB_LOW ) /10000 ;case PORT_RESISTANCE_RSN_SHORT :case PORT_RESISTANCE_RSN_OPEN :default :
drivers/infiniband/core/cma.c +2 -2
@@ -1718,8 +1718,8 @@ cma_ib_id_from_event(struct ib_cm_id *cm_id, }if (!validate_net_dev (*net_dev, - (struct sockaddr *)&req->listen_addr_storage, - (struct sockaddr *)&req->src_addr_storage)) { + (struct sockaddr *)&req->src_addr_storage, + (struct sockaddr *)&req->listen_addr_storage)) { id_priv =ERR_PTR (-EHOSTUNREACH ); goto err; }
drivers/infiniband/core/umem_odp.c +1 -1
@@ -463,7 +463,7 @@ int ib_umem_odp_map_dma_and_lock(struct ib_umem_odp *umem_odp, u64 user_virt,mutex_unlock (&umem_odp->umem_mutex); out_put_mm: -mmput (owning_mm); +mmput_async (owning_mm); out_put_task:if (owning_process)put_task_struct (owning_process);
drivers/infiniband/hw/hns/hns_roce_hw_v2.h +1 -1
@@ -98,7 +98,7 @@#define HNS_ROCE_V2_QPC_TIMER_ENTRY_SZ PAGE_SIZE#define HNS_ROCE_V2_CQC_TIMER_ENTRY_SZ PAGE_SIZE -#define HNS_ROCE_V2_PAGE_SIZE_SUPPORTED 0xFFFFF000 +#define HNS_ROCE_V2_PAGE_SIZE_SUPPORTED 0xFFFF000#define HNS_ROCE_V2_MAX_INNER_MTPT_NUM 2#define HNS_ROCE_INVALID_LKEY 0x0#define HNS_ROCE_INVALID_SGE_LENGTH 0x80000000
drivers/infiniband/hw/hns/hns_roce_qp.c +2 -5
@@ -495,11 +495,8 @@ static int set_rq_size(struct hns_roce_dev *hr_dev, struct ib_qp_cap *cap, hr_qp->rq.max_gs =roundup_pow_of_two (max (1U , cap->max_recv_sge) + hr_qp->rq.rsv_sge); -if (hr_dev->caps.max_rq_sg <=HNS_ROCE_SGE_IN_WQE ) - hr_qp->rq.wqe_shift =ilog2 (hr_dev->caps.max_rq_desc_sz); -else - hr_qp->rq.wqe_shift =ilog2 (hr_dev->caps.max_rq_desc_sz * - hr_qp->rq.max_gs); + hr_qp->rq.wqe_shift =ilog2 (hr_dev->caps.max_rq_desc_sz * + hr_qp->rq.max_gs); hr_qp->rq.wqe_cnt = cnt; if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE &&
drivers/infiniband/hw/irdma/uk.c +3 -1
@@ -1068,6 +1068,7 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, struct irdma_cq_poll_info *info)enum irdma_status_code ret_code;bool move_cq_head = true;u8 polarity; +u8 op_type;bool ext_valid;__le64 *ext_cqe;
@@ -1250,7 +1251,6 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, struct irdma_cq_poll_info *info) do { __le64 *sw_wqe; u64 wqe_qword; - u8 op_type; u32 tail; tail = qp->sq_ring.tail;
@@ -1267,6 +1267,8 @@ irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq, struct irdma_cq_poll_info *info)break ; } }while (1 ); +if (op_type ==IRDMA_OP_TYPE_BIND_MW && info->minor_err ==FLUSH_PROT_ERR ) + info->minor_err =FLUSH_MW_BIND_ERR ; qp->sq_flush_seen = true;if (!IRDMA_RING_MORE_WORK (qp->sq_ring)) qp->sq_flush_complete = true;
drivers/infiniband/hw/irdma/verbs.c +5 -2
@@ -36,15 +36,18 @@ static int irdma_query_device(struct ib_device *ibdev, props->max_send_sge = hw_attrs->uk_attrs.max_hw_wq_frags; props->max_recv_sge = hw_attrs->uk_attrs.max_hw_wq_frags; props->max_cq = rf->max_cq - rf->used_cqs; - props->max_cqe = rf->max_cqe; + props->max_cqe = rf->max_cqe -1 ; props->max_mr = rf->max_mr - rf->used_mrs; props->max_mw = props->max_mr; props->max_pd = rf->max_pd - rf->used_pds; props->max_sge_rd = hw_attrs->uk_attrs.max_hw_read_sges; props->max_qp_rd_atom = hw_attrs->max_hw_ird; props->max_qp_init_rd_atom = hw_attrs->max_hw_ord; -if (rdma_protocol_roce (ibdev,1 )) +if (rdma_protocol_roce (ibdev,1 )) { + props->device_cap_flags |=IB_DEVICE_RC_RNR_NAK_GEN ; props->max_pkeys =IRDMA_PKEY_TBL_SZ ; + } + props->max_ah = rf->max_ah; props->max_mcast_grp = rf->max_mcg; props->max_mcast_qp_attach =IRDMA_MAX_MGS_PER_CTX ;
drivers/infiniband/hw/mlx5/mad.c +6 -0
@@ -166,6 +166,12 @@ static int process_pma_cmd(struct mlx5_ib_dev *dev, u32 port_num, mdev = dev->mdev; mdev_port_num =1 ; } +if (MLX5_CAP_GEN (dev->mdev, num_ports) ==1 ) { +/* set local port to one for Function-Per-Port HCA. */ + mdev = dev->mdev; + mdev_port_num =1 ; + } +/* Declaring support of extended counters */ if (in_mad->mad_hdr.attr_id ==IB_PMA_CLASS_PORT_INFO ) {struct ib_class_port_info cpi = {};
drivers/infiniband/sw/siw/siw_qp_tx.c +14 -4
@@ -29,7 +29,7 @@ static struct page *siw_get_pblpage(struct siw_mem *mem, u64 addr, int *idx)dma_addr_t paddr =siw_pbl_get_buffer (pbl, offset,NULL , idx);if (paddr) -return virt_to_page (paddr); +return virt_to_page ((void *)paddr);return NULL ; }
@@ -533,13 +533,23 @@ static int siw_tx_hdt(struct siw_iwarp_tx *c_tx, struct socket *s)kunmap_local (kaddr); } }else { -u64 va = sge->laddr + sge_off; +/* +* Cast to an uintptr_t to preserve all 64 bits +* in sge->laddr. +*/ +uintptr_t va = (uintptr_t )(sge->laddr + sge_off); - page_array[seg] =virt_to_page (va &PAGE_MASK ); +/* +* virt_to_page() takes a (void *) pointer +* so cast to a (void *) meaning it will be 64 +* bits on a 64 bit platform and 32 bits on a +* 32 bit platform. +*/ + page_array[seg] =virt_to_page ((void *)(va &PAGE_MASK ));if (do_crc)crypto_shash_update ( c_tx->mpa_crc_hd, - (void *)(uintptr_t )va, + (void *)va, plen); }
drivers/infiniband/ulp/rtrs/rtrs-clt.c +5 -4
@@ -1011,7 +1011,8 @@ rtrs_clt_get_copy_req(struct rtrs_clt_path *alive_path,static int rtrs_post_rdma_write_sg (struct rtrs_clt_con *con,struct rtrs_clt_io_req *req,struct rtrs_rbuf *rbuf,bool fr_en, -u32 size,u32 imm,struct ib_send_wr *wr, +u32 count,u32 size,u32 imm, +struct ib_send_wr *wr,struct ib_send_wr *tail) {struct rtrs_clt_path *clt_path =to_clt_path (con->c.path);
@@ -1031,12 +1032,12 @@ static int rtrs_post_rdma_write_sg(struct rtrs_clt_con *con, num_sge =2 ; ptail = tail; }else { -for_each_sg (req->sglist, sg, req->sg_cnt, i) { +for_each_sg (req->sglist, sg, count, i) { sge[i].addr =sg_dma_address (sg); sge[i].length =sg_dma_len (sg); sge[i].lkey = clt_path->s.dev->ib_pd->local_dma_lkey; } - num_sge =1 + req->sg_cnt; + num_sge =1 + count; } sge[i].addr = req->iu->dma_addr; sge[i].length = size;
@@ -1149,7 +1150,7 @@ static int rtrs_clt_write_req(struct rtrs_clt_io_req *req)*/ rtrs_clt_update_all_stats (req,WRITE ); - ret =rtrs_post_rdma_write_sg (req->con, req, rbuf, fr_en, + ret =rtrs_post_rdma_write_sg (req->con, req, rbuf, fr_en, count, req->usr_len +sizeof (*msg), imm, wr, &inv_wr);if (ret) {
drivers/infiniband/ulp/rtrs/rtrs-srv.c +7 -7
@@ -600,7 +600,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path)struct sg_table *sgt = &srv_mr->sgt;struct scatterlist *s;struct ib_mr *mr; -int nr, chunks; +int nr, nr_sgt, chunks; chunks = chunks_per_mr * mri;if (!always_invalidate)
@@ -615,19 +615,19 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path)sg_set_page (s, srv->chunks[chunks + i], max_chunk_size,0 ); - nr =ib_dma_map_sg (srv_path->s.dev->ib_dev, sgt->sgl, + nr_sgt =ib_dma_map_sg (srv_path->s.dev->ib_dev, sgt->sgl, sgt->nents,DMA_BIDIRECTIONAL ); -if (nr < sgt->nents) { - err = nr <0 ? nr : -EINVAL ; +if (!nr_sgt) { + err = -EINVAL ; goto free_sg; } mr =ib_alloc_mr (srv_path->s.dev->ib_pd,IB_MR_TYPE_MEM_REG , - sgt->nents); + nr_sgt);if (IS_ERR (mr)) { err =PTR_ERR (mr); goto unmap_sg; } - nr =ib_map_mr_sg (mr, sgt->sgl, sgt->nents, + nr =ib_map_mr_sg (mr, sgt->sgl, nr_sgt,NULL , max_chunk_size);if (nr <0 || nr < sgt->nents) { err = nr <0 ? nr : -EINVAL ;
@@ -646,7 +646,7 @@ static int map_cont_bufs(struct rtrs_srv_path *srv_path) } }/* Eventually dma addr for each chunk can be cached */ -for_each_sg (sgt->sgl, s, sgt->orig_nents, i) +for_each_sg (sgt->sgl, s, nr_sgt, i) srv_path->dma_addr[chunks + i] =sg_dma_address (s);ib_update_fast_reg_key (mr,ib_inc_rkey (mr->rkey));
drivers/infiniband/ulp/srp/ib_srp.c +2 -1
@@ -1955,7 +1955,8 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)if (scmnd) { req =scsi_cmd_priv (scmnd); scmnd =srp_claim_req (ch, req,NULL , scmnd); - }else { + } +if (!scmnd) {shost_printk (KERN_ERR , target->scsi_host,"Null scmnd for RSP w/tag %#016llx received on ch %td / QP %#x\n" , rsp->tag, ch - target->ch, ch->qp->qp_num);
drivers/iommu/amd/iommu.c +2 -1
@@ -852,7 +852,8 @@ static void build_completion_wait(struct iommu_cmd *cmd,memset (cmd,0 ,sizeof (*cmd)); cmd->data[0 ] =lower_32_bits (paddr) |CMD_COMPL_WAIT_STORE_MASK ; cmd->data[1 ] =upper_32_bits (paddr); - cmd->data[2 ] = data; + cmd->data[2 ] =lower_32_bits (data); + cmd->data[3 ] =upper_32_bits (data);CMD_SET_TYPE (cmd,CMD_COMPL_WAIT ); }
drivers/iommu/intel/iommu.c +25 -3
@@ -542,14 +542,36 @@ static inline int domain_pfn_supported(struct dmar_domain *domain,return !(addr_width <BITS_PER_LONG && pfn >> addr_width); } +/* +* Calculate the Supported Adjusted Guest Address Widths of an IOMMU. +* Refer to 11.4.2 of the VT-d spec for the encoding of each bit of +* the returned SAGAW. +*/ +static unsigned long __iommu_calculate_sagaw (struct intel_iommu *iommu) +{ +unsigned long fl_sagaw, sl_sagaw; + + fl_sagaw =BIT (2 ) | (cap_fl1gp_support (iommu->cap) ?BIT (3 ) :0 ); + sl_sagaw =cap_sagaw (iommu->cap); + +/* Second level only. */ +if (!sm_supported (iommu) || !ecap_flts (iommu->ecap)) +return sl_sagaw; + +/* First level only. */ +if (!ecap_slts (iommu->ecap)) +return fl_sagaw; + +return fl_sagaw & sl_sagaw; +} +static int __iommu_calculate_agaw (struct intel_iommu *iommu,int max_gaw) {unsigned long sagaw;int agaw; - sagaw =cap_sagaw (iommu->cap); -for (agaw =width_to_agaw (max_gaw); - agaw >=0 ; agaw--) { + sagaw =__iommu_calculate_sagaw (iommu); +for (agaw =width_to_agaw (max_gaw); agaw >=0 ; agaw--) {if (test_bit (agaw, &sagaw))break ; }
drivers/md/md.c +1 -0
@@ -5651,6 +5651,7 @@ static int md_alloc(dev_t dev, char *name)* removed (mddev_delayed_delete). */ flush_workqueue (md_misc_wq); +flush_workqueue (md_rdev_misc_wq);mutex_lock (&disks_mutex); mddev =mddev_alloc (dev);
drivers/net/ethernet/intel/i40e/i40e.h +14 -0
@@ -1286,4 +1286,18 @@ int i40e_add_del_cloud_filter(struct i40e_vsi *vsi,int i40e_add_del_cloud_filter_big_buf (struct i40e_vsi *vsi,struct i40e_cloud_filter *filter,bool add); + +/** +* i40e_is_tc_mqprio_enabled - check if TC MQPRIO is enabled on PF +* @pf: pointer to a pf. +* +* Check and return value of flag I40E_FLAG_TC_MQPRIO. +* +* Return: I40E_FLAG_TC_MQPRIO set state. +**/ +static inline u32 i40e_is_tc_mqprio_enabled (struct i40e_pf *pf) +{ +return pf->flags &I40E_FLAG_TC_MQPRIO ; +} +#endif /* _I40E_H_ */
drivers/net/ethernet/intel/i40e/i40e_client.c +4 -1
@@ -177,6 +177,10 @@ void i40e_notify_client_of_netdev_close(struct i40e_vsi *vsi, bool reset) "Cannot locate client instance close routine\n");return ; } +if (!test_bit (__I40E_CLIENT_INSTANCE_OPENED, &cdev->state)) { +dev_dbg (&pf->pdev->dev,"Client is not open, abort close\n" ); +return ; + } cdev->client->ops->close (&cdev->lan_info, cdev->client, reset);clear_bit (__I40E_CLIENT_INSTANCE_OPENED, &cdev->state);i40e_client_release_qvlist (&cdev->lan_info);
@@ -429,7 +433,6 @@ void i40e_client_subtask(struct i40e_pf *pf)/* Remove failed client instance */ clear_bit (__I40E_CLIENT_INSTANCE_OPENED, &cdev->state); -i40e_client_del_instance (pf);return ; } }
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -1
@@ -4921,7 +4921,7 @@ static int i40e_set_channels(struct net_device *dev,/* We do not support setting channels via ethtool when TCs are * configured through mqprio */ -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))return -EINVAL ;/* verify they are not requesting separate vectors */
drivers/net/ethernet/intel/i40e/i40e_main.c +13 -10
@@ -5320,7 +5320,7 @@ static u8 i40e_pf_get_num_tc(struct i40e_pf *pf)u8 num_tc =0 ;struct i40e_dcbx_config *dcbcfg = &hw->local_dcbx_config; -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))return pf->vsi[pf->lan_vsi]->mqprio_qopt.qopt.num_tc;/* If neither MQPRIO nor DCB is enabled, then always use single TC */
@@ -5352,7 +5352,7 @@ static u8 i40e_pf_get_num_tc(struct i40e_pf *pf)**/ static u8 i40e_pf_get_tc_map (struct i40e_pf *pf) { -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))return i40e_mqprio_get_enabled_tc (pf);/* If neither MQPRIO nor DCB is enabled for this PF then just return
@@ -5449,7 +5449,7 @@ static int i40e_vsi_configure_bw_alloc(struct i40e_vsi *vsi, u8 enabled_tc,int i;/* There is no need to reset BW when mqprio mode is on. */ -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))return 0 ;if (!vsi->mqprio_qopt.qopt.hw && !(pf->flags &I40E_FLAG_DCB_ENABLED )) { ret =i40e_set_bw_limit (vsi, vsi->seid,0 );
@@ -5521,7 +5521,7 @@ static void i40e_vsi_config_netdev_tc(struct i40e_vsi *vsi, u8 enabled_tc) vsi->tc_config.tc_info[i].qoffset); } -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))return ;/* Assign UP2TC map for the VSI */
@@ -5682,7 +5682,7 @@ static int i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 enabled_tc) ctxt.vf_num =0 ; ctxt.uplink_seid = vsi->uplink_seid; ctxt.info = vsi->info; -if (vsi->back->flags &I40E_FLAG_TC_MQPRIO ) { +if (i40e_is_tc_mqprio_enabled (pf)) { ret =i40e_vsi_setup_queue_map_mqprio (vsi, &ctxt, enabled_tc);if (ret) goto out;
@@ -6406,7 +6406,7 @@ int i40e_create_queue_channel(struct i40e_vsi *vsi, pf->flags |=I40E_FLAG_VEB_MODE_ENABLED ;if (vsi->type ==I40E_VSI_MAIN ) { -if (pf->flags &I40E_FLAG_TC_MQPRIO ) +if (i40e_is_tc_mqprio_enabled (pf))i40e_do_reset (pf,I40E_PF_RESET_FLAG , true);else i40e_do_reset_safe (pf,I40E_PF_RESET_FLAG );
@@ -6517,6 +6517,9 @@ static int i40e_configure_queue_channels(struct i40e_vsi *vsi) vsi->tc_seid_map[i] = ch->seid; } } + +/* reset to reconfigure TX queue contexts */ +i40e_do_reset (vsi->back,I40E_PF_RESET_FLAG , true);return ret; err_free:
@@ -7800,7 +7803,7 @@ static void *i40e_fwd_add(struct net_device *netdev, struct net_device *vdev)netdev_info (netdev,"Macvlans are not supported when DCB is enabled\n" );return ERR_PTR (-EINVAL ); } -if ((pf->flags &I40E_FLAG_TC_MQPRIO )) { +if (i40e_is_tc_mqprio_enabled (pf)) {netdev_info (netdev,"Macvlans are not supported when HW TC offload is on\n" );return ERR_PTR (-EINVAL ); }
@@ -8053,7 +8056,7 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)/* Quiesce VSI queues */ i40e_quiesce_vsi (vsi); -if (!hw && !(pf->flags &I40E_FLAG_TC_MQPRIO )) +if (!hw && !i40e_is_tc_mqprio_enabled (pf))i40e_remove_queue_channels (vsi);/* Configure VSI for enabled TCs */
@@ -8077,7 +8080,7 @@ static int i40e_setup_tc(struct net_device *netdev, void *type_data)"Setup channel (id:%u) utilizing num_queues %d\n" , vsi->seid, vsi->tc_config.tc_info[0].qcount); -if (pf->flags &I40E_FLAG_TC_MQPRIO ) { +if (i40e_is_tc_mqprio_enabled (pf)) {if (vsi->mqprio_qopt.max_rate[0 ]) {u64 max_tx_rate = vsi->mqprio_qopt.max_rate[0 ];
@@ -10731,7 +10734,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)* unless I40E_FLAG_TC_MQPRIO was enabled or DCB * is not supported with new link speed */ -if (pf->flags &I40E_FLAG_TC_MQPRIO ) { +if (i40e_is_tc_mqprio_enabled (pf)) {i40e_aq_set_dcb_parameters (hw, false,NULL ); }else { if (I40E_IS_X710TL_DEVICE(hw->device_id) &&
drivers/net/ethernet/intel/i40e/i40e_txrx.c +2 -1
@@ -3651,7 +3651,8 @@ u16 i40e_lan_select_queue(struct net_device *netdev,u8 prio;/* is DCB enabled at all? */ -if (vsi->tc_config.numtc ==1 ) +if (vsi->tc_config.numtc ==1 || +i40e_is_tc_mqprio_enabled (vsi->back))return netdev_pick_tx (netdev, skb, sb_dev); prio = skb->priority;
drivers/net/ethernet/intel/iavf/iavf_main.c +11 -3
@@ -2222,6 +2222,11 @@ static void iavf_reset_task(struct work_struct *work)int i =0 , err;bool running; +/* Detach interface to avoid subsequent NDO callbacks */ +rtnl_lock (); +netif_device_detach (netdev); +rtnl_unlock (); +/* When device is being removed it doesn't make sense to run the reset * task, just return in such a case. */
@@ -2229,7 +2234,7 @@ static void iavf_reset_task(struct work_struct *work)if (adapter->state != __IAVF_REMOVE)queue_work (iavf_wq, &adapter->reset_task); -return ; + goto reset_finish; }while (!mutex_trylock (&adapter->client_lock))
@@ -2299,7 +2304,6 @@ static void iavf_reset_task(struct work_struct *work)if (running) {netif_carrier_off (netdev); -netif_tx_stop_all_queues (netdev); adapter->link_up = false;iavf_napi_disable_all (adapter); }
@@ -2412,7 +2416,7 @@ static void iavf_reset_task(struct work_struct *work)mutex_unlock (&adapter->client_lock);mutex_unlock (&adapter->crit_lock); -return ; + goto reset_finish; reset_err:if (running) {set_bit (__IAVF_VSI_DOWN, adapter->vsi.state);
@@ -2423,6 +2427,10 @@ static void iavf_reset_task(struct work_struct *work)mutex_unlock (&adapter->client_lock);mutex_unlock (&adapter->crit_lock);dev_err (&adapter->pdev->dev,"failed to allocate resources during reinit\n" ); +reset_finish: +rtnl_lock (); +netif_device_attach (netdev); +rtnl_unlock (); }/**
drivers/net/ethernet/intel/ice/ice_main.c +1 -1
@@ -3549,7 +3549,7 @@ static int ice_init_pf(struct ice_pf *pf) pf->avail_rxqs =bitmap_zalloc (pf->max_pf_rxqs,GFP_KERNEL );if (!pf->avail_rxqs) { -devm_kfree (ice_pf_to_dev (pf), pf->avail_txqs); +bitmap_free (pf->avail_txqs); pf->avail_txqs =NULL ;return -ENOMEM ; }
drivers/net/phy/meson-gxl.c +1 -7
@@ -243,13 +243,7 @@ static irqreturn_t meson_gxl_handle_interrupt(struct phy_device *phydev) irq_status == INTSRC_ENERGY_DETECT)return IRQ_HANDLED ; -/* Give PHY some time before MAC starts sending data. This works -* around an issue where network doesn't come up properly. -*/ -if (!(irq_status &INTSRC_LINK_DOWN )) -phy_queue_state_machine (phydev,msecs_to_jiffies (100 )); -else -phy_trigger_machine (phydev); +phy_trigger_machine (phydev);return IRQ_HANDLED ; }
drivers/net/wireless/intel/iwlegacy/4965-rs.c +1 -4
@@ -2403,7 +2403,7 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,/* Repeat initial/next rate. * For legacy IL_NUMBER_TRY == 1, this loop will not execute. * For HT IL_HT_NUMBER_TRY == 3, this executes twice. */ -while (repeat_rate >0 ) { +while (repeat_rate >0 && idx < (LINK_QUAL_MAX_RETRY_NUM -1 )) {if (is_legacy (tbl_type.lq_type)) {if (ant_toggle_cnt <NUM_TRY_BEFORE_ANT_TOGGLE ) ant_toggle_cnt++;
@@ -2422,8 +2422,6 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta,cpu_to_le32 (new_rate); repeat_rate--; idx++; -if (idx >=LINK_QUAL_MAX_RETRY_NUM ) - goto out; } il4965_rs_get_tbl_info_from_mcs(new_rate, lq_sta->band,
@@ -2468,7 +2466,6 @@ il4965_rs_fill_link_cmd(struct il_priv *il, struct il_lq_sta *lq_sta, repeat_rate--; } -out: lq_cmd->agg_params.agg_frame_cnt_limit =LINK_QUAL_AGG_FRAME_LIMIT_DEF ; lq_cmd->agg_params.agg_dis_start_th =LINK_QUAL_AGG_DISABLE_START_DEF ;
drivers/net/wireless/microchip/wilc1000/netdev.h +1 -0
@@ -252,6 +252,7 @@ struct wilc {u8 *rx_buffer;u32 rx_buffer_offset;u8 *tx_buffer; +u32 *vmm_table;struct txq_handle txq[NQUEUES ];int txq_entries;
drivers/net/wireless/microchip/wilc1000/sdio.c +33 -6
@@ -27,6 +27,7 @@ struct wilc_sdio {bool irq_gpio;u32 block_size;int has_thrpt_enh3; +u8 *cmd53_buf; };struct sdio_cmd52 {
@@ -46,6 +47,7 @@ struct sdio_cmd53 { u32 count: 9;u8 *buffer;u32 block_size; +bool use_global_buf; };static const struct wilc_hif_func wilc_hif_sdio;
@@ -90,6 +92,8 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd) { struct sdio_func *func = container_of(wilc->dev, struct sdio_func, dev);int size, ret; +struct wilc_sdio *sdio_priv = wilc->bus_data; +u8 *buf = cmd->buffer;sdio_claim_host (func);
@@ -100,12 +104,23 @@ static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd)else size = cmd->count; +if (cmd->use_global_buf) { +if (size >sizeof (u32)) +return -EINVAL ; + + buf = sdio_priv->cmd53_buf; + } +if (cmd->read_write) {/* write */ - ret =sdio_memcpy_toio (func, cmd->address, - (void *)cmd->buffer, size); +if (cmd->use_global_buf) +memcpy (buf, cmd->buffer, size); + + ret =sdio_memcpy_toio (func, cmd->address, buf, size); }else {/* read */ - ret =sdio_memcpy_fromio (func, (void *)cmd->buffer, - cmd->address, size); + ret =sdio_memcpy_fromio (func, buf, cmd->address, size); + +if (cmd->use_global_buf) +memcpy (cmd->buffer, buf, size); }sdio_release_host (func);
@@ -127,6 +142,12 @@ static int wilc_sdio_probe(struct sdio_func *func,if (!sdio_priv)return -ENOMEM ; + sdio_priv->cmd53_buf =kzalloc (sizeof (u32),GFP_KERNEL ); +if (!sdio_priv->cmd53_buf) { + ret = -ENOMEM ; + goto free; + } + ret =wilc_cfg80211_init (&wilc, &func->dev,WILC_HIF_SDIO , &wilc_hif_sdio);if (ret)
@@ -160,6 +181,7 @@ static int wilc_sdio_probe(struct sdio_func *func,irq_dispose_mapping (wilc->dev_irq_num);wilc_netdev_cleanup (wilc); free: +kfree (sdio_priv->cmd53_buf);kfree (sdio_priv);return ret; }
@@ -171,6 +193,7 @@ static void wilc_sdio_remove(struct sdio_func *func)clk_disable_unprepare (wilc->rtc_clk);wilc_netdev_cleanup (wilc); +kfree (sdio_priv->cmd53_buf);kfree (sdio_priv); }
@@ -367,8 +390,9 @@ static int wilc_sdio_write_reg(struct wilc *wilc, u32 addr, u32 data) cmd.address =WILC_SDIO_FBR_DATA_REG ; cmd.block_mode =0 ; cmd.increment =1 ; - cmd.count =4 ; + cmd.count =sizeof (u32); cmd.buffer = (u8 *)&data; + cmd.use_global_buf = true; cmd.block_size = sdio_priv->block_size; ret =wilc_sdio_cmd53 (wilc, &cmd);if (ret)
@@ -406,6 +430,7 @@ static int wilc_sdio_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size) nblk = size / block_size; nleft = size % block_size; + cmd.use_global_buf = false;if (nblk >0 ) { cmd.block_mode =1 ; cmd.increment =1 ;
@@ -484,8 +509,9 @@ static int wilc_sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data) cmd.address =WILC_SDIO_FBR_DATA_REG ; cmd.block_mode =0 ; cmd.increment =1 ; - cmd.count =4 ; + cmd.count =sizeof (u32); cmd.buffer = (u8 *)data; + cmd.use_global_buf = true; cmd.block_size = sdio_priv->block_size; ret =wilc_sdio_cmd53 (wilc, &cmd);
@@ -527,6 +553,7 @@ static int wilc_sdio_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size) nblk = size / block_size; nleft = size % block_size; + cmd.use_global_buf = false;if (nblk >0 ) { cmd.block_mode =1 ; cmd.increment =1 ;
drivers/net/wireless/microchip/wilc1000/wlan.c +13 -2
@@ -701,7 +701,7 @@ int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count)int ret =0 ;int counter;int timeout; -u32 vmm_table[WILC_VMM_TBL_SIZE ]; +u32 *vmm_table = wilc->vmm_table;u8 ac_pkt_num_to_chip[NQUEUES ] = {0 ,0 ,0 ,0 };const struct wilc_hif_func *func;int srcu_idx;
@@ -1220,6 +1220,8 @@ void wilc_wlan_cleanup(struct net_device *dev)while ((rqe =wilc_wlan_rxq_remove (wilc)))kfree (rqe); +kfree (wilc->vmm_table); + wilc->vmm_table =NULL ;kfree (wilc->rx_buffer); wilc->rx_buffer =NULL ;kfree (wilc->tx_buffer);
@@ -1455,6 +1457,14 @@ int wilc_wlan_init(struct net_device *dev) goto fail; } +if (!wilc->vmm_table) + wilc->vmm_table =kzalloc (WILC_VMM_TBL_SIZE ,GFP_KERNEL ); + +if (!wilc->vmm_table) { + ret = -ENOBUFS ; + goto fail; + } +if (!wilc->tx_buffer) wilc->tx_buffer =kmalloc (WILC_TX_BUFF_SIZE ,GFP_KERNEL );
@@ -1479,7 +1489,8 @@ int wilc_wlan_init(struct net_device *dev)return 0 ; fail: - +kfree (wilc->vmm_table); + wilc->vmm_table =NULL ;kfree (wilc->rx_buffer); wilc->rx_buffer =NULL ;kfree (wilc->tx_buffer);
drivers/net/wwan/iosm/iosm_ipc_protocol_ops.c +0 -10
@@ -372,8 +372,6 @@ bool ipc_protocol_dl_td_prepare(struct iosm_protocol *ipc_protocol,struct sk_buff *ipc_protocol_dl_td_process (struct iosm_protocol *ipc_protocol,struct ipc_pipe *pipe) { -u32 tail = -le32_to_cpu (ipc_protocol->p_ap_shm->tail_array[pipe->pipe_nr]);struct ipc_protocol_td *p_td;struct sk_buff *skb;
@@ -403,14 +401,6 @@ struct sk_buff *ipc_protocol_dl_td_process(struct iosm_protocol *ipc_protocol, goto ret; } -if (!IPC_CB (skb)) { -dev_err (ipc_protocol->dev,"pipe# %d, tail: %d skb_cb is NULL" , - pipe->pipe_nr, tail); -ipc_pcie_kfree_skb (ipc_protocol->pcie, skb); - skb =NULL ; - goto ret; - } -if (p_td->buffer.address !=IPC_CB (skb)->mapping) {dev_err (ipc_protocol->dev,"invalid buf=%llx or skb=%p" , (unsigned long long )p_td->buffer.address, skb->data);
drivers/net/xen-netback/xenbus.c +1 -1
@@ -256,7 +256,6 @@ static void backend_disconnect(struct backend_info *be)unsigned int queue_index;xen_unregister_watchers (vif); -xenbus_rm (XBT_NIL , be->dev->nodename,"hotplug-status" );#ifdef CONFIG_DEBUG_FS xenvif_debugfs_delif (vif);#endif /* CONFIG_DEBUG_FS */
@@ -984,6 +983,7 @@ static int netback_remove(struct xenbus_device *dev)struct backend_info *be =dev_get_drvdata (&dev->dev);unregister_hotplug_status_watch (be); +xenbus_rm (XBT_NIL , dev->nodename,"hotplug-status" );if (be->vif) {kobject_uevent (&dev->dev.kobj,KOBJ_OFFLINE );backend_disconnect (be);
drivers/nvme/host/tcp.c +2 -5
@@ -119,7 +119,6 @@ struct nvme_tcp_queue {struct mutex send_mutex;struct llist_head req_list;struct list_head send_list; -bool more_requests;/* recv state */ void *pdu;
@@ -315,7 +314,7 @@ static inline void nvme_tcp_send_all(struct nvme_tcp_queue *queue)static inline bool nvme_tcp_queue_more (struct nvme_tcp_queue *queue) {return !list_empty (&queue->send_list) || - !llist_empty (&queue->req_list) || queue->more_requests; + !llist_empty (&queue->req_list); } static inline void nvme_tcp_queue_request(struct nvme_tcp_request *req,
@@ -334,9 +333,7 @@ static inline void nvme_tcp_queue_request(struct nvme_tcp_request *req,*/ if (queue->io_cpu ==raw_smp_processor_id () && sync && empty &&mutex_trylock (&queue->send_mutex)) { - queue->more_requests = !last;nvme_tcp_send_all (queue); - queue->more_requests = false;mutex_unlock (&queue->send_mutex); }
@@ -1209,7 +1206,7 @@ static void nvme_tcp_io_work(struct work_struct *w)else if (unlikely (result <0 ))return ; -if (!pending) +if (!pending || !queue->rd_enabled)return ; }while (!time_after (jiffies, deadline));/* quota is exhausted */
drivers/nvme/target/core.c +4 -2
@@ -736,6 +736,8 @@ static void nvmet_set_error(struct nvmet_req *req, u16 status)static void __nvmet_req_complete (struct nvmet_req *req,u16 status) { +struct nvmet_ns *ns = req->ns; +if (!req->sq->sqhd_disabled)nvmet_update_sq_head (req); req->cqe->sq_id =cpu_to_le16 (req->sq->qid);
@@ -746,9 +748,9 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)trace_nvmet_req_complete (req); -if (req->ns) -nvmet_put_namespace (req->ns); req->ops->queue_response (req); +if (ns) +nvmet_put_namespace (ns); }void nvmet_req_complete (struct nvmet_req *req,u16 status)
drivers/nvme/target/zns.c +15 -2
@@ -100,6 +100,7 @@ void nvmet_execute_identify_cns_cs_ns(struct nvmet_req *req)struct nvme_id_ns_zns *id_zns;u64 zsze;u16 status; +u32 mar, mor;if (le32_to_cpu (req->cmd->identify.nsid) ==NVME_NSID_ALL ) { req->error_loc = offsetof(struct nvme_identify , nsid);
@@ -126,8 +127,20 @@ void nvmet_execute_identify_cns_cs_ns(struct nvmet_req *req) zsze = (bdev_zone_sectors (req->ns->bdev) <<9 ) >> req->ns->blksize_shift; id_zns->lbafe[0 ].zsze =cpu_to_le64 (zsze); - id_zns->mor =cpu_to_le32 (bdev_max_open_zones (req->ns->bdev)); - id_zns->mar =cpu_to_le32 (bdev_max_active_zones (req->ns->bdev)); + + mor =bdev_max_open_zones (req->ns->bdev); +if (!mor) + mor =U32_MAX ; +else + mor--; + id_zns->mor =cpu_to_le32 (mor); + + mar =bdev_max_active_zones (req->ns->bdev); +if (!mar) + mar =U32_MAX ; +else + mar--; + id_zns->mar =cpu_to_le32 (mar); done: status =nvmet_copy_to_sgl (req,0 , id_zns,sizeof (*id_zns));
drivers/parisc/ccio-dma.c +8 -3
@@ -1380,15 +1380,17 @@ ccio_init_resource(struct resource *res, char *name, void __iomem *ioaddr) } } -static void __init ccio_init_resources (struct ioc *ioc) +static int __init ccio_init_resources (struct ioc *ioc) {struct resource *res = ioc->mmio_region;char *name =kmalloc (14 ,GFP_KERNEL ); - +if (unlikely (!name)) +return -ENOMEM ;snprintf (name,14 ,"GSC Bus [%d/]" , ioc->hw_path);ccio_init_resource (res, name, &ioc->ioc_regs->io_io_low);ccio_init_resource (res +1 , name, &ioc->ioc_regs->io_io_low_hv); +return 0 ; } static int new_ioc_area(struct resource *res, unsigned long size,
@@ -1543,7 +1545,10 @@ static int __init ccio_probe(struct parisc_device *dev)return -ENOMEM ; }ccio_ioc_init (ioc); -ccio_init_resources (ioc); +if (ccio_init_resources (ioc)) { +kfree (ioc); +return -ENOMEM ; + } hppa_dma_ops = &ccio_ops; hba =kzalloc (sizeof (*hba),GFP_KERNEL );
drivers/regulator/core.c +7 -2
@@ -2688,13 +2688,18 @@ static int _regulator_do_enable(struct regulator_dev *rdev)*/ static int _regulator_handle_consumer_enable (struct regulator *regulator) { +int ret;struct regulator_dev *rdev = regulator->rdev;lockdep_assert_held_once (&rdev->mutex.base); regulator->enable_count++; -if (regulator->uA_load && regulator->enable_count ==1 ) -return drms_uA_update (rdev); +if (regulator->uA_load && regulator->enable_count ==1 ) { + ret =drms_uA_update (rdev); +if (ret) + regulator->enable_count--; +return ret; + }return 0 ; }
drivers/scsi/lpfc/lpfc_init.c +4 -1
@@ -7893,7 +7893,7 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)/* Allocate device driver memory */ rc =lpfc_mem_alloc (phba,SGL_ALIGN_SZ );if (rc) -return -ENOMEM ; + goto out_destroy_workqueue;/* IF Type 2 ports get initialized now. */ if (bf_get(lpfc_sli_intf_if_type, &phba->sli4_hba.sli_intf) >=
@@ -8309,6 +8309,9 @@ lpfc_sli4_driver_resource_setup(struct lpfc_hba *phba)lpfc_destroy_bootstrap_mbox (phba); out_free_mem:lpfc_mem_free (phba); +out_destroy_workqueue: +destroy_workqueue (phba->wq); + phba->wq =NULL ;return rc; }
drivers/scsi/megaraid/megaraid_sas_fusion.c +0 -1
@@ -5279,7 +5279,6 @@ megasas_alloc_fusion_context(struct megasas_instance *instance)if (!fusion->log_to_span) {dev_err (&instance->pdev->dev,"Failed from %s %d\n" , __func__, __LINE__); -kfree (instance->ctrl_context);return -ENOMEM ; } }
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -1
@@ -3670,6 +3670,7 @@ static struct fw_event_work *dequeue_next_fw_event(struct MPT3SAS_ADAPTER *ioc) fw_event =list_first_entry (&ioc->fw_event_list, struct fw_event_work, list);list_del_init (&fw_event->list); +fw_event_work_put (fw_event); }spin_unlock_irqrestore (&ioc->fw_event_lock, flags);
@@ -3751,7 +3752,6 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc)if (cancel_work_sync (&fw_event->work))fw_event_work_put (fw_event); -fw_event_work_put (fw_event); } ioc->fw_events_cleanup =0 ; }
drivers/scsi/qla2xxx/qla_target.c +2 -8
@@ -6961,14 +6961,8 @@ qlt_24xx_config_rings(struct scsi_qla_host *vha)if (ha->flags.msix_enabled) {if (IS_QLA83XX (ha) ||IS_QLA27XX (ha) ||IS_QLA28XX (ha)) { -if (IS_QLA2071 (ha)) { -/* 4 ports Baker: Enable Interrupt Handshake */ - icb->msix_atio =0 ; - icb->firmware_options_2 |=cpu_to_le32 (BIT_26 ); - }else { - icb->msix_atio =cpu_to_le16 (msix->entry); - icb->firmware_options_2 &=cpu_to_le32 (~BIT_26 ); - } + icb->msix_atio =cpu_to_le16 (msix->entry); + icb->firmware_options_2 &=cpu_to_le32 (~BIT_26 );ql_dbg (ql_dbg_init, vha,0xf072 ,"Registering ICB vector 0x%x for atio que.\n" , msix->entry);
drivers/scsi/ufs/ufshcd.c +8 -1
@@ -8476,6 +8476,8 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,struct scsi_device *sdp;unsigned long flags;int ret, retries; +unsigned long deadline; +int32_t remaining;spin_lock_irqsave (hba->host->host_lock, flags); sdp = hba->sdev_ufs_device;
@@ -8508,9 +8510,14 @@ static int ufshcd_set_dev_pwr_mode(struct ufs_hba *hba,* callbacks hence set the RQF_PM flag so that it doesn't resume the * already suspended childs. */ + deadline = jiffies +10 *HZ ;for (retries =3 ; retries >0 ; --retries) { + ret = -ETIMEDOUT ; + remaining = deadline - jiffies; +if (remaining <=0 ) +break ; ret =scsi_execute (sdp, cmd,DMA_NONE ,NULL ,0 ,NULL , &sshdr, -START_STOP_TIMEOUT ,0 ,0 ,RQF_PM ,NULL ); + remaining /HZ ,0 ,0 ,RQF_PM ,NULL );if (!scsi_status_is_check_condition (ret) || !scsi_sense_valid (&sshdr) || sshdr.sense_key !=UNIT_ATTENTION )
drivers/soc/bcm/brcmstb/pm/pm-arm.c +39 -11
126 lines not on this page · raw message
drivers/soc/imx/gpcv2.c +4 -1
@@ -237,6 +237,8 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd) } } +reset_control_assert (domain->reset); +/* Enable reset clocks for all devices in the domain */ ret =clk_bulk_prepare_enable (domain->num_clks, domain->clks);if (ret) {
@@ -244,7 +246,8 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd) goto out_regulator_disable; } -reset_control_assert (domain->reset); +/* delays for reset to propagate */ +udelay (5 );if (domain->bits.pxx) {/* request the domain to power up */
drivers/tee/tee_shm.c +1 -0
@@ -9,6 +9,7 @@#include <linux/sched.h> #include <linux/slab.h> #include <linux/tee_drv.h> +#include <linux/uaccess.h> #include <linux/uio.h> #include "tee_private.h"
drivers/vfio/vfio_iommu_type1.c +12 -0
@@ -561,6 +561,18 @@ static int vaddr_get_pfns(struct mm_struct *mm, unsigned long vaddr, ret =pin_user_pages_remote (mm, vaddr, npages, flags |FOLL_LONGTERM , pages,NULL ,NULL );if (ret >0 ) { +int i; + +/* +* The zero page is always resident, we don't need to pin it +* and it falls into our invalid/reserved test so we don't +* unpin in put_pfn(). Unpin all zero pages in the batch here. +*/ +for (i =0 ; i < ret; i++) { +if (unlikely (is_zero_pfn (page_to_pfn (pages[i])))) +unpin_user_page (pages[i]); + } + *pfn =page_to_pfn (pages[0 ]); goto done; }
drivers/video/fbdev/chipsfb.c +1 -0
@@ -430,6 +430,7 @@ static int chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent) err_release_fb:framebuffer_release (p); err_disable: +pci_disable_device (dp); err_out:return rc; }
drivers/video/fbdev/core/fbsysfs.c +4 -0
@@ -84,6 +84,10 @@ void framebuffer_release(struct fb_info *info)if (WARN_ON (refcount_read (&info->count)))return ; +#if IS_ENABLED (CONFIG_FB_BACKLIGHT ) +mutex_destroy (&info->bl_curve_mutex); +#endif +kfree (info->apertures);kfree (info); }
fs/afs/flock.c +1 -1
@@ -76,7 +76,7 @@ void afs_lock_op_done(struct afs_call *call)if (call->error ==0 ) {spin_lock (&vnode->lock);trace_afs_flock_ev (vnode,NULL , afs_flock_timestamp,0 ); - vnode->locked_at = call->reply_time; + vnode->locked_at = call->issue_time;afs_schedule_lock_extension (vnode);spin_unlock (&vnode->lock); }
fs/afs/fsclient.c +1 -1
@@ -131,7 +131,7 @@ static void xdr_decode_AFSFetchStatus(const __be32 **_bp,static time64_t xdr_decode_expiry (struct afs_call *call,u32 expiry) { -return ktime_divns (call->reply_time,NSEC_PER_SEC ) + expiry; +return ktime_divns (call->issue_time,NSEC_PER_SEC ) + expiry; } static void xdr_decode_AFSCallBack(const __be32 **_bp,
fs/afs/internal.h +1 -2
@@ -138,7 +138,6 @@ struct afs_call {bool need_attention;/* T if RxRPC poked us */ bool async;/* T if asynchronous */ bool upgrade;/* T to request service upgrade */ -bool have_reply_time;/* T if have got reply_time */ bool intr;/* T if interruptible */ bool unmarshalling_error;/* T if an unmarshalling error occurred */ u16 service_id;/* Actual service ID (after upgrade) */
@@ -152,7 +151,7 @@ struct afs_call { } __attribute__((packed));__be64 tmp64; }; -ktime_t reply_time;/* Time of first reply packet */ +ktime_t issue_time;/* Time of issue of operation */ };struct afs_call_type {
fs/afs/rxrpc.c +1 -6
@@ -347,6 +347,7 @@ void afs_make_call(struct afs_addr_cursor *ac, struct afs_call *call, gfp_t gfp)if (call->max_lifespan)rxrpc_kernel_set_max_life (call->net->socket, rxcall, call->max_lifespan); + call->issue_time =ktime_get_real ();/* send the request */ iov[0 ].iov_base = call->request;
@@ -497,12 +498,6 @@ static void afs_deliver_to_call(struct afs_call *call)return ; } -if (!call->have_reply_time && -rxrpc_kernel_get_reply_time (call->net->socket, - call->rxcall, - &call->reply_time)) - call->have_reply_time = true; - ret = call->type->deliver (call); state =READ_ONCE (call->state);if (ret ==0 && call->unmarshalling_error)
fs/afs/yfsclient.c +1 -2
@@ -239,8 +239,7 @@ static void xdr_decode_YFSCallBack(const __be32 **_bp,struct afs_callback *cb = &scb->callback;ktime_t cb_expiry; - cb_expiry = call->reply_time; - cb_expiry =ktime_add (cb_expiry,xdr_to_u64 (x->expiration_time) *100 ); + cb_expiry =ktime_add (call->issue_time,xdr_to_u64 (x->expiration_time) *100 ); cb->expires_at =ktime_divns (cb_expiry,NSEC_PER_SEC ); scb->have_cb = true; *_bp +=xdr_size (x);
fs/btrfs/zoned.c +12 -3
@@ -392,10 +392,19 @@ int btrfs_get_dev_zone_info(struct btrfs_device *device, bool populate_cache)* since btrfs adds the pages one by one to a bio, and btrfs cannot * increase the metadata reservation even if it increases the number of * extents, it is safe to stick with the limit. +* +* With the zoned emulation, we can have non-zoned device on the zoned +* mode. In this case, we don't have a valid max zone append size. So, +* use max_segments * PAGE_SIZE as the pseudo max_zone_append_size. */ - zone_info->max_zone_append_size = -min_t (u64, (u64 )bdev_max_zone_append_sectors (bdev) <<SECTOR_SHIFT , - (u64 )bdev_max_segments (bdev) <<PAGE_SHIFT ); +if (bdev_is_zoned (bdev)) { + zone_info->max_zone_append_size =min_t (u64, + (u64 )bdev_max_zone_append_sectors (bdev) <<SECTOR_SHIFT , + (u64 )bdev_max_segments (bdev) <<PAGE_SHIFT ); + }else { + zone_info->max_zone_append_size = + (u64 )bdev_max_segments (bdev) <<PAGE_SHIFT ; + }if (!IS_ALIGNED (nr_sectors, zone_sectors)) zone_info->nr_zones++;
fs/debugfs/inode.c +22 -0
@@ -734,6 +734,28 @@ void debugfs_remove(struct dentry *dentry) }EXPORT_SYMBOL_GPL (debugfs_remove); +/** +* debugfs_lookup_and_remove - lookup a directory or file and recursively remove it +* @name: a pointer to a string containing the name of the item to look up. +* @parent: a pointer to the parent dentry of the item. +* +* This is the equlivant of doing something like +* debugfs_remove(debugfs_lookup(..)) but with the proper reference counting +* handled for the directory being looked up. +*/ +void debugfs_lookup_and_remove (const char *name,struct dentry *parent) +{ +struct dentry *dentry; + + dentry =debugfs_lookup (name, parent); +if (!dentry) +return ; + +debugfs_remove (dentry); +dput (dentry); +} +EXPORT_SYMBOL_GPL (debugfs_lookup_and_remove); +/** * debugfs_rename - rename a file/directory in the debugfs filesystem * @old_dir: a pointer to the parent dentry for the renamed object. This
fs/erofs/internal.h +0 -29
@@ -143,7 +143,6 @@ struct erofs_workgroup {atomic_t refcount; }; -#if defined(CONFIG_SMP )static inline bool erofs_workgroup_try_to_freeze (struct erofs_workgroup *grp,int val) {
@@ -172,34 +171,6 @@ static inline int erofs_wait_on_workgroup_freezed(struct erofs_workgroup *grp)return atomic_cond_read_relaxed (&grp->refcount, VAL != EROFS_LOCKED_MAGIC); } -#else -static inline bool erofs_workgroup_try_to_freeze (struct erofs_workgroup *grp, -int val) -{ -preempt_disable (); -/* no need to spin on UP platforms, let's just disable preemption. */ -if (val !=atomic_read (&grp->refcount)) { -preempt_enable (); -return false; - } -return true; -} - -static inline void erofs_workgroup_unfreeze (struct erofs_workgroup *grp, -int orig_val) -{ -preempt_enable (); -} - -static inline int erofs_wait_on_workgroup_freezed (struct erofs_workgroup *grp) -{ -int v =atomic_read (&grp->refcount); - -/* workgroup is never freezed on uniprocessor systems */ -DBG_BUGON (v ==EROFS_LOCKED_MAGIC ); -return v; -} -#endif /* !CONFIG_SMP */ #endif /* !CONFIG_EROFS_FS_ZIP */ /* we strictly follow PAGE_SIZE and no buffer head yet */
fs/nfs/dir.c +11 -5
@@ -78,6 +78,7 @@ static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir ctx->attr_gencount = nfsi->attr_gencount; ctx->dir_cookie =0 ; ctx->dup_cookie =0 ; + ctx->page_index =0 ;spin_lock (&dir->i_lock);if (list_empty (&nfsi->open_files) && (nfsi->cache_validity &NFS_INO_DATA_INVAL_DEFER ))
@@ -85,6 +86,7 @@ static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dirNFS_INO_INVALID_DATA | NFS_INO_REVAL_FORCED);list_add (&ctx->list, &nfsi->open_files); +clear_bit (NFS_INO_FORCE_READDIR , &nfsi->flags);spin_unlock (&dir->i_lock);return ctx; }
@@ -626,8 +628,7 @@ void nfs_force_use_readdirplus(struct inode *dir)if (nfs_server_capable (dir,NFS_CAP_READDIRPLUS ) && !list_empty (&nfsi->open_files)) {set_bit (NFS_INO_ADVISE_RDPLUS , &nfsi->flags); -invalidate_mapping_pages (dir->i_mapping, - nfsi->page_index +1 ,-1 ); +set_bit (NFS_INO_FORCE_READDIR , &nfsi->flags); } }
@@ -938,10 +939,8 @@ static int find_and_lock_cache_page(struct nfs_readdir_descriptor *desc) sizeof(nfsi->cookieverf)); } res =nfs_readdir_search_array (desc); -if (res ==0 ) { - nfsi->page_index = desc->page_index; +if (res ==0 )return 0 ; - }nfs_readdir_page_unlock_and_put_cached (desc);return res; }
@@ -1081,6 +1080,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx)struct nfs_inode *nfsi =NFS_I (inode);struct nfs_open_dir_context *dir_ctx = file->private_data;struct nfs_readdir_descriptor *desc; +pgoff_t page_index;int res; dfprintk(FILE, "NFS: readdir(%pD2) starting at cookie %llu\n",
@@ -1111,10 +1111,15 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx) desc->dir_cookie = dir_ctx->dir_cookie; desc->dup_cookie = dir_ctx->dup_cookie; desc->duped = dir_ctx->duped; + page_index = dir_ctx->page_index; desc->attr_gencount = dir_ctx->attr_gencount;memcpy (desc->verf, dir_ctx->verf,sizeof (desc->verf));spin_unlock (&file->f_lock); +if (test_and_clear_bit (NFS_INO_FORCE_READDIR , &nfsi->flags) && +list_is_singular (&nfsi->open_files)) +invalidate_mapping_pages (inode->i_mapping, page_index +1 ,-1 ); + do { res = readdir_search_pagecache(desc);
@@ -1151,6 +1156,7 @@ static int nfs_readdir(struct file *file, struct dir_context *ctx) dir_ctx->dup_cookie = desc->dup_cookie; dir_ctx->duped = desc->duped; dir_ctx->attr_gencount = desc->attr_gencount; + dir_ctx->page_index = desc->page_index;memcpy (dir_ctx->verf, desc->verf,sizeof (dir_ctx->verf));spin_unlock (&file->f_lock);
fs/nfs/file.c +6 -9
@@ -223,8 +223,10 @@ nfs_file_fsync_commit(struct file *file, int datasync)int nfs_file_fsync (struct file *file,loff_t start,loff_t end,int datasync) { -struct nfs_open_context *ctx =nfs_file_open_context (file);struct inode *inode =file_inode (file); +struct nfs_inode *nfsi =NFS_I (inode); +long save_nredirtied =atomic_long_read (&nfsi->redirtied_pages); +long nredirtied;int ret;trace_nfs_fsync_enter (inode);
@@ -239,15 +241,10 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) ret =pnfs_sync_inode (inode, !!datasync);if (ret !=0 )break ; -if (!test_and_clear_bit (NFS_CONTEXT_RESEND_WRITES , &ctx->flags)) + nredirtied =atomic_long_read (&nfsi->redirtied_pages); +if (nredirtied == save_nredirtied)break ; -/* -* If nfs_file_fsync_commit detected a server reboot, then -* resend all dirty pages that might have been covered by -* the NFS_CONTEXT_RESEND_WRITES flag -*/ - start =0 ; - end =LLONG_MAX ; + save_nredirtied = nredirtied; }trace_nfs_fsync_exit (inode, ret);
fs/nfs/inode.c +19 -8
@@ -431,6 +431,23 @@ nfs_ilookup(struct super_block *sb, struct nfs_fattr *fattr, struct nfs_fh *fh)return inode; } +static void nfs_inode_init_regular (struct nfs_inode *nfsi) +{ +atomic_long_set (&nfsi->nrequests,0 ); +atomic_long_set (&nfsi->redirtied_pages,0 ); +INIT_LIST_HEAD (&nfsi->commit_info.list); +atomic_long_set (&nfsi->commit_info.ncommit,0 ); +atomic_set (&nfsi->commit_info.rpcs_out,0 ); +mutex_init (&nfsi->commit_mutex); +} + +static void nfs_inode_init_dir (struct nfs_inode *nfsi) +{ + nfsi->cache_change_attribute =0 ; +memset (nfsi->cookieverf,0 ,sizeof (nfsi->cookieverf)); +init_rwsem (&nfsi->rmdir_sem); +} +/* * This is our front-end to iget that looks up inodes by file handle * instead of inode number.
@@ -485,10 +502,12 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, stif (S_ISREG (inode->i_mode)) { inode->i_fop =NFS_SB (sb)->nfs_client->rpc_ops->file_ops; inode->i_data.a_ops = &nfs_file_aops; +nfs_inode_init_regular (nfsi); }else if (S_ISDIR (inode->i_mode)) { inode->i_op =NFS_SB (sb)->nfs_client->rpc_ops->dir_inode_ops; inode->i_fop = &nfs_dir_operations; inode->i_data.a_ops = &nfs_dir_aops; +nfs_inode_init_dir (nfsi);/* Deal with crossing mountpoints */ if (fattr->valid &NFS_ATTR_FATTR_MOUNTPOINT || fattr->valid &NFS_ATTR_FATTR_V4_REFERRAL ) {
@@ -514,7 +533,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st inode->i_uid =make_kuid (&init_user_ns,-2 ); inode->i_gid =make_kgid (&init_user_ns,-2 ); inode->i_blocks =0 ; -memset (nfsi->cookieverf,0 ,sizeof (nfsi->cookieverf)); nfsi->write_io =0 ; nfsi->read_io =0 ;
@@ -2282,14 +2300,7 @@ static void init_once(void *foo)INIT_LIST_HEAD (&nfsi->open_files);INIT_LIST_HEAD (&nfsi->access_cache_entry_lru);INIT_LIST_HEAD (&nfsi->access_cache_inode_lru); -INIT_LIST_HEAD (&nfsi->commit_info.list); -atomic_long_set (&nfsi->nrequests,0 ); -atomic_long_set (&nfsi->commit_info.ncommit,0 ); -atomic_set (&nfsi->commit_info.rpcs_out,0 ); -init_rwsem (&nfsi->rmdir_sem); -mutex_init (&nfsi->commit_mutex);nfs4_init_once (nfsi); - nfsi->cache_change_attribute =0 ; }static int __init nfs_init_inodecache (void )
fs/nfs/write.c +4 -2
@@ -1394,10 +1394,12 @@ static void nfs_initiate_write(struct nfs_pgio_header *hdr,*/ static void nfs_redirty_request (struct nfs_page *req) { +struct nfs_inode *nfsi =NFS_I (page_file_mapping (req->wb_page)->host); +/* Bump the transmission count */ req->wb_nio++;nfs_mark_request_dirty (req); -set_bit (NFS_CONTEXT_RESEND_WRITES , &nfs_req_openctx (req)->flags); +atomic_long_inc (&nfsi->redirtied_pages);nfs_end_page_writeback (req);nfs_release_request (req); }
@@ -1870,7 +1872,7 @@ static void nfs_commit_release_pages(struct nfs_commit_data *data)/* We have a mismatch. Write the page again */ dprintk_cont (" mismatch\n" );nfs_mark_request_dirty (req); -set_bit (NFS_CONTEXT_RESEND_WRITES , &nfs_req_openctx (req)->flags); +atomic_long_inc (&NFS_I (data->inode)->redirtied_pages); next:nfs_unlock_and_release_request (req);/* Latency breaker */
include/linux/buffer_head.h +11 -0
@@ -136,6 +136,17 @@ BUFFER_FNS(Defer_Completion, defer_completion) static __always_inline void set_buffer_uptodate(struct buffer_head *bh) { +/* +* If somebody else already set this uptodate, they will +* have done the memory barrier, and a reader will thus +* see *some* valid buffer state. +* +* Any other serialization (with IO errors or whatever that +* might clear the bit) has to come from other state (eg BH_Lock). +*/ +if (test_bit (BH_Uptodate, &bh->b_state)) +return ; +/* * make it consistent with folio_mark_uptodate * pairs with smp_load_acquire in buffer_uptodate
include/linux/debugfs.h +6 -0
@@ -91,6 +91,8 @@ struct dentry *debugfs_create_automount(const char *name,void debugfs_remove (struct dentry *dentry);#define debugfs_remove_recursive debugfs_remove +void debugfs_lookup_and_remove (const char *name,struct dentry *parent); +const struct file_operations *debugfs_real_fops (const struct file *filp);int debugfs_file_get (struct dentry *dentry);
@@ -225,6 +227,10 @@ static inline void debugfs_remove(struct dentry *dentry)static inline void debugfs_remove_recursive (struct dentry *dentry) { } +static inline void debugfs_lookup_and_remove (const char *name, +struct dentry *parent) +{ } +const struct file_operations *debugfs_real_fops (const struct file *filp);static inline int debugfs_file_get (struct dentry *dentry)
include/linux/nfs_fs.h +27 -21
75 lines not on this page · raw message
include/linux/skbuff.h +38 -11
67 lines not on this page · raw message
include/linux/udp.h +1 -0
@@ -75,6 +75,7 @@ struct udp_sock {* For encapsulation sockets. */ int (*encap_rcv)(struct sock *sk,struct sk_buff *skb); +void (*encap_err_rcv)(struct sock *sk,struct sk_buff *skb,unsigned int udp_offset);int (*encap_err_lookup)(struct sock *sk,struct sk_buff *skb);void (*encap_destroy)(struct sock *sk);
include/net/udp_tunnel.h +4 -0
@@ -67,6 +67,9 @@ static inline int udp_sock_create(struct net *net,typedef int (*udp_tunnel_encap_rcv_t )(struct sock *sk,struct sk_buff *skb);typedef int (*udp_tunnel_encap_err_lookup_t )(struct sock *sk,struct sk_buff *skb); +typedef void (*udp_tunnel_encap_err_rcv_t )(struct sock *sk, +struct sk_buff *skb, +unsigned int udp_offset);typedef void (*udp_tunnel_encap_destroy_t )(struct sock *sk); typedef struct sk_buff *(*udp_tunnel_gro_receive_t)(struct sock *sk, struct list_head *head,
@@ -80,6 +83,7 @@ struct udp_tunnel_sock_cfg {__u8 encap_type;udp_tunnel_encap_rcv_t encap_rcv;udp_tunnel_encap_err_lookup_t encap_err_lookup; +udp_tunnel_encap_err_rcv_t encap_err_rcv;udp_tunnel_encap_destroy_t encap_destroy;udp_tunnel_gro_receive_t gro_receive;udp_tunnel_gro_complete_t gro_complete;
include/soc/at91/sama7-ddr.h +8 -4
@@ -11,8 +11,6 @@#ifndef __SAMA7_DDR_H__#define __SAMA7_DDR_H__ -#ifdef CONFIG_SOC_SAMA7 -/* DDR3PHY */ #define DDR3PHY_PIR (0x04)/* DDR3PHY PHY Initialization Register */ #define DDR3PHY_PIR_DLLBYP (1 << 17)/* DLL Bypass */
@@ -40,6 +38,14 @@#define DDR3PHY_DSGCR_ODTPDD_ODT0 (1 << 20)/* ODT[0] Power Down Driver */ #define DDR3PHY_ZQ0SR0 (0x188)/* ZQ status register 0 */ +#define DDR3PHY_ZQ0SR0_PDO_OFF (0)/* Pull-down output impedance select offset */ +#define DDR3PHY_ZQ0SR0_PUO_OFF (5)/* Pull-up output impedance select offset */ +#define DDR3PHY_ZQ0SR0_PDODT_OFF (10)/* Pull-down on-die termination impedance select offset */ +#define DDR3PHY_ZQ0SRO_PUODT_OFF (15)/* Pull-up on-die termination impedance select offset */ + +#define DDR3PHY_DX0DLLCR (0x1CC)/* DDR3PHY DATX8 DLL Control Register */ +#define DDR3PHY_DX1DLLCR (0x20C)/* DDR3PHY DATX8 DLL Control Register */ +#define DDR3PHY_DXDLLCR_DLLDIS (1 << 31)/* DLL Disable */ /* UDDRC */ #define UDDRC_STAT (0x04)/* UDDRC Operating Mode Status Register */
@@ -75,6 +81,4 @@#define UDDRC_PCTRL_3 (0x6A0)/* UDDRC Port 3 Control Register */ #define UDDRC_PCTRL_4 (0x750)/* UDDRC Port 4 Control Register */ -#endif /* CONFIG_SOC_SAMA7 */ -#endif /* __SAMA7_DDR_H__ */
kernel/cgroup/cgroup.c +63 -22
159 lines not on this page · raw message
kernel/cgroup/cpuset.c +1 -2
@@ -2249,7 +2249,7 @@ static void cpuset_attach(struct cgroup_taskset *tset)cgroup_taskset_first (tset, &css); cs =css_cs (css); -cpus_read_lock (); +lockdep_assert_cpus_held ();/* see cgroup_attach_lock() */ percpu_down_write (&cpuset_rwsem);guarantee_online_mems (cs, &cpuset_attach_nodemask_to);
@@ -2303,7 +2303,6 @@ static void cpuset_attach(struct cgroup_taskset *tset)wake_up (&cpuset_attach_wq);percpu_up_write (&cpuset_rwsem); -cpus_read_unlock (); }/* The various types of files and directories in a cpuset file system */
kernel/dma/swiotlb.c +4 -1
@@ -435,7 +435,10 @@ static void swiotlb_bounce(struct device *dev, phys_addr_t tlb_addr, size_t size } } -#define slot_addr (start, idx) ((start) + ((idx) << IO_TLB_SHIFT)) +static inline phys_addr_t slot_addr (phys_addr_t start,phys_addr_t idx) +{ +return start + (idx <<IO_TLB_SHIFT ); +}/* * Carefully handle integer overflow which can occur when boundary_mask == ~0UL.
kernel/fork.c +1 -0
@@ -1153,6 +1153,7 @@ void mmput_async(struct mm_struct *mm) schedule_work(&mm->async_put_work); } } +EXPORT_SYMBOL_GPL (mmput_async);#endif /**
kernel/kprobes.c +1 -0
@@ -1561,6 +1561,7 @@ static int check_kprobe_address_safe(struct kprobe *p,/* Ensure it is not in reserved area nor out of text */ if (!(core_kernel_text((unsigned long) p->addr) || is_module_text_address((unsigned long) p->addr)) || + in_gate_area_no_mm((unsigned long) p->addr) || within_kprobe_blacklist((unsigned long) p->addr) || jump_label_text_reserved(p->addr, p->addr) || static_call_text_reserved(p->addr, p->addr) ||
kernel/sched/debug.c +1 -1
@@ -416,7 +416,7 @@ void update_sched_domain_debugfs(void)char buf[32 ];snprintf (buf,sizeof (buf),"cpu%d" , cpu); -debugfs_remove (debugfs_lookup (buf, sd_dentry)); +debugfs_lookup_and_remove (buf, sd_dentry); d_cpu =debugfs_create_dir (buf, sd_dentry); i =0 ;
kernel/trace/trace_events_trigger.c +2 -1
@@ -128,7 +128,8 @@ static bool check_user_trigger(struct trace_event_file *file) {struct event_trigger_data *data; -list_for_each_entry_rcu (data, &file->triggers, list) { +list_for_each_entry_rcu (data, &file->triggers, list, +lockdep_is_held (&event_mutex)) {if (data->flags &EVENT_TRIGGER_FL_PROBE )continue ;return true;
mm/kmemleak.c +4 -4
@@ -1125,7 +1125,7 @@ EXPORT_SYMBOL(kmemleak_no_scan);void __ref kmemleak_alloc_phys (phys_addr_t phys,size_t size,int min_count,gfp_t gfp) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_alloc (__va (phys), size, min_count, gfp); }EXPORT_SYMBOL (kmemleak_alloc_phys);
@@ -1139,7 +1139,7 @@ EXPORT_SYMBOL(kmemleak_alloc_phys);*/ void __ref kmemleak_free_part_phys (phys_addr_t phys,size_t size) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_free_part (__va (phys), size); }EXPORT_SYMBOL (kmemleak_free_part_phys);
@@ -1151,7 +1151,7 @@ EXPORT_SYMBOL(kmemleak_free_part_phys);*/ void __ref kmemleak_not_leak_phys (phys_addr_t phys) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_not_leak (__va (phys)); }EXPORT_SYMBOL (kmemleak_not_leak_phys);
@@ -1163,7 +1163,7 @@ EXPORT_SYMBOL(kmemleak_not_leak_phys);*/ void __ref kmemleak_ignore_phys (phys_addr_t phys) { -if (PHYS_PFN (phys) >= min_low_pfn &&PHYS_PFN (phys) < max_low_pfn) +if (!IS_ENABLED (CONFIG_HIGHMEM ) ||PHYS_PFN (phys) < max_low_pfn)kmemleak_ignore (__va (phys)); }EXPORT_SYMBOL (kmemleak_ignore_phys);
net/bridge/br_netfilter_hooks.c +2 -0
@@ -384,6 +384,7 @@ static int br_nf_pre_routing_finish(struct net *net, struct sock *sk, struct sk_/* - Bridged-and-DNAT'ed traffic doesn't * require ip_forwarding. */ if (rt->dst.dev == dev) { +skb_dst_drop (skb);skb_dst_set (skb, &rt->dst); goto bridged_dnat; }
@@ -413,6 +414,7 @@ static int br_nf_pre_routing_finish(struct net *net, struct sock *sk, struct sk_kfree_skb (skb);return 0 ; } +skb_dst_drop (skb);skb_dst_set_noref (skb, &rt->dst); }
net/bridge/br_netfilter_ipv6.c +1 -0
@@ -197,6 +197,7 @@ static int br_nf_pre_routing_finish_ipv6(struct net *net, struct sock *sk, struckfree_skb (skb);return 0 ; } +skb_dst_drop (skb);skb_dst_set_noref (skb, &rt->dst); }
net/core/datagram.c +1 -1
@@ -677,7 +677,7 @@ int __zerocopy_sg_from_iter(struct sock *sk, struct sk_buff *skb,page_ref_sub (last_head, refs); refs =0 ; } -skb_fill_page_desc (skb, frag++, head, start, size); +skb_fill_page_desc_noacc (skb, frag++, head, start, size); }if (refs)page_ref_sub (last_head, refs);
net/core/skbuff.c +2 -3
@@ -4188,9 +4188,8 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,SKB_GSO_CB (nskb)->csum_start =skb_headroom (nskb) + doffset; }else { -skb_copy_bits (head_skb, offset, -skb_put (nskb, len), - len); +if (skb_copy_bits (head_skb, offset,skb_put (nskb, len), len)) + goto err; }continue ; }
net/ipv4/tcp.c +1 -1
@@ -1002,7 +1002,7 @@ struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int flags,skb_frag_size_add (&skb_shinfo (skb)->frags[i -1 ], copy); }else {get_page (page); -skb_fill_page_desc (skb, i, page, offset, copy); +skb_fill_page_desc_noacc (skb, i, page, offset, copy); }if (!(flags &MSG_NO_SHARED_FRAGS ))
net/ipv4/tcp_input.c +18 -7
@@ -2506,6 +2506,21 @@ static inline bool tcp_may_undo(const struct tcp_sock *tp)return tp->undo_marker && (!tp->undo_retrans ||tcp_packet_delayed (tp)); } +static bool tcp_is_non_sack_preventing_reopen (struct sock *sk) +{ +struct tcp_sock *tp =tcp_sk (sk); + +if (tp->snd_una == tp->high_seq &&tcp_is_reno (tp)) { +/* Hold old state until something *above* high_seq +* is ACKed. For Reno it is MUST to prevent false +* fast retransmits (RFC2582). SACK TCP is safe. */ +if (!tcp_any_retrans_done (sk)) + tp->retrans_stamp =0 ; +return true; + } +return false; +} +/* People celebrate: "We love our President!" */ static bool tcp_try_undo_recovery (struct sock *sk) {
@@ -2528,14 +2543,8 @@ static bool tcp_try_undo_recovery(struct sock *sk) }else if (tp->rack.reo_wnd_persist) { tp->rack.reo_wnd_persist--; } -if (tp->snd_una == tp->high_seq &&tcp_is_reno (tp)) { -/* Hold old state until something *above* high_seq -* is ACKed. For Reno it is MUST to prevent false -* fast retransmits (RFC2582). SACK TCP is safe. */ -if (!tcp_any_retrans_done (sk)) - tp->retrans_stamp =0 ; +if (tcp_is_non_sack_preventing_reopen (sk))return true; - }tcp_set_ca_state (sk, TCP_CA_Open); tp->is_sack_reneg =0 ;return false;
@@ -2571,6 +2580,8 @@ static bool tcp_try_undo_loss(struct sock *sk, bool frto_undo)NET_INC_STATS (sock_net (sk),LINUX_MIB_TCPSPURIOUSRTOS );inet_csk (sk)->icsk_retransmits =0 ; +if (tcp_is_non_sack_preventing_reopen (sk)) +return true;if (frto_undo ||tcp_is_sack (tp)) {tcp_set_ca_state (sk, TCP_CA_Open); tp->is_sack_reneg =0 ;
net/ipv4/udp.c +2 -0
@@ -781,6 +781,8 @@ int __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable)*/ if (tunnel) {/* ...not for tunnels though: we don't have a sending socket */ +if (udp_sk (sk)->encap_err_rcv) +udp_sk (sk)->encap_err_rcv (sk, skb, iph->ihl <<2 ); goto out; }if (!inet->recverr) {
net/ipv4/udp_tunnel_core.c +1 -0
@@ -75,6 +75,7 @@ void setup_udp_tunnel_sock(struct net *net, struct socket *sock,udp_sk (sk)->encap_type = cfg->encap_type;udp_sk (sk)->encap_rcv = cfg->encap_rcv; +udp_sk (sk)->encap_err_rcv = cfg->encap_err_rcv;udp_sk (sk)->encap_err_lookup = cfg->encap_err_lookup;udp_sk (sk)->encap_destroy = cfg->encap_destroy;udp_sk (sk)->gro_receive = cfg->gro_receive;
net/ipv6/seg6.c +5 -0
@@ -191,6 +191,11 @@ static int seg6_genl_sethmac(struct sk_buff *skb, struct genl_info *info) goto out_unlock; } +if (slen >nla_len (info->attrs[SEG6_ATTR_SECRET ])) {
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_proto_tcp.c +31 -0
Lines of this file are not shown. View the raw message.
net/rxrpc/peer_event.c +256 -37
293 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.