Linux 6.6.152
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.152 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.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/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml | 16 Documentation/driver-api/driver-model/devres.rst | 1 Makefile | 2 arch/arm/boot/dts/broadcom/bcm-ns.dtsi | 2 arch/arm/mach-npcm/platsmp.c | 2 arch/s390/kvm/pci.c | 86 +- arch/s390/kvm/pci.h | 2 arch/x86/kvm/mmu/mmu.c | 3 drivers/ata/pata_sl82c105.c | 4 drivers/counter/microchip-tcb-capture.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 35 drivers/gpu/drm/bridge/parade-ps8640.c | 27 drivers/hwmon/ads7828.c | 11 drivers/hwmon/corsair-psu.c | 4 drivers/hwmon/nzxt-smart2.c | 6 drivers/hwmon/pmbus/lm25066.c | 19 drivers/input/evdev.c | 27 drivers/misc/fastrpc.c | 19 drivers/misc/mei/client.c | 25 drivers/net/bonding/bond_alb.c | 10 drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 51 + drivers/net/ethernet/aquantia/atlantic/aq_ring.h | 1 drivers/net/ethernet/aquantia/atlantic/aq_vec.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c | 7 drivers/net/ethernet/freescale/fec_main.c | 11 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 1 drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 6 drivers/net/ethernet/marvell/prestera/prestera_pci.c | 3 drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 16 drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h | 1 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 drivers/net/thunderbolt/main.c | 33 drivers/net/usb/ax88179_178a.c | 4 drivers/net/veth.c | 22 drivers/net/vxlan/vxlan_core.c | 2 drivers/pinctrl/renesas/pinctrl-rzg2l.c | 4 drivers/ptp/ptp_ocp.c | 4 drivers/regulator/devres.c | 59 + drivers/s390/crypto/zcrypt_ccamisc.c | 20 drivers/scsi/scsi_debug.c | 4 drivers/spi/spi-fsl-dspi.c | 13 drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 3 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 3 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 drivers/thermal/thermal_hwmon.c | 3 drivers/thunderbolt/eeprom.c | 9 drivers/thunderbolt/icm.c | 2 drivers/tty/serial/8250/8250_dma.c | 12 drivers/tty/vt/keyboard.c | 5 drivers/tty/vt/vt_ioctl.c | 2 drivers/usb/atm/cxacru.c | 2 drivers/usb/cdns3/cdnsp-gadget.c | 4 drivers/usb/gadget/function/f_ncm.c | 2 drivers/vhost/vdpa.c | 9 drivers/vhost/vhost.c | 8 drivers/video/fbdev/core/bitblit.c | 9 fs/btrfs/inode.c | 1 fs/crypto/fscrypt_private.h | 32 fs/crypto/keyring.c | 212 ++--- fs/crypto/policy.c | 2 fs/namespace.c | 5 fs/nfs/nfs4proc.c | 5 fs/overlayfs/super.c | 3 fs/smb/client/sess.c | 2 fs/tracefs/event_inode.c | 4 include/linux/netdevice.h | 11 include/linux/netfilter/ipset/ip_set.h | 2 include/linux/regulator/consumer.h | 7 include/linux/tcp.h | 9 include/net/act_api.h | 19 include/net/addrconf.h | 4 include/net/ip_vs.h | 41 - include/net/pkt_cls.h | 18 include/net/route.h | 2 include/net/sch_generic.h | 4 include/net/tcp.h | 58 - include/net/tcp_ao.h | 90 ++ include/uapi/linux/tcp.h | 2 kernel/bpf/verifier.c | 15 kernel/futex/core.c | 82 +- kernel/sched/psi.c | 6 kernel/trace/ring_buffer.c | 2 kernel/trace/trace_events.c | 2 lib/.gitignore | 2 lib/Makefile | 34 lib/test_fortify/.gitignore | 2 lib/test_fortify/Makefile | 29 net/atm/common.c | 14 net/bridge/br_mrp.c | 6 net/bridge/netfilter/ebt_nflog.c | 17 net/bridge/netfilter/nf_conntrack_bridge.c | 1 net/core/dev.c | 13 net/core/sock.c | 1 net/core/xdp.c | 2 net/devlink/dev.c | 1 net/ipv4/Kconfig | 17 net/ipv4/Makefile | 1 net/ipv4/fib_semantics.c | 101 +- net/ipv4/inet_connection_sock.c | 20 net/ipv4/route.c | 29 net/ipv4/tcp.c | 145 --- net/ipv4/tcp_bpf.c | 2 net/ipv4/tcp_input.c | 2 net/ipv4/tcp_ipv4.c | 386 ++++++---- net/ipv4/tcp_minisocks.c | 21 net/ipv4/tcp_sigpool.c | 357 +++++++++ net/ipv4/udp_offload.c | 4 net/ipv6/ip6_tunnel.c | 3 net/ipv6/route.c | 8 net/ipv6/tcp_ipv6.c | 60 - net/mac802154/scan.c | 4 net/ncsi/ncsi-netlink.c | 4 net/netfilter/ipset/ip_set_bitmap_gen.h | 4 net/netfilter/ipset/ip_set_core.c | 6 net/netfilter/ipset/ip_set_hash_gen.h | 2 net/netfilter/ipset/ip_set_list_set.c | 4 net/netfilter/ipvs/ip_vs_conn.c | 41 - net/netfilter/ipvs/ip_vs_core.c | 68 - net/netfilter/ipvs/ip_vs_ctl.c | 77 + net/netfilter/ipvs/ip_vs_est.c | 10 net/netfilter/ipvs/ip_vs_lc.c | 4 net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 net/netfilter/ipvs/ip_vs_proto_tcp.c | 2 net/netfilter/ipvs/ip_vs_sync.c | 7 net/netfilter/ipvs/ip_vs_xmit.c | 2 net/netfilter/nf_conntrack_proto.c | 6 net/netfilter/nf_conntrack_proto_sctp.c | 12 net/netfilter/nf_conntrack_proto_tcp.c | 132 ++- net/openvswitch/datapath.c | 29 net/openvswitch/flow.c | 11 net/packet/af_packet.c | 72 + net/sched/act_ct.c | 29 net/sched/act_gact.c | 5 net/sched/act_police.c | 6 net/sched/cls_api.c | 47 + net/sched/cls_bpf.c | 2 net/sched/cls_flower.c | 2 net/sched/cls_matchall.c | 2 net/sched/cls_route.c | 35 net/sched/cls_u32.c | 4 net/sched/sch_api.c | 9 net/sched/sch_cake.c | 1 net/sctp/associola.c | 11 net/sctp/outqueue.c | 1 net/sctp/sm_make_chunk.c | 3 net/sctp/sm_statefuns.c | 6 net/smc/af_smc.c | 3 net/smc/smc_llc.c | 3 net/smc/smc_rx.c | 19 net/tipc/node.c | 15 net/tls/tls_sw.c | 16 net/vmw_vsock/virtio_transport.c | 14 scripts/remove-stale-files | 2 security/integrity/ima/ima_appraise.c | 9 sound/usb/endpoint.c | 6 sound/usb/midi2.c | 9 sound/usb/usx2y/usX2Yhwdep.c | 2 sound/usb/usx2y/usx2yhwdeppcm.c | 2 tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 21 tools/testing/selftests/bpf/test_maps.c | 13 tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc | 16 165 files changed, 2373 insertions(+), 1026 deletions(-)
Ahmad Byagowi (1):
ptp: ocp: Fix board ID over-read
Al Viro (1):
mount: honour SB_NOUSER in the new mount API
Aleksandr Nogikh (1):
usb: atm: cxacru: properly kill rcv_urb on error in cxacru_cm()
Alexander Usyskin (1):
mei: pull kvfree out of spinlock
Anandu Krishnan E (1):
misc: fastrpc: fix channel ctx ref leak when session alloc fails
Anna Schumaker (1):
NFS: Pin the 'struct nfs_server' during a FREE_STATEID call
Asad Kamal (1):
Revert "drm/amdgpu: fix aperture mapping leak"
Asbjørn Sloth Tønnesen (3):
net: sched: cls_api: add skip_sw counter
net: sched: cls_api: add filter counter
net: sched: make skip_sw actually skip software
Babanpreet Singh (1):
counter: microchip-tcb-capture: Fix DT channel validation
Baul Lee (5):
ALSA: usb-audio: fix OOB write on Type II inbound URBs
net: bridge: mrp: fix uninitialised bytes on the wire
ALSA: usx2y: bound the hwdep mmap fault offset
vxlan: do not arm the ageing timer on a device that is down
sctp: keep chunk->transport in step with the list it is queued on
Bryam Vargas (1):
thunderbolt: Bound the DROM dual link port number before indexing sw->ports
Cen Zhang (Microsoft) (1):
net/openvswitch: check Ethernet header length in key_extract()
Chengfeng Ye (3):
netfilter: ebt_nflog: pin the NFLOG backend
ipv4: fix use-after-free in fib_nhc_update_mtu() bpf, sockmap: Fix sk_redir use-after-free in send verdict
Christian Brauner (1):
ovl: don't warn when the mount is completed from another user namespace
Claudiu Beznea (1):
pinctrl: renesas: rzg2l: Use -ENOTSUPP instead of -EOPNOTSUPP
Cunhao Lu (1):
serial: 8250_dma: Clear stale RX state on shutdown
Daming Li (1):
net: smc: fix splice entry lifetime imbalance in smc_rx_splice
Dan Carpenter (1):
net/tcp_sigpool: Fix some off by one bugs
David Lechner (2):
regulator: devres: add API for reference voltage supplies
regulator: devres: fix devm_regulator_get_enable_read_voltage() return
Dmitry Antipov (1):
btrfs: fix memory leak in btrfs_do_encoded_write()
Dmitry Safonov (3):
net/tcp: Prepare tcp_md5sig_pool for TCP-AO
net/tcp: Add TCP-AO config and structures
net/tcp_sigpool: Use kref_get_unless_zero()
Dmitry Torokhov (2):
Input: evdev - sanitize event type index when fetching event masks
Input: evdev - fix information leak in evdev_pass_values()
Doruk Tan Ozturk (1):
net/packet: reset the MAC header on the packet-socket transmit path
Eddie Lin (1):
misc: fastrpc: fix memory leak in fastrpc_channel_ctx_free
Ekansh Gupta (1):
misc: fastrpc: Remove buffer from list prior to unmap operation
Eric Biggers (1):
fscrypt: Replace mk_users keyring with simple list
Eric Dumazet (2):
net: remove WARN_ON_ONCE() from sk_mc_loop() net/atm: fix slab-out-of-bounds read in vcc_setsockopt()
Fan XinRan (1):
net: thunderbolt: Tear down DMA paths before stopping the rings
Fan Ye (1):
Revert "net: thunderbolt: Enable end-to-end flow control also in transmit"
Farhan Ali (3):
KVM: s390: pci: Fix memory accounting for pinned/unpinned pages
KVM: s390: pci: Fix missing error codes and memory unaccounting
KVM: s390: pci: Fix resource leak on IRQ registration failure
Greg Kroah-Hartman (1):
Linux 6.6.152
Guenter Roeck (1):
hwmon: (pmbus/lm25066) Fix PMBus coefficient calculations
Harald Freudenberger (1):
s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()
Harshal Dev (1):
dt-bindings: crypto: qcom,ice: Fix missing power-domain and iface clk
Henry Martin (1):
net/ncsi: fix heap OOB read in NCSI_CMD_SEND_CMD payload length
Hongyan Xu (1):
ata: pata_sl82c105: fix bridge revision use-after-free
Hui Su (1):
ring-buffer: Fix crash passing ERR_PTR to kthread_stop()
Hyunjung Ko (2):
net/sched: act_ct: fix sk_buff leak when the header checks reject a packet net/sched: act_gact, act_police: range check the fallback control action
Jamal Hadi Salim (2):
net/sched: cls_route: fix fastmap use-after-free on filter net/sched: cls_api: Always acquire rtnl_lock when destroying locked classifiers
Jianbo Liu (1):
net: sched: cls_api: fix slab-use-after-free in fl_dump_key
Jiawen Liu (1):
net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete
Jiayuan Chen (1):
tcp: fix TFO max_qlen accounting across reuseport migration
Jordan Rife (5):
bpf: tcp: Make mem flags configurable through bpf_iter_tcp_realloc_batch
bpf: tcp: Make sure iter->batch always contains a full bucket snapshot
bpf: tcp: Get rid of st_bucket_done
bpf: tcp: Use bpf_tcp_iter_batch_item for bpf_tcp_iter_state batch items
bpf: tcp: Avoid socket skips and repeats during iteration
Jose Fernandez (Anthropic) (1):
bpf: tcp: Fix use-after-free in bpf_iter_tcp_established_batch()
Joshua Rogers (2):
vt: add permission check for KDSKBMETA ioctl
vt: stabilize tty reference in kbd_keycode with tty_port_tty_get
Jozsef Kadlecsik (1):
netfilter: ipset: switch ext_size to atomic64_t
Julian Anastasov (4):
ipvs: avoid out-of-bounds write in ip_vs_nat_icmp
ipvs: return the csum validation for forward hook
ipvs: add totalconns for dest
ipvs: properly update the overload flag on dest edit
Jun Yang (2):
vhost: reset the vring metadata cache on vring reconfiguration
tipc: read le->link under the node lock in tipc_node_link_down()
Junrui Luo (1):
misc: fastrpc: take fl->lock when moving mmaps on interrupted invoke
Keegan Freyhof (1):
bnxt_en: Fix PTP PPS setting bug
Keno Fischer (1):
futex: Prevent robust futex exit race some more
Kyle Zeng (2):
ipvs: clear IPv4 options after rebasing tunnel ICMP errors
ipv6: prevent in6_dev_get() from resurrecting inet6_dev
Larisa Grigore (1):
spi: spi-fsl-dspi: Avoid setup_accel logic for DMA transfers
Lincoln Wallace (1):
ima: fix out-of-bounds read in xattr_verify()
Mahanta Jambigi (1):
net/smc: fix qentry overwrite for CONFIRM_LINK and ADD_LINK_CONT in smc_llc_event_handler()
Mariano Baragiola (1):
staging: rtl8723bs: validate monitor transmit frame lengths
Martin Kaiser (1):
selftests/ftrace: refactor eprobes test to fix argument checks
Masahiro Yamada (1):
fortify: refactor test_fortify Makefile to fix some build problems
Matthew Rosato (1):
KVM: s390: pci: Fix aisb calculation
Maximilian Immanuel Brandtner (1):
tls: don't abort the connection on signal-interrupted sends
Mehmet Fide (1):
net: fec: do not release NULL pages when RX buffer allocation fails
Michael Chan (2):
bnxt_en: Do not set EOP on RX AGG BDs on 5760X chips
bnxt_en: Disable EOP for TPA on all chips to prevent data corruption
Michael Guralnik (1):
net/mlx5: fw_tracer, return NULL on create error
Michael Wu (1):
tracing: Fix race between update_event_fields and, event_define_fields
Michal Luczaj (2):
selftests/bpf: Fail unbound UDP on sockmap update selftests/bpf: Adapt sockmap update error handling
Muhammad Bilal (2):
staging: rtl8723bs: fix OOB read in rtw_get_wpa_ie()
staging: rtl8723bs: fix OOB read in WMM_param_handler()
Nathan Chancellor (1):
fortify: Disable -Wstringop-overread in tests
Nathan Gao (1):
tcp: do not change rcv_ssthresh in tcp_measure_rcv_mss()
Or Har-Toov (1):
devlink: fix net namespace reference leak in reload
Panagiotis Petrakopoulos (1):
staging: rtl8723bs: fix missing shared-key auth challenge length check
Pawel Laszczak (1):
usb: cdnsp: fix incorrect endian conversions for APB timeout register
Pengpeng Hou (2):
drm/bridge: ps8640: propagate AUX transfer register errors
net: prestera: validate firmware header length
Qihang Tang (3):
packet: use consistent hard_header_len in non-ring send paths
packet: use consistent hard_header_len in TX_RING send path
net: remove CAP_SYS_RAWIO zero-padding in dev_validate_header
Qing Luo (1):
sctp: fix addip_serial increment on ASCONF_ACK allocation failure
Qing Ming (1):
sctp: clear new_transport when removing a peer
Qingshuang Fu (2):
hwmon: (nzxt-smart2) Check return value of init_device() in probe
hwmon: (ads7828) Fix external VREF regulator handling
Rafael J. Wysocki (1):
Revert "thermal/drivers/hwmon: Cleanup coding style a bit"
Rik van Riel (1):
fbdev: bitblit: bound-check glyph index in bit_cursor()
Rob Herring (1):
hwmon: (lm25066) Use i2c_get_match_data()
Rosen Penev (1):
ARM: dts: BCM5301X: fix PCIe controller 2 second interrupt
Sean Christopherson (1):
KVM: x86/mmu: WARN and clear role.invalid when creating a child shadow page
Sergey V. Frolov (1):
net: octeontx2-pf: Fix UB in shift operation
Shay Drory (1):
net/mlx5e: TC, Check if flow is PEER before acquiring devcom lock
Shuangpeng Bai (2):
smb: client: Fix use-after-free in cifs_try_adding_channels()
eventfs: Fix use-after-free in eventfs_remove_rec()
Sidraya Jayagond (1):
net/smc: fix TOCTOU race between smc_listen_out() and listener close
Sonali Pradhan (1):
usb: gadget: f_ncm: Use unsigned int for ndp_index
Sun Jian (1):
veth: fix skb length accounting after XDP frag adjustment
Takashi Iwai (1):
ALSA: usb: Fix UAF at delayed release of MIDI2 EPs
Tejun Heo (1):
sched/psi: Shut down rtpoll_timer in psi_cgroup_free()
Toke Høiland-Jørgensen (1):
net/sched: sch_cake: drop WARN_ON(1) for malformed packets in ACK filter
Weiming Shi (2):
vsock/virtio: read virtqueues under worker locks vsock/virtio: avoid refilling the RX queue after teardown
Wilken Gottwalt (1):
hwmon: (corsair-psu) fix possible out-of-bounds access on missing string termination
Xiang Mei (Microsoft) (2):
bonding: alb: re-check primary_is_promisc under RTNL in bond_alb_monitor
bpf: tcp: fix double sock release on batch realloc
Xin Long (2):
net: sched: refine software bypass handling in tc_run
sctp: clear control chunk transport if it is being removed
Xu Rao (2):
thunderbolt: icm: Preserve USB4 proxy data-valid bit
scsi: scsi_debug: Negate wrapped memcmp() result
Xuanqiang Luo (1):
udp: fix potential use-after-free in tunnel segmentation
Yangyu Chen (2):
net: atlantic: free stranded TX buffers on ring deinit
net: atlantic: free RX pages of consumed but not refilled buffers
Yi Cong (1):
net: usb: ax88179_178a: fix skb leak in ax88179_tx_fixup()
Yiyang Chen (1):
bpf: Preserve pointer state for commuted arithmetic
Yousef Alhouseen (1):
vhost/vdpa: reject overflowing PA map page counts on 32-bit
Yuejie Shi (1):
ipv6: fix Route Information option length validation
Yuho Choi (1):
ARM: npcm: Fix OF node refcount leaks in SMP setup
Yuxiang Yang (1):
sctp: fix use-after-free of cached ASCONF chunk
Zhan Xusheng (1):
fscrypt: use the mount idmap for the owner check in fscrypt_ioctl_set_policy()
Zhiling Zou (5):
ipvs: stop estimator after disabled calc phase
net: openvswitch: reallocate update replies for mismatched IDs
netfilter: bridge: release template ct on non-IP path
xdp: reject clones that overrun skb_shared_info tailroom
ip6_tunnel: clear skb2->cb[] in ip6ip6_err()
Zihan Xi (4):
packet: synchronize pressure clearing with ring reconfiguration
mac802154: fix netdev use-after-free in beacon worker
ipv4: Fix fib_nlmsg_size() for RTA_VIA nexthops
netfilter: nf_conntrack: defer invalid log until after unlock
Zijie Huang (1):
net/sched: reject overly deep qdisc hierarchies
chanyoung (1):
tls: don't leave a full plaintext sk_msg ring unpushed
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/crypto/qcom,inline-crypto-engine.yaml +15 -1
@@ -21,6 +21,16 @@ properties: maxItems: 1 clocks: + minItems: 1 + maxItems: 2 + + clock-names: + minItems: 1 + items: + - const: core + - const: iface + + power-domains: maxItems: 1 required:
@@ -38,6 +48,10 @@ examples: compatible = "qcom,sm8550-inline-crypto-engine", "qcom,inline-crypto-engine"; reg = <0x01d88000 0x8000>; - clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>; + clocks = <&gcc GCC_UFS_PHY_ICE_CORE_CLK>, + <&gcc GCC_UFS_PHY_AHB_CLK>; + clock-names = "core", + "iface"; + power-domains = <&gcc UFS_PHY_GDSC>; }; ...
Documentation/driver-api/driver-model/devres.rst +1 -0
@@ -426,6 +426,7 @@ REGULATOR devm_regulator_bulk_put() devm_regulator_get() devm_regulator_get_enable() + devm_regulator_get_enable_read_voltage() devm_regulator_get_enable_optional() devm_regulator_get_exclusive() devm_regulator_get_optional()
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 151 +SUBLEVEL = 152 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/arm/boot/dts/broadcom/bcm-ns.dtsi +1 -1
@@ -131,7 +131,7 @@ axi@18000000 { /* PCIe Controller 2 */ <0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, - <0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, + <0x00014000 1 &gic GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>, <0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, <0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, <0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
arch/arm/mach-npcm/platsmp.c +2 -0
@@ -32,6 +32,7 @@ static int npcm7xx_smp_boot_secondary(unsigned int cpu, goto out; } gcr_base =of_iomap (gcr_np,0 ); +of_node_put (gcr_np);if (!gcr_base) {pr_err ("could not iomap gcr" ); ret = -ENOMEM ;
@@ -60,6 +61,7 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus)return ; } scu_base =of_iomap (scu_np,0 ); +of_node_put (scu_np);if (!scu_base) {pr_err ("could not iomap scu" );return ;
arch/s390/kvm/pci.c +62 -24
148 lines not on this page · raw message
arch/s390/kvm/pci.h +2 -0
@@ -22,6 +22,8 @@ struct kvm_zdev {struct kvm *kvm;struct zpci_fib fib;struct list_head entry; +struct user_struct *user_account; +struct mm_struct *mm_account; };struct zpci_gaite {
arch/x86/kvm/mmu/mmu.c +3 -0
@@ -2299,6 +2299,9 @@ static union kvm_mmu_page_role kvm_mmu_child_role(u64 *sptep, bool direct, role.direct = direct; role.passthrough =0 ; +WARN_ON_ONCE (role.invalid); + role.invalid =0 ; +/* * If the guest has 4-byte PTEs then that means it's using 32-bit, * 2-level, non-PAE paging. KVM shadows such guests with PAE paging
drivers/ata/pata_sl82c105.c +3 -1
@@ -264,6 +264,7 @@ static struct ata_port_operations sl82c105_port_ops = {static int sl82c105_bridge_revision (struct pci_dev *pdev) {struct pci_dev *bridge; +u8 revision;/* * The bridge should be part of the same device, but function 0.
@@ -285,8 +286,9 @@ static int sl82c105_bridge_revision(struct pci_dev *pdev)/* * We need to find function 0's revision, not function 1 */ + revision = bridge->revision;pci_dev_put (bridge); -return bridge->revision; +return revision; }static void sl82c105_fixup (struct pci_dev *pdev)
drivers/counter/microchip-tcb-capture.c +2 -2
@@ -309,7 +309,7 @@ static int mchp_tc_probe(struct platform_device *pdev)char clk_name[7 ];struct regmap *regmap;struct clk *clk[3 ]; -int channel; +u32 channel;int ret, i; counter =devm_counter_alloc (&pdev->dev,sizeof (*priv));
@@ -343,7 +343,7 @@ static int mchp_tc_probe(struct platform_device *pdev) priv->channel[i] = channel; -snprintf (clk_name,sizeof (clk_name),"t%d_clk" , channel); +snprintf (clk_name,sizeof (clk_name),"t%u_clk" , channel); clk[i] =of_clk_get_by_name (np->parent, clk_name);if (IS_ERR (clk[i])) {
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2 -0
@@ -3977,6 +3977,8 @@ static void amdgpu_device_unmap_mmio(struct amdgpu_device *adev)iounmap (adev->rmmio); adev->rmmio =NULL ; +if (adev->mman.aper_base_kaddr) +iounmap (adev->mman.aper_base_kaddr); adev->mman.aper_base_kaddr =NULL ;/* Memory manager related */
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +19 -16
@@ -1887,23 +1887,17 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)/* Change the size here instead of the init above so only lpfn is affected */ amdgpu_ttm_set_buffer_funcs_status (adev, false);#ifdef CONFIG_64BIT -if (adev->gmc.xgmi.connected_to_cpu) { -void *kaddr =devm_memremap (adev->dev, adev->gmc.aper_base, - adev->gmc.visible_vram_size, -MEMREMAP_WB ); -if (IS_ERR (kaddr)) -return PTR_ERR (kaddr); - adev->mman.aper_base_kaddr = (__force void __iomem *)kaddr; - }else if (adev->gmc.is_app_apu) { +#ifdef CONFIG_X86 +if (adev->gmc.xgmi.connected_to_cpu) + adev->mman.aper_base_kaddr =ioremap_cache (adev->gmc.aper_base, + adev->gmc.visible_vram_size); +else if (adev->gmc.is_app_apu)DRM_DEBUG_DRIVER ("No need to ioremap when real vram size is 0\n" ); - }else { - adev->mman.aper_base_kaddr =devm_ioremap_wc (adev->dev, - adev->gmc.aper_base, - adev->gmc.visible_vram_size); -if (!adev->mman.aper_base_kaddr) -return -ENOMEM ; - } + else +#endif + adev->mman.aper_base_kaddr =ioremap_wc (adev->gmc.aper_base, + adev->gmc.visible_vram_size);#endif /*
@@ -2050,6 +2044,8 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)*/ void amdgpu_ttm_fini (struct amdgpu_device *adev) { +int idx; +if (!adev->mman.initialized)return ;
@@ -2072,7 +2068,14 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)amdgpu_ttm_fw_reserve_vram_fini (adev);amdgpu_ttm_drv_reserve_vram_fini (adev); - adev->mman.aper_base_kaddr =NULL ; +if (drm_dev_enter (adev_to_drm (adev), &idx)) { + +if (adev->mman.aper_base_kaddr) +iounmap (adev->mman.aper_base_kaddr); + adev->mman.aper_base_kaddr =NULL ; + +drm_dev_exit (idx); + }amdgpu_vram_mgr_fini (adev);amdgpu_gtt_mgr_fini (adev);
drivers/gpu/drm/bridge/parade-ps8640.c +21 -6
@@ -258,8 +258,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux, addr_len[PAGE0_SWAUX_LENGTH - base] = (len ==0 ) ?SWAUX_NO_PAYLOAD : ((len -1 ) &SWAUX_LENGTH_MASK ); -regmap_bulk_write (map,PAGE0_SWAUX_ADDR_7_0 , addr_len, -ARRAY_SIZE (addr_len)); + ret =regmap_bulk_write (map,PAGE0_SWAUX_ADDR_7_0 , addr_len, +ARRAY_SIZE (addr_len)); +if (ret) { +DRM_DEV_ERROR (dev, +"failed to write AUX address %#x, len %zu: %d\n" , + msg->address, len, ret); +return ret; + }if (len && (request ==DP_AUX_NATIVE_WRITE || request ==DP_AUX_I2C_WRITE )) {
@@ -275,13 +281,22 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux, } } -regmap_write (map,PAGE0_SWAUX_CTRL ,SWAUX_SEND ); + ret =regmap_write (map,PAGE0_SWAUX_CTRL ,SWAUX_SEND ); +if (ret) { +DRM_DEV_ERROR (dev,"failed to start AUX transfer: %d\n" , ret); +return ret; + }/* Zero delay loop because i2c transactions are slow already */ -regmap_read_poll_timeout (map,PAGE0_SWAUX_CTRL , data, - !(data &SWAUX_SEND ),0 ,50 *1000 ); + ret =regmap_read_poll_timeout (map,PAGE0_SWAUX_CTRL , data, + !(data &SWAUX_SEND ),0 ,50 *1000 ); +if (ret) { +DRM_DEV_ERROR (dev,"failed to complete AUX transfer: %d\n" , + ret); +return ret; + } -regmap_read (map,PAGE0_SWAUX_STATUS , &data); + ret =regmap_read (map,PAGE0_SWAUX_STATUS , &data);if (ret) {DRM_DEV_ERROR (dev,"failed to read PAGE0_SWAUX_STATUS: %d\n" , ret);
drivers/hwmon/ads7828.c +6 -5
@@ -108,12 +108,11 @@ static int ads7828_probe(struct i2c_client *client)struct ads7828_data *data;struct device *hwmon_dev;unsigned int vref_mv =ADS7828_INT_VREF_MV ; -unsigned int vref_uv; +int vref_uv;bool diff_input = false;bool ext_vref = false;unsigned int regval;enum ads7828_chips chip; -struct regulator *reg; data =devm_kzalloc (dev,sizeof (struct ads7828_data ),GFP_KERNEL );if (!data)
@@ -127,9 +126,11 @@ static int ads7828_probe(struct i2c_client *client) }else if (dev->of_node) { diff_input =of_property_read_bool (dev->of_node,"ti,differential-input" ); - reg =devm_regulator_get_optional (dev,"vref" ); -if (!IS_ERR (reg)) { - vref_uv =regulator_get_voltage (reg); + vref_uv =devm_regulator_get_enable_read_voltage (dev,"vref" ); +if (vref_uv <0 ) { +if (vref_uv != -ENODEV ) +return vref_uv; + }else { vref_mv =DIV_ROUND_CLOSEST (vref_uv,1000 );if (vref_mv <ADS7828_EXT_VREF_MV_MIN || vref_mv >ADS7828_EXT_VREF_MV_MAX )
drivers/hwmon/corsair-psu.c +2 -2
@@ -709,7 +709,7 @@ static int vendor_show(struct seq_file *seqf, void *unused) {struct corsairpsu_data *priv = seqf->private; -seq_printf (seqf,"%s\n" , priv->vendor); +seq_printf (seqf,"%.*s\n" ,REPLY_SIZE , priv->vendor);return 0 ; }
@@ -719,7 +719,7 @@ static int product_show(struct seq_file *seqf, void *unused) {struct corsairpsu_data *priv = seqf->private; -seq_printf (seqf,"%s\n" , priv->product); +seq_printf (seqf,"%.*s\n" ,REPLY_SIZE , priv->product);return 0 ; }
drivers/hwmon/nzxt-smart2.c +5 -1
@@ -760,7 +760,11 @@ static int nzxt_smart2_hid_probe(struct hid_device *hdev,hid_device_io_start (hdev); -init_device (drvdata,UPDATE_INTERVAL_DEFAULT_MS ); + ret =init_device (drvdata,UPDATE_INTERVAL_DEFAULT_MS ); +if (ret) { +dev_err (&hdev->dev,"init_device failed: %d\n" , ret); + goto out_hw_close; + } drvdata->hwmon = hwmon_device_register_with_info(&hdev->dev, "nzxtsmart2", drvdata,
drivers/hwmon/pmbus/lm25066.c +6 -13
@@ -14,10 +14,11 @@#include <linux/slab.h> #include <linux/i2c.h> #include <linux/log2.h> -#include <linux/of_device.h> +#include <linux/math.h> +#include <linux/of.h> #include "pmbus.h" -enum chips { lm25056, lm25066, lm5064, lm5066, lm5066i }; +enum chips { lm25056 =1 , lm25066, lm5064, lm5066, lm5066i };#define LM25066_READ_VAUX 0xd0#define LM25066_MFR_READ_IIN 0xd1
@@ -468,8 +469,6 @@ static int lm25066_probe(struct i2c_client *client)struct lm25066_data *data;struct pmbus_driver_info *info;const struct __coeff *coeff; -const struct of_device_id *of_id; -const struct i2c_device_id *i2c_id;if (!i2c_check_functionality (client->adapter,I2C_FUNC_SMBUS_READ_BYTE_DATA ))
@@ -484,14 +483,8 @@ static int lm25066_probe(struct i2c_client *client)if (config <0 )return config; - i2c_id =i2c_match_id (lm25066_id, client); + data->id = (enum chips )(unsigned long )i2c_get_match_data (client); - of_id =of_match_device (lm25066_of_match, &client->dev); -if (of_id && (unsigned long )of_id->data != i2c_id->driver_data) -dev_notice (&client->dev,"Device mismatch: %s in device tree, %s detected\n" , - of_id->name, i2c_id->name); - - data->id = i2c_id->driver_data; info = &data->info; info->pages =1 ;
@@ -548,8 +541,8 @@ static int lm25066_probe(struct i2c_client *client)if (of_property_read_u32 (client->dev.of_node,"shunt-resistor-micro-ohms" , &shunt)) shunt =1000 ; - info->m[PSC_CURRENT_IN ] = info->m[PSC_CURRENT_IN ] * shunt /1000 ; - info->m[PSC_POWER ] = info->m[PSC_POWER ] * shunt /1000 ; + info->m[PSC_CURRENT_IN ] =DIV_ROUND_CLOSEST_ULL ((u64 )info->m[PSC_CURRENT_IN ] * shunt,1000 ); + info->m[PSC_POWER ] =DIV_ROUND_CLOSEST_ULL ((u64 )info->m[PSC_POWER ] * shunt,1000 );#if IS_ENABLED (CONFIG_SENSORS_LM25066_REGULATOR )/* LM25056 doesn't support OPERATION */
drivers/input/evdev.c +16 -11
@@ -21,6 +21,7 @@#include <linux/init.h> #include <linux/input/mt.h> #include <linux/major.h> +#include <linux/nospec.h> #include <linux/device.h> #include <linux/cdev.h> #include "input-compat.h"
@@ -67,8 +68,10 @@ static size_t evdev_get_mask_cnt(unsigned int type) [EV_SND] = SND_CNT, [EV_FF] = FF_CNT, }; +unsigned long mask =array_index_mask_nospec (type,EV_CNT ); -return (type <EV_CNT ) ? counts[type] :0 ; +/* Returns 0 for out-of-bounds types, including speculatively */ +return counts[type & mask] & mask; }/* requires the buffer lock to be held */
@@ -146,11 +149,11 @@ static void __evdev_queue_syn_dropped(struct evdev_client *client)struct timespec64 ts =ktime_to_timespec64 (ev_time[client->clk_type]);struct input_event ev; +memset (&ev,0 ,sizeof (ev)); ev.input_event_sec = ts.tv_sec; ev.input_event_usec = ts.tv_nsec /NSEC_PER_USEC ; ev.type =EV_SYN ; ev.code =SYN_DROPPED ; - ev.value =0 ; client->buffer[client->head++] = ev; client->head &= client->bufsize -1 ;
@@ -218,20 +221,20 @@ static void __pass_event(struct evdev_client *client, client->head &= client->bufsize -1 ;if (unlikely (client->head == client->tail)) { +struct input_event ev; + +memset (&ev,0 ,sizeof (ev)); + ev.input_event_sec = event->input_event_sec; + ev.input_event_usec = event->input_event_usec; + ev.type =EV_SYN ; + ev.code =SYN_DROPPED ; +/* * This effectively "drops" all unconsumed events, leaving * EV_SYN/SYN_DROPPED plus the newest event in the queue. */ client->tail = (client->head -2 ) & (client->bufsize -1 ); - - client->buffer[client->tail] = (struct input_event ) { - .input_event_sec = event->input_event_sec, - .input_event_usec = event->input_event_usec, - .type =EV_SYN , - .code =SYN_DROPPED , - .value =0 , - }; - + client->buffer[client->tail] = ev; client->packet_head = client->tail; }
@@ -253,6 +256,8 @@ static void evdev_pass_values(struct evdev_client *client,if (client->revoked)return ; +memset (&event,0 ,sizeof (event)); + ts =ktime_to_timespec64 (ev_time[client->clk_type]); event.input_event_sec = ts.tv_sec; event.input_event_usec = ts.tv_nsec /NSEC_PER_USEC ;
drivers/misc/fastrpc.c +14 -5
@@ -468,6 +468,7 @@ static void fastrpc_channel_ctx_free(struct kref *ref) cctx = container_of(ref, struct fastrpc_channel_ctx, refcount); +idr_destroy (&cctx->ctx_idr);kfree (cctx); }
@@ -1275,10 +1276,12 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, }if (err == -ERESTARTSYS ) { +spin_lock (&fl->lock);list_for_each_entry_safe (buf, b, &fl->mmaps, node) {list_del (&buf->node);list_add_tail (&buf->node, &fl->cctx->invoke_interrupted_mmaps); } +spin_unlock (&fl->lock); }if (err)
@@ -1644,7 +1647,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)dev_err (&cctx->rpdev->dev,"No session available\n" );mutex_destroy (&fl->mutex);kfree (fl); - +fastrpc_channel_ctx_put (cctx);return -EBUSY ; }
@@ -1872,9 +1875,6 @@ static int fastrpc_req_munmap_impl(struct fastrpc_user *fl, struct fastrpc_buf * &args[0]);if (!err) {dev_dbg (dev,"unmmap\tpt 0x%09lx OK\n" , buf->raddr); -spin_lock (&fl->lock); -list_del (&buf->node); -spin_unlock (&fl->lock);fastrpc_buf_free (buf); }else {dev_err (dev,"unmmap\tpt 0x%09lx ERROR\n" , buf->raddr);
@@ -1888,6 +1888,7 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)struct fastrpc_buf *buf =NULL , *iter, *b;struct fastrpc_req_munmap req;struct device *dev = fl->sctx->dev; +int err;if (copy_from_user (&req, argp,sizeof (req)))return -EFAULT ;
@@ -1895,6 +1896,7 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)spin_lock (&fl->lock);list_for_each_entry_safe (iter, b, &fl->mmaps, node) {if ((iter->raddr == req.vaddrout) && (iter->size == req.size)) { +list_del (&iter->node); buf = iter;break ; }
@@ -1907,7 +1909,14 @@ static int fastrpc_req_munmap(struct fastrpc_user *fl, char __user *argp)return -EINVAL ; } -return fastrpc_req_munmap_impl (fl, buf); + err =fastrpc_req_munmap_impl (fl, buf); +if (err) { +spin_lock (&fl->lock); +list_add_tail (&buf->node, &fl->mmaps); +spin_unlock (&fl->lock); + } + +return err; }static int fastrpc_req_mmap (struct fastrpc_user *fl,char __user *argp)
drivers/misc/mei/client.c +15 -10
@@ -447,18 +447,24 @@ static void mei_io_tx_list_free_cl(struct list_head *head, }/** -* mei_io_list_free_fp - free cb from a list that matches file pointer +* mei_io_rd_list_free_fp - free cb from a rd_completed list that matches file pointer * -* @head: io list +* @cl: host client * @fp: file pointer (matching cb file object), may be NULL */ -static void mei_io_list_free_fp (struct list_head *head,const struct file *fp) +static void mei_io_rd_list_free_fp (struct mei_cl *cl,const struct file *fp) {struct mei_cl_cb *cb, *next; +LIST_HEAD (cmpl_list); -list_for_each_entry_safe (cb, next, head, list) +spin_lock (&cl->rd_completed_lock); +list_for_each_entry_safe (cb, next, &cl->rd_completed, list)if (!fp || fp == cb->fp) -mei_io_cb_free (cb); +list_move (&cb->list, &cmpl_list); +spin_unlock (&cl->rd_completed_lock); + +list_for_each_entry_safe (cb, next, &cmpl_list, list) +mei_io_cb_free (cb); }/**
@@ -587,9 +593,7 @@ int mei_cl_flush_queues(struct mei_cl *cl, const struct file *fp)mei_io_list_flush_cl (&cl->dev->ctrl_rd_list, cl);mei_cl_free_pending (cl); } -spin_lock (&cl->rd_completed_lock); -mei_io_list_free_fp (&cl->rd_completed, fp); -spin_unlock (&cl->rd_completed_lock); +mei_io_rd_list_free_fp (cl, fp);return 0 ; }
@@ -1426,7 +1430,7 @@ void mei_cl_add_rd_completed(struct mei_cl *cl, struct mei_cl_cb *cb) }/** -* mei_cl_del_rd_completed - free read completed callback with lock +* mei_cl_del_rd_completed - unlink read completed callback with lock and free it * * @cl: host client * @cb: callback block
@@ -1435,8 +1439,9 @@ void mei_cl_add_rd_completed(struct mei_cl *cl, struct mei_cl_cb *cb)void mei_cl_del_rd_completed (struct mei_cl *cl,struct mei_cl_cb *cb) {spin_lock (&cl->rd_completed_lock); -mei_io_cb_free (cb); +list_del_init (&cb->list);spin_unlock (&cl->rd_completed_lock); +mei_io_cb_free (cb); }/**
drivers/net/bonding/bond_alb.c +6 -4
@@ -1535,8 +1535,8 @@ void bond_alb_monitor(struct work_struct *work) struct bonding *bond = container_of(work, struct bonding, alb_work.work);struct alb_bond_info *bond_info = &(BOND_ALB_INFO (bond)); +struct slave *slave, *curr;struct list_head *iter; -struct slave *slave;if (!bond_has_slaves (bond)) {atomic_set (&bond_info->tx_rebalance_counter,0 );
@@ -1598,9 +1598,11 @@ void bond_alb_monitor(struct work_struct *work)* because a slave was disabled then * it can now leave promiscuous mode. */ -dev_set_promiscuity (rtnl_dereference (bond->curr_active_slave)->dev, --1 ); - bond_info->primary_is_promisc =0 ; + curr =rtnl_dereference (bond->curr_active_slave); +if (bond_info->primary_is_promisc && curr) { +dev_set_promiscuity (curr->dev,-1 ); + bond_info->primary_is_promisc =0 ; + }rtnl_unlock ();rcu_read_lock ();
drivers/net/ethernet/aquantia/atlantic/aq_ring.c +47 -4
68 lines not on this page · raw message
drivers/net/ethernet/aquantia/atlantic/aq_ring.h +1 -0
@@ -199,6 +199,7 @@ void aq_ring_update_queue_state(struct aq_ring_s *ring);void aq_ring_queue_wake (struct aq_ring_s *ring);void aq_ring_queue_stop (struct aq_ring_s *ring);bool aq_ring_tx_clean (struct aq_ring_s *self); +void aq_ring_tx_deinit (struct aq_ring_s *self);int aq_xdp_xmit (struct net_device *dev,int num_frames,struct xdp_frame **frames,u32 flags); int aq_ring_rx_clean(struct aq_ring_s *self,
drivers/net/ethernet/aquantia/atlantic/aq_vec.c +1 -1
@@ -275,7 +275,7 @@ void aq_vec_deinit(struct aq_vec_s *self)for (i =0U ; self->tx_rings > i; ++i) { ring = self->ring[i]; -aq_ring_tx_clean (&ring[AQ_VEC_TX_ID ]); +aq_ring_tx_deinit (&ring[AQ_VEC_TX_ID ]);aq_ring_rx_deinit (&ring[AQ_VEC_RX_ID ]); }
drivers/net/ethernet/broadcom/bnxt/bnxt.c +11 -1
@@ -3715,7 +3715,17 @@ static int bnxt_init_one_rx_ring(struct bnxt *bp, int ring_nr)if ((bp->flags &BNXT_FLAG_AGG_RINGS )) { type = ((u32 )BNXT_RX_PAGE_SIZE <<RX_BD_LEN_SHIFT ) | -RX_BD_TYPE_RX_AGG_BD |RX_BD_FLAGS_SOP ; +RX_BD_TYPE_RX_AGG_BD ; + +/* Disable EOP if TPA is enabled to prevent overlapping zero +* padding with the next segment's data. On P7_PLUS, EOP will +* automatically disable Relaxed Ordering (RO) to prevent +* potential data corruption (and may degrade performance). On +* older chips, RO will not be automatically disabled and may +* cause corruption. +*/ +if (!(bp->flags &BNXT_FLAG_TPA )) + type |=RX_BD_FLAGS_AGG_EOP ;bnxt_init_rxbd_pages (ring, type); }
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -0
@@ -104,6 +104,7 @@ struct rx_bd {#define RX_BD_TYPE_48B_BD_SIZE (2 << 4)#define RX_BD_TYPE_64B_BD_SIZE (3 << 4)#define RX_BD_FLAGS_SOP (1 << 6) +#define RX_BD_FLAGS_AGG_EOP (1 << 6)#define RX_BD_FLAGS_EOP (1 << 7)#define RX_BD_FLAGS_BUFFERS (3 << 8)#define RX_BD_FLAGS_1_BUFFER_PACKET (0 << 8)
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c +5 -2
@@ -475,12 +475,15 @@ static int bnxt_ptp_enable(struct ptp_clock_info *ptp_info,return rc;case PTP_CLK_REQ_PPS :/* Configure PHC PPS IN */ - rc =bnxt_ptp_cfg_pin (bp,0 ,BNXT_PPS_PIN_PPS_IN ); + pin_id =0 ; +if (!on) +break ; + rc =bnxt_ptp_cfg_pin (bp, pin_id,BNXT_PPS_PIN_PPS_IN );if (rc)return rc; rc =bnxt_ptp_cfg_event (bp,BNXT_PPS_EVENT_INTERNAL );if (!rc) - ptp->pps_info.pins[0 ].event =BNXT_PPS_EVENT_INTERNAL ; + ptp->pps_info.pins[pin_id].event =BNXT_PPS_EVENT_INTERNAL ;return rc;default :netdev_err (ptp->bp->dev,"Unrecognized PIN function\n" );
drivers/net/ethernet/freescale/fec_main.c +9 -2
@@ -3322,8 +3322,15 @@ static void fec_enet_free_buffers(struct net_device *ndev)for (q =0 ; q < fep->num_rx_queues; q++) { rxq = fep->rx_queue[q]; -for (i =0 ; i < rxq->bd.ring_size; i++) -page_pool_put_full_page (rxq->page_pool, rxq->rx_skb_info[i].page, false); +for (i =0 ; i < rxq->bd.ring_size; i++) { +struct page *page = rxq->rx_skb_info[i].page; + +if (!page) +continue ; + +page_pool_put_full_page (rxq->page_pool, page, false); + rxq->rx_skb_info[i].page =NULL ; + }for (i =0 ; i <XDP_STATS_TOTAL ; i++) rxq->stats[i] =0 ;
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +0 -1
@@ -1287,7 +1287,6 @@ static int hix5hd2_dev_remove(struct platform_device *pdev)struct net_device *ndev =platform_get_drvdata (pdev);struct hix5hd2_priv *priv =netdev_priv (ndev); -netif_napi_del (&priv->napi);unregister_netdev (ndev);mdiobus_unregister (priv->bus);mdiobus_free (priv->bus);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +4 -2
@@ -72,10 +72,12 @@ static void otx2_get_egress_burst_cfg(struct otx2_nic *nic, u32 burst,if (burst) { *burst_exp =ilog2 (burst) ?ilog2 (burst) -1 :0 ; tmp = burst -rounddown_pow_of_two (burst); -if (burst < max_mantissa) +if (burst <= max_mantissa) { *burst_mantissa = tmp *2 ; -else + }else { +WARN_ON (*burst_exp <7 ); *burst_mantissa = tmp / (1ULL << (*burst_exp -7 )); + } }else { *burst_exp =MAX_BURST_EXPONENT ; *burst_mantissa = max_mantissa;
drivers/net/ethernet/marvell/prestera/prestera_pci.c +3 -0
@@ -684,6 +684,9 @@ static int prestera_fw_hdr_parse(struct prestera_fw *fw)struct prestera_fw_header *hdr;u32 magic; +if (fw->bin->size <sizeof (*hdr)) +return -EINVAL ; + hdr = (struct prestera_fw_header *)fw->bin->data; magic =be32_to_cpu (hdr->magic_number);
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c +7 -9
@@ -1050,13 +1050,11 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev) tracer =kvzalloc (sizeof (*tracer),GFP_KERNEL );if (!tracer) -return ERR_PTR (-ENOMEM ); +return NULL ; tracer->work_queue =create_singlethread_workqueue ("mlx5_fw_tracer" ); -if (!tracer->work_queue) { - err = -ENOMEM ; +if (!tracer->work_queue) goto free_tracer; - } tracer->dev = dev;
@@ -1098,7 +1096,7 @@ struct mlx5_fw_tracer *mlx5_fw_tracer_create(struct mlx5_core_dev *dev)destroy_workqueue (tracer->work_queue); free_tracer:kvfree (tracer); -return ERR_PTR (err); +return NULL ; }static int fw_tracer_event (struct notifier_block *nb,unsigned long action,void *data);
@@ -1109,7 +1107,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)struct mlx5_core_dev *dev;int err; -if (IS_ERR_OR_NULL (tracer)) +if (!tracer)return 0 ;if (!tracer->str_db.loaded)
@@ -1159,7 +1157,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer *tracer)/* Stop tracer + Cleanup HW resources */ void mlx5_fw_tracer_cleanup (struct mlx5_fw_tracer *tracer) { -if (IS_ERR_OR_NULL (tracer)) +if (!tracer)return ;mutex_lock (&tracer->state_lock);
@@ -1188,7 +1186,7 @@ void mlx5_fw_tracer_cleanup(struct mlx5_fw_tracer *tracer)/* Free software resources (Buffers, etc ..) */ void mlx5_fw_tracer_destroy (struct mlx5_fw_tracer *tracer) { -if (IS_ERR_OR_NULL (tracer)) +if (!tracer)return ;mlx5_core_dbg (tracer->dev,"FWTracer: Destroy\n" );
@@ -1240,7 +1238,7 @@ int mlx5_fw_tracer_reload(struct mlx5_fw_tracer *tracer)struct mlx5_core_dev *dev;int err; -if (IS_ERR_OR_NULL (tracer)) +if (!tracer)return 0 ; dev = tracer->dev;
drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h +1 -0
@@ -30,6 +30,7 @@ enum {MLX5E_TC_FLOW_FLAG_FAILED =MLX5E_TC_FLOW_BASE +9 ,MLX5E_TC_FLOW_FLAG_SAMPLE =MLX5E_TC_FLOW_BASE +10 ,MLX5E_TC_FLOW_FLAG_USE_ACT_STATS =MLX5E_TC_FLOW_BASE +11 , + MLX5E_TC_FLOW_FLAG_PEER = MLX5E_TC_FLOW_BASE + 12, }; struct mlx5e_tc_flow_parse_attr {
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +3 -1
@@ -2043,7 +2043,8 @@ static void mlx5e_tc_del_flow(struct mlx5e_priv *priv,if (mlx5e_is_eswitch_flow (flow)) {struct mlx5_devcom_comp_dev *devcom = flow->priv->mdev->priv.eswitch->devcom; -if (!mlx5_devcom_for_each_peer_begin (devcom)) { +if (flow_flag_test (flow,PEER ) || + !mlx5_devcom_for_each_peer_begin (devcom)) {mlx5e_tc_del_fdb_flow (priv, flow);return ; }
@@ -4489,6 +4490,7 @@ static int mlx5e_tc_add_fdb_peer_flow(struct flow_cls_offload *f,else in_mdev = priv->mdev; + flow_flags |=BIT (MLX5E_TC_FLOW_FLAG_PEER ); parse_attr = flow->attr->parse_attr; peer_flow = __mlx5e_add_fdb_flow(peer_priv, f, flow_flags, parse_attr->filter_dev,
drivers/net/thunderbolt/main.c +22 -11
@@ -389,11 +389,16 @@ static void tbnet_tear_down(struct tbnet *net, bool send_logout)break ; } -tb_ring_stop (net->rx_ring.ring); -tb_ring_stop (net->tx_ring.ring); -tbnet_free_buffers (&net->rx_ring); -tbnet_free_buffers (&net->tx_ring); - +/* Tear the paths down before stopping the rings. This mirrors +* tbnet_connected_work(), which enables the paths last so the +* Rx ring is primed before packets can arrive. Stopping a +* ring zeroes its descriptor base and tbnet_free_buffers() +* unmaps and frees the frame buffers, leaving anything still +* in flight with nowhere to drain to; +* __tb_path_deactivate_hop() then waits for the hop's +* 'pending' bit, which on some host routers never clears in +* that state. +*/ ret = tb_xdomain_disable_paths(net->xd, net->local_transmit_path, net->tx_ring.ring->hop,
@@ -402,6 +407,11 @@ static void tbnet_tear_down(struct tbnet *net, bool send_logout)if (ret)netdev_warn (net->dev,"failed to disable DMA paths\n" ); +tb_ring_stop (net->rx_ring.ring); +tb_ring_stop (net->tx_ring.ring); +tbnet_free_buffers (&net->rx_ring); +tbnet_free_buffers (&net->tx_ring); +tb_xdomain_release_in_hopid (net->xd, net->remote_transmit_path); net->remote_transmit_path =0 ; }
@@ -928,12 +938,8 @@ static int tbnet_open(struct net_device *dev)netif_carrier_off (dev); - flags =RING_FLAG_FRAME ; -/* Only enable full E2E if the other end supports it too */ -if (tbnet_e2e && net->svc->prtcstns &TBNET_E2E ) - flags |=RING_FLAG_E2E ; - - ring =tb_ring_alloc_tx (xd->tb->nhi,-1 ,TBNET_RING_SIZE , flags); + ring =tb_ring_alloc_tx (xd->tb->nhi,-1 ,TBNET_RING_SIZE , +RING_FLAG_FRAME );if (!ring) {netdev_err (dev,"failed to allocate Tx ring\n" );return -ENOMEM ;
@@ -952,6 +958,11 @@ static int tbnet_open(struct net_device *dev) sof_mask =BIT (TBIP_PDF_FRAME_START ); eof_mask =BIT (TBIP_PDF_FRAME_END ); + flags =RING_FLAG_FRAME ; +/* Only enable full E2E if the other end supports it too */ +if (tbnet_e2e && net->svc->prtcstns &TBNET_E2E ) + flags |=RING_FLAG_E2E ; + ring =tb_ring_alloc_rx (xd->tb->nhi,-1 ,TBNET_RING_SIZE , flags, net->tx_ring.ring->hop, sof_mask, eof_mask, tbnet_start_poll, net);
drivers/net/usb/ax88179_178a.c +3 -1
@@ -1491,8 +1491,10 @@ ax88179_tx_fixup(struct usbnet *dev, struct sk_buff *skb, gfp_t flags) headroom =skb_headroom (skb) -8 ; -if ((dev->net->features &NETIF_F_SG ) &&skb_linearize (skb)) +if ((dev->net->features &NETIF_F_SG ) &&skb_linearize (skb)) { +dev_kfree_skb_any (skb);return NULL ; + }if ((skb_header_cloned (skb) || headroom <0 ) &&pskb_expand_head (skb, headroom <0 ?8 :0 ,0 ,GFP_ATOMIC )) {
drivers/net/veth.c +14 -8
@@ -902,18 +902,24 @@ static struct sk_buff *veth_xdp_rcv_skb(struct veth_rq *rq,skb_reset_mac_header (skb); -/* check if bpf_xdp_adjust_tail was used */ - off = xdp->data_end - orig_data_end; -if (off !=0 ) -__skb_put (skb, off);/* positive on grow, negative on shrink */ -/* XDP frag metadata (e.g. nr_frags) are updated in eBPF helpers -* (e.g. bpf_xdp_adjust_tail), we need to update data_len here. +* (e.g. bpf_xdp_adjust_tail). Remove the old fragment contribution +* from skb->len before updating data_len, then add the new one back. */ -if (xdp_buff_has_frags (xdp)) + skb->len -= skb->data_len; +if (xdp_buff_has_frags (xdp)) { skb->data_len =skb_shinfo (skb)->xdp_frags_size; -else + skb->len += skb->data_len; + }else { skb->data_len =0 ; + } + +/* Synchronize the skb tail with XDP's updated linear area. */ + off = xdp->data_end - orig_data_end; +if (off !=0 ) { +skb_set_tail_pointer (skb, xdp->data_end - xdp->data); + skb->len += off;/* positive on grow, negative on shrink */ + } skb->protocol =eth_type_trans (skb, rq->dev);
drivers/net/vxlan/vxlan_core.c +1 -1
@@ -4338,7 +4338,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],if (change_igmp &&vxlan_addr_multicast (&dst->remote_ip)) err =vxlan_multicast_leave (vxlan); -if (conf.age_interval != vxlan->cfg.age_interval) +if (netif_running (dev) && conf.age_interval != vxlan->cfg.age_interval)mod_timer (&vxlan->age_timer, jiffies);netdev_adjacent_change_commit (dst->remote_dev, lowerdev, dev);
drivers/pinctrl/renesas/pinctrl-rzg2l.c +2 -2
@@ -710,7 +710,7 @@ static int rzg2l_pinctrl_pinconf_set(struct pinctrl_dev *pctldev, }default : -return -EOPNOTSUPP ; +return -ENOTSUPP ; } }
@@ -759,7 +759,7 @@ static int rzg2l_pinctrl_pinconf_group_get(struct pinctrl_dev *pctldev,/* Check config matching between to pin */ if (i && prev_config != *config) -return -EOPNOTSUPP ; +return -ENOTSUPP ; prev_config = *config; }
drivers/ptp/ptp_ocp.c +3 -1
@@ -1671,9 +1671,11 @@ ptp_ocp_devlink_info_get(struct devlink *devlink, struct devlink_info_req *req,if (err)return err; +snprintf (buf,sizeof (buf),"%.*s" ,OCP_BOARD_ID_LEN , + (const char *)bp->board_id); err =devlink_info_version_fixed_put (req,DEVLINK_INFO_VERSION_GENERIC_BOARD_ID , - bp->board_id); + buf);if (err)return err;
drivers/regulator/devres.c +59 -0
65 lines not on this page · raw message
drivers/s390/crypto/zcrypt_ccamisc.c +13 -7
@@ -946,7 +946,8 @@ static int _ip_cprb_helper(u16 cardnr, u16 domain,const u8 *clr_key_value, int clr_key_bit_size, u8 *key_token, - int *key_token_size) + int *key_token_size, + bool scrub) { int rc, n;u8 *mem, *ptr;
@@ -1087,7 +1088,7 @@ static int _ip_cprb_helper(u16 cardnr, u16 domain, *key_token_size = t->len; out: -free_cprbmem (mem,PARMBSIZE ,0 ); +free_cprbmem (mem,PARMBSIZE , scrub);return rc; }
@@ -1130,7 +1131,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags,* 4/4 COMPLETE the secure cipher key import */ rc =_ip_cprb_helper (card, dom,"AES " ,"FIRST " ,"MIN3PART" , - exorbuf, keybitsize, token, &tokensize); + exorbuf, keybitsize, token, &tokensize, + true);if (rc) { DEBUG_ERR( "%s clear key import 1/4 with CSNBKPI2 failed, rc=%d\n",
@@ -1138,7 +1140,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags, goto out; } rc =_ip_cprb_helper (card, dom,"AES " ,"ADD-PART" ,NULL , - clrkey, keybitsize, token, &tokensize); + clrkey, keybitsize, token, &tokensize, + true);if (rc) { DEBUG_ERR( "%s clear key import 2/4 with CSNBKPI2 failed, rc=%d\n",
@@ -1146,7 +1149,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags, goto out; } rc =_ip_cprb_helper (card, dom,"AES " ,"ADD-PART" ,NULL , - exorbuf, keybitsize, token, &tokensize); + exorbuf, keybitsize, token, &tokensize, + true);if (rc) { DEBUG_ERR( "%s clear key import 3/4 with CSNBKPI2 failed, rc=%d\n",
@@ -1154,7 +1158,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags, goto out; } rc =_ip_cprb_helper (card, dom,"AES " ,"COMPLETE" ,NULL , -NULL , keybitsize, token, &tokensize); +NULL , keybitsize, token, &tokensize, + true);if (rc) { DEBUG_ERR( "%s clear key import 4/4 with CSNBKPI2 failed, rc=%d\n",
@@ -1172,7 +1177,8 @@ int cca_clr2cipherkey(u16 card, u16 dom, u32 keybitsize, u32 keygenflags, *keybufsize = tokensize; out: -kfree (token); +memzero_explicit (exorbuf,sizeof (exorbuf)); +kfree_sensitive (token);return rc; }EXPORT_SYMBOL (cca_clr2cipherkey);
drivers/scsi/scsi_debug.c +2 -2
@@ -3077,8 +3077,8 @@ static bool comp_write_worker(struct sdeb_store_info *sip, u64 lba, u32 num,if (!res)return res;if (rest) - res =memcmp (fsp, arr + ((num - rest) * lb_size), - rest * lb_size); + res = !memcmp (fsp, arr + ((num - rest) * lb_size), + rest * lb_size);if (!res)return res;if (compare_only)
drivers/spi/spi-fsl-dspi.c +7 -6
@@ -751,8 +751,12 @@ static void dspi_setup_accel(struct fsl_dspi *dspi)struct spi_transfer *xfer = dspi->cur_transfer;bool odd = !!(dspi->len &1 ); -/* No accel for frames not multiple of 8 bits at the moment */ -if (xfer->bits_per_word %8 ) +/* +* No accel for DMA transfers or frames not multiples of 8 bits at the +* moment. +*/ +if (dspi->devtype_data->trans_mode ==DSPI_DMA_MODE || + xfer->bits_per_word %8 ) goto no_accel;if (!odd && dspi->len <= dspi->devtype_data->fifo_size *2 ) {
@@ -761,10 +765,7 @@ static void dspi_setup_accel(struct fsl_dspi *dspi) dspi->oper_bits_per_word =8 ; }else {/* Start off with maximum supported by hardware */ -if (dspi->devtype_data->trans_mode ==DSPI_XSPI_MODE ) - dspi->oper_bits_per_word =32 ; -else - dspi->oper_bits_per_word =16 ; + dspi->oper_bits_per_word =32 ;/* * And go down only if the buffer can't be sent with
drivers/staging/rtl8723bs/core/rtw_ieee80211.c +3 -0
@@ -371,6 +371,9 @@ unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) pbuf =rtw_get_ie (pbuf,WLAN_EID_VENDOR_SPECIFIC , &len, limit_new);if (pbuf) { +if (len <6 ) + goto check_next_ie; +/* check if oui matches... */ if (memcmp ((pbuf +2 ), wpa_oui_type,sizeof (wpa_oui_type))) goto check_next_ie;
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +1 -1
@@ -905,7 +905,7 @@ unsigned int OnAuthClient(struct adapter *padapter, union recv_frame *precv_fram p =rtw_get_ie (pframe +WLAN_HDR_A3_LEN + _AUTH_IE_OFFSET_,WLAN_EID_CHALLENGE , (int *)&len, pkt_len -WLAN_HDR_A3_LEN - _AUTH_IE_OFFSET_); -if (!p) +if (!p || len !=WLAN_AUTH_CHALLENGE_LEN ) goto authclnt_fail;memcpy ((void *)(pmlmeinfo->chg_txt), (void *)(p +2 ), len);
drivers/staging/rtl8723bs/core/rtw_wlan_util.c +3 -0
@@ -731,6 +731,9 @@ int WMM_param_handler(struct adapter *padapter, struct ndis_80211_var_ie *pIE)return false; } +if (pIE->length !=WLAN_WMM_LEN ) +return false; +if (!memcmp (&(pmlmeinfo->WMM_param), (pIE->data +6 ),sizeof (struct WMM_para_element )))return false;else
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c +4 -0
@@ -2043,6 +2043,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc/* Skip the ratio tap header */ skb_pull (skb, rtap_len); +if (skb->len < dot11_hdr_len) + goto fail; dot11_hdr = (struct ieee80211_hdr *)skb->data; frame_control =le16_to_cpu (dot11_hdr->frame_control);
@@ -2055,6 +2057,8 @@ static netdev_tx_t rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struc qos_len =2 ;if ((frame_control &0x0300 ) ==0x0300 ) dot11_hdr_len +=6 ; +if (skb->len < dot11_hdr_len + qos_len + snap_len) + goto fail;memcpy (dst_mac_addr, dot11_hdr->addr1,sizeof (dst_mac_addr));memcpy (src_mac_addr, dot11_hdr->addr2,sizeof (src_mac_addr));
drivers/thermal/thermal_hwmon.c +2 -1
@@ -218,7 +218,8 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)if (new_hwmon_device)hwmon_device_unregister (hwmon->device); free_mem: -kfree (hwmon); +if (new_hwmon_device) +kfree (hwmon);return result; }
drivers/thunderbolt/eeprom.c +8 -1
@@ -392,9 +392,16 @@ static int tb_drom_parse_entry_port(struct tb_switch *sw,return -EIO ; } port->link_nr = entry->link_nr; -if (entry->has_dual_link_port) +if (entry->has_dual_link_port) { +if (entry->dual_link_port_nr > sw->config.max_port_number) { +tb_sw_warn (sw, +"port entry has invalid dual link port number %u\n" , + entry->dual_link_port_nr); +return -EIO ; + } port->dual_link_port = &port->sw->ports[entry->dual_link_port_nr]; + } }return 0 ; }
drivers/thunderbolt/icm.c +1 -1
@@ -2291,7 +2291,7 @@ static int icm_usb4_switch_op(struct tb_switch *sw, u16 opcode, u32 *metadata,if (tx_data_len) { request.data_len_valid |=ICM_USB4_SWITCH_DATA_VALID ;if (tx_data_len <ARRAY_SIZE (request.data)) - request.data_len_valid = + request.data_len_valid |= tx_data_len &ICM_USB4_SWITCH_DATA_LEN_MASK ;memcpy (request.data, tx_data, tx_data_len *sizeof (u32)); }
drivers/tty/serial/8250/8250_dma.c +7 -5
@@ -201,11 +201,12 @@ void serial8250_rx_dma_flush(struct uart_8250_port *p) {struct uart_8250_dma *dma = p->dma; -if (dma->rx_running) { -dmaengine_pause (dma->rxchan); -__dma_rx_complete (p); -dmaengine_terminate_async (dma->rxchan); - } +if (!dma || !dma->rxchan || !dma->rx_running) +return ; + +dmaengine_pause (dma->rxchan); +__dma_rx_complete (p); +dmaengine_terminate_async (dma->rxchan); }EXPORT_SYMBOL_GPL (serial8250_rx_dma_flush);
@@ -314,6 +315,7 @@ void serial8250_release_dma(struct uart_8250_port *p)/* Release RX resources */ dmaengine_terminate_sync (dma->rxchan); + dma->rx_running =0 ;dma_free_coherent (dma->rxchan->device->dev, dma->rx_size, dma->rx_buf, dma->rx_addr);dma_release_channel (dma->rxchan);
drivers/tty/vt/keyboard.c +4 -1
@@ -1405,7 +1405,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)struct keyboard_notifier_param param = { .vc = vc, .value = keycode, .down = down };int rc; - tty = vc->port.tty; + tty =tty_port_tty_get (&vc->port);if (tty && (!tty->driver_data)) {/* No driver data? Strange. Okay we fix it then. */
@@ -1465,9 +1465,12 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)* characters get aren't echoed locally. This makes key repeat * usable with slow applications and under heavy loads. */ +tty_kref_put (tty);return ; } +tty_kref_put (tty); + param.shift = shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate; param.ledstate = kbd->ledflagstate; key_map = key_maps[shift_final];
drivers/tty/vt/vt_ioctl.c +2 -0
@@ -408,6 +408,8 @@ static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd,/* this could be folded into KDSKBMODE, but for compatibility reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */ case KDSKBMETA : +if (!perm) +return -EPERM ;return vt_do_kdskbmeta (console, arg);case KDGKBMETA :
drivers/usb/atm/cxacru.c +2 -0
@@ -700,6 +700,8 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, ret = offd;usb_dbg (instance->usbatm,"cm %#x\n" , cm); fail: +if (ret <0 ) +usb_kill_urb (instance->rcv_urb);mutex_unlock (&instance->cm_serialize); err:return ret;
drivers/usb/cdns3/cdnsp-gadget.c +2 -2
@@ -154,9 +154,9 @@ static void cdnsp_set_apb_timeout_value(struct cdnsp_device *pdev) offset =cdnsp_find_next_ext_cap (base, offset,D_XEC_PRE_REGS_CAP ); reg = base + offset +REG_CHICKEN_BITS_3_OFFSET ; - val =le32_to_cpu (readl (reg)); + val =readl (reg); val =CHICKEN_APB_TIMEOUT_SET (val, cdns->override_apb_timeout); -writel (cpu_to_le32 (val), reg); +writel (val, reg); }static void cdnsp_set_chicken_bits_2 (struct cdnsp_device *pdev,u32 bit)
drivers/usb/gadget/function/f_ncm.c +1 -1
@@ -1161,7 +1161,7 @@ static int ncm_unwrap_ntb(struct gether *port,unsigned char *ntb_ptr = skb->data;__le16 *tmp;unsigned index, index2; -int ndp_index; +unsigned int ndp_index;unsigned dg_len, dg_len2;unsigned ndp_len;unsigned block_len;
drivers/vhost/vdpa.c +8 -1
@@ -998,6 +998,7 @@ static int vhost_vdpa_pa_map(struct vhost_vdpa *v,unsigned int gup_flags =FOLL_LONGTERM ;unsigned long npages, cur_base, map_pfn, last_pfn =0 ;unsigned long lock_limit, sz2pin, nchunks, i; +unsigned long page_offset;u64 start = iova;long pinned;int ret =0 ;
@@ -1010,7 +1011,13 @@ static int vhost_vdpa_pa_map(struct vhost_vdpa *v,if (perm &VHOST_ACCESS_WO ) gup_flags |=FOLL_WRITE ; - npages =PFN_UP (size + (iova & ~PAGE_MASK )); + page_offset = iova & ~PAGE_MASK ; +if (size >ULONG_MAX - page_offset) { + ret = -EINVAL ; + goto free; + } + + npages =PFN_UP (size + page_offset);if (!npages) { ret = -EINVAL ; goto free;
drivers/vhost/vhost.c +8 -0
@@ -1937,6 +1937,14 @@ static long vhost_vring_set_num_addr(struct vhost_dev *d,BUG (); } +/* +* The metadata cache holds the IOTLB mapping that backed the previous +* desc/avail/used addresses and vring size, both of which are being +* replaced here. iotlb_access_ok() takes a cache hit as proof that the +* region was validated, so the stale entries have to go. +*/ +__vhost_vq_meta_reset (vq); +mutex_unlock (&vq->mutex);return r;
drivers/video/fbdev/core/bitblit.c +7 -2
@@ -274,9 +274,14 @@ static void bit_cursor(struct vc_data *vc, struct fb_info *info, int mode,if (!vc->vc_font.data)return ; - c =scr_readw ((u16 *) vc->vc_pos); + c =scr_readw ((u16 *) vc->vc_pos); attribute =get_attribute (info, c); - src = vc->vc_font.data + ((c & charmask) * (w * vc->vc_font.height)); + c &= charmask; + +/* Clamp to font size, same as bit_putcs_aligned() */ +if (c >= vc->vc_font.charcount) + c =0 ; + src = vc->vc_font.data + (c * (w * vc->vc_font.height));if (par->cursor_state.image.data != src || par->cursor_reset) {
fs/btrfs/inode.c +1 -0
@@ -10640,6 +10640,7 @@ ssize_t btrfs_do_encoded_write(struct kiocb *iocb, struct iov_iter *from, }kvfree (pages); out: +extent_changeset_free (data_reserved);if (ret >=0 ) iocb->ki_pos += encoded->len;return ret;
fs/crypto/fscrypt_private.h +22 -10
@@ -422,6 +422,19 @@ fscrypt_is_key_prepared(struct fscrypt_prepared_key *prep_key,/* keyring.c */ +/* +* fscrypt_master_key_user - a user's claim to a master key +*/ +struct fscrypt_master_key_user { +struct list_head link; +kuid_t uid; +/* +* This 'struct key' contains no secret. It exists solely to charge the +* appropriate user's key quota. +*/ +struct key *quota_key; +}; +/* * fscrypt_master_key_secret - secret key material of an in-use master key */
@@ -506,19 +519,18 @@ struct fscrypt_master_key {struct fscrypt_key_specifier mk_spec;/* -* Keyring which contains a key of type 'key_type_fscrypt_user' for each -* user who has added this key. Normally each key will be added by just -* one user, but it's possible that multiple users share a key, and in -* that case we need to keep track of those users so that one user can't -* remove the key before the others want it removed too. +* List of user claims to this key (struct fscrypt_master_key_user). +* Normally each key will be added by just one user, but it's possible +* that multiple users share a key, and in that case we need to keep +* track of those users so that one user can't remove the key before the +* others want it removed too. * -* This is NULL for v1 policy keys; those can only be added by root. +* Used only for v2 policy keys. v1 policy keys can be added only by +* root, so user tracking doesn't apply to them. * -* Locking: protected by ->mk_sem. (We don't just rely on the keyrings -* subsystem semaphore ->mk_users->sem, as we need support for atomic -* search+insert along with proper synchronization with ->mk_secret.) +* Locking: protected by ->mk_sem. */ -struct key *mk_users; +struct list_head mk_users;/* * List of inodes that were unlocked using this key. This allows the
fs/crypto/keyring.c +91 -121
331 lines not on this page · raw message
fs/crypto/policy.c +1 -1
@@ -505,7 +505,7 @@ int fscrypt_ioctl_set_policy(struct file *filp, const void __user *arg)return -EFAULT ; policy.version = version; -if (!inode_owner_or_capable (&nop_mnt_idmap, inode)) +if (!inode_owner_or_capable (file_mnt_idmap (filp), inode))return -EACCES ; ret =mnt_want_write_file (filp);
fs/namespace.c +5 -0
@@ -4050,6 +4050,11 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags, ret =PTR_ERR (newmount.mnt); goto err_unlock; } +if (newmount.mnt->mnt_sb->s_flags &SB_NOUSER ) { +mntput (newmount.mnt); + ret = -EINVAL ; + goto err_unlock; + } newmount.dentry =dget (fc->root); newmount.mnt->mnt_flags = mnt_flags;
fs/nfs/nfs4proc.c +5 -0
@@ -10383,6 +10383,7 @@ static void nfs41_free_stateid_release(void *calldata)struct nfs_free_stateid_data *data = calldata;struct nfs_client *clp = data->server->nfs_client; +nfs_sb_deactive (data->server->super);nfs_put_client (clp);kfree (calldata); }
@@ -10424,6 +10425,10 @@ static int nfs41_free_stateid(struct nfs_server *server,if (!refcount_inc_not_zero (&clp->cl_count))return -EIO ; +if (!nfs_sb_active (server->super)) { +nfs_put_client (clp); +return -EIO ; + }nfs4_state_protect (server->nfs_client,NFS_SP4_MACH_CRED_STATEID , &task_setup.rpc_client, &msg);
fs/overlayfs/super.c +2 -1
@@ -1345,7 +1345,8 @@ int ovl_fill_super(struct super_block *sb, struct fs_context *fc)int err; err = -EIO ; -if (WARN_ON (fc->user_ns !=current_user_ns ())) +/* The fscontext fd may have been passed to another user namespace. */ +if (fc->user_ns !=current_user_ns ()) goto out_err; sb->s_d_op = &ovl_dentry_operations;
fs/smb/client/sess.c +1 -1
@@ -271,9 +271,9 @@ int cifs_try_adding_channels(struct cifs_ses *ses)cifs_dbg (VFS ,"failed to open extra channel on iface:%pIS rc=%d\n" , &iface->sockaddr, rc); -kref_put (&iface->refcount, release_iface);/* failure to add chan should increase weight */ iface->weight_fulfilled++; +kref_put (&iface->refcount, release_iface);continue ; }
fs/tracefs/event_inode.c +2 -2
@@ -922,7 +922,7 @@ struct eventfs_inode *eventfs_create_events_dir(const char *name, struct dentry*/ static void eventfs_remove_rec (struct eventfs_inode *ei,int level) { -struct eventfs_inode *ei_child; +struct eventfs_inode *ei_child, *tmp;/* * Check recursion depth. It should never be greater than 3:
@@ -935,7 +935,7 @@ static void eventfs_remove_rec(struct eventfs_inode *ei, int level)return ;/* search for nested folders or files */ -list_for_each_entry (ei_child, &ei->children, list) +list_for_each_entry_safe (ei_child, tmp, &ei->children, list)eventfs_remove_rec (ei_child, level +1 );list_del_rcu (&ei->list);
include/linux/netdevice.h +4 -7
@@ -301,9 +301,11 @@ struct hh_cache {* We could use other alignment values, but we must maintain the * relationship HH alignment <= LL alignment. */ -#define LL_RESERVED_SPACE (dev) \ - ((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom)) \ +#define LL_RESERVED_SPACE_EX (dev, hlen) \ + ((((hlen) + READ_ONCE((dev)->needed_headroom)) \ & ~(HH_DATA_MOD - 1)) + HH_DATA_MOD) +#define LL_RESERVED_SPACE (dev) \ + LL_RESERVED_SPACE_EX(dev, (dev)->hard_header_len)#define LL_RESERVED_SPACE_EXTRA (dev,extra) \ ((((dev)->hard_header_len + READ_ONCE((dev)->needed_headroom) + (extra)) \ & ~(HH_DATA_MOD - 1)) + HH_DATA_MOD)
@@ -3197,11 +3199,6 @@ static inline bool dev_validate_header(const struct net_device *dev,if (len < dev->min_header_len)return false; -if (capable (CAP_SYS_RAWIO )) { -memset (ll_header + len,0 , dev->hard_header_len - len); -return true; - } -if (dev->header_ops && dev->header_ops->validate)return dev->header_ops->validate (ll_header, len);
include/linux/netfilter/ipset/ip_set.h +1 -1
@@ -273,7 +273,7 @@ struct ip_set {/* Number of elements (vs timeout) */ u32 elements;/* Size of the dynamic extensions (vs timeout) */ -size_t ext_size; +atomic64_t ext_size;/* Element data size */ size_t dsize;/* Offsets to extensions in elements */
include/linux/regulator/consumer.h +7 -0
@@ -209,6 +209,7 @@ struct regulator *__must_check devm_regulator_get_optional(struct device *dev, const char *id);int devm_regulator_get_enable (struct device *dev,const char *id);int devm_regulator_get_enable_optional (struct device *dev,const char *id); +int devm_regulator_get_enable_read_voltage (struct device *dev,const char *id);void regulator_put (struct regulator *regulator);void devm_regulator_put (struct regulator *regulator);
@@ -374,6 +375,12 @@ static inline int devm_regulator_get_enable_optional(struct device *dev,return 0 ; } +static inline int devm_regulator_get_enable_read_voltage (struct device *dev, +const char *id) +{ +return -ENODEV ; +} +static inline struct regulator *__must_check regulator_get_optional (struct device *dev,const char *id) {
include/linux/tcp.h +7 -2
@@ -445,13 +445,18 @@ struct tcp_sock {bool syn_smc;/* SYN includes SMC */ #endif -#ifdef CONFIG_TCP_MD5SIG -/* TCP AF-Specific parts; only used by MD5 Signature support so far */ +#if defined(CONFIG_TCP_MD5SIG ) || defined(CONFIG_TCP_AO ) +/* TCP AF-Specific parts; only used by TCP-AO/MD5 Signature support so far */ const struct tcp_sock_af_ops *af_specific; +#ifdef CONFIG_TCP_MD5SIG /* TCP MD5 Signature Option information */ struct tcp_md5sig_info __rcu *md5sig_info;#endif +#ifdef CONFIG_TCP_AO +struct tcp_ao_info __rcu *ao_info; +#endif +#endif /* TCP fastopen related information */ struct tcp_fastopen_request *fastopen_req;
include/net/act_api.h +19 -0
@@ -268,6 +268,25 @@ int tcf_action_check_ctrlact(int action, struct tcf_proto *tp,struct tcf_chain *tcf_action_set_ctrlact (struct tc_action *a,int action,struct tcf_chain *newchain); +/* Range check for a control action supplied by user space. +* +* This is the same test tcf_action_check_ctrlact() applies to the primary +* control action, factored out for the *fallback* control actions +* (act_gact's TCA_GACT_PROB.paction and act_police's TCA_POLICE_RESULT), +* which must not reach tcf_action_check_ctrlact() because they have no +* goto_chain to allocate. Without it, user space can store kernel-internal +* verdicts such as TC_ACT_CONSUMED, which is TC_ACT_VALUE_MAX + 1 and is +* deliberately not part of the UAPI value range. +*/ +static inline bool tcf_action_valid (int action) +{ +int opcode =TC_ACT_EXT_OPCODE (action); + +if (!opcode) +return action <=TC_ACT_VALUE_MAX ; +return opcode <=TC_ACT_EXT_OPCODE_MAX || action ==TC_ACT_UNSPEC ; +} +#ifdef CONFIG_INET DECLARE_STATIC_KEY_FALSE (tcf_frag_xmit_count);#endif
include/net/addrconf.h +2 -2
@@ -370,8 +370,8 @@ static inline struct inet6_dev *in6_dev_get(const struct net_device *dev)rcu_read_lock (); idev =rcu_dereference (dev->ip6_ptr); -if (idev) -refcount_inc (&idev->refcnt); +if (idev && !refcount_inc_not_zero (&idev->refcnt)) + idev =NULL ;rcu_read_unlock ();return idev; }
include/net/ip_vs.h +21 -20
97 lines not on this page · raw message
include/net/pkt_cls.h +18 -0
@@ -72,6 +72,15 @@ static inline bool tcf_block_non_null_shared(struct tcf_block *block)return block && block->index; } +#ifdef CONFIG_NET_CLS_ACT +DECLARE_STATIC_KEY_FALSE (tcf_sw_enabled_key); + +static inline bool tcf_block_bypass_sw (struct tcf_block *block) +{ +return block && !atomic_read (&block->useswcnt); +} +#endif +static inline struct Qdisc *tcf_block_q (struct tcf_block *block) {WARN_ON (tcf_block_shared (block));
@@ -750,6 +759,15 @@ tc_cls_common_offload_init(struct flow_cls_common_offload *cls_common, cls_common->extack = extack; } +static inline void tcf_proto_update_usesw (struct tcf_proto *tp,u32 flags) +{ +if (tp->usesw) +return ; +if (tc_skip_sw (flags) &&tc_in_hw (flags)) +return ; + tp->usesw = true; +} +#if IS_ENABLED (CONFIG_NET_TC_SKB_EXT )static inline struct tc_skb_ext *tc_skb_ext_alloc (struct sk_buff *skb) {
include/net/route.h +2 -0
@@ -244,6 +244,8 @@ int fib_dump_info_fnhe(struct sk_buff *skb, struct netlink_callback *cb, u32 table_id, struct fib_info *fi, int *fa_index, int fa_start, unsigned int flags); +void fnhe_update_pmtu (struct fib_nh_exception *fnhe,u32 new,u32 orig); +static inline void ip_rt_put (struct rtable *rt) {/* dst_release() accepts a NULL parameter.
include/net/sch_generic.h +4 -0
@@ -100,6 +100,7 @@ struct Qdisc {struct hlist_node hash;u32 handle;u32 parent; +int depth;struct netdev_queue *dev_queue;
@@ -429,6 +430,8 @@ struct tcf_proto {*/ spinlock_t lock;bool deleting; +bool counted; +bool usesw;refcount_t refcnt;struct rcu_head rcu;struct hlist_node destroy_ht_node;
@@ -477,6 +480,7 @@ struct tcf_block {struct flow_block flow_block;struct list_head owner_list;bool keep_dst; +atomic_t useswcnt;atomic_t offloadcnt;/* Number of oddloaded filters */ unsigned int nooffloaddevcnt;/* Number of devs unable to do offload */ unsigned int lockeddevcnt;/* Number of devs that require rtnl lock. */
include/net/tcp.h +38 -20
85 lines not on this page · raw message
include/net/tcp_ao.h new file +90 -0
90 lines not on this page · raw message
include/uapi/linux/tcp.h +2 -0
@@ -360,6 +360,8 @@ struct tcp_diag_md5sig {__u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN ]; }; +#define TCP_AO_MAXKEYLEN 80 +/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */ #define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1
kernel/bpf/verifier.c +8 -7
@@ -12657,11 +12657,12 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env,break ; } -/* In case of 'scalar += pointer', dst_reg inherits pointer type and id. -* The id may be overwritten later if we create a new variable offset. +/* For 'scalar += pointer', dst_reg inherits the complete pointer +* register state. Individual fields may be adjusted later by pointer +* arithmetic. Callers guarantee that below does not overwrite off_reg. */ - dst_reg->type = ptr_reg->type; - dst_reg->id = ptr_reg->id; +if (dst_reg != ptr_reg) + *dst_reg = *ptr_reg;if (!check_reg_sane_offset (env, off_reg, ptr_reg->type) || !check_reg_sane_offset (env, ptr_reg, ptr_reg->type))
@@ -12729,7 +12730,7 @@ static int adjust_ptr_min_max_vals(struct bpf_verifier_env *env, }break ;case BPF_SUB : -if (dst_reg == off_reg) { +if (dst_reg != ptr_reg) {/* scalar -= pointer. Creates an unknown scalar */ verbose (env,"R%d tried to subtract pointer from scalar\n" , dst);
@@ -13588,8 +13589,8 @@ static int adjust_reg_min_max_vals(struct bpf_verifier_env *env, err =mark_chain_precision (env, insn->dst_reg);if (err)return err; -return adjust_ptr_min_max_vals (env, insn, - src_reg, dst_reg); + off_reg = *dst_reg; +return adjust_ptr_min_max_vals (env, insn, src_reg, &off_reg); } }else if (ptr_reg) {/* pointer += scalar */
kernel/futex/core.c +56 -26
105 lines not on this page · raw message
kernel/sched/psi.c +6 -0
@@ -1138,6 +1138,12 @@ void psi_cgroup_free(struct cgroup *cgroup)return ;cancel_delayed_work_sync (&cgroup->psi->avgs_work); +/* +* A psi_schedule_rtpoll_work() call racing the last trigger's +* destruction may have re-armed the timer after psi_trigger_destroy() +* deleted it. Spurious firing while the group is alive is harmless. +*/ +timer_shutdown_sync (&cgroup->psi->rtpoll_timer);free_percpu (cgroup->psi->pcpu);/* All triggers must be removed by now */ WARN_ONCE (cgroup->psi->rtpoll_states,"psi: trigger leak\n" );
kernel/trace/ring_buffer.c +1 -1
@@ -6090,7 +6090,7 @@ static __init int test_ringbuffer(void) out_free:for_each_online_cpu (cpu) { -if (!rb_threads[cpu]) +if (IS_ERR_OR_NULL (rb_threads[cpu]))break ;kthread_stop (rb_threads[cpu]); }
kernel/trace/trace_events.c +2 -0
@@ -3038,6 +3038,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)int last_i;int i; +mutex_lock (&event_mutex);down_write (&trace_event_sem);list_for_each_entry_safe (call, p, &ftrace_events, list) {/* events are usually grouped together with systems */
@@ -3071,6 +3072,7 @@ void trace_event_eval_update(struct trace_eval_map **map, int len)cond_resched (); }up_write (&trace_event_sem); +mutex_unlock (&event_mutex); } static bool event_in_systems(struct trace_event_call *call,
lib/.gitignore +0 -2
@@ -5,5 +5,3 @@ /gen_crc32table /gen_crc64table /oid_registry_data.c -/test_fortify.log -/test_fortify/*.log
lib/Makefile +1 -33
@@ -407,36 +407,4 @@ CFLAGS_longest_symbol_kunit.o += $(call cc-disable-warning, missing-prototypes) obj-$(CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED) += devmem_is_allowed.o -# FORTIFY_SOURCE compile-time behavior tests -TEST_FORTIFY_SRCS = $(wildcard $(srctree)/$(src)/test_fortify/*-*.c) -TEST_FORTIFY_LOGS = $(patsubst $(srctree)/$(src)/%.c, %.log, $(TEST_FORTIFY_SRCS)) -TEST_FORTIFY_LOG = test_fortify.log - -quiet_cmd_test_fortify = TEST $@ - cmd_test_fortify = $(CONFIG_SHELL) $(srctree)/scripts/test_fortify.sh \ - $< $@ "$(NM)" $(CC) $(c_flags) \ - $(call cc-disable-warning,fortify-source) \ - -DKBUILD_EXTRA_WARN1 - -targets += $(TEST_FORTIFY_LOGS) -clean-files += $(TEST_FORTIFY_LOGS) -clean-files += $(addsuffix .o, $(TEST_FORTIFY_LOGS)) -$(obj)/test_fortify/%.log: $(src)/test_fortify/%.c \ - $(src)/test_fortify/test_fortify.h \ - $(srctree)/include/linux/fortify-string.h \ - $(srctree)/scripts/test_fortify.sh \ - FORCE - $(call if_changed,test_fortify) - -quiet_cmd_gen_fortify_log = GEN $@ - cmd_gen_fortify_log = cat </dev/null $(filter-out FORCE,$^) 2>/dev/null > $@ || true - -targets += $(TEST_FORTIFY_LOG) -clean-files += $(TEST_FORTIFY_LOG) -$(obj)/$(TEST_FORTIFY_LOG): $(addprefix $(obj)/, $(TEST_FORTIFY_LOGS)) FORCE - $(call if_changed,gen_fortify_log) - -# Fake dependency to trigger the fortify tests. -ifeq ($(CONFIG_FORTIFY_SOURCE),y) -$(obj)/string.o: $(obj)/$(TEST_FORTIFY_LOG) -endif +subdir-$(CONFIG_FORTIFY_SOURCE) += test_fortify
lib/test_fortify/.gitignore new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +/*.log
lib/test_fortify/Makefile new file +29 -0
@@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0 + +ccflags-y := $(call cc-disable-warning,fortify-source) +ccflags-y += $(call cc-disable-warning,stringop-overread) + +quiet_cmd_test_fortify = TEST $@ + cmd_test_fortify = $(CONFIG_SHELL) $(srctree)/scripts/test_fortify.sh \ + $< $@ "$(NM)" $(CC) $(c_flags) -DKBUILD_EXTRA_WARN1 + +$(obj)/%.log: $(src)/%.c $(srctree)/scripts/test_fortify.sh \ + $(src)/test_fortify.h \ + $(srctree)/include/linux/fortify-string.h \ + FORCE + $(call if_changed,test_fortify) + +logs = $(patsubst $(srctree)/$(src)/%.c, %.log, $(wildcard $(srctree)/$(src)/*-*.c)) +targets += $(logs) + +quiet_cmd_gen_fortify_log = CAT $@ + cmd_gen_fortify_log = cat $(or $(real-prereqs),/dev/null) > $@ + +$(obj)/test_fortify.log: $(addprefix $(obj)/, $(logs)) FORCE + $(call if_changed,gen_fortify_log) + +always-y += test_fortify.log + +# Some architectures define __NO_FORTIFY if __SANITIZE_ADDRESS__ is undefined. +# Pass CFLAGS_KASAN to avoid warnings. +KASAN_SANITIZE := y
net/atm/common.c +9 -5
@@ -760,7 +760,7 @@ int vcc_setsockopt(struct socket *sock, int level, int optname, sockptr_t optval, unsigned int optlen) {struct atm_vcc *vcc; -unsigned long value; +int value;int error;if (__SO_LEVEL_MATCH (optname, level) && optlen !=__SO_SIZE (optname))
@@ -772,8 +772,10 @@ int vcc_setsockopt(struct socket *sock, int level, int optname, {struct atm_qos qos; -if (copy_from_sockptr (&qos, optval,sizeof (qos))) -return -EFAULT ; + error =copy_safe_from_sockptr (&qos,sizeof (qos), optval, + optlen); +if (error) +return error; error =check_qos (&qos);if (error)return error;
@@ -786,8 +788,10 @@ int vcc_setsockopt(struct socket *sock, int level, int optname,return 0 ; }case SO_SETCLP : -if (copy_from_sockptr (&value, optval,sizeof (value))) -return -EFAULT ; + error =copy_safe_from_sockptr (&value,sizeof (value), optval, + optlen); +if (error) +return error;if (value) vcc->atm_options |=ATM_ATMOPT_CLP ;else
net/bridge/br_mrp.c +2 -4
@@ -224,11 +224,9 @@ static struct sk_buff *br_mrp_alloc_test_skb(struct br_mrp *mrp, sub_opt =skb_put (skb,sizeof (*sub_opt));memset (sub_opt,0x0 ,sizeof (*sub_opt)); - sub_tlv =skb_put (skb,sizeof (*sub_tlv)); - sub_tlv->type =BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR ; -/* 32 bit alligment shall be ensured therefore add 2 bytes */ -skb_put (skb,MRP_OPT_PADDING ); + sub_tlv =skb_put_zero (skb,sizeof (*sub_tlv) +MRP_OPT_PADDING ); + sub_tlv->type =BR_MRP_SUB_TLV_HEADER_TEST_AUTO_MGR ; }br_mrp_skb_tlv (skb,BR_MRP_TLV_HEADER_END ,0x0 );
net/bridge/netfilter/ebt_nflog.c +16 -1
@@ -41,11 +41,25 @@ ebt_nflog_tg(struct sk_buff *skb, const struct xt_action_param *par)static int ebt_nflog_tg_check (const struct xt_tgchk_param *par) {struct ebt_nflog_info *info = par->targinfo; +int ret;if (info->flags & ~EBT_NFLOG_MASK )return -EINVAL ; info->prefix[EBT_NFLOG_PREFIX_SIZE -1 ] ='\0' ; -return 0 ; + + ret =nf_logger_find_get (par->family,NF_LOG_TYPE_ULOG ); +if (ret !=0 && !par->nft_compat) { +request_module ("%s" ,"nfnetlink_log" ); + + ret =nf_logger_find_get (par->family,NF_LOG_TYPE_ULOG ); + } + +return ret; +} + +static void ebt_nflog_tg_destroy (const struct xt_tgdtor_param *par) +{ +nf_logger_put (par->family,NF_LOG_TYPE_ULOG ); }static struct xt_target ebt_nflog_tg_reg__read_mostly = {
@@ -54,6 +68,7 @@ static struct xt_target ebt_nflog_tg_reg __read_mostly = { .family = NFPROTO_BRIDGE, .target = ebt_nflog_tg, .checkentry = ebt_nflog_tg_check, + .destroy = ebt_nflog_tg_destroy, .targetsize = sizeof(struct ebt_nflog_info), .me = THIS_MODULE, };
net/bridge/netfilter/nf_conntrack_bridge.c +1 -0
@@ -281,6 +281,7 @@ static unsigned int nf_ct_bridge_pre(void *priv, struct sk_buff *skb, ret =nf_ct_br_defrag6 (skb, &bridge_state);break ;default : +nf_reset_ct (skb);nf_ct_set (skb,NULL ,IP_CT_UNTRACKED );return NF_ACCEPT ; }
net/core/dev.c +13 -0
@@ -2146,6 +2146,11 @@ void net_dec_egress_queue(void)EXPORT_SYMBOL_GPL (net_dec_egress_queue);#endif +#ifdef CONFIG_NET_CLS_ACT +DEFINE_STATIC_KEY_FALSE (tcf_sw_enabled_key); +EXPORT_SYMBOL (tcf_sw_enabled_key); +#endif +DEFINE_STATIC_KEY_FALSE (netstamp_needed_key);EXPORT_SYMBOL (netstamp_needed_key);#ifdef CONFIG_JUMP_LABEL
@@ -4030,6 +4035,14 @@ static int tc_run(struct tcx_entry *entry, struct sk_buff *skb)if (!miniq)return ret; +/* Global bypass */ +if (!static_branch_likely (&tcf_sw_enabled_key)) +return ret; + +/* Block-wise bypass */ +if (tcf_block_bypass_sw (miniq->block)) +return ret; +tc_skb_cb (skb)->mru =0 ;tc_skb_cb (skb)->post_ct = false;
net/core/sock.c +0 -1
@@ -776,7 +776,6 @@ bool sk_mc_loop(struct sock *sk)return inet6_sk (sk)->mc_loop;#endif } -WARN_ON_ONCE (1 );return true; }EXPORT_SYMBOL (sk_mc_loop);
net/core/xdp.c +1 -1
@@ -674,7 +674,7 @@ struct xdp_frame *xdpf_clone(struct xdp_frame *xdpf) headroom = xdpf->headroom +sizeof (*xdpf); totalsize = headroom + xdpf->len; -if (unlikely (totalsize >PAGE_SIZE )) +if (unlikely (totalsize >SKB_WITH_OVERHEAD (PAGE_SIZE )))return NULL ; page =dev_alloc_page ();if (!page)
net/devlink/dev.c +1 -0
@@ -505,6 +505,7 @@ int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) action != DEVLINK_RELOAD_ACTION_DRIVER_REINIT) {NL_SET_ERR_MSG_MOD (info->extack,"Changing namespace is only supported for reinit action" ); +put_net (dest_net);return -EOPNOTSUPP ; } }
net/ipv4/Kconfig +17 -0
@@ -741,10 +741,27 @@ config DEFAULT_TCP_CONG default "bbr" if DEFAULT_BBR default "cubic" +config TCP_SIGPOOL + tristate + +config TCP_AO + bool "TCP: Authentication Option (RFC5925)" + select CRYPTO + select TCP_SIGPOOL + depends on 64BIT && IPV6 != m # seq-number extension needs WRITE_ONCE(u64) + help + TCP-AO specifies the use of stronger Message Authentication Codes (MACs), + protects against replays for long-lived TCP connections, and + provides more details on the association of security with TCP + connections than TCP MD5 (See RFC5925) + + If unsure, say N. + config TCP_MD5SIG bool "TCP: MD5 Signature Option support (RFC2385)" select CRYPTO select CRYPTO_MD5 + select TCP_SIGPOOL help RFC2385 specifies a method of giving MD5 protection to TCP sessions. Its main (only?) use is to protect BGP sessions between core routers
net/ipv4/Makefile +1 -0
@@ -62,6 +62,7 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o +obj-$(CONFIG_TCP_SIGPOOL) += tcp_sigpool.o obj-$(CONFIG_NET_SOCK_MSG) += tcp_bpf.o obj-$(CONFIG_BPF_SYSCALL) += udp_bpf.o obj-$(CONFIG_NETLABEL) += cipso_ipv4.o
net/ipv4/fib_semantics.c +60 -41
140 lines not on this page · raw message
net/ipv4/inet_connection_sock.c +16 -4
@@ -930,11 +930,23 @@ static struct request_sock *inet_reqsk_clone(struct request_sock *req, nreq->rsk_listener = sk; -/* We need not acquire fastopenq->lock -* because the child socket is locked in inet_csk_listen_stop(). -*/ -if (sk->sk_protocol ==IPPROTO_TCP &&tcp_rsk (nreq)->tfo_listener) +if (sk->sk_protocol ==IPPROTO_TCP &&tcp_rsk (nreq)->tfo_listener) { +struct fastopen_queue *fastopenq; + +/* reqsk_fastopen_remove() will uncharge nreq->rsk_listener, +* that is @sk, so charge it here. Unlike the listener +* being closed, @sk is live and needs its lock. +*/ + fastopenq = &inet_csk (sk)->icsk_accept_queue.fastopenq; +spin_lock_bh (&fastopenq->lock); + fastopenq->qlen++; +spin_unlock_bh (&fastopenq->lock); + +/* We need not acquire fastopenq->lock +* because the child socket is locked in inet_csk_listen_stop(). +*/ rcu_assign_pointer (tcp_sk (nreq->sk)->fastopen_rsk, nreq); + }return nreq; }
net/ipv4/route.c +29 -0
@@ -751,6 +751,35 @@ static void update_or_create_fnhe(struct fib_nh_common *nhc, __be32 daddr,spin_unlock_bh (&fnhe_lock); } +/* Update the PMTU of an exception when: +* - the new MTU of the first hop becomes smaller than the PMTU +* - the old MTU was the same as the PMTU, and it limited discovery of +* larger MTUs on the path. With that limit raised, we can now +* discover larger MTUs +* A special case is locked exceptions, for which the PMTU is smaller +* than the minimal accepted PMTU: +* - if the new MTU is greater than the PMTU, don't make any change +* - otherwise, unlock and set PMTU +* +* fnhe_lock keeps fnhe_pmtu and fnhe_mtu_locked consistent against +* update_or_create_fnhe(), which sets both under the same lock. +*/ +void fnhe_update_pmtu (struct fib_nh_exception *fnhe,u32 new,u32 orig) +{ +spin_lock_bh (&fnhe_lock); + +if (fnhe->fnhe_mtu_locked) { +if (new <= fnhe->fnhe_pmtu) { + fnhe->fnhe_pmtu = new; + fnhe->fnhe_mtu_locked = false; + } + }else if (new < fnhe->fnhe_pmtu || orig == fnhe->fnhe_pmtu) { + fnhe->fnhe_pmtu = new; + } + +spin_unlock_bh (&fnhe_lock); +} +static void __ip_do_redirect (struct rtable *rt,struct sk_buff *skb,struct flowi4 *fl4,bool kill_route) {
net/ipv4/tcp.c +28 -117
50 lines not on this page · raw message
net/ipv4/tcp_ipv4.c +270 -116
386 lines not on this page · raw message
net/ipv4/tcp_sigpool.c new file +357 -0
357 lines not on this page · raw message
net/ipv6/tcp_ipv6.c +27 -33
60 lines not on this page · raw message
net/netfilter/ipset/ip_set_bitmap_gen.h +2 -2
Lines of this file are not shown. View the raw message.
net/netfilter/ipvs/ip_vs_conn.c +12 -29
41 lines not on this page · raw message
net/netfilter/ipvs/ip_vs_core.c +35 -33
68 lines not on this page · raw message
net/netfilter/ipvs/ip_vs_ctl.c +64 -13
77 lines not on this page · raw message
net/netfilter/nf_conntrack_proto_sctp.c +8 -4
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_proto_tcp.c +88 -44
132 lines not on this page · raw message
net/packet/af_packet.c +47 -25
72 lines not on this page · raw message
net/sched/cls_api.c +46 -1
47 lines not on this page · raw message
tools/testing/selftests/bpf/prog_tests/sockmap_listen.c +11 -10
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_maps.c +6 -7
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ftrace/test.d/dynevent/add_remove_eprobe.tc +5 -11
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.