Linux 6.12.83
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.12.83 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.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/admin-guide/mm/damon/reclaim.rst | 4 Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml | 4 Makefile | 2 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts | 2 arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi | 26 - arch/arm64/boot/dts/qcom/x1e80100.dtsi | 2 arch/arm64/include/asm/uaccess.h | 2 arch/arm64/kvm/guest.c | 4 arch/loongarch/kvm/vcpu.c | 2 arch/loongarch/kvm/vm.c | 2 arch/mips/kvm/mips.c | 4 arch/powerpc/include/asm/uaccess.h | 3 arch/powerpc/kvm/book3s.c | 4 arch/powerpc/kvm/booke.c | 4 arch/powerpc/lib/pmem.c | 11 arch/riscv/kvm/vcpu.c | 2 arch/riscv/kvm/vm.c | 2 arch/s390/kvm/kvm-s390.c | 4 arch/x86/events/intel/uncore_discovery.c | 2 arch/x86/include/asm/uaccess.h | 2 arch/x86/include/asm/uaccess_32.h | 8 arch/x86/include/asm/uaccess_64.h | 16 arch/x86/include/uapi/asm/kvm.h | 12 arch/x86/kvm/svm/sev.c | 24 - arch/x86/kvm/x86.c | 18 arch/x86/lib/copy_user_uncached_64.S | 6 arch/x86/lib/usercopy_32.c | 9 arch/x86/lib/usercopy_64.c | 12 crypto/af_alg.c | 2 crypto/algif_aead.c | 2 crypto/algif_skcipher.c | 5 drivers/ata/ahci.c | 14 drivers/gpio/gpio-tegra.c | 2 drivers/gpio/gpiolib.c | 43 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 drivers/gpu/drm/i915/i915_gem.c | 2 drivers/gpu/drm/qxl/qxl_ioctl.c | 2 drivers/gpu/drm/vc4/vc4_bo.c | 3 drivers/gpu/drm/vc4/vc4_gem.c | 19 drivers/gpu/drm/vc4/vc4_hdmi.c | 14 drivers/gpu/drm/vc4/vc4_v3d.c | 1 drivers/gpu/drm/xe/xe_mmio.c | 135 +++--- drivers/gpu/drm/xe/xe_mmio.h | 76 --- drivers/gpu/drm/xe/xe_trace.h | 7 drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 drivers/hid/hid-alps.c | 3 drivers/hid/hid-core.c | 3 drivers/hid/hid-ids.h | 3 drivers/hid/hid-quirks.c | 1 drivers/hid/hid-roccat.c | 2 drivers/hwmon/powerz.c | 8 drivers/i2c/busses/i2c-s3c2410.c | 7 drivers/infiniband/hw/irdma/verbs.c | 1 drivers/infiniband/sw/rdmavt/qp.c | 8 drivers/md/bcache/super.c | 7 drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c | 9 drivers/media/test-drivers/vidtv/vidtv_bridge.c | 4 drivers/media/test-drivers/vidtv/vidtv_channel.c | 4 drivers/media/test-drivers/vidtv/vidtv_mux.c | 4 drivers/media/test-drivers/vidtv/vidtv_ts.c | 48 +- drivers/media/test-drivers/vidtv/vidtv_ts.h | 4 drivers/media/usb/as102/as102_usb_drv.c | 2 drivers/media/usb/em28xx/em28xx-video.c | 14 drivers/media/usb/hackrf/hackrf.c | 7 drivers/net/can/spi/mcp251x.c | 29 + drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 8 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 15 drivers/net/ethernet/intel/ixgbevf/vf.c | 7 drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 19 drivers/net/ethernet/wangxun/txgbe/txgbe_type.h | 8 drivers/net/ipa/reg/gsi_reg-v5.0.c | 9 drivers/net/phy/sfp.c | 16 drivers/net/usb/cdc-phonet.c | 7 drivers/net/wan/lapbether.c | 13 drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c | 5 drivers/net/wireless/realtek/rtw88/usb.c | 3 drivers/net/wireless/ti/wl1251/tx.c | 8 drivers/nfc/s3fwrn5/uart.c | 10 drivers/ntb/ntb_transport.c | 7 drivers/pci/bus.c | 6 drivers/pci/controller/pci-hyperv.c | 8 drivers/pci/endpoint/functions/pci-epf-vntb.c | 1 drivers/pci/pci-driver.c | 8 drivers/pci/pci.c | 10 drivers/pci/pci.h | 1 drivers/pinctrl/intel/pinctrl-intel.c | 2 drivers/platform/x86/amd/pmc/pmc-quirks.c | 9 drivers/platform/x86/asus-nb-wmi.c | 2 drivers/soc/aspeed/aspeed-socinfo.c | 2 drivers/soc/qcom/pdr_internal.h | 2 drivers/soc/qcom/qcom_pdr_msg.c | 2 drivers/staging/media/rkvdec/rkvdec-vp9.c | 3 drivers/staging/rtl8723bs/core/rtw_security.c | 2 drivers/staging/sm750fb/sm750.c | 3 drivers/thermal/thermal_core.c | 36 + drivers/thermal/thermal_core.h | 1 drivers/usb/class/cdc-acm.c | 53 ++ drivers/usb/core/port.c | 1 drivers/usb/gadget/function/f_hid.c | 15 drivers/usb/gadget/function/f_ncm.c | 4 drivers/usb/gadget/function/f_phonet.c | 9 drivers/usb/gadget/udc/renesas_usb3.c | 7 drivers/usb/serial/option.c | 2 drivers/usb/storage/unusual_devs.h | 7 drivers/usb/usbip/usbip_common.c | 12 drivers/video/fbdev/tdfxfb.c | 3 drivers/video/fbdev/udlfb.c | 3 fs/dcache.c | 4 fs/eventpoll.c | 6 fs/nilfs2/dat.c | 3 fs/ocfs2/aops.c | 3 fs/ocfs2/inode.c | 31 + fs/ocfs2/mmap.c | 7 fs/ocfs2/ocfs2_trace.h | 10 fs/ocfs2/resize.c | 10 fs/smb/client/fs_context.c | 4 fs/smb/client/smb2inode.c | 2 fs/smb/server/connection.c | 1 fs/smb/server/smb2pdu.c | 7 fs/smb/server/smbacl.c | 3 include/linux/kvm_host.h | 93 ++-- include/linux/soc/qcom/pdr.h | 1 include/linux/uaccess.h | 11 include/net/ip_tunnels.h | 2 include/net/netfilter/nf_queue.h | 1 include/net/pkt_cls.h | 2 include/net/xdp_sock.h | 2 include/net/xdp_sock_drv.h | 23 + include/trace/events/btrfs.h | 11 include/uapi/linux/kvm.h | 19 kernel/events/uprobes.c | 4 kernel/fork.c | 17 kernel/sched/deadline.c | 2 kernel/trace/trace_probe.c | 2 lib/iov_iter.c | 4 mm/backing-dev.c | 5 mm/kasan/init.c | 8 net/bluetooth/hci_conn.c | 2 net/bluetooth/hci_core.c | 2 net/bluetooth/hci_sync.c | 20 net/can/raw.c | 11 net/ipv4/icmp.c | 7 net/ipv4/nexthop.c | 41 + net/ipv6/exthdrs.c | 4 net/ipv6/netfilter/ip6t_eui64.c | 3 net/ipv6/seg6_hmac.c | 2 net/l2tp/l2tp_core.c | 5 net/netfilter/ipvs/ip_vs_ctl.c | 1 net/netfilter/nf_conntrack_netlink.c | 2 net/netfilter/nf_conntrack_proto_sctp.c | 3 net/netfilter/nfnetlink_log.c | 8 net/netfilter/nfnetlink_queue.c | 214 +++------- net/netfilter/nft_set_pipapo_avx2.c | 20 net/netfilter/xt_multiport.c | 34 + net/nfc/digital_technology.c | 6 net/nfc/llcp_core.c | 2 net/rxrpc/key.c | 5 net/sched/act_csum.c | 6 net/sched/em_cmp.c | 5 net/sched/em_nbyte.c | 2 net/sched/em_text.c | 11 net/unix/diag.c | 21 net/xdp/xdp_umem.c | 3 net/xdp/xsk.c | 4 net/xdp/xsk_buff_pool.c | 32 + net/xfrm/xfrm_policy.c | 5 net/xfrm/xfrm_user.c | 11 scripts/checkpatch.pl | 10 scripts/generate_rust_analyzer.py | 3 sound/firewire/fireworks/fireworks_command.c | 5 sound/pci/asihpi/hpimsgx.c | 6 sound/pci/ctxfi/ctvmem.h | 2 sound/pci/hda/patch_realtek.c | 10 sound/soc/amd/yc/acp6x-mach.c | 21 sound/soc/qcom/qdsp6/q6apm.c | 14 sound/soc/soc-core.c | 1 sound/soc/sof/topology.c | 2 sound/soc/stm/stm32_sai_sub.c | 3 sound/usb/6fire/chip.c | 17 sound/usb/format.c | 86 +++- sound/usb/quirks.c | 2 tools/objtool/check.c | 2 tools/power/x86/turbostat/turbostat.c | 9 tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh | 1 virt/kvm/binary_stats.c | 2 virt/kvm/kvm_main.c | 20 187 files changed, 1327 insertions(+), 727 deletions(-)
Abd-Alrhman Masalkhi (1):
media: vidtv: fix pass-by-value structs causing MSAN warnings
Abhishek Kumar (1):
media: em28xx: fix use-after-free in em28xx_v4l2_open()
Agalakov Daniil (1):
e1000: check return value of e1000_read_eeprom
Alexander Koskovich (2):
net: ipa: fix GENERIC_CMD register field masks for IPA v5.0+
net: ipa: fix event ring index not programmed for IPA v5.0+
Alexander Savenko (1):
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IMH9
Alice Mikityanska (1):
l2tp: Drop large packets with UDP encap
Andrii Kovalchuk (1):
ALSA: hda/realtek: Add HP ENVY Laptop 13-ba0xxx quirk
Andy Shevchenko (1):
pinctrl: intel: Fix the revision for new features (1kOhm PD, HW debouncer)
Arnd Bergmann (2):
media: rkvdec: reduce stack usage in rkvdec_init_v4l2_vp9_count_tbl()
ALSA: asihpi: avoid write overflow check warning
Arthur Husband (1):
ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585
Bartosz Golaszewski (1):
gpiolib: unify two loops initializing GPIO descriptors
Benoît Sevens (1):
HID: roccat: fix use-after-free in roccat_report_event
Berk Cem Goksel (1):
ALSA: 6fire: fix use-after-free on disconnect
Breno Leitao (1):
mm: blk-cgroup: fix use-after-free in cgwb_release_workfn()
Cen Zhang (1):
Bluetooth: hci_sync: annotate data-races around hdev->req_status
Chris J Arges (1):
net: increase IP_TUNNEL_RECURSION_LIMIT to 5
Cássio Gabriel (1):
ASoC: SOF: topology: reject invalid vendor array size in token parser
César Montoya (1):
ALSA: hda/realtek: Add mute LED quirk for HP Pavilion 15-eg0xxx
Daniel Brát (1):
usb: storage: Expand range of matched versions for VL817 quirks entry
Daniel Golle (1):
selftests: net: bridge_vlan_mcast: wait for h1 before querier check
Daniel J Blueman (1):
arm64: dts: qcom: hamoa/x1: fix idle exit latency
Dave Carey (1):
USB: cdc-acm: Add quirks for Yoga Book 9 14IAH10 INGENIC touchscreen
David Howells (1):
rxrpc: Fix key quota calculation for multitoken keys
David Woodhouse (1):
KVM: x86: Use __DECLARE_FLEX_ARRAY() for UAPI structures with VLAs
Deepanshu Kartikey (2):
nilfs2: fix NULL i_assoc_inode dereference in nilfs_mdt_save_to_shadow_map
ocfs2: validate inline data i_size during inode read
Dmitry Antipov (1):
ocfs2: add inline inode consistency check to ocfs2_validate_inode_block()
Donet Tom (1):
drm/amdgpu: Handle GPU page faults correctly on non-4K page systems
Douya Le (1):
crypto: af_alg - limit RX SG extraction by receive buffer budget
Dustin L. Howett (1):
ALSA: hda/realtek: add quirk for Framework F111:000F
Emil Tantilov (1):
idpf: fix PREEMPT_RT raw/bh spinlock nesting for async VC handling
Eric Dumazet (2):
net: lapbether: handle NETDEV_PRE_TYPE_CHANGE
net: sched: fix TCF_LAYER_TRANSPORT handling in tcf_get_base_ptr()
Fabio Baltieri (1):
net: txgbe: leave space for null terminators on property_entry
Fabio Porcedda (1):
USB: serial: option: add Telit Cinterion FN990A MBIM composition
Fan Wu (1):
media: mediatek: vcodec: fix use-after-free in encoder release path
Fernando Fernandez Mancera (2):
ipv4: nexthop: avoid duplicate NHA_HW_STATS_ENABLE on nexthop group dump
ipv4: nexthop: allocate skb dynamically in rtm_get_nexthop()
Florian Westphal (3):
netfilter: nft_set_pipapo_avx2: don't return non-matching entry on expiry
netfilter: nfnetlink_queue: make hash table per queue
netfilter: conntrack: add missing netlink policy validations
Fredric Cover (1):
fs/smb/client: fix out-of-bounds read in cifs_sanitize_prepath
Geoffrey D. Bennett (1):
ALSA: usb-audio: Improve Focusrite sample rate filtering
Gilson Marquato Júnior (1):
ASoC: amd: yc: Add DMI entry for HP Laptop 15-fc0xxx
Goldwyn Rodrigues (1):
btrfs: tracepoints: get correct superblock from dentry in event btrfs_sync_file()
Greg Kroah-Hartman (18):
xfrm_user: fix info leak in build_mapping()
i2c: s3c24xx: check the size of the SMBUS message before using it
HID: alps: fix NULL pointer dereference in alps_raw_event()
HID: core: clamp report_size in s32ton() to avoid undefined shift
net: usb: cdc-phonet: fix skb frags[] overflow in rx_complete()
NFC: digital: Bounds check NFC-A cascade depth in SDD response handler drm/vc4: platform_get_irq_byname() returns an int
ALSA: fireworks: bound device-supplied status before string array lookup
fbdev: tdfxfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO
usb: gadget: f_ncm: validate minimum block_len in ncm_unwrap_ntb()
usb: gadget: f_phonet: fix skb frags[] overflow in pn_rx_complete()
usb: gadget: renesas_usb3: validate endpoint index in standard request handlers
smb: client: fix off-by-8 bounds check in check_wsl_eas()
ksmbd: validate EaNameLength in smb2_get_ea()
ksmbd: require 3 sub-authorities before reading sub_auth[2]
ksmbd: fix mechToken leak when SPNEGO decode fails after token alloc
fbdev: udlfb: avoid divide-by-zero on FBIOPUT_VSCREENINFO
Linux 6.12.83
Harin Lee (1):
ALSA: ctxfi: Limit PTP to a single page
Herbert Xu (1):
crypto: algif_aead - Fix minimum RX size check for decryption
Jacob Moroni (1):
RDMA/irdma: Fix double free related to rereg_user_mr
Jeongjun Park (2):
media: as102: fix to not free memory after the device is registered in as102_usb_probe()
media: hackrf: fix to not free memory after the device is registered in hackrf_probe()
Jiexun Wang (1):
af_unix: read UNIX_DIAG_VFS data under unix_state_lock
Johan Hovold (1):
wifi: rtw88: fix device leak on probe failure
John Hancock (1):
PCI: Revert "Enable ACS after configuring IOMMU for OF platforms"
John Pavlick (1):
net: sfp: add quirks for Hisense and HSGQ GPON ONT SFP modules
Jon Hunter (2):
net: stmmac: Fix PTP ref clock for Tegra234
dt-bindings: net: Fix Tegra234 MGBE PTP clock
Joseph Qi (2):
ocfs2: fix possible deadlock between unlink and dio_end_io_write
ocfs2: fix out-of-bounds write in ocfs2_write_end_inline
Junrui Luo (1):
staging: sm750fb: fix division by zero in ps_to_hz()
Junxi Qian (1):
nfc: llcp: add missing return after LLCP_CLOSED checks
Keenan Dong (1):
xfrm: account XFRMA_IF_ID in aevent size calculation
Koichiro Den (1):
PCI: endpoint: pci-epf-vntb: Stop cmd_handler work in epf_ntb_epc_cleanup
Kotlyarov Mihail (1):
xfrm: fix refcount leak in xfrm_migrate_policy_find
Kuninori Morimoto (1):
ASoC: soc-core: call missing INIT_LIST_HEAD() for card_aux_list
Liam R. Howlett (1):
kernel: be more careful about dup_mmap() failures and uprobe registering
Lin YuChen (1):
staging: rtl8723bs: initialize le_tmp64 in rtw_BIP_verify()
Linus Torvalds (3):
x86-64: rename misleadingly named '__copy_user_nocache()' function
x86: rename and clean up __copy_from_user_inatomic_nocache() x86-64/arm64/powerpc: clean up and rename __copy_from_user_flushcache
Long Li (1):
PCI: hv: Set default NUMA node to 0 for devices without affinity info
Lukas Wunner (1):
PCI: Fix placement of pci_save_state() in pci_bus_add_device()
Luke Wang (1):
arm64: dts: imx93-9x9-qsb: change usdhc tuning step for eMMC and SD
Maciej Fijalkowski (4):
xsk: tighten UMEM headroom validation to account for tailroom and min frame
xsk: respect tailroom for ZC setups
xsk: fix XDP_UMEM_SG_FLAG issues
xsk: validate MTU against usable frame size on bind
Mario Limonciello (1):
platform/x86/amd: pmc: Add Thinkpad L14 Gen3 to quirk_s2idle_bug
Markus Niebel (1):
arm64: dts: imx93-tqma9352: improve eMMC pad configuration
Matthew Schwartz (2):
ALSA: hda/realtek: Add quirk for ASUS ROG Flow Z13-KJP GZ302EAC platform/x86: asus-nb-wmi: add DMI quirk for ASUS ROG Flow Z13-KJP GZ302EAC
Maximilian Pezzullo (1):
HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
Maíra Canal (4):
drm/vc4: Release runtime PM reference after binding V3D drm/vc4: Fix memory leak of BO array in hang state drm/vc4: Fix a memory leak in hang state error path drm/vc4: Protect madv read in vc4_gem_object_mmap() with madv_lock
Michael Zimmermann (1):
usb: gadget: f_hid: don't call cdev_init while cdev in use
Michal Schmidt (1):
ixgbevf: add missing negotiate_features op to Hyper-V ops table
Mingzhe Zou (1):
bcache: fix cached_dev.sb_bio use-after-free and crash
Minhong He (1):
ipv6: add NULL checks for idev in SRv6 paths
Mukesh Ojha (1):
soc: qcom: pd-mapper: Fix element length in servreg_loc_pfr_req_ei
Nathan Rebello (1):
usbip: validate number_of_packets in usbip_pack_ret_submit()
Nicholas Carlini (1):
eventpoll: defer struct eventpoll free to RCU grace period
Paweł Narewski (1):
gpiolib: fix race condition for gdev->srcu
Pengpeng Hou (4):
wifi: wl1251: validate packet IDs before indexing tx_frames
wifi: brcmfmac: validate bsscfg indices in IF events
nfc: s3fwrn5: allocate rx skb before consuming bytes tracing/probe: reject non-closed empty immediate strings
Peter Zijlstra (1):
sched/deadline: Use revised wakeup rule for dl_server
Phil Willoughby (1):
ALSA: usb-audio: Fix quirk flags for NeuralDSP Quad Cortex
Potin Lai (1):
soc: aspeed: socinfo: Mask table entries for accurate SoC ID matching
Rafael J. Wysocki (2):
thermal: core: Mark thermal zones as exiting before unregistration
thermal: core: Address thermal zone removal races with resume
Ren Wei (1):
netfilter: xt_multiport: validate range encoding in checkentry
Ritesh Harjani (IBM) (1):
mm/kasan: fix double free for kasan pXds
Ruide Cao (1):
net: sched: act_csum: validate nested VLAN headers
Ruslan Valiyev (2):
media: vidtv: fix NULL pointer dereference in vidtv_channel_pmt_match_sections
media: vidtv: fix nfeeds state corruption on start_streaming failure
Samasth Norway Ananda (1):
gpio: tegra: fix irq_release_resources calling enable instead of disable
Samuel Page (1):
can: raw: fix ro->uniq use-after-free in raw_rcv()
Sanman Pradhan (1):
hwmon: (powerz) Fix use-after-free on USB disconnect
Sasha Levin (3):
Revert "drm/xe/mmio: Avoid double-adjust in 64-bit reads" Revert "drm/xe: Switch MMIO interface to take xe_mmio instead of xe_gt"
checkpatch: add support for Assisted-by tag
Scott Mitchell (1):
netfilter: nfnetlink_queue: nfqnl_instance GFP_ATOMIC -> GFP_KERNEL_ACCOUNT allocation
Sean Christopherson (5):
KVM: SEV: Reject attempts to sync VMSA of an already-launched/encrypted vCPU
KVM: SEV: Disallow LAUNCH_FINISH if vCPUs are actively being created
KVM: SEV: Drop WARN on large size for KVM_MEMORY_ENCRYPT_REG_REGION
KVM: Remove subtle "struct kvm_stats_desc" pseudo-overlay
KVM: x86: Use scratch field in MMIO fragment to hold small write values
Sebastian Krzyszkowiak (1):
arm64: dts: imx8mq: Set the correct gpu_ahb clock frequency
SeongJae Park (1):
Docs/admin-guide/mm/damon/reclaim: warn commit_inputs vs param updates race
Serhii Pievniev (1):
tools/power/turbostat: Fix microcode patch level output for AMD/Hygon
Srinivas Kandagatla (1):
ASoC: qcom: q6apm: move component registration to unmanaged version
Steffen Klassert (1):
xfrm: Wait for RCU readers during policy netns exit
Takashi Iwai (1):
ALSA: hda/realtek: Add quirk for Samsung Book2 Pro 360 (NP950QED)
Tamir Duberstein (1):
scripts: generate_rust_analyzer.py: avoid FD leak
Tejas Bharambe (1):
ocfs2: fix use-after-free in ocfs2_fault() when VM_FAULT_RETRY
Tomasz Merta (1):
ASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J
Vee Satayamas (1):
ASoC: amd: yc: Add DMI quirk for ASUS EXPERTBOOK BM1403CDA
Weiming Shi (1):
ipvs: fix NULL deref in ip_vs_add_service error path
Wenyuan Li (1):
can: mcp251x: add error handling for power enable in open and resume
Xiang Mei (1):
netfilter: nfnetlink_log: initialize nfgenmsg in NLMSG_DONE terminator
Xu Yang (1):
usb: port: add delay after usb_hub_set_port_power()
Yiqi Sun (1):
ipv4: icmp: fix null-ptr-deref in icmp_build_probe()
Zhang Heng (1):
ASoC: amd: yc: Add DMI quirk for Thin A15 B7VF
ZhengYuan Huang (1):
ocfs2: handle invalid dinode in ocfs2_group_extend
Zhengchuan Liang (1):
netfilter: ip6t_eui64: reject invalid MAC header for all packets
Zhihao Cheng (1):
dcache: Limit the minimal number of bucket to two
Zide Chen (1):
perf/x86/intel/uncore: Skip discovery table for offline dies
leo vriska (1):
HID: quirks: add HID_QUIRK_ALWAYS_POLL for 8BitDo Pro 3
songxiebing (1):
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14IAH10
Greg Kroah-Hartman
maintainerDocumentation/admin-guide/mm/damon/reclaim.rst +4 -0
@@ -71,6 +71,10 @@ of parametrs except ``enabled`` again. Once the re-reading is done, this parameter is set as ``N``. If invalid parameters are found while the re-reading, DAMON_RECLAIM will be disabled. +Once ``Y`` is written to this parameter, the user must not write to any +parameters until reading ``commit_inputs`` again returns ``N``. If users +violate this rule, the kernel may exhibit undefined behavior. + min_age -------
Documentation/devicetree/bindings/net/nvidia,tegra234-mgbe.yaml +2 -2
@@ -42,7 +42,7 @@ properties: - const: mgbe - const: mac - const: mac-divider - - const: ptp-ref + - const: ptp_ref - const: rx-input-m - const: rx-input - const: tx
@@ -133,7 +133,7 @@ examples: <&bpmp TEGRA234_CLK_MGBE0_RX_PCS_M>, <&bpmp TEGRA234_CLK_MGBE0_RX_PCS>, <&bpmp TEGRA234_CLK_MGBE0_TX_PCS>; - clock-names = "mgbe", "mac", "mac-divider", "ptp-ref", "rx-input-m", + clock-names = "mgbe", "mac", "mac-divider", "ptp_ref", "rx-input-m", "rx-input", "tx", "eee-pcs", "rx-pcs-input", "rx-pcs-m", "rx-pcs", "tx-pcs"; resets = <&bpmp TEGRA234_RESET_MGBE0_MAC>,
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 12 -SUBLEVEL = 82 +SUBLEVEL = 83 EXTRAVERSION = NAME = Baby Opossum Posse
arch/arm64/boot/dts/freescale/imx8mq.dtsi +1 -1
@@ -1636,7 +1636,7 @@ gpu: gpu@38000000 { <&clk IMX8MQ_GPU_PLL_OUT>, <&clk IMX8MQ_GPU_PLL>; assigned-clock-rates = <800000000>, <800000000>, - <800000000>, <800000000>, <0>; + <800000000>, <400000000>, <0>; power-domains = <&pgc_gpu>; };
arch/arm64/boot/dts/freescale/imx93-9x9-qsb.dts +2 -0
@@ -311,6 +311,7 @@ &usdhc1 { pinctrl-2 = <&pinctrl_usdhc1_200mhz>; bus-width = <8>; non-removable; + fsl,tuning-step = <1>; status = "okay"; };
@@ -323,6 +324,7 @@ &usdhc2 { vmmc-supply = <®_usdhc2_vmmc>; bus-width = <4>; no-mmc; + fsl,tuning-step = <1>; status = "okay"; };
arch/arm64/boot/dts/freescale/imx93-tqma9352.dtsi +13 -13
@@ -273,21 +273,21 @@ MX93_PAD_SD2_RESET_B__GPIO3_IO07 0x106 /* enable SION for data and cmd pad due to ERR052021 */ pinctrl_usdhc1: usdhc1grp { fsl,pins = < - /* PD | FSEL 3 | DSE X5 */ - MX93_PAD_SD1_CLK__USDHC1_CLK 0x5be + /* PD | FSEL 3 | DSE X4 */ + MX93_PAD_SD1_CLK__USDHC1_CLK 0x59e /* HYS | FSEL 0 | no drive */ MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x1000 - /* HYS | FSEL 3 | X5 */ - MX93_PAD_SD1_CMD__USDHC1_CMD 0x400011be - /* HYS | FSEL 3 | X4 */ - MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x4000119e - MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x4000119e - MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x4000119e - MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x4000119e - MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x4000119e - MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x4000119e - MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x4000119e - MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x4000119e + /* HYS | PU | FSEL 3 | DSE X4 */ + MX93_PAD_SD1_CMD__USDHC1_CMD 0x4000139e + /* HYS | PU | FSEL 3 | DSE X4 */ + MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x4000139e + MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x4000139e + MX93_PAD_SD1_DATA2__USDHC1_DATA2 0x4000139e + MX93_PAD_SD1_DATA3__USDHC1_DATA3 0x4000139e + MX93_PAD_SD1_DATA4__USDHC1_DATA4 0x4000139e + MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x4000139e + MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x4000139e + MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x4000139e >; };
arch/arm64/boot/dts/qcom/x1e80100.dtsi +1 -1
@@ -280,7 +280,7 @@ CLUSTER_C4: cpu-sleep-0 { idle-state-name = "ret"; arm,psci-suspend-param = <0x00000004>; entry-latency-us = <180>; - exit-latency-us = <500>; + exit-latency-us = <320>; min-residency-us = <600>; }; };
arch/arm64/include/asm/uaccess.h +1 -1
@@ -480,7 +480,7 @@ extern __must_check long strnlen_user(const char __user *str, long n);#ifdef CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE extern unsigned long __must_check __copy_user_flushcache (void *to,const void __user *from,unsigned long n); -static inline int __copy_from_user_flushcache (void *dst,const void __user *src,unsigned size) +static inline size_t copy_from_user_flushcache (void *dst,const void __user *src,size_t size) {kasan_check_write (dst, size);return __copy_user_flushcache (dst,__uaccess_mask_ptr (src), size);
arch/arm64/kvm/guest.c +2 -2
@@ -29,7 +29,7 @@#include "trace.h" -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS () };
@@ -42,7 +42,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , hvc_exit_stat),STATS_DESC_COUNTER (VCPU , wfe_exit_stat),
arch/loongarch/kvm/vcpu.c +1 -1
@@ -14,7 +14,7 @@#define CREATE_TRACE_POINTS #include "trace.h" -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , int_exits),STATS_DESC_COUNTER (VCPU , idle_exits),
arch/loongarch/kvm/vm.c +1 -1
@@ -7,7 +7,7 @@#include <asm/kvm_mmu.h> #include <asm/kvm_vcpu.h> -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS (),STATS_DESC_ICOUNTER (VM , pages),STATS_DESC_ICOUNTER (VM , hugepages),
arch/mips/kvm/mips.c +2 -2
@@ -38,7 +38,7 @@#define VECTORSPACING 0x100/* for EI/VI mode */ #endif -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS () };
@@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , wait_exits),STATS_DESC_COUNTER (VCPU , cache_exits),
arch/powerpc/include/asm/uaccess.h +1 -2
@@ -407,8 +407,7 @@ copy_mc_to_user(void __user *to, const void *from, unsigned long n) }#endif -extern long __copy_from_user_flushcache (void *dst,const void __user *src, -unsigned size); +extern size_t copy_from_user_flushcache (void *dst,const void __user *src,size_t size); static __must_check __always_inline bool user_access_begin(const void __user *ptr, size_t len) {
arch/powerpc/kvm/book3s.c +2 -2
@@ -38,7 +38,7 @@/* #define EXIT_DEBUG */ -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS (),STATS_DESC_ICOUNTER (VM , num_2M_pages),STATS_DESC_ICOUNTER (VM , num_1G_pages)
@@ -53,7 +53,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , sum_exits),STATS_DESC_COUNTER (VCPU , mmio_exits),
arch/powerpc/kvm/booke.c +2 -2
@@ -36,7 +36,7 @@unsigned long kvmppc_booke_handlers; -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS (),STATS_DESC_ICOUNTER (VM , num_2M_pages),STATS_DESC_ICOUNTER (VM , num_1G_pages)
@@ -51,7 +51,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , sum_exits),STATS_DESC_COUNTER (VCPU , mmio_exits),
arch/powerpc/lib/pmem.c +6 -5
@@ -66,15 +66,16 @@ EXPORT_SYMBOL_GPL(arch_invalidate_pmem);/* * CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE symbols */ -long __copy_from_user_flushcache (void *dest,const void __user *src, -unsigned size) +size_t copy_from_user_flushcache (void *dest,const void __user *src, +size_t size) { -unsigned long copied, start = (unsigned long ) dest; +unsigned long not_copied, start = (unsigned long ) dest; - copied =__copy_from_user (dest, src, size); + src =mask_user_address (src); + not_copied =__copy_from_user (dest, src, size);clean_pmem_range (start, start + size); -return copied; +return not_copied; }void memcpy_flushcache (void *dest,const void *src,size_t size)
arch/riscv/kvm/vcpu.c +1 -1
@@ -24,7 +24,7 @@#define CREATE_TRACE_POINTS #include "trace.h" -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , ecall_exit_stat),STATS_DESC_COUNTER (VCPU , wfi_exit_stat),
arch/riscv/kvm/vm.c +1 -1
@@ -12,7 +12,7 @@#include <linux/uaccess.h> #include <linux/kvm_host.h> -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS () }; static_assert(ARRAY_SIZE(kvm_vm_stats_desc) ==
arch/s390/kvm/kvm-s390.c +2 -2
@@ -59,7 +59,7 @@#define VCPU_IRQS_MAX_BUF (sizeof(struct kvm_s390_irq) * \ (KVM_MAX_VCPUS + LOCAL_IRQS)) -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS (),STATS_DESC_COUNTER (VM , inject_io),STATS_DESC_COUNTER (VM , inject_float_mchk),
@@ -85,7 +85,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , exit_userspace),STATS_DESC_COUNTER (VCPU , exit_null),
arch/x86/events/intel/uncore_discovery.c +1 -1
@@ -374,7 +374,7 @@ bool intel_uncore_has_discovery_tables(int *ignore) (val &UNCORE_DISCOVERY_DVSEC2_BIR_MASK ) *UNCORE_DISCOVERY_BIR_STEP ; die =get_device_die_id (dev); -if (die <0 ) +if ((die <0 ) || (die >=uncore_max_dies ()))continue ;parse_discovery_table (dev, die, bar_offset, &parsed, ignore);
arch/x86/include/asm/uaccess.h +1 -1
@@ -508,7 +508,7 @@ extern struct movsl_mask { } ____cacheline_aligned_in_smp movsl_mask;#endif -#define ARCH_HAS_NOCACHE_UACCESS 1 +#define ARCH_HAS_NONTEMPORAL_UACCESS 1/* * The "unsafe" user accesses aren't really "unsafe", but the naming
arch/x86/include/asm/uaccess_32.h +1 -7
@@ -26,13 +26,7 @@ raw_copy_from_user(void *to, const void __user *from, unsigned long n)return __copy_user_ll (to, (__force const void *)from, n); } -static __always_inline unsigned long -__copy_from_user_inatomic_nocache (void *to,const void __user *from, -unsigned long n) -{ -return __copy_from_user_ll_nocache_nozero (to, from, n); -} - +unsigned long __must_check copy_from_user_inatomic_nontemporal (void *,const void __user *,unsigned long n);unsigned long __must_check clear_user (void __user *mem,unsigned long len);unsigned long __must_check __clear_user (void __user *mem,unsigned long len);
arch/x86/include/asm/uaccess_64.h +9 -7
@@ -147,26 +147,28 @@ raw_copy_to_user(void __user *dst, const void *src, unsigned long size)return copy_user_generic ((__force void *)dst, src, size); } -extern long __copy_user_nocache (void *dst,const void __user *src,unsigned size); -extern long __copy_user_flushcache (void *dst,const void __user *src,unsigned size); +#define copy_to_nontemporal copy_to_nontemporal +extern size_t copy_to_nontemporal (void *dst,const void *src,size_t size); +extern size_t copy_user_flushcache (void *dst,const void __user *src,size_t size);static inline int -__copy_from_user_inatomic_nocache (void *dst,const void __user *src, +copy_from_user_inatomic_nontemporal (void *dst,const void __user *src,unsigned size) {long ret;kasan_check_write (dst, size); + src =mask_user_address (src);stac (); - ret =__copy_user_nocache (dst, src, size); + ret =copy_to_nontemporal (dst, (__force const void *)src, size);clac ();return ret; } -static inline int -__copy_from_user_flushcache (void *dst,const void __user *src,unsigned size) +static inline size_t +copy_from_user_flushcache (void *dst,const void __user *src,size_t size) {kasan_check_write (dst, size); -return __copy_user_flushcache (dst, src, size); +return copy_user_flushcache (dst, src, size); }/*
arch/x86/include/uapi/asm/kvm.h +6 -6
@@ -192,13 +192,13 @@ struct kvm_msrs {__u32 nmsrs;/* number of msrs in entries */ __u32 pad; -struct kvm_msr_entry entries[]; + __DECLARE_FLEX_ARRAY(struct kvm_msr_entry, entries); };/* for KVM_GET_MSR_INDEX_LIST */ struct kvm_msr_list {__u32 nmsrs;/* number of msrs in entries */ -__u32 indices[]; + __DECLARE_FLEX_ARRAY(__u32, indices); };/* Maximum size of any access bitmap in bytes */
@@ -240,7 +240,7 @@ struct kvm_cpuid_entry {struct kvm_cpuid {__u32 nent;__u32 padding; -struct kvm_cpuid_entry entries[]; + __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry, entries); };struct kvm_cpuid_entry2 {
@@ -262,7 +262,7 @@ struct kvm_cpuid_entry2 {struct kvm_cpuid2 {__u32 nent;__u32 padding; -struct kvm_cpuid_entry2 entries[]; + __DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry2, entries); };/* for KVM_GET_PIT and KVM_SET_PIT */
@@ -393,7 +393,7 @@ struct kvm_xsave {* the contents of CPUID leaf 0xD on the host. */ __u32 region[1024 ]; -__u32 extra[]; +__DECLARE_FLEX_ARRAY (__u32, extra); };#define KVM_MAX_XCRS 16
@@ -530,7 +530,7 @@ struct kvm_pmu_event_filter {__u32 fixed_counter_bitmap;__u32 flags;__u32 pad[4 ]; -__u64 events[]; +__DECLARE_FLEX_ARRAY (__u64, events); };#define KVM_PMU_EVENT_ALLOW 0
arch/x86/kvm/svm/sev.c +18 -6
@@ -642,10 +642,16 @@ static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr,if (ulen ==0 || uaddr + ulen < uaddr)return ERR_PTR (-EINVAL ); -/* Calculate number of pages. */ +/* +* Calculate the number of pages that need to be pinned to cover the +* entire range. Note! This isn't simply ulen >> PAGE_SHIFT, as KVM +* doesn't require the incoming address+size to be page aligned! +*/ first = (uaddr &PAGE_MASK ) >>PAGE_SHIFT ; last = ((uaddr + ulen -1 ) &PAGE_MASK ) >>PAGE_SHIFT ; npages = (last - first +1 ); +if (npages >INT_MAX ) +return ERR_PTR (-EINVAL ); locked = sev->pages_locked + npages; lock_limit =rlimit (RLIMIT_MEMLOCK ) >>PAGE_SHIFT ;
@@ -654,9 +660,6 @@ static struct page **sev_pin_memory(struct kvm *kvm, unsigned long uaddr,return ERR_PTR (-ENOMEM ); } -if (WARN_ON_ONCE (npages >INT_MAX )) -return ERR_PTR (-EINVAL ); -/* Avoid using vmalloc for smaller buffers. */ size = npages *sizeof (struct page *);if (size >PAGE_SIZE )
@@ -814,6 +817,9 @@ static int sev_es_sync_vmsa(struct vcpu_svm *svm)u8 *d;int i; +if (vcpu->arch.guest_state_protected) +return -EINVAL ; +/* Check some debug related fields before encrypting the VMSA */ if (svm->vcpu.guest_debug || (svm->vmcb->save.dr7 & ~DR7_FIXED_1 ))return -EINVAL ;
@@ -959,6 +965,9 @@ static int sev_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp)if (!sev_es_guest (kvm))return -ENOTTY ; +if (kvm_is_vcpu_creation_in_progress (kvm)) +return -EBUSY ; +kvm_for_each_vcpu (i, vcpu, kvm) { ret =mutex_lock_killable (&vcpu->mutex);if (ret)
@@ -2058,8 +2067,8 @@ static int sev_check_source_vcpus(struct kvm *dst, struct kvm *src)struct kvm_vcpu *src_vcpu;unsigned long i; -if (src->created_vcpus !=atomic_read (&src->online_vcpus) || - dst->created_vcpus !=atomic_read (&dst->online_vcpus)) +if (kvm_is_vcpu_creation_in_progress (src) || +kvm_is_vcpu_creation_in_progress (dst))return -EBUSY ;if (!sev_es_guest (src))
@@ -2453,6 +2462,9 @@ static int snp_launch_update_vmsa(struct kvm *kvm, struct kvm_sev_cmd *argp)unsigned long i;int ret; +if (kvm_is_vcpu_creation_in_progress (kvm)) +return -EBUSY ; + data.gctx_paddr =__psp_pa (sev->snp_context); data.page_type =SNP_PAGE_TYPE_VMSA ;
arch/x86/kvm/x86.c +15 -3
@@ -229,7 +229,7 @@ EXPORT_SYMBOL_GPL(allow_smaller_maxphyaddr);bool __read_mostly enable_apicv = true;EXPORT_SYMBOL_GPL (enable_apicv); -const struct _kvm_stats_desc kvm_vm_stats_desc[] = { +const struct kvm_stats_desc kvm_vm_stats_desc[] = {KVM_GENERIC_VM_STATS (),STATS_DESC_COUNTER (VM , mmu_shadow_zapped),STATS_DESC_COUNTER (VM , mmu_pte_write),
@@ -255,7 +255,7 @@ const struct kvm_stats_header kvm_vm_stats_header = { sizeof(kvm_vm_stats_desc), }; -const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = { +const struct kvm_stats_desc kvm_vcpu_stats_desc[] = {KVM_GENERIC_VCPU_STATS (),STATS_DESC_COUNTER (VCPU , pf_taken),STATS_DESC_COUNTER (VCPU , pf_fixed),
@@ -7976,7 +7976,13 @@ static int emulator_read_write_onepage(unsigned long addr, void *val,WARN_ON (vcpu->mmio_nr_fragments >=KVM_MAX_MMIO_FRAGMENTS ); frag = &vcpu->mmio_fragments[vcpu->mmio_nr_fragments++]; frag->gpa = gpa; - frag->data = val; +if (write && bytes <=8u ) { + frag->val =0 ; + frag->data = &frag->val; +memcpy (&frag->val, val, bytes); + }else { + frag->data = val; + } frag->len = bytes;return X86EMUL_CONTINUE ; }
@@ -7991,6 +7997,9 @@ static int emulator_read_write(struct x86_emulate_ctxt *ctxt,gpa_t gpa;int rc; +if (WARN_ON_ONCE ((bytes >8u || !ops->write) &&object_is_on_stack (val))) +return X86EMUL_UNHANDLEABLE ; +if (ops->read_write_prepare && ops->read_write_prepare (vcpu, val, bytes))return X86EMUL_CONTINUE ;
@@ -11508,6 +11517,9 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu) frag++; vcpu->mmio_cur_fragment++; }else { +if (WARN_ON_ONCE (frag->data == &frag->val)) +return -EIO ; +/* Go forward to the next mmio piece. */ frag->data += len; frag->gpa += len;
arch/x86/lib/copy_user_uncached_64.S +3 -3
@@ -26,7 +26,7 @@ * Output: * rax uncopied bytes or 0 if successful. */ -SYM_FUNC_START(__copy_user_nocache) +SYM_FUNC_START(copy_to_nontemporal) /* If destination is not 7-byte aligned, we'll have to align it */ testb $7,%dil jne .Lalign
@@ -238,5 +238,5 @@ _ASM_EXTABLE_UA(95b, .Ldone) _ASM_EXTABLE_UA(52b, .Ldone0) _ASM_EXTABLE_UA(53b, .Ldone0) -SYM_FUNC_END(__copy_user_nocache) -EXPORT_SYMBOL(__copy_user_nocache) +SYM_FUNC_END(copy_to_nontemporal) +EXPORT_SYMBOL(copy_to_nontemporal)
arch/x86/lib/usercopy_32.c +5 -4
@@ -322,10 +322,11 @@ unsigned long __copy_user_ll(void *to, const void *from, unsigned long n) }EXPORT_SYMBOL (__copy_user_ll); -unsigned long __copy_from_user_ll_nocache_nozero (void *to,const void __user *from, +unsigned long copy_from_user_inatomic_nontemporal (void *to,const void __user *from,unsigned long n) { -__uaccess_begin_nospec (); +if (!user_access_begin (from, n)) +return n;#ifdef CONFIG_X86_INTEL_USERCOPY if (n >64 &&static_cpu_has (X86_FEATURE_XMM2 )) n =__copy_user_intel_nocache (to, from, n);
@@ -334,7 +335,7 @@ unsigned long __copy_from_user_ll_nocache_nozero(void *to, const void __user *fr#else __copy_user (to, from, n);#endif -__uaccess_end (); +user_access_end ();return n; } -EXPORT_SYMBOL (__copy_from_user_ll_nocache_nozero); +EXPORT_SYMBOL (copy_from_user_inatomic_nontemporal);
arch/x86/lib/usercopy_64.c +6 -6
@@ -43,17 +43,17 @@ void arch_wb_cache_pmem(void *addr, size_t size) }EXPORT_SYMBOL_GPL (arch_wb_cache_pmem); -long __copy_user_flushcache (void *dst,const void __user *src,unsigned size) +size_t copy_user_flushcache (void *dst,const void __user *src,size_t size) {unsigned long flushed, dest = (unsigned long ) dst; -long rc; +unsigned long rc; -stac (); - rc =__copy_user_nocache (dst, src, size); -clac (); + src =masked_user_access_begin (src); + rc =copy_to_nontemporal (dst, (__force const void *)src, size); +user_access_end ();/* -* __copy_user_nocache() uses non-temporal stores for the bulk +* copy_to_nontemporal() uses non-temporal stores for the bulk * of the transfer, but we need to manually flush if the * transfer is unaligned. A cached memory copy is used when * destination or size is not naturally aligned. That is:
crypto/af_alg.c +2 -0
@@ -1258,6 +1258,8 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags, seglen =min_t (size_t, (maxsize - len),msg_data_left (msg)); +/* Never pin more pages than the remaining RX accounting budget. */ + seglen =min_t (size_t, seglen,af_alg_rcvbuf (sk));if (list_empty (&areq->rsgl_list)) { rsgl = &areq->first_rsgl;
crypto/algif_aead.c +1 -1
@@ -170,7 +170,7 @@ static int _aead_recvmsg(struct socket *sock, struct msghdr *msg,if (usedpages < outlen) {size_t less = outlen - usedpages; -if (used < less) { +if (used < less + (ctx->enc ?0 : as)) { err = -EINVAL ; goto free; }
crypto/algif_skcipher.c +5 -0
@@ -130,6 +130,11 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,* full block size buffers. */ if (ctx->more || len < ctx->used) { +if (len < bs) { + err = -EINVAL ; + goto free; + } + len -= len % bs; cflags |=CRYPTO_SKCIPHER_REQ_NOTFINAL ; }
drivers/ata/ahci.c +14 -0
@@ -68,6 +68,7 @@ enum board_ids {/* board IDs for specific chipsets in alphabetical order */ board_ahci_al, board_ahci_avn, + board_ahci_jmb585, board_ahci_mcp65, board_ahci_mcp77, board_ahci_mcp89,
@@ -212,6 +213,15 @@ static const struct ata_port_info ahci_port_info[] = { .udma_mask = ATA_UDMA6, .port_ops = &ahci_avn_ops, }, + /* JMicron JMB582/585: 64-bit DMA is broken, force 32-bit */ + [board_ahci_jmb585] = { +AHCI_HFLAGS (AHCI_HFLAG_IGN_IRQ_IF_ERR | + AHCI_HFLAG_32BIT_ONLY), + .flags = AHCI_FLAG_COMMON, + .pio_mask = ATA_PIO4, + .udma_mask = ATA_UDMA6, + .port_ops = &ahci_ops, + }, [board_ahci_mcp65] = {AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA |AHCI_HFLAG_NO_PMP | AHCI_HFLAG_YES_NCQ),
@@ -439,6 +449,10 @@ static const struct pci_device_id ahci_pci_tbl[] = {/* Elkhart Lake IDs 0x4b60 & 0x4b62 https://sata-io.org/product/8803 not tested yet */ { PCI_VDEVICE(INTEL, 0x4b63), board_ahci_pcs_quirk }, /* Elkhart Lake AHCI */ +/* JMicron JMB582/585: force 32-bit DMA (broken 64-bit implementation) */ + { PCI_VDEVICE(JMICRON, 0x0582), board_ahci_jmb585 }, + { PCI_VDEVICE(JMICRON, 0x0585), board_ahci_jmb585 }, +/* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr },
drivers/gpio/gpio-tegra.c +1 -1
@@ -593,7 +593,7 @@ static void tegra_gpio_irq_release_resources(struct irq_data *d)struct tegra_gpio_info *tgi =gpiochip_get_data (chip);gpiochip_relres_irq (chip, d->hwirq); -tegra_gpio_enable (tgi, d->hwirq); +tegra_gpio_disable (tgi, d->hwirq); }static void tegra_gpio_irq_print_chip (struct irq_data *d,struct seq_file *s)
drivers/gpio/gpiolib.c +21 -22
89 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3 -3
@@ -2806,14 +2806,14 @@ bool amdgpu_vm_handle_fault(struct amdgpu_device *adev, u32 pasid,if (!root)return false; - addr /=AMDGPU_GPU_PAGE_SIZE ; -if (is_compute_context && !svm_range_restore_pages (adev, pasid, vmid, - node_id, addr, ts, write_fault)) { + node_id, addr >>PAGE_SHIFT , ts, write_fault)) {amdgpu_bo_unref (&root);return true; } + addr /=AMDGPU_GPU_PAGE_SIZE ; + r =amdgpu_bo_reserve (root, true);if (r) goto error_unref;
drivers/gpu/drm/i915/i915_gem.c +1 -1
@@ -519,7 +519,7 @@ ggtt_write(struct io_mapping *mapping,/* We can use the cpu mem copy function because this is X86. */ vaddr =io_mapping_map_atomic_wc (mapping, base); - unwritten =__copy_from_user_inatomic_nocache ((void __force *)vaddr + offset, + unwritten =copy_from_user_inatomic_nontemporal ((void __force *)vaddr + offset, user_data, length);io_mapping_unmap_atomic (vaddr);if (unwritten) {
drivers/gpu/drm/qxl/qxl_ioctl.c +1 -1
@@ -182,7 +182,7 @@ static int qxl_process_single_command(struct qxl_device *qdev,/* TODO copy slow path code from i915 */ fb_cmd =qxl_bo_kmap_atomic_page (qdev, cmd_bo, (release->release_offset &PAGE_MASK )); - unwritten =__copy_from_user_inatomic_nocache + unwritten =copy_from_user_inatomic_nontemporal (fb_cmd +sizeof (union qxl_release_info ) + (release->release_offset & ~PAGE_MASK ),u64_to_user_ptr (cmd->command), cmd->command_size);
drivers/gpu/drm/vc4/vc4_bo.c +3 -0
@@ -738,12 +738,15 @@ static int vc4_gem_object_mmap(struct drm_gem_object *obj, struct vm_area_structreturn -EINVAL ; } +mutex_lock (&bo->madv_lock);if (bo->madv !=VC4_MADV_WILLNEED ) {DRM_DEBUG ("mmapping of %s BO not allowed\n" , bo->madv ==VC4_MADV_DONTNEED ?"purgeable" :"purged" ); +mutex_unlock (&bo->madv_lock);return -EINVAL ; } +mutex_unlock (&bo->madv_lock);return drm_gem_dma_mmap (&bo->base, vma); }
drivers/gpu/drm/vc4/vc4_gem.c +11 -8
@@ -60,6 +60,7 @@ vc4_free_hang_state(struct drm_device *dev, struct vc4_hang_state *state)for (i =0 ; i < state->user_state.bo_count; i++)drm_gem_object_put (state->bo[i]); +kfree (state->bo);kfree (state); }
@@ -168,10 +169,8 @@ vc4_save_hang_state(struct drm_device *dev)spin_lock_irqsave (&vc4->job_lock, irqflags); exec[0 ] =vc4_first_bin_job (vc4); exec[1 ] =vc4_first_render_job (vc4); -if (!exec[0 ] && !exec[1 ]) { -spin_unlock_irqrestore (&vc4->job_lock, irqflags); -return ; - } +if (!exec[0 ] && !exec[1 ]) + goto err_free_state;/* Get the bos from both binner and renderer into hang state. */ state->bo_count =0 ;
@@ -188,10 +187,8 @@ vc4_save_hang_state(struct drm_device *dev) kernel_state->bo =kcalloc (state->bo_count,sizeof (*kernel_state->bo),GFP_ATOMIC ); -if (!kernel_state->bo) { -spin_unlock_irqrestore (&vc4->job_lock, irqflags); -return ; - } +if (!kernel_state->bo) + goto err_free_state; k =0 ;for (i =0 ; i <2 ; i++) {
@@ -283,6 +280,12 @@ vc4_save_hang_state(struct drm_device *dev) vc4->hang_state = kernel_state;spin_unlock_irqrestore (&vc4->job_lock, irqflags); } + +return ; + +err_free_state: +spin_unlock_irqrestore (&vc4->job_lock, irqflags); +kfree (kernel_state); } static void
drivers/gpu/drm/vc4/vc4_hdmi.c +10 -4
@@ -2391,17 +2391,23 @@ static int vc4_hdmi_hotplug_init(struct vc4_hdmi *vc4_hdmi)int ret;if (vc4_hdmi->variant->external_irq_controller) { -unsigned int hpd_con =platform_get_irq_byname (pdev,"hpd-connected" ); -unsigned int hpd_rm =platform_get_irq_byname (pdev,"hpd-removed" ); +int hpd =platform_get_irq_byname (pdev,"hpd-connected" ); - ret =devm_request_threaded_irq (&pdev->dev, hpd_con, +if (hpd <0 ) +return hpd; + + ret =devm_request_threaded_irq (&pdev->dev, hpd,NULL , vc4_hdmi_hpd_irq_thread,IRQF_ONESHOT ,"vc4 hdmi hpd connected" , vc4_hdmi);if (ret)return ret; - ret =devm_request_threaded_irq (&pdev->dev, hpd_rm, + hpd =platform_get_irq_byname (pdev,"hpd-removed" ); +if (hpd <0 ) +return hpd; + + ret =devm_request_threaded_irq (&pdev->dev, hpd,NULL , vc4_hdmi_hpd_irq_thread,IRQF_ONESHOT ,"vc4 hdmi hpd disconnected" , vc4_hdmi);
drivers/gpu/drm/vc4/vc4_v3d.c +1 -0
@@ -479,6 +479,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)pm_runtime_use_autosuspend (dev);pm_runtime_set_autosuspend_delay (dev,40 );/* a little over 2 frames. */ +pm_runtime_put_autosuspend (dev);return 0 ;
drivers/gpu/drm/xe/xe_mmio.c +70 -65
276 lines not on this page · raw message
drivers/gpu/drm/xe/xe_mmio.h +17 -59
84 lines not on this page · raw message
drivers/gpu/drm/xe/xe_trace.h +3 -4
@@ -21,7 +21,6 @@#include "xe_vm.h" #define __dev_name_xe (xe) dev_name((xe)->drm.dev) -#define __dev_name_tile (tile) __dev_name_xe(tile_to_xe((tile)))#define __dev_name_gt (gt) __dev_name_xe(gt_to_xe((gt)))#define __dev_name_eq (q) __dev_name_gt((q)->gt)
@@ -343,12 +342,12 @@ DEFINE_EVENT(xe_hw_fence, xe_hw_fence_try_signal, ); TRACE_EVENT(xe_reg_rw, - TP_PROTO(struct xe_mmio *mmio, bool write, u32 reg, u64 val, int len), + TP_PROTO(struct xe_gt *gt, bool write, u32 reg, u64 val, int len), - TP_ARGS(mmio, write, reg, val, len), + TP_ARGS(gt, write, reg, val, len), TP_STRUCT__entry( - __string(dev, __dev_name_tile(mmio->tile)) + __string(dev, __dev_name_gt(gt)) __field(u64, val) __field(u32, reg) __field(u16, write)
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2 -1
@@ -352,7 +352,8 @@ static void sfh_init_work(struct work_struct *work) rc =amd_sfh_hid_client_init (mp2);if (rc) {amd_sfh_clear_intr (mp2); -dev_err (&pdev->dev,"amd_sfh_hid_client_init failed err %d\n" , rc); +if (rc != -EOPNOTSUPP ) +dev_err (&pdev->dev,"amd_sfh_hid_client_init failed err %d\n" , rc);return ; }
drivers/hid/hid-alps.c +3 -0
@@ -437,6 +437,9 @@ static int alps_raw_event(struct hid_device *hdev,int ret =0 ;struct alps_dev *hdata =hid_get_drvdata (hdev); +if (!(hdev->claimed &HID_CLAIMED_INPUT ) || !hdata->input) +return 0 ; +switch (hdev->product) {case HID_PRODUCT_ID_T4_BTNLESS : ret =t4_raw_event (hdata, data, size);
drivers/hid/hid-core.c +3 -0
@@ -71,6 +71,9 @@ static u32 s32ton(__s32 value, unsigned int n)if (!value || !n)return 0 ; +if (n >32 ) + n =32 ; + a = value >> (n -1 );if (a && a !=-1 )return value <0 ?1 << (n -1 ) : (1 << (n -1 )) -1 ;
drivers/hid/hid-ids.h +3 -0
@@ -22,6 +22,9 @@#define USB_DEVICE_ID_3M2256 0x0502#define USB_DEVICE_ID_3M3266 0x0506 +#define USB_VENDOR_ID_8BITDO 0x2dc8 +#define USB_DEVICE_ID_8BITDO_PRO_3 0x6009 +#define USB_VENDOR_ID_A4TECH 0x09da#define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006#define USB_DEVICE_ID_A4TECH_X5_005D 0x000a
drivers/hid/hid-quirks.c +1 -0
@@ -25,6 +25,7 @@*/ static const struct hid_device_id hid_quirks[] = { + {HID_USB_DEVICE (USB_VENDOR_ID_8BITDO ,USB_DEVICE_ID_8BITDO_PRO_3 ),HID_QUIRK_ALWAYS_POLL }, {HID_USB_DEVICE (USB_VENDOR_ID_AASHIMA ,USB_DEVICE_ID_AASHIMA_GAMEPAD ),HID_QUIRK_BADPAD }, {HID_USB_DEVICE (USB_VENDOR_ID_AASHIMA ,USB_DEVICE_ID_AASHIMA_PREDATOR ),HID_QUIRK_BADPAD }, {HID_USB_DEVICE (USB_VENDOR_ID_ADATA_XPG ,USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE ),HID_QUIRK_ALWAYS_POLL },
drivers/hid/hid-roccat.c +2 -0
@@ -257,6 +257,7 @@ int roccat_report_event(int minor, u8 const *data)if (!new_value)return -ENOMEM ; +mutex_lock (&device->readers_lock);mutex_lock (&device->cbuf_lock); report = &device->cbuf[device->cbuf_end];
@@ -279,6 +280,7 @@ int roccat_report_event(int minor, u8 const *data) }mutex_unlock (&device->cbuf_lock); +mutex_unlock (&device->readers_lock);wake_up_interruptible (&device->wait);return 0 ;
drivers/hwmon/powerz.c +6 -2
@@ -114,6 +114,9 @@ static int powerz_read_data(struct usb_device *udev, struct powerz_priv *priv) {int ret; +if (!priv->urb) +return -ENODEV ; + priv->status = -ETIMEDOUT ;reinit_completion (&priv->completion);
@@ -230,6 +233,8 @@ static int powerz_probe(struct usb_interface *intf,mutex_init (&priv->mutex);init_completion (&priv->completion); +usb_set_intfdata (intf, priv); + hwmon_dev =devm_hwmon_device_register_with_info (parent,DRIVER_NAME , priv, &powerz_chip_info,NULL );
@@ -238,8 +243,6 @@ static int powerz_probe(struct usb_interface *intf,return PTR_ERR (hwmon_dev); } -usb_set_intfdata (intf, priv); -return 0 ; }
@@ -250,6 +253,7 @@ static void powerz_disconnect(struct usb_interface *intf)mutex_lock (&priv->mutex);usb_kill_urb (priv->urb);usb_free_urb (priv->urb); + priv->urb =NULL ;mutex_unlock (&priv->mutex); }
drivers/i2c/busses/i2c-s3c2410.c +6 -1
@@ -504,8 +504,13 @@ static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat) i2c->msg->buf[i2c->msg_ptr++] = byte;/* Add actual length to read for smbus block read */ -if (i2c->msg->flags &I2C_M_RECV_LEN && i2c->msg->len ==1 ) +if (i2c->msg->flags &I2C_M_RECV_LEN && i2c->msg->len ==1 ) { +if (byte ==0 || byte >I2C_SMBUS_BLOCK_MAX ) { +s3c24xx_i2c_stop (i2c, -EPROTO ); +break ; + } i2c->msg->len += byte; + } prepare_read:if (is_msglast (i2c)) {/* last byte of buffer */
drivers/infiniband/hw/irdma/verbs.c +1 -0
@@ -3210,6 +3210,7 @@ static int irdma_rereg_mr_trans(struct irdma_mr *iwmr, u64 start, u64 len, err:ib_umem_release (region); + iwmr->region =NULL ;return err; }
drivers/infiniband/sw/rdmavt/qp.c +3 -5
@@ -92,12 +92,10 @@ static int rvt_wss_llc_size(void)static void cacheless_memcpy (void *dst,void *src,size_t n) {/* -* Use the only available X64 cacheless copy. Add a __user cast -* to quiet sparse. The src agument is already in the kernel so -* there are no security issues. The extra fault recovery machinery -* is not invoked. +* Use the only available X64 cacheless copy. +* The extra fault recovery machinery is not invoked. */ -__copy_user_nocache (dst, (void __user *)src, n); +copy_to_nontemporal (dst, src, n); }void rvt_wss_exit (struct rvt_dev_info *rdi)
drivers/md/bcache/super.c +7 -0
@@ -1373,6 +1373,13 @@ static CLOSURE_CALLBACK(cached_dev_free)mutex_unlock (&bch_register_lock); +/* +* Wait for any pending sb_write to complete before free. +* The sb_bio is embedded in struct cached_dev, so we must +* ensure no I/O is in progress. +*/ +closure_sync (&dc->sb_write); +if (dc->sb_disk)put_page (virt_to_page (dc->sb_disk));
drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c +9 -0
@@ -216,6 +216,15 @@ static int fops_vcodec_release(struct file *file)v4l2_fh_exit (&ctx->fh);v4l2_ctrl_handler_free (&ctx->ctrl_hdl); +/* +* Cancel any pending encode work before freeing the context. +* Although v4l2_m2m_ctx_release() waits for m2m job completion, +* the workqueue handler (mtk_venc_worker) may still be accessing +* the context after v4l2_m2m_job_finish() returns. Without this, +* a use-after-free occurs when the worker accesses ctx after kfree. +*/ +cancel_work_sync (&ctx->encode_work); +spin_lock_irqsave (&dev->dev_ctx_lock, flags);list_del_init (&ctx->list);spin_unlock_irqrestore (&dev->dev_ctx_lock, flags);
drivers/media/test-drivers/vidtv/vidtv_bridge.c +3 -1
@@ -237,8 +237,10 @@ static int vidtv_start_feed(struct dvb_demux_feed *feed)if (dvb->nfeeds ==1 ) { ret =vidtv_start_streaming (dvb); -if (ret <0 ) +if (ret <0 ) { + dvb->nfeeds--; rc = ret; + } }mutex_unlock (&dvb->feed_lock);
drivers/media/test-drivers/vidtv/vidtv_channel.c +4 -0
@@ -341,6 +341,10 @@ vidtv_channel_pmt_match_sections(struct vidtv_channel *channels, tail =vidtv_psi_pmt_stream_init (tail, s->type, e_pid); +if (!tail) { +vidtv_psi_pmt_stream_destroy (head); +return ; + }if (!head) head = tail;
drivers/media/test-drivers/vidtv/vidtv_mux.c +2 -2
@@ -233,7 +233,7 @@ static u32 vidtv_mux_push_pcr(struct vidtv_mux *m)/* the 27Mhz clock will feed both parts of the PCR bitfield */ args.pcr = m->timing.clk; - nbytes +=vidtv_ts_pcr_write_into (args); + nbytes +=vidtv_ts_pcr_write_into (&args); m->mux_buf_offset += nbytes; m->num_streamed_pcr++;
@@ -363,7 +363,7 @@ static u32 vidtv_mux_pad_with_nulls(struct vidtv_mux *m, u32 npkts) args.continuity_counter = &ctx->cc;for (i =0 ; i < npkts; ++i) { - m->mux_buf_offset +=vidtv_ts_null_write_into (args); + m->mux_buf_offset +=vidtv_ts_null_write_into (&args); args.dest_offset = m->mux_buf_offset; }
drivers/media/test-drivers/vidtv/vidtv_ts.c +24 -24
96 lines not on this page · raw message
drivers/media/test-drivers/vidtv/vidtv_ts.h +2 -2
@@ -90,7 +90,7 @@ void vidtv_ts_inc_cc(u8 *continuity_counter);* * Return: The number of bytes written into the buffer. */ -u32 vidtv_ts_null_write_into (struct null_packet_write_args args); +u32 vidtv_ts_null_write_into (const struct null_packet_write_args *args);/** * vidtv_ts_pcr_write_into - Write a PCR packet into a buffer.
@@ -101,6 +101,6 @@ u32 vidtv_ts_null_write_into(struct null_packet_write_args args);* * Return: The number of bytes written into the buffer. */ -u32 vidtv_ts_pcr_write_into (struct pcr_write_args args); +u32 vidtv_ts_pcr_write_into (const struct pcr_write_args *args);#endif //VIDTV_TS_H
drivers/media/usb/as102/as102_usb_drv.c +2 -0
@@ -403,7 +403,9 @@ static int as102_usb_probe(struct usb_interface *intf, failed_dvb:as102_free_usb_stream_buffer (as102_dev); failed_stream: +usb_set_intfdata (intf,NULL );usb_deregister_dev (intf, &as102_usb_class_driver); +return ret; failed:usb_put_dev (as102_dev->bus_adap.usb_dev);usb_set_intfdata (intf,NULL );
drivers/media/usb/em28xx/em28xx-video.c +10 -4
@@ -2128,7 +2128,7 @@ static int em28xx_v4l2_open(struct file *filp) {struct video_device *vdev =video_devdata (filp);struct em28xx *dev =video_drvdata (filp); -struct em28xx_v4l2 *v4l2 = dev->v4l2; +struct em28xx_v4l2 *v4l2;enum v4l2_buf_type fh_type =0 ;int ret;
@@ -2145,13 +2145,19 @@ static int em28xx_v4l2_open(struct file *filp)return -EINVAL ; } +if (mutex_lock_interruptible (&dev->lock)) +return -ERESTARTSYS ; + + v4l2 = dev->v4l2; +if (!v4l2) { +mutex_unlock (&dev->lock); +return -ENODEV ; + } +em28xx_videodbg ("open dev=%s type=%s users=%d\n" ,video_device_node_name (vdev), v4l2_type_names[fh_type], v4l2->users); -if (mutex_lock_interruptible (&dev->lock)) -return -ERESTARTSYS ; - ret =v4l2_fh_open (filp);if (ret) { dev_err(&dev->intf->dev,
drivers/media/usb/hackrf/hackrf.c +4 -3
@@ -1486,7 +1486,7 @@ static int hackrf_probe(struct usb_interface *intf,if (ret) {dev_err (dev->dev,"Failed to register as video device (%d)\n" , ret); - goto err_v4l2_device_unregister; + goto err_v4l2_device_put; }dev_info (dev->dev,"Registered as %s\n" ,video_device_node_name (&dev->rx_vdev));
@@ -1515,8 +1515,9 @@ static int hackrf_probe(struct usb_interface *intf,return 0 ; err_video_unregister_device_rx:video_unregister_device (&dev->rx_vdev); -err_v4l2_device_unregister: -v4l2_device_unregister (&dev->v4l2_dev); +err_v4l2_device_put: +v4l2_device_put (&dev->v4l2_dev); +return ret; err_v4l2_ctrl_handler_free_tx:v4l2_ctrl_handler_free (&dev->tx_ctrl_handler); err_v4l2_ctrl_handler_free_rx:
drivers/net/can/spi/mcp251x.c +24 -5
@@ -1212,7 +1212,11 @@ static int mcp251x_open(struct net_device *net) }mutex_lock (&priv->mcp_lock); -mcp251x_power_enable (priv->transceiver,1 ); + ret =mcp251x_power_enable (priv->transceiver,1 ); +if (ret) { +dev_err (&spi->dev,"failed to enable transceiver power: %pe\n" ,ERR_PTR (ret)); + goto out_close_candev; + } priv->force_quit =0 ; priv->tx_skb =NULL ;
@@ -1259,6 +1263,7 @@ static int mcp251x_open(struct net_device *net)mcp251x_hw_sleep (spi); out_close:mcp251x_power_enable (priv->transceiver,0 ); +out_close_candev:close_candev (net);mutex_unlock (&priv->mcp_lock);if (release_irq)
@@ -1494,11 +1499,25 @@ static int __maybe_unused mcp251x_can_resume(struct device *dev) {struct spi_device *spi =to_spi_device (dev);struct mcp251x_priv *priv =spi_get_drvdata (spi); +int ret =0 ; -if (priv->after_suspend &AFTER_SUSPEND_POWER ) -mcp251x_power_enable (priv->power,1 ); -if (priv->after_suspend &AFTER_SUSPEND_UP ) -mcp251x_power_enable (priv->transceiver,1 ); +if (priv->after_suspend &AFTER_SUSPEND_POWER ) { + ret =mcp251x_power_enable (priv->power,1 ); +if (ret) { +dev_err (dev,"failed to restore power: %pe\n" ,ERR_PTR (ret)); +return ret; + } + } + +if (priv->after_suspend &AFTER_SUSPEND_UP ) { + ret =mcp251x_power_enable (priv->transceiver,1 ); +if (ret) { +dev_err (dev,"failed to restore transceiver power: %pe\n" ,ERR_PTR (ret)); +if (priv->after_suspend &AFTER_SUSPEND_POWER ) +mcp251x_power_enable (priv->power,0 ); +return ret; + } + }if (priv->after_suspend & (AFTER_SUSPEND_POWER |AFTER_SUSPEND_UP ))queue_work (priv->wq, &priv->restart_work);
drivers/net/ethernet/intel/e1000/e1000_ethtool.c +7 -1
@@ -496,14 +496,19 @@ static int e1000_set_eeprom(struct net_device *netdev,*/ ret_val =e1000_read_eeprom (hw, first_word,1 , &eeprom_buff[0 ]); +if (ret_val) + goto out; + ptr++; } -if (((eeprom->offset + eeprom->len) &1 ) && (ret_val ==0 )) { +if ((eeprom->offset + eeprom->len) &1 ) {/* need read/modify/write of last changed EEPROM word * only the first byte of the word is being modified */ ret_val =e1000_read_eeprom (hw, last_word,1 , &eeprom_buff[last_word - first_word]); +if (ret_val) + goto out; }/* Device's eeprom is always little-endian, word addressable */
@@ -522,6 +527,7 @@ static int e1000_set_eeprom(struct net_device *netdev,if ((ret_val ==0 ) && (first_word <=EEPROM_CHECKSUM_REG ))e1000_update_eeprom_checksum (hw); +out:kfree (eeprom_buff);return ret_val; }
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +6 -9
@@ -59,6 +59,7 @@ typedef int (*async_vc_cb) (struct idpf_adapter *, struct idpf_vc_xn *,*/ struct idpf_vc_xn {struct completion completed; +spinlock_t lock;enum idpf_vc_xn_state state;size_t reply_sz;struct kvec reply;
@@ -312,26 +313,21 @@ int idpf_send_mb_msg(struct idpf_adapter *adapter, u32 op,return err; } -/* API for virtchnl "transaction" support ("xn" for short). -* -* We are reusing the completion lock to serialize the accesses to the -* transaction state for simplicity, but it could be its own separate synchro -* as well. For now, this API is only used from within a workqueue context; -* raw_spin_lock() is enough. -*/ +/* API for virtchnl "transaction" support ("xn" for short). */ +/** * idpf_vc_xn_lock - Request exclusive access to vc transaction * @xn: struct idpf_vc_xn* to access */ #define idpf_vc_xn_lock (xn) \ - raw_spin_lock(&(xn)->completed.wait.lock) + spin_lock(&(xn)->lock)/** * idpf_vc_xn_unlock - Release exclusive access to vc transaction * @xn: struct idpf_vc_xn* to access */ #define idpf_vc_xn_unlock (xn) \ - raw_spin_unlock(&(xn)->completed.wait.lock) + spin_unlock(&(xn)->lock)/** * idpf_vc_xn_release_bufs - Release reference to reply buffer(s) and
@@ -363,6 +359,7 @@ static void idpf_vc_xn_init(struct idpf_vc_xn_manager *vcxn_mngr) xn->state =IDPF_VC_XN_IDLE ; xn->idx = i;idpf_vc_xn_release_bufs (xn); +spin_lock_init (&xn->lock);init_completion (&xn->completed); }
drivers/net/ethernet/intel/ixgbevf/vf.c +7 -0
@@ -709,6 +709,12 @@ static int ixgbevf_negotiate_features_vf(struct ixgbe_hw *hw, u32 *pf_features)return err; } +static int ixgbevf_hv_negotiate_features_vf (struct ixgbe_hw *hw, +u32 *pf_features) +{ +return -EOPNOTSUPP ; +} +/** * ixgbevf_set_vfta_vf - Set/Unset VLAN filter table address * @hw: pointer to the HW structure
@@ -1142,6 +1148,7 @@ static const struct ixgbe_mac_operations ixgbevf_hv_mac_ops = { .setup_link = ixgbevf_setup_mac_link_vf, .check_link = ixgbevf_hv_check_mac_link_vf, .negotiate_api_version = ixgbevf_hv_negotiate_api_version_vf, + .negotiate_features = ixgbevf_hv_negotiate_features_vf, .set_rar = ixgbevf_hv_set_rar_vf, .update_mc_addr_list = ixgbevf_hv_update_mc_addr_list_vf, .update_xcast_mode = ixgbevf_hv_update_xcast_mode,
drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c +17 -2
@@ -9,7 +9,7 @@#include "stmmac_platform.h" static const char *const mgbe_clks[] = { -"rx-pcs" ,"tx" ,"tx-pcs" ,"mac-divider" ,"mac" ,"mgbe" ,"ptp-ref" ,"mac" +"rx-pcs" ,"tx" ,"tx-pcs" ,"mac-divider" ,"mac" ,"mgbe" ,"ptp_ref" ,"mac" };struct tegra_mgbe {
@@ -215,6 +215,7 @@ static int tegra_mgbe_probe(struct platform_device *pdev) {struct plat_stmmacenet_data *plat;struct stmmac_resources res; +bool use_legacy_ptp = false;struct tegra_mgbe *mgbe;int irq, err, i;u32 value;
@@ -257,9 +258,23 @@ static int tegra_mgbe_probe(struct platform_device *pdev)if (!mgbe->clks)return -ENOMEM ; -for (i =0 ; i <ARRAY_SIZE (mgbe_clks); i++) +/* Older device-trees use 'ptp-ref' rather than 'ptp_ref'. +* Fall back when the legacy name is present. +*/ +if (of_property_match_string (pdev->dev.of_node,"clock-names" , +"ptp-ref" ) >=0 ) + use_legacy_ptp = true; + +for (i =0 ; i <ARRAY_SIZE (mgbe_clks); i++) { mgbe->clks[i].id = mgbe_clks[i]; +if (use_legacy_ptp && !strcmp (mgbe_clks[i],"ptp_ref" )) { +dev_warn (mgbe->dev, +"Device-tree update needed for PTP clock!\n" ); + mgbe->clks[i].id ="ptp-ref" ; + } + } + err =devm_clk_bulk_get (mgbe->dev,ARRAY_SIZE (mgbe_clks), mgbe->clks);if (err <0 )return err;
drivers/net/ethernet/wangxun/txgbe/txgbe_type.h +4 -4
@@ -295,10 +295,10 @@ struct txgbe_nodes {char i2c_name[32 ];char sfp_name[32 ];char phylink_name[32 ]; -struct property_entry gpio_props[1 ]; -struct property_entry i2c_props[3 ]; -struct property_entry sfp_props[8 ]; -struct property_entry phylink_props[2 ]; +struct property_entry gpio_props[2 ]; +struct property_entry i2c_props[4 ]; +struct property_entry sfp_props[9 ]; +struct property_entry phylink_props[3 ];struct software_node_ref_args i2c_ref[1 ];struct software_node_ref_args gpio0_ref[1 ];struct software_node_ref_args gpio1_ref[1 ];
drivers/net/ipa/reg/gsi_reg-v5.0.c +5 -4
@@ -30,7 +30,7 @@ REG_STRIDE_FIELDS(CH_C_CNTXT_0, ch_c_cntxt_0,static const u32 reg_ch_c_cntxt_1_fmask[] = { [CH_R_LENGTH ] =GENMASK (23 ,0 ), - [ERINDEX ] =GENMASK (31 ,24 ), + [CH_ERINDEX ] =GENMASK (31 ,24 ), }; REG_STRIDE_FIELDS(CH_C_CNTXT_1, ch_c_cntxt_1,
@@ -156,9 +156,10 @@ REG_FIELDS(EV_CH_CMD, ev_ch_cmd, 0x00025010 + 0x12000 * GSI_EE_AP);static const u32 reg_generic_cmd_fmask[] = { [GENERIC_OPCODE ] =GENMASK (4 ,0 ), - [GENERIC_CHID ] =GENMASK (9 ,5 ), - [GENERIC_EE ] =GENMASK (13 ,10 ), -/* Bits 14-31 reserved */ + [GENERIC_CHID ] =GENMASK (12 ,5 ), + [GENERIC_EE ] =GENMASK (16 ,13 ), +/* Bits 17-23 reserved */ + [GENERIC_PARAMS ] =GENMASK (31 ,24 ), };REG_FIELDS (GENERIC_CMD , generic_cmd,0x00025018 +0x12000 *GSI_EE_AP );
drivers/net/phy/sfp.c +16 -0
@@ -536,6 +536,22 @@ static const struct sfp_quirk sfp_quirks[] = {SFP_QUIRK ("HUAWEI" ,"MA5671A" , sfp_quirk_2500basex, sfp_fixup_ignore_tx_fault_and_los), +// Hisense LXT-010S-H is a GPON ONT SFP (sold as LEOX LXT-010S-H) that +// can operate at 2500base-X, but reports 1000BASE-LX / 1300MBd in its +// EEPROM +SFP_QUIRK ("Hisense-Leox" ,"LXT-010S-H" , sfp_quirk_2500basex, + sfp_fixup_ignore_tx_fault), + +// Hisense ZNID-GPON-2311NA can operate at 2500base-X, but reports +// 1000BASE-LX / 1300MBd in its EEPROM +SFP_QUIRK ("Hisense" ,"ZNID-GPON-2311NA" , sfp_quirk_2500basex, + sfp_fixup_ignore_tx_fault), + +// HSGQ HSGQ-XPON-Stick can operate at 2500base-X, but reports +// 1000BASE-LX / 1300MBd in its EEPROM +SFP_QUIRK ("HSGQ" ,"HSGQ-XPON-Stick" , sfp_quirk_2500basex, + sfp_fixup_ignore_tx_fault), +// Lantech 8330-262D-E and 8330-265D can operate at 2500base-X, but // incorrectly report 2500MBd NRZ in their EEPROM. // Some 8330-265D modules have inverted LOS, while all of them report
drivers/net/usb/cdc-phonet.c +6 -1
@@ -157,11 +157,16 @@ static void rx_complete(struct urb *req) PAGE_SIZE); page =NULL ; } - }else { + }else if (skb_shinfo (skb)->nr_frags <MAX_SKB_FRAGS ) {skb_add_rx_frag (skb,skb_shinfo (skb)->nr_frags, page,0 , req->actual_length,PAGE_SIZE ); page =NULL ; + }else { +dev_kfree_skb_any (skb); + pnd->rx_skb =NULL ; + skb =NULL ; + dev->stats.rx_length_errors++; }if (req->actual_length <PAGE_SIZE ) pnd->rx_skb =NULL ;/* Last fragment */
drivers/net/wan/lapbether.c +8 -5
@@ -444,33 +444,36 @@ static void lapbeth_free_device(struct lapbethdev *lapbeth)static int lapbeth_device_event (struct notifier_block *this,unsigned long event,void *ptr) { -struct lapbethdev *lapbeth;struct net_device *dev =netdev_notifier_info_to_dev (ptr); +struct lapbethdev *lapbeth;if (dev_net (dev) != &init_net)return NOTIFY_DONE ; -if (!dev_is_ethdev (dev) && !lapbeth_get_x25_dev (dev)) + lapbeth =lapbeth_get_x25_dev (dev); +if (!dev_is_ethdev (dev) && !lapbeth)return NOTIFY_DONE ;switch (event) {case NETDEV_UP :/* New ethernet device -> new LAPB interface */ -if (!lapbeth_get_x25_dev (dev)) +if (!lapbeth)lapbeth_new_device (dev);break ;case NETDEV_GOING_DOWN :/* ethernet device closes -> close LAPB interface */ - lapbeth =lapbeth_get_x25_dev (dev);if (lapbeth)dev_close (lapbeth->axdev);break ;case NETDEV_UNREGISTER :/* ethernet device disappears -> remove LAPB interface */ - lapbeth =lapbeth_get_x25_dev (dev);if (lapbeth)lapbeth_free_device (lapbeth);break ; +case NETDEV_PRE_TYPE_CHANGE : +/* Our underlying device type must not change. */ +if (lapbeth) +return NOTIFY_BAD ; }return NOTIFY_DONE ;
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c +5 -0
@@ -152,6 +152,11 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,bphy_err (drvr,"invalid interface index: %u\n" , ifevent->ifidx);return ; } +if (ifevent->bsscfgidx >=BRCMF_MAX_IFS ) { +bphy_err (drvr,"invalid bsscfg index: %u\n" , + ifevent->bsscfgidx); +return ; + } ifp = drvr->iflist[ifevent->bsscfgidx];
drivers/net/wireless/realtek/rtw88/usb.c +1 -2
@@ -953,7 +953,7 @@ static int rtw_usb_intf_init(struct rtw_dev *rtwdev, struct usb_interface *intf) {struct rtw_usb *rtwusb =rtw_get_usb_priv (rtwdev); -struct usb_device *udev =usb_get_dev (interface_to_usbdev (intf)); +struct usb_device *udev =interface_to_usbdev (intf);int ret; rtwusb->udev = udev;
@@ -979,7 +979,6 @@ static void rtw_usb_intf_deinit(struct rtw_dev *rtwdev, {struct rtw_usb *rtwusb =rtw_get_usb_priv (rtwdev); -usb_put_dev (rtwusb->udev);kfree (rtwusb->usb_data);usb_set_intfdata (intf,NULL ); }
drivers/net/wireless/ti/wl1251/tx.c +5 -3
@@ -402,12 +402,14 @@ static void wl1251_tx_packet_cb(struct wl1251 *wl,int hdrlen;u8 *frame; - skb = wl->tx_frames[result->id]; -if (skb ==NULL ) { -wl1251_error ("SKB for packet %d is NULL" , result->id); +if (unlikely (result->id >=ARRAY_SIZE (wl->tx_frames) || + wl->tx_frames[result->id] ==NULL )) { +wl1251_error ("invalid packet id %u" , result->id);return ; } + skb = wl->tx_frames[result->id]; + info =IEEE80211_SKB_CB (skb); if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) &&
drivers/nfc/s3fwrn5/uart.c +7 -3
@@ -58,6 +58,12 @@ static size_t s3fwrn82_uart_read(struct serdev_device *serdev,size_t i;for (i =0 ; i < count; i++) { +if (!phy->recv_skb) { + phy->recv_skb =alloc_skb (NCI_SKB_BUFF_LEN ,GFP_KERNEL ); +if (!phy->recv_skb) +return i; + } +skb_put_u8 (phy->recv_skb, *data++);if (phy->recv_skb->len <S3FWRN82_NCI_HEADER )
@@ -69,9 +75,7 @@ static size_t s3fwrn82_uart_read(struct serdev_device *serdev,s3fwrn5_recv_frame (phy->common.ndev, phy->recv_skb, phy->common.mode); - phy->recv_skb =alloc_skb (NCI_SKB_BUFF_LEN ,GFP_KERNEL ); -if (!phy->recv_skb) -return 0 ; + phy->recv_skb =NULL ; }return i;
drivers/ntb/ntb_transport.c +4 -3
@@ -1802,12 +1802,13 @@ static void ntb_tx_copy_callback(void *data,static void ntb_memcpy_tx (struct ntb_queue_entry *entry,void __iomem *offset) { -#ifdef ARCH_HAS_NOCACHE_UACCESS +#ifdef copy_to_nontemporal/* * Using non-temporal mov to improve performance on non-cached -* writes, even though we aren't actually copying from user space. +* writes. This only works if __iomem is strictly memory-like, +* but that is the case on x86-64 */ -__copy_from_user_inatomic_nocache (offset, entry->buf, entry->len); +copy_to_nontemporal (offset, entry->buf, entry->len);#else memcpy_toio (offset, entry->buf, entry->len);#endif
drivers/pci/bus.c +3 -3
@@ -331,9 +331,6 @@ void pci_bus_add_device(struct pci_dev *dev)struct device_node *dn = dev->dev.of_node;int retval; -/* Save config space for error recoverability */ -pci_save_state (dev); -/* * Can not put in pci_device_add yet because resources * are not assigned yet for some devices.
@@ -346,6 +343,9 @@ void pci_bus_add_device(struct pci_dev *dev)pci_proc_attach_device (dev);pci_bridge_d3_update (dev); +/* Save config space for error recoverability */ +pci_save_state (dev); + dev->match_driver = !dn ||of_device_is_available (dn); retval =device_attach (&dev->dev);if (retval <0 && retval != -EPROBE_DEFER )
drivers/pci/controller/pci-hyperv.c +8 -0
@@ -2364,6 +2364,14 @@ static void hv_pci_assign_numa_node(struct hv_pcibus_device *hbus)if (!hv_dev)continue ; +/* +* If the Hyper-V host doesn't provide a NUMA node for the +* device, default to node 0. With NUMA_NO_NODE the kernel +* may spread work across NUMA nodes, which degrades +* performance on Hyper-V. +*/ +set_dev_node (&dev->dev,0 ); +if (hv_dev->desc.flags &HV_PCI_DEVICE_FLAG_NUMA_AFFINITY && hv_dev->desc.virtual_numa_node <num_possible_nodes ())/*
drivers/pci/endpoint/functions/pci-epf-vntb.c +1 -0
@@ -799,6 +799,7 @@ static int epf_ntb_epc_init(struct epf_ntb *ntb)*/ static void epf_ntb_epc_cleanup (struct epf_ntb *ntb) { +disable_delayed_work_sync (&ntb->cmd_handler);epf_ntb_mw_bar_clear (ntb, ntb->num_mws);epf_ntb_db_bar_clear (ntb);epf_ntb_config_sspad_bar_clear (ntb);
drivers/pci/pci-driver.c +0 -8
@@ -1656,14 +1656,6 @@ static int pci_dma_configure(struct device *dev) ret =acpi_dma_configure (dev,acpi_get_dma_attr (adev)); } -/* -* Attempt to enable ACS regardless of capability because some Root -* Ports (e.g. those quirked with *_intel_pch_acs_*) do not have -* the standard ACS capability but still support ACS via those -* quirks. -*/ -pci_enable_acs (to_pci_dev (dev)); -pci_put_host_bridge_device (bridge);if (!ret && !driver->driver_managed_dma) {
drivers/pci/pci.c +9 -1
@@ -1072,7 +1072,7 @@ static void pci_std_enable_acs(struct pci_dev *dev, struct pci_acs *caps)* pci_enable_acs - enable ACS if hardware support it * @dev: the PCI device */ -void pci_enable_acs (struct pci_dev *dev) +static void pci_enable_acs (struct pci_dev *dev) {struct pci_acs caps;bool enable_acs = false;
@@ -3718,6 +3718,14 @@ bool pci_acs_path_enabled(struct pci_dev *start,void pci_acs_init (struct pci_dev *dev) { dev->acs_cap =pci_find_ext_capability (dev,PCI_EXT_CAP_ID_ACS ); + +/* +* Attempt to enable ACS regardless of capability because some Root +* Ports (e.g. those quirked with *_intel_pch_acs_*) do not have +* the standard ACS capability but still support ACS via those +* quirks. +*/ +pci_enable_acs (dev); }/**
drivers/pci/pci.h +0 -1
@@ -653,7 +653,6 @@ static inline resource_size_t pci_resource_alignment(struct pci_dev *dev, }void pci_acs_init (struct pci_dev *dev); -void pci_enable_acs (struct pci_dev *dev);#ifdef CONFIG_PCI_QUIRKS int pci_dev_specific_acs_enabled (struct pci_dev *dev,u16 acs_flags);int pci_dev_specific_enable_acs (struct pci_dev *dev);
drivers/pinctrl/intel/pinctrl-intel.c +1 -1
@@ -1588,7 +1588,7 @@ int intel_pinctrl_probe(struct platform_device *pdev, value =readl (regs +REVID );if (value == ~0u )return -ENODEV ; -if (((value &REVID_MASK ) >>REVID_SHIFT ) >=0x94 ) { +if (((value &REVID_MASK ) >>REVID_SHIFT ) >=0x92 ) { community->features |=PINCTRL_FEATURE_DEBOUNCE ; community->features |=PINCTRL_FEATURE_1K_PD ; }
drivers/platform/x86/amd/pmc/pmc-quirks.c +9 -0
@@ -197,6 +197,15 @@ static const struct dmi_system_id fwbug_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "82XQ"), } }, +/* https://bugzilla.kernel.org/show_bug.cgi?id=221273 */ + { + .ident = "Thinkpad L14 Gen3", + .driver_data = &quirk_s2idle_bug, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"LENOVO" ), + DMI_MATCH(DMI_PRODUCT_NAME, "21C6"), + } + }, /* https://gitlab.freedesktop.org/drm/amd/-/issues/4434 */ { .ident = "Lenovo Yoga 6 13ALC6",
drivers/platform/x86/asus-nb-wmi.c +1 -1
@@ -547,7 +547,7 @@ static const struct dmi_system_id asus_quirks[] = { .callback = dmi_matched, .ident = "ASUS ROG Z13", .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_MATCH (DMI_SYS_VENDOR ,"ASUS" ), DMI_MATCH(DMI_PRODUCT_NAME, "ROG Flow Z13"), }, .driver_data = &quirk_asus_z13,
drivers/soc/aspeed/aspeed-socinfo.c +1 -1
@@ -39,7 +39,7 @@ static const char *siliconid_to_name(u32 siliconid)unsigned int i;for (i =0 ; i <ARRAY_SIZE (rev_table) ; ++i) { -if (rev_table[i].id == id) +if ((rev_table[i].id &0xff00ffff ) == id)return rev_table[i].name; }
drivers/soc/qcom/pdr_internal.h +1 -1
@@ -84,7 +84,7 @@ struct servreg_set_ack_resp {struct servreg_loc_pfr_req {char service[SERVREG_NAME_LENGTH +1 ]; -char reason[257 ]; +char reason[SERVREG_PFR_LENGTH +1 ]; };struct servreg_loc_pfr_resp {
drivers/soc/qcom/qcom_pdr_msg.c +1 -1
@@ -326,7 +326,7 @@ const struct qmi_elem_info servreg_loc_pfr_req_ei[] = { }, { .data_type = QMI_STRING, - .elem_len = SERVREG_NAME_LENGTH + 1, + .elem_len = SERVREG_PFR_LENGTH + 1, .elem_size = sizeof(char), .array_type = VAR_LEN_ARRAY, .tlv_type = 0x02,
drivers/staging/media/rkvdec/rkvdec-vp9.c +2 -1
@@ -923,7 +923,8 @@ static void rkvdec_vp9_done(struct rkvdec_ctx *ctx,update_ctx_last_info (vp9_ctx); } -static void rkvdec_init_v4l2_vp9_count_tbl (struct rkvdec_ctx *ctx) +static noinline_for_stack void +rkvdec_init_v4l2_vp9_count_tbl (struct rkvdec_ctx *ctx) {struct rkvdec_vp9_ctx *vp9_ctx = ctx->priv;struct rkvdec_vp9_intra_frame_symbol_counts *intra_cnts = vp9_ctx->count_tbl.cpu;
drivers/staging/rtl8723bs/core/rtw_security.c +1 -1
@@ -1363,7 +1363,7 @@ u32 rtw_BIP_verify(struct adapter *padapter, u8 *precvframe)u8 mic[16 ];struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;__le16 le_tmp; -__le64 le_tmp64; +__le64 le_tmp64 =0 ; ori_len = pattrib->pkt_len-WLAN_HDR_A3_LEN +BIP_AAD_SIZE ;BIP_AAD =rtw_zmalloc (ori_len);
drivers/staging/sm750fb/sm750.c +3 -0
@@ -483,6 +483,9 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,struct lynxfb_crtc *crtc;resource_size_t request; +if (!var->pixclock) +return -EINVAL ; + ret =0 ; par = info->par; crtc = &par->crtc;
drivers/thermal/thermal_core.c +31 -5
@@ -42,6 +42,8 @@ static struct thermal_governor *def_governor;static bool thermal_pm_suspended; +static struct workqueue_struct *thermal_wq__ro_after_init ; +/* * Governor section: set of functions to handle thermal governors *
@@ -328,7 +330,7 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,if (delay >HZ ) delay =round_jiffies_relative (delay); -mod_delayed_work (system_freezable_power_efficient_wq, &tz->poll_queue, delay); +mod_delayed_work (thermal_wq, &tz->poll_queue, delay); }static void thermal_zone_recheck (struct thermal_zone_device *tz,int error)
@@ -1614,7 +1616,10 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) }mutex_lock (&tz->lock); + + tz->state |=TZ_STATE_FLAG_EXIT ;list_del (&tz->node); +mutex_unlock (&tz->lock);/* Unbind all cdevs associated with 'this' thermal zone */
@@ -1688,6 +1693,12 @@ static void thermal_zone_device_resume(struct work_struct *work)mutex_lock (&tz->lock); +/* If the thermal zone is going away, there's nothing to do. */ +if (tz->state &TZ_STATE_FLAG_EXIT ) { +mutex_unlock (&tz->lock); +return ; + } + tz->state &= ~(TZ_STATE_FLAG_SUSPENDED |TZ_STATE_FLAG_RESUMING );thermal_debug_tz_resume (tz);
@@ -1719,6 +1730,9 @@ static void thermal_zone_pm_prepare(struct thermal_zone_device *tz) tz->state |=TZ_STATE_FLAG_SUSPENDED ; +/* Prevent new work from getting to the workqueue subsequently. */ +cancel_delayed_work (&tz->poll_queue); +mutex_unlock (&tz->lock); }
@@ -1726,8 +1740,6 @@ static void thermal_zone_pm_complete(struct thermal_zone_device *tz) {mutex_lock (&tz->lock); -cancel_delayed_work (&tz->poll_queue); -reinit_completion (&tz->resume); tz->state |=TZ_STATE_FLAG_RESUMING ;
@@ -1737,7 +1749,7 @@ static void thermal_zone_pm_complete(struct thermal_zone_device *tz)*/ INIT_DELAYED_WORK (&tz->poll_queue, thermal_zone_device_resume);/* Queue up the work without a delay. */ -mod_delayed_work (system_freezable_power_efficient_wq, &tz->poll_queue,0 ); +mod_delayed_work (thermal_wq, &tz->poll_queue,0 );mutex_unlock (&tz->lock); }
@@ -1759,6 +1771,11 @@ static int thermal_pm_notify(struct notifier_block *nb,thermal_zone_pm_prepare (tz);mutex_unlock (&thermal_list_lock); +/* +* Allow any leftover thermal work items already on the +* worqueue to complete so they don't get in the way later. +*/ +flush_workqueue (thermal_wq);break ;case PM_POST_HIBERNATION :case PM_POST_RESTORE :
@@ -1798,9 +1815,16 @@ static int __init thermal_init(void)if (result) goto error; + thermal_wq =alloc_workqueue ("thermal_events" , +WQ_FREEZABLE |WQ_POWER_EFFICIENT ,0 ); +if (!thermal_wq) { + result = -ENOMEM ; + goto unregister_netlink; + } + result =thermal_register_governors ();if (result) - goto unregister_netlink; + goto destroy_workqueue; thermal_class =kzalloc (sizeof (*thermal_class),GFP_KERNEL );if (!thermal_class) {
@@ -1827,6 +1851,8 @@ static int __init thermal_init(void) unregister_governors:thermal_unregister_governors (); +destroy_workqueue: +destroy_workqueue (thermal_wq); unregister_netlink:thermal_netlink_exit (); error:
drivers/thermal/thermal_core.h +1 -0
@@ -65,6 +65,7 @@ struct thermal_governor {#define TZ_STATE_FLAG_SUSPENDED BIT(0)#define TZ_STATE_FLAG_RESUMING BIT(1)#define TZ_STATE_FLAG_INIT BIT(2) +#define TZ_STATE_FLAG_EXIT BIT(3)#define TZ_STATE_READY 0
drivers/usb/class/cdc-acm.c +46 -7
101 lines not on this page · raw message
drivers/usb/core/port.c +1 -0
@@ -139,6 +139,7 @@ static ssize_t disable_store(struct device *dev, struct device_attribute *attr,usb_disconnect (&port_dev->child); rc =usb_hub_set_port_power (hdev, hub, port1, !disabled); +msleep (2 *hub_power_on_good_delay (hub));if (disabled) {usb_clear_port_feature (hdev, port1,USB_PORT_FEAT_C_CONNECTION );
drivers/usb/gadget/function/f_hid.c +10 -5
@@ -103,7 +103,7 @@ struct f_hidg {struct list_head report_list;struct device dev; -struct cdev cdev; +struct cdev *cdev;struct usb_function func;struct usb_ep *in_ep;
@@ -764,8 +764,9 @@ static int f_hidg_release(struct inode *inode, struct file *fd)static int f_hidg_open (struct inode *inode,struct file *fd) { +struct kobject *parent = inode->i_cdev->kobj.parent;struct f_hidg *hidg = - container_of(inode->i_cdev, struct f_hidg, cdev); + container_of(parent, struct f_hidg, dev.kobj); fd->private_data = hidg;
@@ -1270,8 +1271,12 @@ static int hidg_bind(struct usb_configuration *c, struct usb_function *f) }/* create char device */ -cdev_init (&hidg->cdev, &f_hidg_fops); - status =cdev_device_add (&hidg->cdev, &hidg->dev); + hidg->cdev =cdev_alloc (); +if (!hidg->cdev) + goto fail_free_all; + hidg->cdev->ops = &f_hidg_fops; + + status =cdev_device_add (hidg->cdev, &hidg->dev);if (status) goto fail_free_all;
@@ -1521,7 +1526,7 @@ static void hidg_unbind(struct usb_configuration *c, struct usb_function *f) {struct f_hidg *hidg =func_to_hidg (f); -cdev_device_del (&hidg->cdev, &hidg->dev); +cdev_device_del (hidg->cdev, &hidg->dev);destroy_workqueue (hidg->workqueue);usb_free_all_descriptors (f); }
drivers/usb/gadget/function/f_ncm.c +2 -2
@@ -1209,8 +1209,8 @@ static int ncm_unwrap_ntb(struct gether *port, block_len =get_ncm (&tmp, opts->block_length);/* (d)wBlockLength */ -if (block_len > ntb_max) { -INFO (port->func.config->cdev,"OUT size exceeded\n" ); +if ((block_len < opts->nth_size + opts->ndp_size) || (block_len > ntb_max)) { +INFO (port->func.config->cdev,"Bad block length: %#X\n" , block_len); goto err; }
drivers/usb/gadget/function/f_phonet.c +9 -0
@@ -333,6 +333,15 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req)if (unlikely (!skb))break ; +if (unlikely (skb_shinfo (skb)->nr_frags >=MAX_SKB_FRAGS )) { +/* Frame count from host exceeds frags[] capacity */ +dev_kfree_skb_any (skb); +if (fp->rx.skb == skb) + fp->rx.skb =NULL ; + dev->stats.rx_length_errors++; +break ; + } +if (skb->len ==0 ) {/* First fragment */ skb->protocol =htons (ETH_P_PHONET );skb_reset_mac_header (skb);
drivers/usb/gadget/udc/renesas_usb3.c +6 -1
@@ -1669,6 +1669,10 @@ static bool usb3_std_req_get_status(struct renesas_usb3 *usb3,break ;case USB_RECIP_ENDPOINT : num =le16_to_cpu (ctrl->wIndex) &USB_ENDPOINT_NUMBER_MASK ; +if (num >= usb3->num_usb3_eps) { + stall = true; +break ; + } usb3_ep =usb3_get_ep (usb3, num);if (usb3_ep->halt) status |=1 <<USB_ENDPOINT_HALT ;
@@ -1781,7 +1785,8 @@ static bool usb3_std_req_feature_endpoint(struct renesas_usb3 *usb3,struct renesas_usb3_ep *usb3_ep;struct renesas_usb3_request *usb3_req; -if (le16_to_cpu (ctrl->wValue) !=USB_ENDPOINT_HALT ) +if ((le16_to_cpu (ctrl->wValue) !=USB_ENDPOINT_HALT ) || + (num >= usb3->num_usb3_eps))return true;/* stall */ usb3_ep =usb3_get_ep (usb3, num);
drivers/usb/serial/option.c +2 -0
@@ -1383,6 +1383,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1073, 0xff), /* Telit FN990A (ECM) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1074, 0xff), /* Telit FN990A (MBIM) */ + .driver_info = NCTRL(5) | RSVD(6) | RSVD(7) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ .driver_info = RSVD(0) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1077, 0xff), /* Telit FN990A (rmnet + audio) */
drivers/usb/storage/unusual_devs.h +4 -3
@@ -2350,10 +2350,11 @@ UNUSUAL_DEV( 0x2027, 0xa001, 0x0000, 0x9999, US_FL_SCM_MULT_TARG ),/* -* Reported by DocMAX <[email protected]> -* and Thomas Weißschuh <[email protected]> +* Reported by DocMAX <[email protected]>, +* Thomas Weißschuh <[email protected]> +* and Daniel Brát <[email protected]> */ -UNUSUAL_DEV( 0x2109, 0x0715, 0x9999, 0x9999, +UNUSUAL_DEV( 0x2109, 0x0715, 0x0000, 0x9999, "VIA Labs, Inc.", "VL817 SATA Bridge", USB_SC_DEVICE, USB_PR_DEVICE, NULL,
drivers/usb/usbip/usbip_common.c +12 -0
@@ -470,6 +470,18 @@ static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb, urb->status = rpdu->status; urb->actual_length = rpdu->actual_length; urb->start_frame = rpdu->start_frame; +/* +* The number_of_packets field determines the length of +* iso_frame_desc[], which is a flexible array allocated +* at URB creation time. A response must never claim more +* packets than originally submitted; doing so would cause +* an out-of-bounds write in usbip_recv_iso() and +* usbip_pad_iso(). Clamp to zero on violation so both +* functions safely return early. +*/ +if (rpdu->number_of_packets <0 || + rpdu->number_of_packets > urb->number_of_packets) + rpdu->number_of_packets =0 ; urb->number_of_packets = rpdu->number_of_packets; urb->error_count = rpdu->error_count; }
drivers/video/fbdev/tdfxfb.c +3 -0
@@ -496,6 +496,9 @@ static int tdfxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) } } +if (!var->pixclock) +return -EINVAL ; +if (PICOS2KHZ (var->pixclock) > par->max_pixclock) {DPRINTK ("pixclock too high (%ldKHz)\n" ,PICOS2KHZ (var->pixclock));
drivers/video/fbdev/udlfb.c +3 -0
@@ -1018,6 +1018,9 @@ static int dlfb_ops_check_var(struct fb_var_screeninfo *var,struct fb_videomode mode;struct dlfb_data *dlfb = info->par; +if (!var->pixclock) +return -EINVAL ; +/* set device-specific elements of var unrelated to mode */ dlfb_var_color_format (var);
fs/dcache.c +2 -2
@@ -3127,7 +3127,7 @@ static void __init dcache_init_early(void)HASH_EARLY |HASH_ZERO , &d_hash_shift,NULL , -0 , +2 , 0); d_hash_shift =32 - d_hash_shift;
@@ -3158,7 +3158,7 @@ static void __init dcache_init(void)HASH_ZERO , &d_hash_shift,NULL , -0 , +2 , 0); d_hash_shift =32 - d_hash_shift;
fs/eventpoll.c +5 -1
@@ -226,6 +226,9 @@ struct eventpoll {*/ refcount_t refcount; +/* used to defer freeing past ep_get_upwards_depth_proc() RCU walk */ +struct rcu_head rcu; +#ifdef CONFIG_NET_RX_BUSY_POLL /* used to track busy poll napi_id */ unsigned int napi_id;
@@ -790,7 +793,8 @@ static void ep_free(struct eventpoll *ep)mutex_destroy (&ep->mtx);free_uid (ep->user);wakeup_source_unregister (ep->ws); -kfree (ep); +/* ep_get_upwards_depth_proc() may still hold epi->ep under RCU */ +kfree_rcu (ep, rcu); }/*
fs/nilfs2/dat.c +3 -0
@@ -523,6 +523,9 @@ int nilfs_dat_read(struct super_block *sb, size_t entry_size,if (err) goto failed; + err =nilfs_attach_btree_node_cache (dat); +if (err) + goto failed; err =nilfs_read_inode_common (dat, raw_inode);if (err) goto failed;
fs/ocfs2/aops.c +1 -2
@@ -2318,8 +2318,6 @@ static int ocfs2_dio_end_io_write(struct inode *inode, goto out; } -down_write (&oi->ip_alloc_sem); -/* Delete orphan before acquire i_rwsem. */ if (dwc->dw_orphaned) {BUG_ON (dwc->dw_writer_pid !=task_pid_nr (current));
@@ -2332,6 +2330,7 @@ static int ocfs2_dio_end_io_write(struct inode *inode,mlog_errno (ret); } +down_write (&oi->ip_alloc_sem); di = (struct ocfs2_dinode *)di_bh->b_data;ocfs2_init_dinode_extent_tree (&et,INODE_CACHE (inode), di_bh);
fs/ocfs2/inode.c +31 -0
@@ -1419,6 +1419,37 @@ int ocfs2_validate_inode_block(struct super_block *sb, goto bail; } +if (le16_to_cpu (di->i_dyn_features) &OCFS2_INLINE_DATA_FL ) { +struct ocfs2_inline_data *data = &di->id2.i_data; + +if (le32_to_cpu (di->i_clusters)) { + rc =ocfs2_error (sb, +"Invalid dinode %llu: %u clusters\n" , + (unsigned long long )bh->b_blocknr, +le32_to_cpu (di->i_clusters)); + goto bail; + } + +if (le16_to_cpu (data->id_count) > +ocfs2_max_inline_data_with_xattr (sb, di)) { + rc =ocfs2_error (sb, +"Invalid dinode #%llu: inline data id_count %u exceeds max %d\n" , + (unsigned long long )bh->b_blocknr, +le16_to_cpu (data->id_count), +ocfs2_max_inline_data_with_xattr (sb, di)); + goto bail; + } + +if (le64_to_cpu (di->i_size) >le16_to_cpu (data->id_count)) { + rc =ocfs2_error (sb, +"Invalid dinode #%llu: inline data i_size %llu exceeds id_count %u\n" , + (unsigned long long )bh->b_blocknr, + (unsigned long long )le64_to_cpu (di->i_size), +le16_to_cpu (data->id_count)); + goto bail; + } + } + rc =0 ; bail:
fs/ocfs2/mmap.c +3 -4
@@ -30,7 +30,8 @@static vm_fault_t ocfs2_fault (struct vm_fault *vmf) { -struct vm_area_struct *vma = vmf->vma; +unsigned long long ip_blkno = +OCFS2_I (file_inode (vmf->vma->vm_file))->ip_blkno;sigset_t oldset;vm_fault_t ret;
@@ -38,11 +39,9 @@ static vm_fault_t ocfs2_fault(struct vm_fault *vmf) ret =filemap_fault (vmf);ocfs2_unblock_signals (&oldset); -trace_ocfs2_fault (OCFS2_I (vma->vm_file->f_mapping->host)->ip_blkno, - vma, vmf->page, vmf->pgoff); +trace_ocfs2_fault (ip_blkno, vmf->page, vmf->pgoff);return ret; } -static vm_fault_t __ocfs2_page_mkwrite (struct file *file,struct buffer_head *di_bh,struct page *page) {
fs/ocfs2/ocfs2_trace.h +4 -6
@@ -1246,22 +1246,20 @@ TRACE_EVENT(ocfs2_write_end_inline,TRACE_EVENT (ocfs2_fault, TP_PROTO(unsigned long long ino, - void *area, void *page, unsigned long pgoff), -TP_ARGS (ino, area, page, pgoff), + void *page, unsigned long pgoff), +TP_ARGS (ino, page, pgoff),TP_STRUCT__entry ( __field(unsigned long long, ino) - __field(void *, area) __field(void *, page) __field(unsigned long, pgoff) ),TP_fast_assign ( __entry->ino = ino; - __entry->area = area; __entry->page = page; __entry->pgoff = pgoff; ), -TP_printk ("%llu %p %p %lu" , - __entry->ino, __entry->area, __entry->page, __entry->pgoff) +TP_printk ("%llu %p %lu" , + __entry->ino, __entry->page, __entry->pgoff) );/* End of trace events for fs/ocfs2/mmap.c. */
fs/ocfs2/resize.c +7 -3
@@ -303,9 +303,13 @@ int ocfs2_group_extend(struct inode * inode, int new_clusters) fe = (struct ocfs2_dinode *)main_bm_bh->b_data; -/* main_bm_bh is validated by inode read inside ocfs2_inode_lock(), -* so any corruption is a code bug. */ -BUG_ON (!OCFS2_IS_VALID_DINODE (fe)); +/* JBD-managed buffers can bypass validation, so treat this as corruption. */ +if (!OCFS2_IS_VALID_DINODE (fe)) { + ret =ocfs2_error (main_bm_inode->i_sb, +"Invalid dinode #%llu\n" , + (unsigned long long )OCFS2_I (main_bm_inode)->ip_blkno); + goto out_unlock; + }if (le16_to_cpu (fe->id2.i_chain.cl_cpg) != ocfs2_group_bitmap_size(osb->sb, 0,
fs/smb/client/fs_context.c +4 -0
@@ -527,6 +527,10 @@ char *cifs_sanitize_prepath(char *prepath, gfp_t gfp)while (IS_DELIM (*cursor1)) cursor1++; +/* exit in case of only delimiters */ +if (!*cursor1) +return NULL ; +/* copy the first letter */ *cursor2 = *cursor1;
fs/smb/client/smb2inode.c +1 -1
@@ -125,7 +125,7 @@ static int check_wsl_eas(struct kvec *rsp_iov) nlen = ea->ea_name_length; vlen =le16_to_cpu (ea->ea_value_length);if (nlen !=SMB2_WSL_XATTR_NAME_LEN || - (u8 *)ea + nlen +1 + vlen > end) + (u8 *)ea->ea_data + nlen +1 + vlen > end)return -EINVAL ;switch (vlen) {
fs/smb/server/connection.c +1 -0
@@ -39,6 +39,7 @@ void ksmbd_conn_free(struct ksmbd_conn *conn)xa_destroy (&conn->sessions);kvfree (conn->request_buf);kfree (conn->preauth_info); +kfree (conn->mechToken);if (atomic_dec_and_test (&conn->refcnt)) { conn->transport->ops->free_transport (conn->transport);kfree (conn);
fs/smb/server/smb2pdu.c +6 -1
@@ -1921,7 +1921,7 @@ int smb2_sess_setup(struct ksmbd_work *work)else if (rc) rsp->hdr.Status =STATUS_LOGON_FAILURE ; -if (conn->use_spnego && conn->mechToken) { +if (conn->mechToken) {kfree (conn->mechToken); conn->mechToken =NULL ; }
@@ -4728,6 +4728,11 @@ static int smb2_get_ea(struct ksmbd_work *work, struct ksmbd_file *fp, ea_req = (struct smb2_ea_info_req *)((char *)req +le16_to_cpu (req->InputBufferOffset)); + +if (le32_to_cpu (req->InputBufferLength) < + offsetof(struct smb2_ea_info_req , name) + + ea_req->EaNameLength) +return -EINVAL ; }else {/* need to send all EAs, if no specific EA is requested*/ if (le32_to_cpu (req->Flags) &SL_RETURN_SINGLE_ENTRY )
fs/smb/server/smbacl.c +2 -1
@@ -451,7 +451,8 @@ static void parse_dacl(struct mnt_idmap *idmap, ppace[i]->access_req =smb_map_generic_desired_access (ppace[i]->access_req); -if (!(compare_sids (&ppace[i]->sid, &sid_unix_NFS_mode))) { +if (ppace[i]->sid.num_subauth >=3 && + !(compare_sids (&ppace[i]->sid, &sid_unix_NFS_mode))) { fattr->cf_mode =le32_to_cpu (ppace[i]->sid.sub_auth[2 ]);break ;
include/linux/kvm_host.h +44 -49
129 lines not on this page · raw message
include/linux/soc/qcom/pdr.h +1 -0
@@ -5,6 +5,7 @@#include <linux/soc/qcom/qmi.h> #define SERVREG_NAME_LENGTH 64 +#define SERVREG_PFR_LENGTH 256struct pdr_service ;struct pdr_handle ;
include/linux/uaccess.h +8 -3
@@ -318,16 +318,21 @@ static inline size_t probe_subpage_writeable(char __user *uaddr, size_t size)#endif /* CONFIG_ARCH_HAS_SUBPAGE_FAULTS */ -#ifndef ARCH_HAS_NOCACHE_UACCESS +#ifndef ARCH_HAS_NONTEMPORAL_UACCESS static inline __must_check unsigned long -__copy_from_user_inatomic_nocache (void *to,const void __user *from, +copy_from_user_inatomic_nontemporal (void *to,const void __user *from,unsigned long n) { +if (can_do_masked_user_access ()) + from =mask_user_address (from); +else +if (!access_ok (from, n)) +return n;return __copy_from_user_inatomic (to, from, n); } -#endif /* ARCH_HAS_NOCACHE_UACCESS */ +#endif /* ARCH_HAS_NONTEMPORAL_UACCESS */ extern __must_check int check_zeroed_user (const void __user *from,size_t size);
include/net/ip_tunnels.h +1 -1
@@ -29,7 +29,7 @@* recursion involves route lookups and full IP output, consuming much * more stack per level, so a lower limit is needed. */ -#define IP_TUNNEL_RECURSION_LIMIT 4 +#define IP_TUNNEL_RECURSION_LIMIT 5/* Keep error state on tunnel for 30 sec */ #define IPTUNNEL_ERR_TIMEO (30*HZ)
include/net/netfilter/nf_queue.h +0 -1
@@ -23,7 +23,6 @@ struct nf_queue_entry {struct nf_hook_state state;bool nf_ct_is_unconfirmed;u16 size;/* sizeof(entry) + saved route keys */ -u16 queue_num;/* extra space to store route keys */ };
include/net/pkt_cls.h +2 -0
@@ -536,6 +536,8 @@ static inline unsigned char * tcf_get_base_ptr(struct sk_buff *skb, int layer)case TCF_LAYER_NETWORK :return skb_network_header (skb);case TCF_LAYER_TRANSPORT : +if (!skb_transport_header_was_set (skb)) +break ;return skb_transport_header (skb); }
include/net/xdp_sock.h +1 -1
@@ -14,7 +14,7 @@#include <linux/mm.h> #include <net/sock.h> -#define XDP_UMEM_SG_FLAG (1 << 1) +#define XDP_UMEM_SG_FLAG BIT(3)struct net_device ;struct xsk_queue ;
include/net/xdp_sock_drv.h +22 -1
@@ -37,16 +37,37 @@ static inline u32 xsk_pool_get_headroom(struct xsk_buff_pool *pool)return XDP_PACKET_HEADROOM + pool->headroom; } +static inline u32 xsk_pool_get_tailroom (bool mbuf) +{ +return mbuf ?SKB_DATA_ALIGN (sizeof (struct skb_shared_info )) :0 ; +} +static inline u32 xsk_pool_get_chunk_size (struct xsk_buff_pool *pool) {return pool->chunk_size; } -static inline u32 xsk_pool_get_rx_frame_size (struct xsk_buff_pool *pool) +static inline u32 __xsk_pool_get_rx_frame_size (struct xsk_buff_pool *pool) {return xsk_pool_get_chunk_size (pool) -xsk_pool_get_headroom (pool); } +static inline u32 xsk_pool_get_rx_frame_size (struct xsk_buff_pool *pool) +{ +u32 frame_size =__xsk_pool_get_rx_frame_size (pool); +struct xdp_umem *umem = pool->umem; +bool mbuf; + +/* Reserve tailroom only for zero-copy pools that opted into +* multi-buffer. The reserved area is used for skb_shared_info, +* matching the XDP core's xdp_data_hard_end() layout. +*/ + mbuf = pool->dev && (umem->flags &XDP_UMEM_SG_FLAG ); + frame_size -=xsk_pool_get_tailroom (mbuf); + +return ALIGN_DOWN (frame_size,128 ); +} +static inline u32 xsk_pool_get_rx_frag_step (struct xsk_buff_pool *pool) {return pool->unaligned ?0 :xsk_pool_get_chunk_size (pool);
include/trace/events/btrfs.h +7 -4
@@ -771,12 +771,15 @@ TRACE_EVENT(btrfs_sync_file, ),TP_fast_assign ( - const struct dentry *dentry = file->f_path.dentry; -const struct inode *inode =d_inode (dentry); + struct dentry *dentry = file_dentry(file); +struct inode *inode =file_inode (file); +struct dentry *parent =dget_parent (dentry); +struct inode *parent_inode =d_inode (parent); -TP_fast_assign_fsid (btrfs_sb (file->f_path.dentry->d_sb)); +dput (parent); +TP_fast_assign_fsid (btrfs_sb (inode->i_sb)); __entry->ino =btrfs_ino (BTRFS_I (inode)); - __entry->parent =btrfs_ino (BTRFS_I (d_inode (dentry->d_parent))); + __entry->parent =btrfs_ino (BTRFS_I (parent_inode)); __entry->datasync = datasync; __entry->root_objectid =btrfs_root_id (BTRFS_I (inode)->root); ),
include/uapi/linux/kvm.h +14 -5
@@ -11,9 +11,14 @@#include <linux/const.h> #include <linux/types.h> #include <linux/compiler.h> +#include <linux/stddef.h> #include <linux/ioctl.h> #include <asm/kvm.h> +#ifdef __KERNEL__ +#include <linux/kvm_types.h> +#endif +#define KVM_API_VERSION 12/*
@@ -492,7 +497,7 @@ struct kvm_coalesced_mmio {struct kvm_coalesced_mmio_ring {__u32 first, last; -struct kvm_coalesced_mmio coalesced_mmio[]; + __DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio); };#define KVM_COALESCED_MMIO_MAX \
@@ -542,7 +547,7 @@ struct kvm_clear_dirty_log {/* for KVM_SET_SIGNAL_MASK */ struct kvm_signal_mask {__u32 len; -__u8 sigset[]; + __DECLARE_FLEX_ARRAY(__u8, sigset); };/* for KVM_TPR_ACCESS_REPORTING */
@@ -995,7 +1000,7 @@ struct kvm_irq_routing_entry {struct kvm_irq_routing {__u32 nr;__u32 flags; -struct kvm_irq_routing_entry entries[]; + __DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries); };#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
@@ -1082,7 +1087,7 @@ struct kvm_dirty_tlb {struct kvm_reg_list {__u64 n;/* number of regs */ -__u64 reg[]; + __DECLARE_FLEX_ARRAY(__u64, reg); };struct kvm_one_reg {
@@ -1526,7 +1531,11 @@ struct kvm_stats_desc {__u16 size;__u32 offset;__u32 bucket_size; -char name[]; +#ifdef __KERNEL__ +char name[KVM_STATS_NAME_SIZE ]; +#else +__DECLARE_FLEX_ARRAY (char, name); +#endif };#define KVM_GET_STATS_FD _IO(KVMIO, 0xce)
kernel/events/uprobes.c +4 -0
@@ -27,6 +27,7 @@#include <linux/shmem_fs.h> #include <linux/khugepaged.h> #include <linux/rcupdate_trace.h> +#include <linux/oom.h> /* check_stable_address_space */ #include <linux/uprobes.h>
@@ -1106,6 +1107,9 @@ register_for_each_vma(struct uprobe *uprobe, struct uprobe_consumer *new)* returns NULL in find_active_uprobe_rcu(). */ mmap_write_lock (mm); +if (check_stable_address_space (mm)) + goto unlock; + vma =find_vma (mm, info->vaddr);if (!vma || !valid_vma (vma, is_register) ||file_inode (vma->vm_file) != uprobe->inode)
kernel/fork.c +14 -3
@@ -766,7 +766,8 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,mt_set_in_rcu (vmi.mas.tree);ksm_fork (mm, oldmm);khugepaged_fork (mm, oldmm); - }else if (mpnt) { + }else { +/* * The entire maple tree has already been duplicated. If the * mmap duplication fails, mark the failure point with
@@ -774,8 +775,18 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,* stop releasing VMAs that have not been duplicated after this * point. */ -mas_set_range (&vmi.mas, mpnt->vm_start, mpnt->vm_end -1 ); -mas_store (&vmi.mas,XA_ZERO_ENTRY ); +if (mpnt) { +mas_set_range (&vmi.mas, mpnt->vm_start, mpnt->vm_end -1 ); +mas_store (&vmi.mas,XA_ZERO_ENTRY ); +/* Avoid OOM iterating a broken tree */ +set_bit (MMF_OOM_SKIP , &mm->flags); + } +/* +* The mm_struct is going to exit, but the locks will be dropped
Lines of this file are not shown. View the raw message.
net/ipv4/nexthop.c +28 -13
41 lines not on this page · raw message
net/netfilter/nf_conntrack_proto_sctp.c +2 -1
Lines of this file are not shown. View the raw message.
net/netfilter/nfnetlink_queue.c +83 -131
214 lines not on this page · raw message
sound/firewire/fireworks/fireworks_command.c +4 -1
Lines of this file are not shown. View the raw message.
sound/usb/format.c +74 -12
86 lines not on this page · raw message
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +1 -0
Lines of this file are not shown. View the 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.