Linux 5.10.217
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.217 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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
------------
Makefile | 2 arch/arm64/boot/dts/qcom/msm8998.dtsi | 8 arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 - arch/arm64/kvm/vgic/vgic-kvm-device.c | 12 arch/mips/include/asm/ptrace.h | 2 arch/mips/kernel/asm-offsets.c | 1 arch/mips/kernel/ptrace.c | 15 - arch/mips/kernel/scall32-o32.S | 23 + arch/mips/kernel/scall64-n32.S | 3 arch/mips/kernel/scall64-n64.S | 3 arch/mips/kernel/scall64-o32.S | 33 +- arch/s390/include/asm/dwarf.h | 1 arch/s390/kernel/vdso64/vdso_user_wrapper.S | 2 arch/s390/mm/gmap.c | 2 arch/s390/mm/hugetlbpage.c | 2 block/blk-iocost.c | 7 drivers/ata/sata_gemini.c | 5 drivers/clk/clk.c | 12 drivers/clk/sunxi-ng/ccu-sun50i-h6.c | 19 + drivers/firewire/nosy.c | 6 drivers/firewire/ohci.c | 6 drivers/gpio/gpio-crystalcove.c | 2 drivers/gpio/gpio-wcove.c | 2 drivers/gpu/drm/nouveau/nouveau_dp.c | 13 - drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 drivers/gpu/host1x/bus.c | 8 drivers/hwmon/corsair-cpro.c | 45 ++- drivers/hwmon/pmbus/ucd9000.c | 6 drivers/iio/accel/mxc4005.c | 24 + drivers/iio/imu/adis16475.c | 4 drivers/md/md.c | 1 drivers/misc/eeprom/at24.c | 46 ++- drivers/misc/mei/hw-me-regs.h | 2 drivers/misc/mei/pci-me.c | 2 drivers/net/dsa/mv88e6xxx/chip.c | 4 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 20 + drivers/net/ethernet/brocade/bna/bnad_debugfs.c | 4 drivers/net/ethernet/chelsio/cxgb4/sge.c | 6 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 3 drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 4 drivers/net/ethernet/qlogic/qede/qede_filter.c | 14 - drivers/net/usb/qmi_wwan.c | 1 drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c | 34 +- drivers/pinctrl/core.c | 8 drivers/pinctrl/devicetree.c | 10 drivers/pinctrl/mediatek/pinctrl-paris.c | 180 +++++--------- drivers/pinctrl/meson/pinctrl-meson-a1.c | 6 drivers/power/supply/rt9455_charger.c | 2 drivers/regulator/core.c | 27 +- drivers/regulator/mt6360-regulator.c | 32 +- drivers/scsi/bnx2fc/bnx2fc_tgt.c | 2 drivers/scsi/lpfc/lpfc.h | 1 drivers/scsi/lpfc/lpfc_scsi.c | 13 - drivers/target/target_core_configfs.c | 12 drivers/usb/core/hub.c | 5 drivers/usb/dwc3/core.c | 90 ++----- drivers/usb/dwc3/core.h | 1 drivers/usb/dwc3/gadget.c | 2 drivers/usb/dwc3/host.c | 27 ++ drivers/usb/gadget/composite.c | 6 drivers/usb/gadget/function/f_fs.c | 2 drivers/usb/host/ohci-hcd.c | 8 drivers/usb/host/xhci-plat.h | 4 drivers/usb/typec/ucsi/ucsi.c | 12 drivers/usb/usbip/usbip_common.h | 1 fs/9p/vfs_file.c | 2 fs/9p/vfs_inode.c | 5 fs/9p/vfs_super.c | 1 fs/btrfs/inode.c | 2 fs/btrfs/send.c | 4 fs/btrfs/transaction.c | 2 fs/btrfs/volumes.c | 17 - fs/gfs2/bmap.c | 5 fs/nfs/client.c | 5 fs/nfs/inode.c | 13 - fs/nfs/internal.h | 2 fs/nfs/netns.h | 2 include/linux/kcov.h | 1 include/linux/sched.h | 1 include/linux/skbuff.h | 15 + include/linux/sunrpc/clnt.h | 1 include/net/xfrm.h | 3 lib/dynamic_debug.c | 6 net/bluetooth/l2cap_core.c | 3 net/bluetooth/sco.c | 4 net/bridge/br_forward.c | 9 net/core/net_namespace.c | 13 - net/core/rtnetlink.c | 2 net/core/skbuff.c | 28 +- net/core/sock.c | 4 net/ipv4/tcp.c | 4 net/ipv4/tcp_input.c | 2 net/ipv4/tcp_ipv4.c | 8 net/ipv4/tcp_output.c | 4 net/ipv4/udp_offload.c | 12 net/ipv4/xfrm4_input.c | 6 net/ipv6/fib6_rules.c | 6 net/ipv6/xfrm6_input.c | 6 net/l2tp/l2tp_eth.c | 3 net/mac80211/ieee80211_i.h | 4 net/mac80211/iface.c | 1 net/mac80211/rx.c | 1 net/nsh/nsh.c | 14 - net/phonet/pn_netlink.c | 2 net/sunrpc/clnt.c | 5 net/tipc/msg.c | 8 net/wireless/nl80211.c | 2 net/wireless/trace.h | 2 net/xfrm/xfrm_input.c | 8 security/keys/key.c | 3 sound/pci/hda/patch_realtek.c | 1 sound/soc/codecs/Kconfig | 18 - sound/soc/generic/Kconfig | 2 sound/soc/intel/boards/Kconfig | 2 sound/soc/meson/Kconfig | 3 sound/soc/pxa/Kconfig | 14 - sound/soc/tegra/tegra186_dspk.c | 7 sound/usb/line6/driver.c | 6 tools/power/x86/turbostat/turbostat.8 | 2 tools/power/x86/turbostat/turbostat.c | 7 tools/testing/selftests/timers/valid-adjtimex.c | 73 ++--- 122 files changed, 757 insertions(+), 510 deletions(-)
Adam Goldman (1):
firewire: ohci: mask bus reset interrupts between ISR and bottom half
Alan Stern (1):
usb: Fix regression caused by invalid ep0 maxpacket in virtual SuperSpeed device
Aleksa Savic (3):
hwmon: (corsair-cpro) Use a separate buffer for sending commands
hwmon: (corsair-cpro) Use complete_all() instead of complete() in ccp_raw_event()
hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock
Alexander Stein (1):
eeprom: at24: Use dev_err_probe for nvmem register failure
Alexander Usyskin (1):
mei: me: add lunar lake point M DID
Aman Dhoot (1):
ALSA: hda/realtek: Fix mute led of HP Laptop 15-da3001TU
Anand Jain (1):
btrfs: return accurate error code on open failure in open_fs_devices()
Andrew Price (1):
gfs2: Fix invalid metadata access in punch_hole
Andy Shevchenko (2):
gpio: wcove: Use -ENOTSUPP consistently
gpio: crystalcove: Use -ENOTSUPP consistently
AngeloGioacchino Del Regno (1):
regulator: mt6360: De-capitalize devicetree regulator subnodes
Arnd Bergmann (1):
power: rt9455: hide unused rt9455_boost_voltage_values
Asbjørn Sloth Tønnesen (4):
net: qede: sanitize 'rc' in qede_add_tc_flower_fltr()
net: qede: use return from qede_parse_flow_attr() for flower
net: qede: use return from qede_parse_flow_attr() for flow_spec
net: qede: use return from qede_parse_actions()
Billy Tsai (1):
pinctrl: pinctrl-aspeed-g6: Fix register offset for pinconf of GPIOR-T
Boris Burkov (2):
btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve
btrfs: always clear PERTRANS metadata during commit
Bui Quang Minh (2):
bna: ensure the copied buf is NUL terminated
octeontx2-af: avoid off-by-one read from userspace
Bumyong Lee (1):
dmaengine: pl330: issue_pending waits until WFP state
Chen Ni (1):
ata: sata_gemini: Check clk_enable() result
Chen-Yu Tsai (3):
pinctrl: mediatek: paris: Rework mtk_pinconf_{get,set} switch/case logic
pinctrl: mediatek: paris: Fix PIN_CONFIG_INPUT_SCHMITT_ENABLE readback
pinctrl: mediatek: paris: Rework support for PIN_CONFIG_{INPUT,OUTPUT}_ENABLE
Chris Wulff (1):
usb: gadget: f_fs: Fix a race condition when processing setup packets.
Christian A. Ehrhardt (2):
usb: typec: ucsi: Check for notifications after init
usb: typec: ucsi: Fix connector check on init
Claudio Imbrenda (2):
s390/mm: Fix storage key clearing for guest huge pages s390/mm: Fix clearing storage keys for huge pages
Dan Carpenter (1):
pinctrl: core: delete incorrect free in pinctrl_enable()
Daniel Okazaki (1):
eeprom: at24: fix memory corruption race condition
David Bauer (1):
net l2tp: drop flow hash on forward
Dmitry Antipov (1):
btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send()
Doug Berger (1):
net: bcmgenet: synchronize use of bcmgenet_set_rx_mode()
Doug Smythies (1):
tools/power turbostat: Fix added raw MSR output
Duoming Zhou (2):
Bluetooth: Fix use-after-free bugs caused by sco_sock_timeout
Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout
Eric Dumazet (3):
tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets
phonet: fix rtm_phonet_notify() skb allocation
ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
Felix Fietkau (3):
net: bridge: fix multicast-to-unicast with fraglist GSO
net: core: reject skb_copy(_expand) for fraglist GSO skbs
net: bridge: fix corrupted ethernet header on multicast-to-unicast
Geert Uytterhoeven (1):
ASoC: Fix 7/8 spaces indentation in Kconfig
Greg Kroah-Hartman (1):
Linux 5.10.217
Guenter Roeck (1):
usb: ohci: Prevent missed ohci interrupts
Hans de Goede (1):
iio: accel: mxc4005: Interrupt handling fixes
Heiner Kallweit (1):
eeprom: at24: Probe for DDR3 thermal sensor in the SPD case
Igor Artemiev (1):
wifi: cfg80211: fix rdev_dump_mpp() arguments order
Jan Dakinevich (1):
pinctrl/meson: fix typo in PDM's pin name
Jeff Johnson (1):
wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
Jeff Layton (1):
9p: explicitly deny setlease attempts
Jens Remus (1):
s390/vdso: Add CFI for RA register to asm macro vdso_func
Jernej Skrabec (1):
clk: sunxi-ng: h6: Reparent CPUX during PLL CPUX rate change
Jerome Brunet (1):
ASoC: meson: cards: select SND_DYNAMIC_MINORS
Jiaxun Yang (1):
MIPS: scall: Save thread_info.syscall unconditionally on entry
Jim Cromie (1):
dyndbg: fix old BUG_ON in >control parser
Joakim Sindholt (3):
fs/9p: only translate RWX permissions for plain 9P2000 fs/9p: translate O_TRUNC into OTRUNC
fs/9p: drop inodes immediately on non-.L too
Johan Hovold (1):
regulator: core: fix debugfs creation regression
Johannes Berg (1):
wifi: nl80211: don't free NULL coalescing rule
John Stultz (1):
selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior
Josef Bacik (3):
sunrpc: add a struct rpc_stats arg to rpc_create_args
nfs: expose /proc/net/sunrpc/nfs in net namespaces
nfs: make the rpc_stat per net namespace
Justin Tee (1):
scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
Kuniyuki Iwashima (3):
nfs: Handle error of rpc_proc_register() in nfs_net_init().
nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
Lakshmi Yadlapati (1):
hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us
Li Nan (1):
md: fix kmemleak of rdev->serial
Lyude Paul (1):
drm/nouveau/dp: Don't probe eDP ports twice harder
Marc Zyngier (1):
KVM: arm64: vgic-v2: Use cpuid from userspace as vcpu_id
Marek Behún (1):
net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341
Maurizio Lombardi (1):
scsi: target: Fix SELinux error when systemd-modules loads the target module
Oliver Upton (1):
KVM: arm64: vgic-v2: Check for non-NULL vCPU in vgic_v2_parse_attr()
Paolo Abeni (1):
tipc: fix UAF in error path
Paul Davey (1):
xfrm: Preserve vlan tags for transport mode software GRO
Peiyang Wang (1):
net: hns3: use appropriate barrier function after setting a bit value
Peng Liu (1):
tools/power turbostat: Fix Bzy_MHz documentation typo
Peter Korsgaard (1):
usb: gadget: composite: fix OS descriptors w_value logic
Phil Elwell (1):
net: bcmgenet: Reset RBUF on first open
Ramona Gradinariu (1):
iio:imu: adis16475: Fix sync mode setting
Richard Gobert (1):
net: gro: add flush check in udp_gro_receive_segment
Rik van Riel (1):
blk-iocost: avoid out of bounds shift
Rob Herring (1):
arm64: dts: qcom: Fix 'interrupt-map' parent address cells
Roded Zats (1):
rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation
Sameer Pujar (1):
ASoC: tegra: Fix DSPK 16-bit playback
Saurav Kashyap (1):
scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
Sebastian Andrzej Siewior (2):
cxgb4: Properly lock TX queue for the selftest.
kcov: Remove kcov include from sched.h and move it to its users.
Silvio Gissi (1):
keys: Fix overwrite of key expiration on instantiation
Stephen Boyd (1):
clk: Don't hold prepare_lock when calling kref_put()
Takashi Iwai (1):
ALSA: line6: Zero-initialize message buffers
Thadeu Lima de Souza Cascardo (1):
net: fix out-of-bounds access in ops_init
Thanassis Avgerinos (1):
firewire: nosy: ensure user_length is taken into account when fetching packet contents
Thierry Reding (1):
gpu: host1x: Do not setup DMA for virtual devices
Thinh Nguyen (2):
usb: xhci-plat: Don't include xhci.h
usb: dwc3: core: Prevent phy suspend during init
Vanillan Wang (1):
net:usb:qmi_wwan: support Rolling modules
Vinod Koul (1):
dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
Xin Long (1):
tipc: fix a possible memleak in tipc_buf_append
Zack Rusin (1):
drm/vmwgfx: Fix invalid reads in fence signaled events
Zeng Heng (1):
pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
linke li (1):
net: mark racy access on sk->sk_rcvbuf
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 216 +SUBLEVEL = 217 EXTRAVERSION = NAME = Dare mighty things
arch/arm64/boot/dts/qcom/msm8998.dtsi +4 -4
@@ -949,10 +949,10 @@ pcie0: pci@1c00000 { interrupts = <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "msi"; interrupt-map-mask = <0 0 0 0x7>; - interrupt-map = <0 0 0 1 &intc 0 135 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 2 &intc 0 136 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 3 &intc 0 138 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 4 &intc 0 139 IRQ_TYPE_LEVEL_HIGH>; + interrupt-map = <0 0 0 1 &intc 0 0 135 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc 0 0 136 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc 0 0 138 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc 0 0 139 IRQ_TYPE_LEVEL_HIGH>; clocks = <&gcc GCC_PCIE_0_PIPE_CLK>, <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
arch/arm64/boot/dts/qcom/sdm845.dtsi +8 -8
@@ -1824,10 +1824,10 @@ pcie0: pci@1c00000 { interrupt-names = "msi"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; - interrupt-map = <0 0 0 1 &intc 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ - <0 0 0 2 &intc 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ - <0 0 0 3 &intc 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ - <0 0 0 4 &intc 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ + interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ + <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ + <0 0 0 3 &intc 0 0 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ + <0 0 0 4 &intc 0 0 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ clocks = <&gcc GCC_PCIE_0_PIPE_CLK>, <&gcc GCC_PCIE_0_AUX_CLK>,
@@ -1928,10 +1928,10 @@ pcie1: pci@1c08000 { interrupt-names = "msi"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; - interrupt-map = <0 0 0 1 &intc 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ - <0 0 0 2 &intc 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ - <0 0 0 3 &intc 0 438 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ - <0 0 0 4 &intc 0 439 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ + interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ + <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ + <0 0 0 3 &intc 0 0 0 438 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ + <0 0 0 4 &intc 0 0 0 439 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ clocks = <&gcc GCC_PCIE_1_PIPE_CLK>, <&gcc GCC_PCIE_1_AUX_CLK>,
arch/arm64/kvm/vgic/vgic-kvm-device.c +4 -8
@@ -284,16 +284,12 @@ int kvm_register_vgic_device(unsigned long type)int vgic_v2_parse_attr (struct kvm_device *dev,struct kvm_device_attr *attr,struct vgic_reg_attr *reg_attr) { -int cpuid; +int cpuid =FIELD_GET (KVM_DEV_ARM_VGIC_CPUID_MASK , attr->attr); - cpuid = (attr->attr &KVM_DEV_ARM_VGIC_CPUID_MASK ) >> -KVM_DEV_ARM_VGIC_CPUID_SHIFT ; - -if (cpuid >=atomic_read (&dev->kvm->online_vcpus)) -return -EINVAL ; - - reg_attr->vcpu =kvm_get_vcpu (dev->kvm, cpuid); reg_attr->addr = attr->attr &KVM_DEV_ARM_VGIC_OFFSET_MASK ; + reg_attr->vcpu =kvm_get_vcpu_by_id (dev->kvm, cpuid); +if (!reg_attr->vcpu) +return -EINVAL ;return 0 ; }
arch/mips/include/asm/ptrace.h +1 -1
@@ -157,7 +157,7 @@ static inline long regs_return_value(struct pt_regs *regs)#define instruction_pointer (regs) ((regs)->cp0_epc)#define profile_pc (regs) instruction_pointer(regs) -extern asmlinkage long syscall_trace_enter (struct pt_regs *regs,long syscall); +extern asmlinkage long syscall_trace_enter (struct pt_regs *regs); extern asmlinkage void syscall_trace_leave(struct pt_regs *regs);extern void die (const char *,struct pt_regs *)__noreturn ;
arch/mips/kernel/asm-offsets.c +1 -0
@@ -100,6 +100,7 @@ void output_thread_info_defines(void)OFFSET (TI_PRE_COUNT , thread_info, preempt_count);OFFSET (TI_ADDR_LIMIT , thread_info, addr_limit);OFFSET (TI_REGS , thread_info, regs); +OFFSET (TI_SYSCALL , thread_info, syscall);DEFINE (_THREAD_SIZE,THREAD_SIZE );DEFINE (_THREAD_MASK,THREAD_MASK );DEFINE (_IRQ_STACK_SIZE,IRQ_STACK_SIZE );
arch/mips/kernel/ptrace.c +6 -9
@@ -1310,16 +1310,13 @@ long arch_ptrace(struct task_struct *child, long request,* Notification of system call entry/exit * - triggered by current->work.syscall_trace */ -asmlinkage long syscall_trace_enter (struct pt_regs *regs,long syscall) +asmlinkage long syscall_trace_enter (struct pt_regs *regs) {user_exit (); -current_thread_info ()->syscall = syscall; -if (test_thread_flag (TIF_SYSCALL_TRACE )) {if (tracehook_report_syscall_entry (regs))return -1 ; - syscall =current_thread_info ()->syscall; }#ifdef CONFIG_SECCOMP
@@ -1328,7 +1325,7 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall)struct seccomp_data sd;unsigned long args[6 ]; - sd.nr = syscall; + sd.nr =current_thread_info ()->syscall; sd.arch =syscall_get_arch (current);syscall_get_arguments (current, regs, args);for (i =0 ; i <6 ; i++)
@@ -1338,23 +1335,23 @@ asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall) ret =__secure_computing (&sd);if (ret ==-1 )return ret; - syscall = current_thread_info()->syscall; }#endif if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT )))trace_sys_enter (regs, regs->regs[2 ]); -audit_syscall_entry (syscall, regs->regs[4 ], regs->regs[5 ], +audit_syscall_entry (current_thread_info ()->syscall, + regs->regs[4 ], regs->regs[5 ], regs->regs[6 ], regs->regs[7 ]);/* * Negative syscall numbers are mistaken for rejected syscalls, but * won't have had the return value set appropriately, so we do so now. */ -if (syscall <0 ) +if (current_thread_info ()->syscall <0 )syscall_set_return_value (current, regs, -ENOSYS ,0 ); -return syscall; +return current_thread_info ()->syscall; }/*
arch/mips/kernel/scall32-o32.S +13 -10
@@ -80,6 +80,18 @@ loads_done: PTR load_a7, bad_stack_a7 .previous + /* + * syscall number is in v0 unless we called syscall(__NR_###) + * where the real syscall number is in a0 + */ + subu t2, v0, __NR_O32_Linux + bnez t2, 1f /* __NR_syscall at offset 0 */ + LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number + b 2f +1: + LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number +2: + lw t0, TI_FLAGS($28) # syscall tracing enabled? li t1, _TIF_WORK_SYSCALL_ENTRY and t0, t1
@@ -117,16 +129,7 @@ syscall_trace_entry: SAVE_STATIC move a0, sp - /* - * syscall number is in v0 unless we called syscall(__NR_###) - * where the real syscall number is in a0 - */ - move a1, v0 - subu t2, v0, __NR_O32_Linux - bnez t2, 1f /* __NR_syscall at offset 0 */ - lw a1, PT_R4(sp) - -1: jal syscall_trace_enter + jal syscall_trace_enter bltz v0, 1f # seccomp failed? Skip syscall
arch/mips/kernel/scall64-n32.S +2 -1
@@ -44,6 +44,8 @@ NESTED(handle_sysn32, PT_SIZE, sp) sd a3, PT_R26(sp) # save a3 for syscall restarting + LONG_S v0, TI_SYSCALL($28) # Store syscall number + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0
@@ -72,7 +74,6 @@ syscall_common: n32_syscall_trace_entry: SAVE_STATIC move a0, sp - move a1, v0 jal syscall_trace_enter bltz v0, 1f # seccomp failed? Skip syscall
arch/mips/kernel/scall64-n64.S +2 -1
@@ -47,6 +47,8 @@ NESTED(handle_sys64, PT_SIZE, sp) sd a3, PT_R26(sp) # save a3 for syscall restarting + LONG_S v0, TI_SYSCALL($28) # Store syscall number + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0
@@ -83,7 +85,6 @@ n64_syscall_exit: syscall_trace_entry: SAVE_STATIC move a0, sp - move a1, v0 jal syscall_trace_enter bltz v0, 1f # seccomp failed? Skip syscall
arch/mips/kernel/scall64-o32.S +17 -16
@@ -79,6 +79,22 @@ loads_done: PTR load_a7, bad_stack_a7 .previous + /* + * absolute syscall number is in v0 unless we called syscall(__NR_###) + * where the real syscall number is in a0 + * note: NR_syscall is the first O32 syscall but the macro is + * only defined when compiling with -mabi=32 (CONFIG_32BIT) + * therefore __NR_O32_Linux is used (4000) + */ + + subu t2, v0, __NR_O32_Linux + bnez t2, 1f /* __NR_syscall at offset 0 */ + LONG_S a0, TI_SYSCALL($28) # Save a0 as syscall number + b 2f +1: + LONG_S v0, TI_SYSCALL($28) # Save v0 as syscall number +2: + li t1, _TIF_WORK_SYSCALL_ENTRY LONG_L t0, TI_FLAGS($28) # syscall tracing enabled? and t0, t1, t0
@@ -113,22 +129,7 @@ trace_a_syscall: sd a7, PT_R11(sp) # For indirect syscalls move a0, sp - /* - * absolute syscall number is in v0 unless we called syscall(__NR_###) - * where the real syscall number is in a0 - * note: NR_syscall is the first O32 syscall but the macro is - * only defined when compiling with -mabi=32 (CONFIG_32BIT) - * therefore __NR_O32_Linux is used (4000) - */ - .set push - .set reorder - subu t1, v0, __NR_O32_Linux - move a1, v0 - bnez t1, 1f /* __NR_syscall at offset 0 */ - ld a1, PT_R4(sp) /* Arg1 for __NR_syscall case */ - .set pop - -1: jal syscall_trace_enter + jal syscall_trace_enter bltz v0, 1f # seccomp failed? Skip syscall
arch/s390/include/asm/dwarf.h +1 -0
@@ -9,6 +9,7 @@#define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset#define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset#define CFI_RESTORE .cfi_restore +#define CFI_REL_OFFSET .cfi_rel_offset#ifdef CONFIG_AS_CFI_VAL_OFFSET #define CFI_VAL_OFFSET .cfi_val_offset
arch/s390/kernel/vdso64/vdso_user_wrapper.S +2 -0
@@ -23,8 +23,10 @@ __kernel_\func: CFI_DEF_CFA_OFFSET (STACK_FRAME_OVERHEAD + WRAPPER_FRAME_SIZE) CFI_VAL_OFFSET 15, -STACK_FRAME_OVERHEAD stg %r14,STACK_FRAME_OVERHEAD(%r15) + CFI_REL_OFFSET 14, STACK_FRAME_OVERHEAD brasl %r14,__s390_vdso_\func lg %r14,STACK_FRAME_OVERHEAD(%r15) + CFI_RESTORE 14 aghi %r15,WRAPPER_FRAME_SIZE CFI_DEF_CFA_OFFSET STACK_FRAME_OVERHEAD CFI_RESTORE 15
arch/s390/mm/gmap.c +1 -1
@@ -2627,7 +2627,7 @@ static int __s390_enable_skey_hugetlb(pte_t *pte, unsigned long addr,return 0 ; start =pmd_val (*pmd) &HPAGE_MASK ; - end = start +HPAGE_SIZE -1 ; + end = start +HPAGE_SIZE ;__storage_key_init_range (start, end);set_bit (PG_arch_1, &page->flags);cond_resched ();
arch/s390/mm/hugetlbpage.c +1 -1
@@ -146,7 +146,7 @@ static void clear_huge_pte_skeys(struct mm_struct *mm, unsigned long rste) }if (!test_and_set_bit (PG_arch_1, &page->flags)) -__storage_key_init_range (paddr, paddr + size -1 ); +__storage_key_init_range (paddr, paddr + size); } void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
block/blk-iocost.c +4 -3
@@ -1290,7 +1290,7 @@ static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now) {struct ioc *ioc = iocg->ioc;struct blkcg_gq *blkg =iocg_to_blkg (iocg); -u64 tdelta, delay, new_delay; +u64 tdelta, delay, new_delay, shift;s64 vover, vover_pct;u32 hwa;
@@ -1305,8 +1305,9 @@ static bool iocg_kick_delay(struct ioc_gq *iocg, struct ioc_now *now)/* calculate the current delay in effect - 1/2 every second */ tdelta = now->now - iocg->delay_at; -if (iocg->delay) - delay = iocg->delay >>div64_u64 (tdelta,USEC_PER_SEC ); + shift =div64_u64 (tdelta,USEC_PER_SEC ); +if (iocg->delay && shift <BITS_PER_LONG ) + delay = iocg->delay >> shift;else delay =0 ;
drivers/ata/sata_gemini.c +4 -1
@@ -201,7 +201,10 @@ int gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge) pclk = sg->sata0_pclk; else pclk = sg->sata1_pclk; -clk_enable (pclk); + ret =clk_enable (pclk); +if (ret) +return ret; +msleep (10 );/* Do not keep clocking a bridge that is not online */
drivers/clk/clk.c +5 -7
@@ -4186,7 +4186,8 @@ void clk_unregister(struct clk *clk)if (ops == &clk_nodrv_ops) {pr_err ("%s: unregistered clock: %s\n" , __func__, clk->core->name); - goto unlock; +clk_prepare_unlock (); +return ; }/* * Assign empty clock ops for consumers that might still hold
@@ -4220,11 +4221,10 @@ void clk_unregister(struct clk *clk)if (clk->core->protect_count)pr_warn ("%s: unregistering protected clock: %s\n" , __func__, clk->core->name); +clk_prepare_unlock ();kref_put (&clk->core->ref, __clk_release);free_clk (clk); -unlock: -clk_prepare_unlock (); }EXPORT_SYMBOL_GPL (clk_unregister);
@@ -4387,13 +4387,11 @@ void __clk_put(struct clk *clk) clk->max_rate < clk->core->req_rate)clk_core_set_rate_nolock (clk->core, clk->core->req_rate); - owner = clk->core->owner; -kref_put (&clk->core->ref, __clk_release); -clk_prepare_unlock (); + owner = clk->core->owner; +kref_put (&clk->core->ref, __clk_release);module_put (owner); -free_clk (clk); }
drivers/clk/sunxi-ng/ccu-sun50i-h6.c +17 -2
@@ -1181,12 +1181,19 @@ static const u32 usb2_clk_regs[] = { SUN50I_H6_USB3_CLK_REG, }; +static struct ccu_mux_nb sun50i_h6_cpu_nb = { + .common = &cpux_clk.common, + .cm = &cpux_clk.mux, + .delay_us =1 , + .bypass_index =0 ,/* index of 24 MHz oscillator */ +}; +static int sun50i_h6_ccu_probe (struct platform_device *pdev) {struct resource *res;void __iomem *reg; +int i, ret;u32 val; -int i; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); reg =devm_ioremap_resource (&pdev->dev, res);
@@ -1240,7 +1247,15 @@ static int sun50i_h6_ccu_probe(struct platform_device *pdev) val |=BIT (24 );writel (val, reg +SUN50I_H6_HDMI_CEC_CLK_REG ); -return sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_h6_ccu_desc); + ret =sunxi_ccu_probe (pdev->dev.of_node, reg, &sun50i_h6_ccu_desc); +if (ret) +return ret; + +/* Reparent CPU during PLL CPUX rate changes */ +ccu_mux_notifier_register (pll_cpux_clk.common.hw.clk, + &sun50i_h6_cpu_nb); + +return 0 ; }static const struct of_device_id sun50i_h6_ccu_ids[] = {
drivers/firewire/nosy.c +4 -2
@@ -148,10 +148,12 @@ packet_buffer_get(struct client *client, char __user *data, size_t user_length)if (atomic_read (&buffer->size) ==0 )return -ENODEV ; -/* FIXME: Check length <= user_length. */ + length = buffer->head->length; + +if (length > user_length) +return 0 ; end = buffer->data + buffer->capacity; - length = buffer->head->length;if (&buffer->head->data[length] < end) {if (copy_to_user (data, buffer->head->data, length))
drivers/firewire/ohci.c +5 -1
@@ -2049,6 +2049,8 @@ static void bus_reset_work(struct work_struct *work) ohci->generation = generation;reg_write (ohci, OHCI1394_IntEventClear, OHCI1394_busReset); +if (param_debug &OHCI_PARAM_DEBUG_BUSRESETS ) +reg_write (ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);if (ohci->quirks &QUIRK_RESET_PACKET ) ohci->request_generation = generation;
@@ -2115,12 +2117,14 @@ static irqreturn_t irq_handler(int irq, void *data)return IRQ_NONE ;/* -* busReset and postedWriteErr must not be cleared yet +* busReset and postedWriteErr events must not be cleared yet * (OHCI 1.1 clauses 7.2.3.2 and 13.2.8.1) */ reg_write (ohci, OHCI1394_IntEventClear, event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr));log_irqs (ohci, event); +if (event & OHCI1394_busReset) +reg_write (ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);if (event & OHCI1394_selfIDComplete)queue_work (selfid_workqueue, &ohci->bus_reset_work);
drivers/gpio/gpio-crystalcove.c +1 -1
@@ -91,7 +91,7 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)case 0x5e :return GPIOPANELCTL ;default : -return -EOPNOTSUPP ; +return -ENOTSUPP ; } }
drivers/gpio/gpio-wcove.c +1 -1
@@ -102,7 +102,7 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)unsigned int reg;if (gpio >=WCOVE_GPIO_NUM ) -return -EOPNOTSUPP ; +return -ENOTSUPP ;if (reg_type ==CTRL_IN ) reg =GPIO_IN_CTRL_BASE + gpio;
drivers/gpu/drm/nouveau/nouveau_dp.c +8 -5
@@ -109,12 +109,15 @@ nouveau_dp_detect(struct nouveau_connector *nv_connector,u8 *dpcd = nv_encoder->dp.dpcd;int ret =NOUVEAU_DP_NONE ; -/* If we've already read the DPCD on an eDP device, we don't need to -* reread it as it won't change +/* eDP ports don't support hotplugging - so there's no point in probing eDP ports unless we +* haven't probed them once before. */ -if (connector->connector_type == DRM_MODE_CONNECTOR_eDP && - dpcd[DP_DPCD_REV ] !=0 ) -return NOUVEAU_DP_SST ; +if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { +if (connector->status == connector_status_connected) +return NOUVEAU_DP_SST ; +else if (connector->status == connector_status_disconnected) +return NOUVEAU_DP_NONE ; + }mutex_lock (&nv_encoder->dp.hpd_irq_lock);if (mstm) {
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
@@ -1066,7 +1066,7 @@ static int vmw_event_fence_action_create(struct drm_file *file_priv, } event->event.base.type =DRM_VMW_EVENT_FENCE_SIGNALED ; - event->event.base.length =sizeof (*event); + event->event.base.length =sizeof (event->event); event->event.user_data = user_data; ret =drm_event_reserve_init (dev, file_priv, &event->base, &event->event.base);
drivers/gpu/host1x/bus.c +0 -8
@@ -335,11 +335,6 @@ static int host1x_device_uevent(struct device *dev,return 0 ; } -static int host1x_dma_configure (struct device *dev) -{ -return of_dma_configure (dev, dev->of_node, true); -} -static const struct dev_pm_ops host1x_device_pm_ops = { .suspend = pm_generic_suspend, .resume = pm_generic_resume,
@@ -353,7 +348,6 @@ struct bus_type host1x_bus_type = { .name = "host1x", .match = host1x_device_match, .uevent = host1x_device_uevent, - .dma_configure = host1x_dma_configure, .pm = &host1x_device_pm_ops, };
@@ -442,8 +436,6 @@ static int host1x_device_add(struct host1x *host1x, device->dev.bus = &host1x_bus_type; device->dev.parent = host1x->dev; -of_dma_configure (&device->dev, host1x->dev->of_node, true); - device->dev.dma_parms = &device->dma_parms;dma_set_max_seg_size (&device->dev,UINT_MAX );
drivers/hwmon/corsair-cpro.c +32 -13
86 lines not on this page · raw message
drivers/hwmon/pmbus/ucd9000.c +3 -3
@@ -80,11 +80,11 @@ struct ucd9000_debugfs_entry {* It has been observed that the UCD90320 randomly fails register access when * doing another access right on the back of a register write. To mitigate this * make sure that there is a minimum delay between a write access and the -* following access. The 250us is based on experimental data. At a delay of -* 200us the issue seems to go away. Add a bit of extra margin to allow for +* following access. The 500 is based on experimental data. At a delay of +* 350us the issue seems to go away. Add a bit of extra margin to allow for * system to system differences. */ -#define UCD90320_WAIT_DELAY_US 250 +#define UCD90320_WAIT_DELAY_US 500static inline void ucd90320_wait (const struct ucd9000_data *data) {
drivers/iio/accel/mxc4005.c +17 -7
@@ -27,9 +27,13 @@#define MXC4005_REG_ZOUT_UPPER 0x07#define MXC4005_REG_ZOUT_LOWER 0x08 +#define MXC4005_REG_INT_MASK0 0x0A +#define MXC4005_REG_INT_MASK1 0x0B#define MXC4005_REG_INT_MASK1_BIT_DRDYE 0x01 +#define MXC4005_REG_INT_CLR0 0x00 +#define MXC4005_REG_INT_CLR1 0x01#define MXC4005_REG_INT_CLR1_BIT_DRDYC 0x01
@@ -113,7 +117,9 @@ static bool mxc4005_is_readable_reg(struct device *dev, unsigned int reg)static bool mxc4005_is_writeable_reg (struct device *dev,unsigned int reg) {switch (reg) { +case MXC4005_REG_INT_CLR0 :case MXC4005_REG_INT_CLR1 : +case MXC4005_REG_INT_MASK0 :case MXC4005_REG_INT_MASK1 :case MXC4005_REG_CONTROL :return true;
@@ -334,17 +340,13 @@ static int mxc4005_set_trigger_state(struct iio_trigger *trig, {struct iio_dev *indio_dev =iio_trigger_get_drvdata (trig);struct mxc4005_data *data =iio_priv (indio_dev); +unsigned int val;int ret;mutex_lock (&data->mutex); -if (state) { - ret =regmap_write (data->regmap,MXC4005_REG_INT_MASK1 , -MXC4005_REG_INT_MASK1_BIT_DRDYE ); - }else { - ret =regmap_write (data->regmap,MXC4005_REG_INT_MASK1 , - ~MXC4005_REG_INT_MASK1_BIT_DRDYE ); - } + val = state ?MXC4005_REG_INT_MASK1_BIT_DRDYE :0 ; + ret =regmap_write (data->regmap,MXC4005_REG_INT_MASK1 , val);if (ret <0 ) {mutex_unlock (&data->mutex);dev_err (data->dev,"failed to update reg_int_mask1" );
@@ -386,6 +388,14 @@ static int mxc4005_chip_init(struct mxc4005_data *data)dev_dbg (data->dev,"MXC4005 chip id %02x\n" , reg); + ret =regmap_write (data->regmap,MXC4005_REG_INT_MASK0 ,0 ); +if (ret <0 ) +return dev_err_probe (data->dev, ret,"writing INT_MASK0\n" ); + + ret =regmap_write (data->regmap,MXC4005_REG_INT_MASK1 ,0 ); +if (ret <0 ) +return dev_err_probe (data->dev, ret,"writing INT_MASK1\n" ); +return 0 ; }
drivers/iio/imu/adis16475.c +3 -1
@@ -1070,6 +1070,7 @@ static int adis16475_config_sync_mode(struct adis16475 *st)struct device *dev = &st->adis.spi->dev;const struct adis16475_sync *sync;u32 sync_mode; +u16 val;/* default to internal clk */ st->clk_freq = st->info->int_clk *1000 ;
@@ -1155,8 +1156,9 @@ static int adis16475_config_sync_mode(struct adis16475 *st)* I'm keeping this for simplicity and avoiding extra variables * in chip_info. */ + val =ADIS16475_SYNC_MODE (sync->sync_mode); ret =__adis_update_bits (&st->adis,ADIS16475_REG_MSG_CTRL , -ADIS16475_SYNC_MODE_MASK , sync->sync_mode); +ADIS16475_SYNC_MODE_MASK , val);if (ret)return ret;
drivers/md/md.c +1 -0
@@ -2532,6 +2532,7 @@ static int bind_rdev_to_array(struct md_rdev *rdev, struct mddev *mddev) fail:pr_warn ("md: failed to register dev-%s for %s\n" , b,mdname (mddev)); +mddev_destroy_serial_pool (mddev, rdev, false);return err; }
drivers/misc/eeprom/at24.c +38 -8
64 lines not on this page · raw message
drivers/misc/mei/hw-me-regs.h +2 -0
@@ -115,6 +115,8 @@#define MEI_DEV_ID_ARL_S 0x7F68/* Arrow Lake Point S */ #define MEI_DEV_ID_ARL_H 0x7770/* Arrow Lake Point H */ +#define MEI_DEV_ID_LNL_M 0xA870/* Lunar Lake Point M */ +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +2 -0
@@ -121,6 +121,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_ARL_S, MEI_ME_PCH15_CFG)}, {MEI_PCI_DEVICE(MEI_DEV_ID_ARL_H, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_LNL_M, MEI_ME_PCH15_CFG)}, +/* required last entry */ {0, } };
drivers/net/dsa/mv88e6xxx/chip.c +2 -2
@@ -4650,7 +4650,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6141, .family = MV88E6XXX_FAMILY_6341, .name = "Marvell 88E6141", - .num_databases = 4096, + .num_databases = 256, .num_macs = 2048, .num_ports = 6, .num_internal_phys = 5,
@@ -5056,7 +5056,7 @@ static const struct mv88e6xxx_info mv88e6xxx_table[] = { .prod_num = MV88E6XXX_PORT_SWITCH_ID_PROD_6341, .family = MV88E6XXX_FAMILY_6341, .name = "Marvell 88E6341", - .num_databases = 4096, + .num_databases = 256, .num_macs = 2048, .num_internal_phys = 5, .num_ports = 6,
drivers/net/ethernet/broadcom/genet/bcmgenet.c +15 -5
@@ -2,7 +2,7 @@/* * Broadcom GENET (Gigabit Ethernet) controller driver * -* Copyright (c) 2014-2020 Broadcom +* Copyright (c) 2014-2024 Broadcom */ #define pr_fmt (fmt) "bcmgenet: " fmt
@@ -3252,7 +3252,7 @@ static void bcmgenet_get_hw_addr(struct bcmgenet_priv *priv, }/* Returns a reusable dma control register value */ -static u32 bcmgenet_dma_disable (struct bcmgenet_priv *priv) +static u32 bcmgenet_dma_disable (struct bcmgenet_priv *priv,bool flush_rx) {unsigned int i;u32 reg;
@@ -3277,6 +3277,14 @@ static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)udelay (10 );bcmgenet_umac_writel (priv,0 ,UMAC_TX_FLUSH ); +if (flush_rx) { + reg =bcmgenet_rbuf_ctrl_get (priv); +bcmgenet_rbuf_ctrl_set (priv, reg |BIT (0 )); +udelay (10 ); +bcmgenet_rbuf_ctrl_set (priv, reg); +udelay (10 ); + } +return dma_ctrl; }
@@ -3298,7 +3306,9 @@ static void bcmgenet_netif_start(struct net_device *dev)struct bcmgenet_priv *priv =netdev_priv (dev);/* Start the network engine */ +netif_addr_lock_bh (dev);bcmgenet_set_rx_mode (dev); +netif_addr_unlock_bh (dev);bcmgenet_enable_rx_napi (priv);umac_enable_set (priv,CMD_TX_EN |CMD_RX_EN , true);
@@ -3340,8 +3350,8 @@ static int bcmgenet_open(struct net_device *dev)bcmgenet_set_hw_addr (priv, dev->dev_addr); -/* Disable RX/TX DMA and flush TX queues */ - dma_ctrl =bcmgenet_dma_disable (priv); +/* Disable RX/TX DMA and flush TX and RX queues */ + dma_ctrl =bcmgenet_dma_disable (priv, true);/* Reinitialize TDMA and RDMA and SW housekeeping */ ret =bcmgenet_init_dma (priv);
@@ -4199,7 +4209,7 @@ static int bcmgenet_resume(struct device *d)bcmgenet_hfb_create_rxnfc_filter (priv, rule);/* Disable RX/TX DMA and flush TX queues */ - dma_ctrl =bcmgenet_dma_disable (priv); + dma_ctrl =bcmgenet_dma_disable (priv, false);/* Reinitialize TDMA and RDMA and SW housekeeping */ ret =bcmgenet_init_dma (priv);
drivers/net/ethernet/brocade/bna/bnad_debugfs.c +2 -2
@@ -312,7 +312,7 @@ bnad_debugfs_write_regrd(struct file *file, const char __user *buf,void *kern_buf;/* Copy the user space buf */ - kern_buf =memdup_user (buf, nbytes); + kern_buf =memdup_user_nul (buf, nbytes);if (IS_ERR (kern_buf))return PTR_ERR (kern_buf);
@@ -372,7 +372,7 @@ bnad_debugfs_write_regwr(struct file *file, const char __user *buf,void *kern_buf;/* Copy the user space buf */ - kern_buf =memdup_user (buf, nbytes); + kern_buf =memdup_user_nul (buf, nbytes);if (IS_ERR (kern_buf))return PTR_ERR (kern_buf);
drivers/net/ethernet/chelsio/cxgb4/sge.c +3 -3
@@ -2678,12 +2678,12 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev) lb->loopback =1 ; q = &adap->sge.ethtxq[pi->first_qset]; -__netif_tx_lock (q->txq,smp_processor_id ()); +__netif_tx_lock_bh (q->txq);reclaim_completed_tx (adap, &q->q,-1 , true); credits =txq_avail (&q->q) - ndesc;if (unlikely (credits <0 )) { -__netif_tx_unlock (q->txq); +__netif_tx_unlock_bh (q->txq);return -ENOMEM ; }
@@ -2718,7 +2718,7 @@ int cxgb4_selftest_lb_pkt(struct net_device *netdev)init_completion (&lb->completion);txq_advance (&q->q, ndesc);cxgb4_ring_tx_db (adap, &q->q, ndesc); -__netif_tx_unlock (q->txq); +__netif_tx_unlock_bh (q->txq);/* wait for the pkt to return */ ret =wait_for_completion_timeout (&lb->completion,10 *HZ );
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +1 -2
@@ -7005,8 +7005,7 @@ static void hclge_set_timer_task(struct hnae3_handle *handle, bool enable)/* Set the DOWN flag here to disable link updating */ set_bit (HCLGE_STATE_DOWN , &hdev->state); -/* flush memory to make sure DOWN is seen by service task */ -smp_mb__before_atomic (); +smp_mb__after_atomic ();/* flush memory to make sure DOWN is seen by service task */ hclge_flush_link_update (hdev); } }
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +1 -2
@@ -2583,8 +2583,7 @@ static void hclgevf_set_timer_task(struct hnae3_handle *handle, bool enable) }else {set_bit (HCLGEVF_STATE_DOWN , &hdev->state); -/* flush memory to make sure DOWN is seen by service task */ -smp_mb__before_atomic (); +smp_mb__after_atomic ();/* flush memory to make sure DOWN is seen by service task */ hclgevf_flush_link_update (hdev); } }
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c +1 -3
@@ -420,12 +420,10 @@ static ssize_t rvu_dbg_qsize_write(struct file *filp,u16 pcifunc;int ret, lf; - cmd_buf =memdup_user (buffer, count +1 ); + cmd_buf =memdup_user_nul (buffer, count);if (IS_ERR (cmd_buf))return -ENOMEM ; - cmd_buf[count] ='\0' ; - cmd_buf_tmp =strchr (cmd_buf,'\n' );if (cmd_buf_tmp) { *cmd_buf_tmp ='\0' ;
drivers/net/ethernet/qlogic/qede/qede_filter.c +8 -6
@@ -1877,8 +1877,8 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, struct flow_cls_offload *f) {struct qede_arfs_fltr_node *n; -int min_hlen, rc = -EINVAL ;struct qede_arfs_tuple t; +int min_hlen, rc;__qede_lock (edev);
@@ -1888,7 +1888,8 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, }/* parse flower attribute and prepare filter */ -if (qede_parse_flow_attr (edev, proto, f->rule, &t)) + rc =qede_parse_flow_attr (edev, proto, f->rule, &t); +if (rc) goto unlock;/* Validate profile mode and number of filters */
@@ -1897,11 +1898,13 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto,DP_NOTICE (edev,"Filter configuration invalidated, filter mode=0x%x, configured mode=0x%x, filter count=0x%x\n" , t.mode, edev->arfs->mode, edev->arfs->filter_count); + rc = -EINVAL ; goto unlock; }/* parse tc actions and get the vf_id */ -if (qede_parse_actions (edev, &f->rule->action, f->common.extack)) + rc =qede_parse_actions (edev, &f->rule->action, f->common.extack); +if (rc) goto unlock;if (qede_flow_find_fltr (edev, &t)) {
@@ -2007,10 +2010,9 @@ static int qede_flow_spec_to_rule(struct qede_dev *edev,if (IS_ERR (flow))return PTR_ERR (flow); -if (qede_parse_flow_attr (edev, proto, flow->rule, t)) { - err = -EINVAL ; + err =qede_parse_flow_attr (edev, proto, flow->rule, t); +if (err) goto err_out; - }/* Make sure location is valid and filter isn't already set */ err = qede_flow_spec_validate(edev, &flow->rule->action, t,
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1358,6 +1358,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0489, 0xe0b5, 0)}, /* Foxconn T77W968 LTE with eSIM support*/ {QMI_FIXED_INTF(0x2692, 0x9025, 4)}, /* Cellient MPL200 (rebranded Qualcomm 05c6:9025) */ {QMI_QUIRK_SET_DTR(0x1546, 0x1342, 4)}, /* u-blox LARA-L6 */ + {QMI_QUIRK_SET_DTR(0x33f8, 0x0104, 4)}, /* Rolling RW101 RMNET *//* 4. Gobi 1000 devices */ {QMI_GOBI1K_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c +17 -17
@@ -43,7 +43,7 @@#define SCU614 0x614/* Disable GPIO Internal Pull-Down #1 */ #define SCU618 0x618/* Disable GPIO Internal Pull-Down #2 */ #define SCU61C 0x61c/* Disable GPIO Internal Pull-Down #3 */ -#define SCU620 0x620/* Disable GPIO Internal Pull-Down #4 */ +#define SCU630 0x630/* Disable GPIO Internal Pull-Down #4 */ #define SCU634 0x634/* Disable GPIO Internal Pull-Down #5 */ #define SCU638 0x638/* Disable GPIO Internal Pull-Down #6 */ #define SCU694 0x694/* Multi-function Pin Control #25 */
@@ -2471,38 +2471,38 @@ static struct aspeed_pin_config aspeed_g6_configs[] = {ASPEED_PULL_DOWN_PINCONF (D14 ,SCU61C ,0 ),/* GPIOS7 */ -ASPEED_PULL_DOWN_PINCONF (T24 ,SCU620 ,23 ), +ASPEED_PULL_DOWN_PINCONF (T24 ,SCU630 ,23 ),/* GPIOS6 */ -ASPEED_PULL_DOWN_PINCONF (P23 ,SCU620 ,22 ), +ASPEED_PULL_DOWN_PINCONF (P23 ,SCU630 ,22 ),/* GPIOS5 */ -ASPEED_PULL_DOWN_PINCONF (P24 ,SCU620 ,21 ), +ASPEED_PULL_DOWN_PINCONF (P24 ,SCU630 ,21 ),/* GPIOS4 */ -ASPEED_PULL_DOWN_PINCONF (R26 ,SCU620 ,20 ), +ASPEED_PULL_DOWN_PINCONF (R26 ,SCU630 ,20 ),/* GPIOS3*/ -ASPEED_PULL_DOWN_PINCONF (R24 ,SCU620 ,19 ), +ASPEED_PULL_DOWN_PINCONF (R24 ,SCU630 ,19 ),/* GPIOS2 */ -ASPEED_PULL_DOWN_PINCONF (T26 ,SCU620 ,18 ), +ASPEED_PULL_DOWN_PINCONF (T26 ,SCU630 ,18 ),/* GPIOS1 */ -ASPEED_PULL_DOWN_PINCONF (T25 ,SCU620 ,17 ), +ASPEED_PULL_DOWN_PINCONF (T25 ,SCU630 ,17 ),/* GPIOS0 */ -ASPEED_PULL_DOWN_PINCONF (R23 ,SCU620 ,16 ), +ASPEED_PULL_DOWN_PINCONF (R23 ,SCU630 ,16 ),/* GPIOR7 */ -ASPEED_PULL_DOWN_PINCONF (U26 ,SCU620 ,15 ), +ASPEED_PULL_DOWN_PINCONF (U26 ,SCU630 ,15 ),/* GPIOR6 */ -ASPEED_PULL_DOWN_PINCONF (W26 ,SCU620 ,14 ), +ASPEED_PULL_DOWN_PINCONF (W26 ,SCU630 ,14 ),/* GPIOR5 */ -ASPEED_PULL_DOWN_PINCONF (T23 ,SCU620 ,13 ), +ASPEED_PULL_DOWN_PINCONF (T23 ,SCU630 ,13 ),/* GPIOR4 */ -ASPEED_PULL_DOWN_PINCONF (U25 ,SCU620 ,12 ), +ASPEED_PULL_DOWN_PINCONF (U25 ,SCU630 ,12 ),/* GPIOR3*/ -ASPEED_PULL_DOWN_PINCONF (V26 ,SCU620 ,11 ), +ASPEED_PULL_DOWN_PINCONF (V26 ,SCU630 ,11 ),/* GPIOR2 */ -ASPEED_PULL_DOWN_PINCONF (V24 ,SCU620 ,10 ), +ASPEED_PULL_DOWN_PINCONF (V24 ,SCU630 ,10 ),/* GPIOR1 */ -ASPEED_PULL_DOWN_PINCONF (U24 ,SCU620 ,9 ), +ASPEED_PULL_DOWN_PINCONF (U24 ,SCU630 ,9 ),/* GPIOR0 */ -ASPEED_PULL_DOWN_PINCONF (V25 ,SCU620 ,8 ), +ASPEED_PULL_DOWN_PINCONF (V25 ,SCU630 ,8 ),/* GPIOX7 */ ASPEED_PULL_DOWN_PINCONF(AB10, SCU634, 31),
drivers/pinctrl/core.c +1 -7
@@ -2075,13 +2075,7 @@ int pinctrl_enable(struct pinctrl_dev *pctldev) error =pinctrl_claim_hogs (pctldev);if (error) { -dev_err (pctldev->dev,"could not claim hogs: %i\n" , - error); -pinctrl_free_pindescs (pctldev, pctldev->desc->pins, - pctldev->desc->npins); -mutex_destroy (&pctldev->mutex); -kfree (pctldev); - +dev_err (pctldev->dev,"could not claim hogs: %i\n" , error);return error; }
drivers/pinctrl/devicetree.c +6 -4
@@ -220,14 +220,16 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)for (state =0 ; ; state++) {/* Retrieve the pinctrl-* property */ propname =kasprintf (GFP_KERNEL ,"pinctrl-%d" , state); -if (!propname) -return -ENOMEM ; +if (!propname) { + ret = -ENOMEM ; + goto err; + } prop =of_find_property (np, propname, &size);kfree (propname);if (!prop) {if (state ==0 ) { -of_node_put (np); -return -ENODEV ; + ret = -ENODEV ; + goto err; }break ; }
drivers/pinctrl/mediatek/pinctrl-paris.c +72 -108
275 lines not on this page · raw message
drivers/pinctrl/meson/pinctrl-meson-a1.c +3 -3
@@ -250,7 +250,7 @@ static const unsigned int pdm_dclk_x_pins[] = { GPIOX_10 };static const unsigned int pdm_din2_a_pins[] = {GPIOA_6 };static const unsigned int pdm_din1_a_pins[] = {GPIOA_7 };static const unsigned int pdm_din0_a_pins[] = {GPIOA_8 }; -static const unsigned int pdm_dclk_pins[] = {GPIOA_9 }; +static const unsigned int pdm_dclk_a_pins[] = {GPIOA_9 };/* gen_clk */ static const unsigned int gen_clk_x_pins[] = {GPIOX_7 };
@@ -591,7 +591,7 @@ static struct meson_pmx_group meson_a1_periphs_groups[] = {GROUP (pdm_din2_a,3 ),GROUP (pdm_din1_a,3 ),GROUP (pdm_din0_a,3 ), -GROUP (pdm_dclk,3 ), +GROUP (pdm_dclk_a,3 ),GROUP (pwm_c_a,3 ), GROUP(pwm_b_a, 3),
@@ -755,7 +755,7 @@ static const char * const spi_a_groups[] = {static const char *const pdm_groups[] = {"pdm_din0_x" ,"pdm_din1_x" ,"pdm_din2_x" ,"pdm_dclk_x" ,"pdm_din2_a" , -"pdm_din1_a" ,"pdm_din0_a" ,"pdm_dclk" , +"pdm_din1_a" ,"pdm_din0_a" ,"pdm_dclk_a" , };static const char *const gen_clk_groups[] = {
drivers/power/supply/rt9455_charger.c +2 -0
@@ -193,6 +193,7 @@ static const int rt9455_voreg_values[] = { 4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000 }; +#if IS_ENABLED (CONFIG_USB_PHY )/* * When the charger is in boost mode, REG02[7:2] represent boost output * voltage.
@@ -208,6 +209,7 @@ static const int rt9455_boost_voltage_values[] = {5600000 ,5600000 ,5600000 ,5600000 ,5600000 ,5600000 ,5600000 ,5600000 , 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, }; +#endif /* REG07[3:0] (VMREG) in uV */ static const int rt9455_vmreg_values[] = {
drivers/regulator/core.c +16 -11
@@ -1749,19 +1749,24 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, } } -if (err != -EEXIST ) +if (err != -EEXIST ) { regulator->debugfs =debugfs_create_dir (supply_name, rdev->debugfs); -if (IS_ERR (regulator->debugfs)) -rdev_dbg (rdev,"Failed to create debugfs directory\n" ); +if (IS_ERR (regulator->debugfs)) { +rdev_dbg (rdev,"Failed to create debugfs directory\n" ); + regulator->debugfs =NULL ; + } + } -debugfs_create_u32 ("uA_load" ,0444 , regulator->debugfs, - ®ulator->uA_load); -debugfs_create_u32 ("min_uV" ,0444 , regulator->debugfs, - ®ulator->voltage[PM_SUSPEND_ON ].min_uV); -debugfs_create_u32 ("max_uV" ,0444 , regulator->debugfs, - ®ulator->voltage[PM_SUSPEND_ON ].max_uV); -debugfs_create_file ("constraint_flags" ,0444 , regulator->debugfs, - regulator, &constraint_flags_fops); +if (regulator->debugfs) { +debugfs_create_u32 ("uA_load" ,0444 , regulator->debugfs, + ®ulator->uA_load); +debugfs_create_u32 ("min_uV" ,0444 , regulator->debugfs, + ®ulator->voltage[PM_SUSPEND_ON ].min_uV); +debugfs_create_u32 ("max_uV" ,0444 , regulator->debugfs, + ®ulator->voltage[PM_SUSPEND_ON ].max_uV); +debugfs_create_file ("constraint_flags" ,0444 , regulator->debugfs, + regulator, &constraint_flags_fops); + }/* * Check now if the regulator is an always on regulator - if
drivers/regulator/mt6360-regulator.c +20 -12
@@ -319,15 +319,15 @@ static unsigned int mt6360_regulator_of_map_mode(unsigned int hw_mode) } } -#define MT6360_REGULATOR_DESC (_name, _sname, ereg, emask, vreg, vmask, \ - mreg, mmask, streg, stmask, vranges, \ - vcnts, offon_delay, irq_tbls) \ +#define MT6360_REGULATOR_DESC (match, _name, _sname, ereg, emask, vreg, \ + vmask, mreg, mmask, streg, stmask, \ + vranges, vcnts, offon_delay, irq_tbls) \ { \ .desc = { \ .name = #_name, \ .supply_name = #_sname, \ .id = MT6360_REGULATOR_##_name, \ - .of_match = of_match_ptr(#_name), \ + .of_match = of_match_ptr(match), \ .regulators_node = of_match_ptr("regulator"), \ .of_map_mode = mt6360_regulator_of_map_mode, \ .owner = THIS_MODULE, \
@@ -351,21 +351,29 @@ static unsigned int mt6360_regulator_of_map_mode(unsigned int hw_mode) }static const struct mt6360_regulator_desc mt6360_regulator_descs[] = { -MT6360_REGULATOR_DESC (BUCK1 ,BUCK1_VIN ,0x117 ,0x40 ,0x110 ,0xff ,0x117 ,0x30 ,0x117 ,0x04 , +MT6360_REGULATOR_DESC ("buck1" ,BUCK1 ,BUCK1_VIN , +0x117 ,0x40 ,0x110 ,0xff ,0x117 ,0x30 ,0x117 ,0x04 , buck_vout_ranges,256 ,0 , buck1_irq_tbls), -MT6360_REGULATOR_DESC (BUCK2 ,BUCK2_VIN ,0x127 ,0x40 ,0x120 ,0xff ,0x127 ,0x30 ,0x127 ,0x04 , +MT6360_REGULATOR_DESC ("buck2" ,BUCK2 ,BUCK2_VIN , +0x127 ,0x40 ,0x120 ,0xff ,0x127 ,0x30 ,0x127 ,0x04 , buck_vout_ranges,256 ,0 , buck2_irq_tbls), -MT6360_REGULATOR_DESC (LDO6 ,LDO_VIN3 ,0x137 ,0x40 ,0x13B ,0xff ,0x137 ,0x30 ,0x137 ,0x04 , +MT6360_REGULATOR_DESC ("ldo6" ,LDO6 ,LDO_VIN3 , +0x137 ,0x40 ,0x13B ,0xff ,0x137 ,0x30 ,0x137 ,0x04 , ldo_vout_ranges1,256 ,0 , ldo6_irq_tbls), -MT6360_REGULATOR_DESC (LDO7 ,LDO_VIN3 ,0x131 ,0x40 ,0x135 ,0xff ,0x131 ,0x30 ,0x131 ,0x04 , +MT6360_REGULATOR_DESC ("ldo7" ,LDO7 ,LDO_VIN3 , +0x131 ,0x40 ,0x135 ,0xff ,0x131 ,0x30 ,0x131 ,0x04 , ldo_vout_ranges1,256 ,0 , ldo7_irq_tbls), -MT6360_REGULATOR_DESC (LDO1 ,LDO_VIN1 ,0x217 ,0x40 ,0x21B ,0xff ,0x217 ,0x30 ,0x217 ,0x04 , +MT6360_REGULATOR_DESC ("ldo1" ,LDO1 ,LDO_VIN1 , +0x217 ,0x40 ,0x21B ,0xff ,0x217 ,0x30 ,0x217 ,0x04 , ldo_vout_ranges2,256 ,0 , ldo1_irq_tbls), -MT6360_REGULATOR_DESC (LDO2 ,LDO_VIN1 ,0x211 ,0x40 ,0x215 ,0xff ,0x211 ,0x30 ,0x211 ,0x04 , +MT6360_REGULATOR_DESC ("ldo2" ,LDO2 ,LDO_VIN1 , +0x211 ,0x40 ,0x215 ,0xff ,0x211 ,0x30 ,0x211 ,0x04 , ldo_vout_ranges2,256 ,0 , ldo2_irq_tbls), -MT6360_REGULATOR_DESC (LDO3 ,LDO_VIN1 ,0x205 ,0x40 ,0x209 ,0xff ,0x205 ,0x30 ,0x205 ,0x04 , +MT6360_REGULATOR_DESC ("ldo3" ,LDO3 ,LDO_VIN1 , +0x205 ,0x40 ,0x209 ,0xff ,0x205 ,0x30 ,0x205 ,0x04 , ldo_vout_ranges2,256 ,100 , ldo3_irq_tbls), -MT6360_REGULATOR_DESC (LDO5 ,LDO_VIN2 ,0x20B ,0x40 ,0x20F ,0x7f ,0x20B ,0x30 ,0x20B ,0x04 , +MT6360_REGULATOR_DESC ("ldo5" ,LDO5 ,LDO_VIN2 , +0x20B ,0x40 ,0x20F ,0x7f ,0x20B ,0x30 ,0x20B ,0x04 , ldo_vout_ranges3,128 ,100 , ldo5_irq_tbls), };
drivers/scsi/bnx2fc/bnx2fc_tgt.c +0 -2
@@ -833,7 +833,6 @@ static void bnx2fc_free_session_resc(struct bnx2fc_hba *hba,BNX2FC_TGT_DBG (tgt,"Freeing up session resources\n" ); -spin_lock_bh (&tgt->cq_lock); ctx_base_ptr = tgt->ctx_base; tgt->ctx_base =NULL ;
@@ -889,7 +888,6 @@ static void bnx2fc_free_session_resc(struct bnx2fc_hba *hba, tgt->sq, tgt->sq_dma); tgt->sq =NULL ; } -spin_unlock_bh (&tgt->cq_lock);if (ctx_base_ptr)iounmap (ctx_base_ptr);
drivers/scsi/lpfc/lpfc.h +0 -1
@@ -1065,7 +1065,6 @@ struct lpfc_hba {unsigned long bit_flags;#define FABRIC_COMANDS_BLOCKED 0atomic_t num_rsrc_err; -atomic_t num_cmd_success;unsigned long last_rsrc_error_time;unsigned long last_ramp_down_time;#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
drivers/scsi/lpfc/lpfc_scsi.c +4 -9
@@ -246,11 +246,10 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)struct Scsi_Host *shost;struct scsi_device *sdev;unsigned long new_queue_depth; -unsigned long num_rsrc_err, num_cmd_success; +unsigned long num_rsrc_err;int i; num_rsrc_err =atomic_read (&phba->num_rsrc_err); - num_cmd_success =atomic_read (&phba->num_cmd_success);/* * The error and success command counters are global per
@@ -265,20 +264,16 @@ lpfc_ramp_down_queue_handler(struct lpfc_hba *phba)for (i =0 ; i <= phba->max_vports && vports[i] !=NULL ; i++) { shost =lpfc_shost_from_vport (vports[i]);shost_for_each_device (sdev, shost) { - new_queue_depth = - sdev->queue_depth * num_rsrc_err / - (num_rsrc_err + num_cmd_success); -if (!new_queue_depth) - new_queue_depth = sdev->queue_depth -1 ; +if (num_rsrc_err >= sdev->queue_depth) + new_queue_depth =1 ;else new_queue_depth = sdev->queue_depth - - new_queue_depth; + num_rsrc_err;scsi_change_queue_depth (sdev, new_queue_depth); } }lpfc_destroy_vport_work_array (phba, vports);atomic_set (&phba->num_rsrc_err,0 ); -atomic_set (&phba->num_cmd_success,0 ); }/**
drivers/target/target_core_configfs.c +12 -0
@@ -3532,6 +3532,8 @@ static int __init target_core_init_configfs(void) {struct configfs_subsystem *subsys = &target_core_fabrics;struct t10_alua_lu_gp *lu_gp; +struct cred *kern_cred; +const struct cred *old_cred;int ret; pr_debug("TARGET_CORE[0]: Loading Generic Kernel Storage"
@@ -3608,11 +3610,21 @@ static int __init target_core_init_configfs(void)if (ret <0 ) goto out; +/* We use the kernel credentials to access the target directory */ + kern_cred =prepare_kernel_cred (&init_task); +if (!kern_cred) { + ret = -ENOMEM ; + goto out; + } + old_cred =override_creds (kern_cred);target_init_dbroot (); +revert_creds (old_cred); +put_cred (kern_cred);return 0 ; out: +target_xcopy_release_pt ();configfs_unregister_subsystem (subsys);core_dev_release_virtual_lun0 ();rd_module_exit ();
drivers/usb/core/hub.c +3 -2
@@ -5053,9 +5053,10 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, }if (usb_endpoint_maxp (&udev->ep0.desc) == i) { ;/* Initial ep0 maxpacket guess is right */ - }else if ((udev->speed ==USB_SPEED_FULL || + }else if (((udev->speed ==USB_SPEED_FULL || udev->speed ==USB_SPEED_HIGH ) && - (i ==8 || i ==16 || i ==32 || i ==64 )) { + (i ==8 || i ==16 || i ==32 || i ==64 )) || + (udev->speed >=USB_SPEED_SUPER && i >0 )) {/* Initial guess is wrong; use the descriptor's value */ if (udev->speed ==USB_SPEED_FULL )dev_dbg (&udev->dev,"ep0 maxpacket = %d\n" , i);
drivers/usb/dwc3/core.c +38 -52
130 lines not on this page · raw message
drivers/usb/dwc3/core.h +1 -0
@@ -1456,6 +1456,7 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc);void dwc3_event_buffers_cleanup (struct dwc3 *dwc);int dwc3_core_soft_reset (struct dwc3 *dwc); +void dwc3_enable_susphy (struct dwc3 *dwc,bool enable);#if IS_ENABLED (CONFIG_USB_DWC3_HOST ) ||IS_ENABLED (CONFIG_USB_DWC3_DUAL_ROLE )int dwc3_host_init (struct dwc3 *dwc);
drivers/usb/dwc3/gadget.c +2 -0
@@ -2380,6 +2380,7 @@ static int __dwc3_gadget_start(struct dwc3 *dwc)dwc3_ep0_out_start (dwc);dwc3_gadget_enable_irq (dwc); +dwc3_enable_susphy (dwc, true);return 0 ;
@@ -4046,6 +4047,7 @@ void dwc3_gadget_exit(struct dwc3 *dwc)if (!dwc->gadget)return ; +dwc3_enable_susphy (dwc, false);usb_del_gadget (dwc->gadget);dwc3_gadget_free_endpoints (dwc);usb_put_gadget (dwc->gadget);
drivers/usb/dwc3/host.c +27 -0
@@ -9,9 +9,30 @@#include <linux/acpi.h> #include <linux/platform_device.h> +#include <linux/usb.h> +#include <linux/usb/hcd.h> +#include "../host/xhci-plat.h" #include "core.h" +static void dwc3_xhci_plat_start (struct usb_hcd *hcd) +{ +struct platform_device *pdev; +struct dwc3 *dwc; + +if (!usb_hcd_is_primary_hcd (hcd)) +return ; + + pdev =to_platform_device (hcd->self.controller); + dwc =dev_get_drvdata (pdev->dev.parent); + +dwc3_enable_susphy (dwc, true); +} + +static const struct xhci_plat_priv dwc3_xhci_plat_quirk = { + .plat_start = dwc3_xhci_plat_start, +}; +static int dwc3_host_get_irq (struct dwc3 *dwc) {struct platform_device *dwc3_pdev =to_platform_device (dwc->dev);
@@ -115,6 +136,11 @@ int dwc3_host_init(struct dwc3 *dwc) } } + ret =platform_device_add_data (xhci, &dwc3_xhci_plat_quirk, +sizeof (struct xhci_plat_priv )); +if (ret) + goto err; + ret =platform_device_add (xhci);if (ret) {dev_err (dwc->dev,"failed to register xHCI device\n" );
@@ -129,6 +155,7 @@ int dwc3_host_init(struct dwc3 *dwc)void dwc3_host_exit (struct dwc3 *dwc) { +dwc3_enable_susphy (dwc, false);platform_device_unregister (dwc->xhci); dwc->xhci =NULL ; }
drivers/usb/gadget/composite.c +3 -3
@@ -1925,7 +1925,7 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) buf[5 ] =0x01 ;switch (ctrl->bRequestType &USB_RECIP_MASK ) {case USB_RECIP_DEVICE : -if (w_index !=0x4 || (w_value >>8 )) +if (w_index !=0x4 || (w_value &0xff ))break ; buf[6 ] = w_index;/* Number of ext compat interfaces */
@@ -1941,9 +1941,9 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) }break ;case USB_RECIP_INTERFACE : -if (w_index !=0x5 || (w_value >>8 )) +if (w_index !=0x5 || (w_value &0xff ))break ; - interface = w_value &0xFF ; + interface = w_value >>8 ;if (interface >=MAX_CONFIG_INTERFACES || !os_desc_cfg->interface[interface])break ;
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3403,7 +3403,7 @@ static int ffs_func_setup(struct usb_function *f,__ffs_event_add (ffs,FUNCTIONFS_SETUP );spin_unlock_irqrestore (&ffs->ev.waitq.lock, flags); -return creq->wLength ==0 ?USB_GADGET_DELAYED_STATUS :0 ; +return ffs->ev.setup.wLength ==0 ?USB_GADGET_DELAYED_STATUS :0 ; } static bool ffs_func_req_match(struct usb_function *f,
drivers/usb/host/ohci-hcd.c +8 -0
@@ -890,6 +890,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)/* Check for an all 1's result which is a typical consequence * of dead, unclocked, or unplugged (CardBus...) devices */ +again:if (ints == ~(u32 )0 ) { ohci->rh_state =OHCI_RH_HALTED ;ohci_dbg (ohci,"device removed!\n" );
@@ -984,6 +985,13 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd) }spin_unlock (&ohci->lock); +/* repeat until all enabled interrupts are handled */ +if (ohci->rh_state !=OHCI_RH_HALTED ) { + ints =ohci_readl (ohci, ®s->intrstatus); +if (ints && (ints &ohci_readl (ohci, ®s->intrenable))) + goto again; + } +return IRQ_HANDLED ; }
drivers/usb/host/xhci-plat.h +3 -1
@@ -8,7 +8,9 @@ #ifndef _XHCI_PLAT_H #define _XHCI_PLAT_H -#include "xhci.h" /* for hcd_to_xhci() */ +struct device; +struct platform_device; +struct usb_hcd; struct xhci_plat_priv { const char *firmware_name;
drivers/usb/typec/ucsi/ucsi.c +11 -1
@@ -827,7 +827,7 @@ void ucsi_connector_change(struct ucsi *ucsi, u8 num)struct ucsi_connector *con = &ucsi->connector[num -1 ];if (!(ucsi->ntfy &UCSI_ENABLE_NTFY_CONNECTOR_CHANGE )) { -dev_dbg (ucsi->dev,"Bogus connector change event\n" ); +dev_dbg (ucsi->dev,"Early connector change event\n" );return ; }
@@ -1191,6 +1191,7 @@ static int ucsi_init(struct ucsi *ucsi) {struct ucsi_connector *con;u64 command, ntfy; +u32 cci;int ret;int i;
@@ -1242,6 +1243,15 @@ static int ucsi_init(struct ucsi *ucsi) goto err_unregister; ucsi->ntfy = ntfy; + +mutex_lock (&ucsi->ppm_lock); + ret = ucsi->ops->read (ucsi,UCSI_CCI , &cci,sizeof (cci)); +mutex_unlock (&ucsi->ppm_lock); +if (ret) +return ret; +if (UCSI_CCI_CONNECTOR (cci)) +ucsi_connector_change (ucsi,UCSI_CCI_CONNECTOR (cci)); +return 0 ; err_unregister:
drivers/usb/usbip/usbip_common.h +1 -0
@@ -18,6 +18,7 @@#include <linux/usb.h> #include <linux/wait.h> #include <linux/sched/task.h> +#include <linux/kcov.h> #include <uapi/linux/usbip.h> #undef pr_fmt
fs/9p/vfs_file.c +2 -0
@@ -685,6 +685,7 @@ const struct file_operations v9fs_file_operations = { .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync, + .setlease = simple_nosetlease, };const struct file_operations v9fs_file_operations_dotl = {
@@ -726,4 +727,5 @@ const struct file_operations v9fs_mmap_file_operations_dotl = { .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write, .fsync = v9fs_file_fsync_dotl, + .setlease = simple_nosetlease, };
fs/9p/vfs_inode.c +4 -1
@@ -86,7 +86,7 @@ static int p9mode2perm(struct v9fs_session_info *v9ses,int res;int mode = stat->mode; - res = mode &S_IALLUGO ; + res = mode &0777 ;/* S_IRWXUGO */ if (v9fs_proto_dotu (v9ses)) {if ((mode &P9_DMSETUID ) ==P9_DMSETUID ) res |=S_ISUID ;
@@ -177,6 +177,9 @@ int v9fs_uflags2omode(int uflags, int extended)break ; } +if (uflags &O_TRUNC ) + ret |=P9_OTRUNC ; +if (extended) {if (uflags &O_EXCL ) ret |=P9_OEXCL ;
fs/9p/vfs_super.c +1 -0
@@ -336,6 +336,7 @@ static const struct super_operations v9fs_super_ops = { .alloc_inode = v9fs_alloc_inode, .free_inode = v9fs_free_inode, .statfs = simple_statfs, + .drop_inode = v9fs_drop_inode, .evict_inode = v9fs_evict_inode, .show_options = v9fs_show_options, .umount_begin = v9fs_umount_begin,
fs/btrfs/inode.c +1 -1
@@ -2070,7 +2070,7 @@ void btrfs_clear_delalloc_extent(struct inode *vfs_inode,*/ if (*bits &EXTENT_CLEAR_META_RESV && root != fs_info->tree_root) -btrfs_delalloc_release_metadata (inode, len, false); +btrfs_delalloc_release_metadata (inode, len, true);/* For sanity tests. */ if (btrfs_is_testing (fs_info))
fs/btrfs/send.c +2 -2
@@ -7339,8 +7339,8 @@ long btrfs_ioctl_send(struct file *mnt_file, struct btrfs_ioctl_send_args *arg) sctx->waiting_dir_moves =RB_ROOT ; sctx->orphan_dirs =RB_ROOT ; - sctx->clone_roots =kvcalloc (sizeof (*sctx->clone_roots), - arg->clone_sources_count +1 , + sctx->clone_roots =kvcalloc (arg->clone_sources_count +1 , +sizeof (*sctx->clone_roots),GFP_KERNEL );if (!sctx->clone_roots) { ret = -ENOMEM ;
fs/btrfs/transaction.c +1 -1
@@ -1343,6 +1343,7 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans)radix_tree_tag_clear (&fs_info->fs_roots_radix, (unsigned long )root->root_key.objectid,BTRFS_ROOT_TRANS_TAG ); +btrfs_qgroup_free_meta_all_pertrans (root);spin_unlock (&fs_info->fs_roots_radix_lock);btrfs_free_log (trans, root);
@@ -1367,7 +1368,6 @@ static noinline int commit_fs_roots(struct btrfs_trans_handle *trans)if (ret2)return ret2;spin_lock (&fs_info->fs_roots_radix_lock); -btrfs_qgroup_free_meta_all_pertrans (root); } }spin_unlock (&fs_info->fs_roots_radix_lock);
fs/btrfs/volumes.c +12 -5
@@ -1266,25 +1266,32 @@ static int open_fs_devices(struct btrfs_fs_devices *fs_devices,struct btrfs_device *device;struct btrfs_device *latest_dev =NULL ;struct btrfs_device *tmp_device; +int ret =0 ; flags |=FMODE_EXCL ;list_for_each_entry_safe (device, tmp_device, &fs_devices->devices, dev_list) { -int ret; +int ret2; - ret =btrfs_open_one_device (fs_devices, device, flags, holder); -if (ret ==0 && + ret2 =btrfs_open_one_device (fs_devices, device, flags, holder); +if (ret2 ==0 && (!latest_dev || device->generation > latest_dev->generation)) { latest_dev = device; - }else if (ret == -ENODATA ) { + }else if (ret2 == -ENODATA ) { fs_devices->num_devices--;list_del (&device->dev_list);btrfs_free_device (device); } +if (ret ==0 && ret2 !=0 ) + ret = ret2; } -if (fs_devices->open_devices ==0 ) + +if (fs_devices->open_devices ==0 ) { +if (ret) +return ret;return -EINVAL ; + } fs_devices->opened =1 ; fs_devices->latest_bdev = latest_dev->bdev;
fs/gfs2/bmap.c +3 -2
@@ -1758,7 +1758,8 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length)struct buffer_head *dibh, *bh;struct gfs2_holder rd_gh;unsigned int bsize_shift = sdp->sd_sb.sb_bsize_shift; -u64 lblock = (offset + (1 << bsize_shift) -1 ) >> bsize_shift; +unsigned int bsize =1 << bsize_shift; +u64 lblock = (offset + bsize -1 ) >> bsize_shift;__u16 start_list[GFS2_MAX_META_HEIGHT ];__u16 __end_list[GFS2_MAX_META_HEIGHT ], *end_list =NULL ;unsigned int start_aligned, end_aligned;
@@ -1769,7 +1770,7 @@ static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length)u64 prev_bnr =0 ;__be64 *start, *end; -if (offset >= maxsize) { +if (offset + bsize -1 >= maxsize) {/* * The starting point lies beyond the allocated meta-data; * there are no blocks do deallocate.
fs/nfs/client.c +4 -1
@@ -73,7 +73,6 @@ const struct rpc_program nfs_program = { .number = NFS_PROGRAM, .nrvers = ARRAY_SIZE(nfs_version), .version = nfs_version, - .stats = &nfs_rpcstat, .pipe_dir_name = NFS_PIPE_DIRNAME, };
@@ -501,6 +500,7 @@ int nfs_create_rpc_client(struct nfs_client *clp,const struct nfs_client_initdata *cl_init, rpc_authflavor_t flavor) { + struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);struct rpc_clnt *clnt =NULL ; struct rpc_create_args args = { .net = clp->cl_net,
@@ -512,6 +512,7 @@ int nfs_create_rpc_client(struct nfs_client *clp, .servername = clp->cl_hostname, .nodename = cl_init->nodename, .program = &nfs_program, + .stats = &nn->rpcstats, .version = clp->rpc_ops->version, .authflavor = flavor, .cred = cl_init->cred,
@@ -1110,6 +1111,8 @@ void nfs_clients_init(struct net *net)#endif spin_lock_init (&nn->nfs_client_lock); nn->boot_time =ktime_get_real (); +memset (&nn->rpcstats,0 ,sizeof (nn->rpcstats)); + nn->rpcstats.program = &nfs_program;nfs_netns_sysfs_setup (nn, net); }
fs/nfs/inode.c +9 -4
@@ -2225,12 +2225,21 @@ EXPORT_SYMBOL_GPL(nfs_net_id);static int nfs_net_init (struct net *net) { +struct nfs_net *nn =net_generic (net, nfs_net_id); +nfs_clients_init (net); + +if (!rpc_proc_register (net, &nn->rpcstats)) { +nfs_clients_exit (net); +return -ENOMEM ; + } +return nfs_fs_proc_net_init (net); }static void nfs_net_exit (struct net *net) { +rpc_proc_unregister (net,"nfs" );nfs_fs_proc_net_exit (net);nfs_clients_exit (net); }
@@ -2289,15 +2298,12 @@ static int __init init_nfs_fs(void)if (err) goto out1; -rpc_proc_register (&init_net, &nfs_rpcstat); - err =register_nfs_fs ();if (err) goto out0;return 0 ; out0: -rpc_proc_unregister (&init_net,"nfs" );nfs_destroy_directcache (); out1:nfs_destroy_writepagecache ();
@@ -2330,7 +2336,6 @@ static void __exit exit_nfs_fs(void)nfs_destroy_nfspagecache ();nfs_fscache_unregister ();unregister_pernet_subsys (&nfs_net_ops); -rpc_proc_unregister (&init_net,"nfs" );unregister_nfs_fs ();nfs_fs_proc_exit ();nfsiod_stop ();
fs/nfs/internal.h +0 -2
@@ -435,8 +435,6 @@ int nfs_try_get_tree(struct fs_context *);int nfs_get_tree_common (struct fs_context *);void nfs_kill_super (struct super_block *); -extern struct rpc_stat nfs_rpcstat; -extern int __init register_nfs_fs (void ); extern void __exit unregister_nfs_fs(void);extern bool nfs_sb_active (struct super_block *sb);
fs/nfs/netns.h +2 -0
@@ -9,6 +9,7 @@#include <linux/nfs4.h> #include <net/net_namespace.h> #include <net/netns/generic.h> +#include <linux/sunrpc/stats.h> struct bl_dev_msg {int32_t status;
@@ -34,6 +35,7 @@ struct nfs_net {struct nfs_netns_client *nfs_client;spinlock_t nfs_client_lock;ktime_t boot_time; +struct rpc_stat rpcstats;#ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_nfsfs;#endif
include/linux/kcov.h +1 -0
@@ -2,6 +2,7 @@#ifndef _LINUX_KCOV_H#define _LINUX_KCOV_H +#include <linux/sched.h> #include <uapi/linux/kcov.h> struct task_struct ;
include/linux/sched.h +0 -1
@@ -14,7 +14,6 @@#include <linux/pid.h> #include <linux/sem.h> #include <linux/shm.h> -#include <linux/kcov.h> #include <linux/mutex.h> #include <linux/plist.h> #include <linux/hrtimer.h>
include/linux/skbuff.h +15 -0
@@ -2607,6 +2607,21 @@ static inline void skb_mac_header_rebuild(struct sk_buff *skb) } } +/* Move the full mac header up to current network_header. +* Leaves skb->data pointing at offset skb->mac_len into the mac_header. +* Must be provided the complete mac header length. +*/ +static inline void skb_mac_header_rebuild_full (struct sk_buff *skb,u32 full_mac_len) +{ +if (skb_mac_header_was_set (skb)) { +const unsigned char *old_mac =skb_mac_header (skb); + +skb_set_mac_header (skb, -full_mac_len); +memmove (skb_mac_header (skb), old_mac, full_mac_len); +__skb_push (skb, full_mac_len - skb->mac_len); + } +} +static inline int skb_checksum_start_offset (const struct sk_buff *skb) {return skb->csum_start -skb_headroom (skb);
include/linux/sunrpc/clnt.h +1 -0
@@ -126,6 +126,7 @@ struct rpc_create_args {const char *servername;const char *nodename;const struct rpc_program *program; +struct rpc_stat *stats;u32 prognumber;/* overrides program->number */ u32 version;rpc_authflavor_t authflavor;
include/net/xfrm.h +3 -0
@@ -1028,6 +1028,9 @@ struct xfrm_offload {#define CRYPTO_INVALID_PACKET_SYNTAX 64#define CRYPTO_INVALID_PROTOCOL 128 +/* Used to keep whole l2 header for transport mode GRO */ +__u32 orig_mac_len; +__u8 proto; };
lib/dynamic_debug.c +5 -1
@@ -260,7 +260,11 @@ static int ddebug_tokenize(char *buf, char *words[], int maxwords) }else {for (end = buf; *end && !isspace (*end); end++) ; -BUG_ON (end == buf); +if (end == buf) { +pr_err ("parse err after word:%d=%s\n" , nwords, + nwords ? words[nwords -1 ] :"<none>" ); +return -EINVAL ; + } }/* `buf' is start of word, `end' is one past its end */
net/bluetooth/l2cap_core.c +3 -0
@@ -435,6 +435,9 @@ static void l2cap_chan_timeout(struct work_struct *work)BT_DBG ("chan %p state %s" , chan,state_to_string (chan->state)); +if (!conn) +return ; +mutex_lock (&conn->chan_lock);/* __set_chan_timer() calls l2cap_chan_hold(chan) while scheduling * this work. No need to call l2cap_chan_hold(chan) here again.
net/bluetooth/sco.c +4 -0
@@ -83,6 +83,10 @@ static void sco_sock_timeout(struct work_struct *work)struct sock *sk;sco_conn_lock (conn); +if (!conn->hcon) { +sco_conn_unlock (conn); +return ; + } sk = conn->sk;if (sk)sock_hold (sk);
net/bridge/br_forward.c +7 -2
@@ -245,6 +245,7 @@ static void maybe_deliver_addr(struct net_bridge_port *p, struct sk_buff *skb, {struct net_device *dev =BR_INPUT_SKB_CB (skb)->brdev;const unsigned char *src =eth_hdr (skb)->h_source; +struct sk_buff *nskb;if (!should_deliver (p, skb))return ;
@@ -253,12 +254,16 @@ static void maybe_deliver_addr(struct net_bridge_port *p, struct sk_buff *skb,if (skb->dev == p->dev &ðer_addr_equal (src, addr))return ; - skb =skb_copy (skb,GFP_ATOMIC ); -if (!skb) { +__skb_push (skb,ETH_HLEN ); + nskb =pskb_copy (skb,GFP_ATOMIC ); +__skb_pull (skb,ETH_HLEN ); +if (!nskb) {DEV_STATS_INC (dev, tx_dropped);return ; } + skb = nskb; +__skb_pull (skb,ETH_HLEN );if (!is_broadcast_ether_addr (addr))memcpy (eth_hdr (skb)->h_dest, addr,ETH_ALEN );
net/core/net_namespace.c +10 -3
@@ -86,12 +86,15 @@ u64 __net_gen_cookie(struct net *net)static struct net_generic *net_alloc_generic (void ) { +unsigned int gen_ptrs =READ_ONCE (max_gen_ptrs); +unsigned int generic_size;struct net_generic *ng; - unsigned int generic_size = offsetof(struct net_generic, ptr[max_gen_ptrs]); + + generic_size = offsetof(struct net_generic, ptr[gen_ptrs]); ng =kzalloc (generic_size,GFP_KERNEL );if (ng) - ng->s.len = max_gen_ptrs; + ng->s.len = gen_ptrs;return ng; }
@@ -1241,7 +1244,11 @@ static int register_pernet_operations(struct list_head *list,if (error <0 )return error; *ops->id = error; - max_gen_ptrs =max (max_gen_ptrs, *ops->id +1 ); +/* This does not require READ_ONCE as writers already hold +* pernet_ops_rwsem. But WRITE_ONCE is needed to protect +* net_alloc_generic. +*/ +WRITE_ONCE (max_gen_ptrs,max (max_gen_ptrs, *ops->id +1 )); } error =__register_pernet_operations (list, ops);if (error) {
net/core/rtnetlink.c +1 -1
@@ -2379,7 +2379,7 @@ static int do_setvfinfo(struct net_device *dev, struct nlattr **tb)nla_for_each_nested (attr, tb[IFLA_VF_VLAN_LIST ], rem) {if (nla_type (attr) !=IFLA_VF_VLAN_INFO || -nla_len (attr) <NLA_HDRLEN ) { +nla_len (attr) <sizeof (struct ifla_vf_vlan_info )) {return -EINVAL ; }if (len >=MAX_VLAN_LIST_LEN )
net/core/skbuff.c +20 -8
@@ -60,6 +60,7 @@#include <linux/prefetch.h> #include <linux/if_vlan.h> #include <linux/mpls.h> +#include <linux/kcov.h> #include <net/protocol.h> #include <net/dst.h>
@@ -1516,11 +1517,17 @@ static inline int skb_alloc_rx_flag(const struct sk_buff *skb)struct sk_buff *skb_copy (const struct sk_buff *skb,gfp_t gfp_mask) { -int headerlen =skb_headroom (skb); -unsigned int size =skb_end_offset (skb) + skb->data_len; -struct sk_buff *n =__alloc_skb (size, gfp_mask, -skb_alloc_rx_flag (skb),NUMA_NO_NODE ); +struct sk_buff *n; +unsigned int size; +int headerlen; + +if (WARN_ON_ONCE (skb_shinfo (skb)->gso_type &SKB_GSO_FRAGLIST )) +return NULL ; + headerlen =skb_headroom (skb); + size =skb_end_offset (skb) + skb->data_len; + n =__alloc_skb (size, gfp_mask, +skb_alloc_rx_flag (skb),NUMA_NO_NODE );if (!n)return NULL ;
@@ -1750,12 +1757,17 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,/* * Allocate the copy buffer */ -struct sk_buff *n =__alloc_skb (newheadroom + skb->len + newtailroom, - gfp_mask,skb_alloc_rx_flag (skb), -NUMA_NO_NODE ); -int oldheadroom =skb_headroom (skb);int head_copy_len, head_copy_off; +struct sk_buff *n; +int oldheadroom; + +if (WARN_ON_ONCE (skb_shinfo (skb)->gso_type &SKB_GSO_FRAGLIST )) +return NULL ; + oldheadroom =skb_headroom (skb); + n =__alloc_skb (newheadroom + skb->len + newtailroom, + gfp_mask,skb_alloc_rx_flag (skb), +NUMA_NO_NODE );if (!n)return NULL ;
net/core/sock.c +2 -2
@@ -440,7 +440,7 @@ int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)unsigned long flags;struct sk_buff_head *list = &sk->sk_receive_queue; -if (atomic_read (&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) { +if (atomic_read (&sk->sk_rmem_alloc) >=READ_ONCE (sk->sk_rcvbuf)) {atomic_inc (&sk->sk_drops);trace_sock_rcvqueue_full (sk, skb);return -ENOMEM ;
@@ -492,7 +492,7 @@ int __sk_receive_skb(struct sock *sk, struct sk_buff *skb, skb->dev =NULL ; -if (sk_rcvqueues_full (sk, sk->sk_rcvbuf)) { +if (sk_rcvqueues_full (sk,READ_ONCE (sk->sk_rcvbuf))) {atomic_inc (&sk->sk_drops); goto discard_and_relse; }
net/ipv4/tcp.c +2 -2
@@ -2493,7 +2493,7 @@ void tcp_shutdown(struct sock *sk, int how)/* If we've already sent a FIN, or it's a closed state, skip this. */ if ((1 << sk->sk_state) & (TCPF_ESTABLISHED |TCPF_SYN_SENT | -TCPF_SYN_RECV |TCPF_CLOSE_WAIT )) { +TCPF_CLOSE_WAIT )) {/* Clear out any half completed packets. FIN if needed. */ if (tcp_close_state (sk))tcp_send_fin (sk);
@@ -2604,7 +2604,7 @@ void __tcp_close(struct sock *sk, long timeout)* machine. State transitions: * * TCP_ESTABLISHED -> TCP_FIN_WAIT1 -* TCP_SYN_RECV -> TCP_FIN_WAIT1 (forget it, it's impossible) +* TCP_SYN_RECV -> TCP_FIN_WAIT1 (it is difficult) * TCP_CLOSE_WAIT -> TCP_LAST_ACK * * are legal only when FIN has been sent (i.e. in window),
net/ipv4/tcp_input.c +2 -0
@@ -6516,6 +6516,8 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb)tcp_initialize_rcv_mss (sk);tcp_fast_path_on (tp); +if (sk->sk_shutdown &SEND_SHUTDOWN ) +tcp_shutdown (sk,SEND_SHUTDOWN );break ;case TCP_FIN_WAIT1 : {
net/ipv4/tcp_ipv4.c +7 -1
@@ -153,6 +153,12 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp)if (tcptw->tw_ts_recent_stamp && (!twp || (reuse &&time_after32 (ktime_get_seconds (), tcptw->tw_ts_recent_stamp)))) { +/* inet_twsk_hashdance() sets sk_refcnt after putting twsk +* and releasing the bucket lock. +*/ +if (unlikely (!refcount_inc_not_zero (&sktw->sk_refcnt))) +return 0 ; +/* In case of repair and re-using TIME-WAIT sockets we still * want to be sure that it is safe as above but honor the * sequence numbers and time stamps set as part of the repair
@@ -173,7 +179,7 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp) tp->rx_opt.ts_recent = tcptw->tw_ts_recent; tp->rx_opt.ts_recent_stamp = tcptw->tw_ts_recent_stamp; } -sock_hold (sktw); +return 1 ; }
net/ipv4/tcp_output.c +3 -1
@@ -3440,7 +3440,9 @@ void tcp_send_fin(struct sock *sk)return ; } }else { - skb =alloc_skb_fclone (MAX_TCP_HEADER , sk->sk_allocation); + skb =alloc_skb_fclone (MAX_TCP_HEADER , +sk_gfp_mask (sk,GFP_ATOMIC | + __GFP_NOWARN));if (unlikely (!skb))return ;
net/ipv4/udp_offload.c +11 -1
@@ -431,6 +431,7 @@ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,struct sk_buff *p;unsigned int ulen;int ret =0 ; +int flush;/* requires non zero csum, for symmetry with GSO */ if (!uh->check) {
@@ -464,13 +465,22 @@ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,return p; } + flush =NAPI_GRO_CB (p)->flush; + +if (NAPI_GRO_CB (p)->flush_id !=1 || +NAPI_GRO_CB (p)->count !=1 || + !NAPI_GRO_CB (p)->is_atomic) + flush |=NAPI_GRO_CB (p)->flush_id; +else +NAPI_GRO_CB (p)->is_atomic = false; +/* Terminate the flow on len mismatch or if it grow "too much". * Under small packet flood GRO count could elsewhere grow a lot * leading to excessive truesize values. * On len mismatch merge the first packet shorter than gso_size, * otherwise complete the GRO packet. */ -if (ulen >ntohs (uh2->len)) { +if (ulen >ntohs (uh2->len) || flush) { pp = p; }else {if (NAPI_GRO_CB (skb)->is_flist) {
net/ipv4/xfrm4_input.c +5 -1
@@ -61,7 +61,11 @@ int xfrm4_transport_finish(struct sk_buff *skb, int async)ip_send_check (iph);if (xo && (xo->flags &XFRM_GRO )) { -skb_mac_header_rebuild (skb); +/* The full l2 header needs to be preserved so that re-injecting the packet at l2 +* works correctly in the presence of vlan tags. +*/ +skb_mac_header_rebuild_full (skb, xo->orig_mac_len); +skb_reset_network_header (skb);skb_reset_transport_header (skb);return 0 ; }
net/ipv6/fib6_rules.c +5 -1
@@ -232,8 +232,12 @@ static int __fib6_rule_action(struct fib_rule *rule, struct flowi *flp, rt =pol_lookup_func (lookup, net, table, flp6, arg->lookup_data, flags);if (rt != net->ipv6.ip6_null_entry) { +struct inet6_dev *idev =ip6_dst_idev (&rt->dst); + +if (!idev) + goto again; err =fib6_rule_saddr (net, rule, flags, flp6, -ip6_dst_idev (&rt->dst)->dev); + idev->dev);if (err == -EAGAIN ) goto again;
net/ipv6/xfrm6_input.c +5 -1
@@ -56,7 +56,11 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async)skb_postpush_rcsum (skb,skb_network_header (skb), nhlen);if (xo && (xo->flags &XFRM_GRO )) { -skb_mac_header_rebuild (skb); +/* The full l2 header needs to be preserved so that re-injecting the packet at l2 +* works correctly in the presence of vlan tags. +*/ +skb_mac_header_rebuild_full (skb, xo->orig_mac_len); +skb_reset_network_header (skb);skb_reset_transport_header (skb);return 0 ; }
net/l2tp/l2tp_eth.c +3 -0
@@ -136,6 +136,9 @@ static void l2tp_eth_dev_recv(struct l2tp_session *session, struct sk_buff *skb,/* checksums verified by L2TP */ skb->ip_summed =CHECKSUM_NONE ; +/* drop outer flow-hash */ +skb_clear_hash (skb); +skb_dst_drop (skb);nf_reset_ct (skb);
net/mac80211/ieee80211_i.h +2 -2
@@ -112,7 +112,7 @@ struct ieee80211_bss { };/** -* enum ieee80211_corrupt_data_flags - BSS data corruption flags +* enum ieee80211_bss_corrupt_data_flags - BSS data corruption flags * @IEEE80211_BSS_CORRUPT_BEACON: last beacon frame received was corrupted * @IEEE80211_BSS_CORRUPT_PROBE_RESP: last probe response received was corrupted *
@@ -125,7 +125,7 @@ enum ieee80211_bss_corrupt_data_flags { };/** -* enum ieee80211_valid_data_flags - BSS valid data flags +* enum ieee80211_bss_valid_data_flags - BSS valid data flags * @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE * @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE * @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE
net/mac80211/iface.c +1 -0
@@ -15,6 +15,7 @@#include <linux/if_arp.h> #include <linux/netdevice.h> #include <linux/rtnetlink.h> +#include <linux/kcov.h> #include <net/mac80211.h> #include <net/ieee80211_radiotap.h> #include "ieee80211_i.h"
net/mac80211/rx.c +1 -0
@@ -17,6 +17,7 @@#include <linux/etherdevice.h> #include <linux/rcupdate.h> #include <linux/export.h> +#include <linux/kcov.h> #include <linux/bitops.h> #include <net/mac80211.h> #include <net/ieee80211_radiotap.h>
net/nsh/nsh.c +8 -6
@@ -76,13 +76,15 @@ EXPORT_SYMBOL_GPL(nsh_pop);static struct sk_buff *nsh_gso_segment (struct sk_buff *skb,netdev_features_t features) { +unsigned int outer_hlen, mac_len, nsh_len;struct sk_buff *segs =ERR_PTR (-EINVAL );u16 mac_offset = skb->mac_header; -unsigned int nsh_len, mac_len; -__be16 proto; +__be16 outer_proto, proto;skb_reset_network_header (skb); + outer_proto = skb->protocol; + outer_hlen =skb_mac_header_len (skb); mac_len = skb->mac_len;if (unlikely (!pskb_may_pull (skb,NSH_BASE_HDR_LEN )))
@@ -112,10 +114,10 @@ static struct sk_buff *nsh_gso_segment(struct sk_buff *skb, }for (skb = segs; skb; skb = skb->next) { - skb->protocol =htons (ETH_P_NSH ); -__skb_push (skb, nsh_len); - skb->mac_header = mac_offset; - skb->network_header = skb->mac_header + mac_len; + skb->protocol = outer_proto; +__skb_push (skb, nsh_len + outer_hlen); +skb_reset_mac_header (skb); +skb_set_network_header (skb, outer_hlen); skb->mac_len = mac_len; }
net/phonet/pn_netlink.c +1 -1
@@ -193,7 +193,7 @@ void rtm_phonet_notify(int event, struct net_device *dev, u8 dst)struct sk_buff *skb;int err = -ENOBUFS ; - skb =nlmsg_new (NLMSG_ALIGN (sizeof (struct ifaddrmsg )) + + skb =nlmsg_new (NLMSG_ALIGN (sizeof (struct rtmsg )) +nla_total_size (1 ) +nla_total_size (4 ),GFP_KERNEL );if (skb ==NULL ) goto errout;
net/sunrpc/clnt.c +4 -1
@@ -395,7 +395,7 @@ static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, clnt->cl_maxproc = version->nrprocs; clnt->cl_prog = args->prognumber ? : program->number; clnt->cl_vers = version->number; - clnt->cl_stats = program->stats; + clnt->cl_stats = args->stats ? : program->stats; clnt->cl_metrics =rpc_alloc_iostats (clnt);rpc_init_pipe_dir_head (&clnt->cl_pipedir_objects); err = -ENOMEM ;
@@ -665,6 +665,7 @@ struct rpc_clnt *rpc_clone_client(struct rpc_clnt *clnt) .version = clnt->cl_vers, .authflavor = clnt->cl_auth->au_flavor, .cred = clnt->cl_cred, + .stats = clnt->cl_stats, };return __rpc_clone_client (&args, clnt); }
@@ -687,6 +688,7 @@ rpc_clone_client_set_auth(struct rpc_clnt *clnt, rpc_authflavor_t flavor) .version = clnt->cl_vers, .authflavor = flavor, .cred = clnt->cl_cred, + .stats = clnt->cl_stats, };return __rpc_clone_client (&args, clnt); }
@@ -967,6 +969,7 @@ struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *old, .version = vers, .authflavor = old->cl_auth->au_flavor, .cred = old->cl_cred, + .stats = old->cl_stats, };struct rpc_clnt *clnt;int err;
net/tipc/msg.c +6 -2
@@ -148,9 +148,9 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)if (fragid ==FIRST_FRAGMENT ) {if (unlikely (head)) goto err; - *buf =NULL ;if (skb_has_frag_list (frag) &&__skb_linearize (frag)) goto err; + *buf =NULL ; frag =skb_unshare (frag,GFP_ATOMIC );if (unlikely (!frag)) goto err;
@@ -162,6 +162,11 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf)if (!head) goto err; +/* Either the input skb ownership is transferred to headskb +* or the input skb is freed, clear the reference to avoid +* bad access on error path. +*/ + *buf =NULL ;if (skb_try_coalesce (head, frag, &headstolen, &delta)) {kfree_skb_partial (frag, headstolen); }else {
@@ -185,7 +190,6 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) *headbuf =NULL ;return 1 ; } - *buf =NULL ;return 0 ; err:kfree_skb (*buf);
net/wireless/nl80211.c +2 -0
@@ -12642,6 +12642,8 @@ static int nl80211_set_coalesce(struct sk_buff *skb, struct genl_info *info) error:for (i =0 ; i < new_coalesce.n_rules; i++) { tmp_rule = &new_coalesce.rules[i]; +if (!tmp_rule) +continue ;for (j =0 ; j < tmp_rule->n_patterns; j++)kfree (tmp_rule->patterns[j].mask);kfree (tmp_rule->patterns);
net/wireless/trace.h +1 -1
@@ -968,7 +968,7 @@ TRACE_EVENT(rdev_get_mpp, TRACE_EVENT(rdev_dump_mpp, TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx, u8 *dst, u8 *mpp), - TP_ARGS(wiphy, netdev, _idx, mpp, dst), + TP_ARGS(wiphy, netdev, _idx, dst, mpp), TP_STRUCT__entry( WIPHY_ENTRY NETDEV_ENTRY
net/xfrm/xfrm_input.c +8 -0
@@ -399,11 +399,15 @@ static int xfrm_prepare_input(struct xfrm_state *x, struct sk_buff *skb)*/ static int xfrm4_transport_input (struct xfrm_state *x,struct sk_buff *skb) { +struct xfrm_offload *xo =xfrm_offload (skb);int ihl = skb->data -skb_transport_header (skb);if (skb->transport_header != skb->network_header) {memmove (skb_transport_header (skb),skb_network_header (skb), ihl); +if (xo) + xo->orig_mac_len = +skb_mac_header_was_set (skb) ?skb_mac_header_len (skb) :0 ; skb->network_header = skb->transport_header; }ip_hdr (skb)->tot_len =htons (skb->len + ihl);
@@ -414,11 +418,15 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb)static int xfrm6_transport_input (struct xfrm_state *x,struct sk_buff *skb) {#if IS_ENABLED (CONFIG_IPV6 ) +struct xfrm_offload *xo =xfrm_offload (skb);int ihl = skb->data -skb_transport_header (skb);if (skb->transport_header != skb->network_header) {memmove (skb_transport_header (skb),skb_network_header (skb), ihl); +if (xo) + xo->orig_mac_len = +skb_mac_header_was_set (skb) ?skb_mac_header_len (skb) :0 ; skb->network_header = skb->transport_header; } ipv6_hdr(skb)->payload_len = htons(skb->len + ihl -
security/keys/key.c +2 -1
@@ -464,7 +464,8 @@ static int __key_instantiate_and_link(struct key *key,if (authkey)key_invalidate (authkey); -key_set_expiry (key, prep->expiry); +if (prep->expiry !=TIME64_MAX ) +key_set_expiry (key, prep->expiry); } }
sound/pci/hda/patch_realtek.c +1 -0
@@ -9066,6 +9066,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x860f ,"HP ZBook 15 G6" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x861f ,"HP Elite Dragonfly G1" ,ALC285_FIXUP_HP_GPIO_AMP_INIT ),SND_PCI_QUIRK (0x103c ,0x869d ,"HP" ,ALC236_FIXUP_HP_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x86c1 ,"HP Laptop 15-da3001TU" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x86c7 ,"HP Envy AiO 32" ,ALC274_FIXUP_HP_ENVY_GPIO ),SND_PCI_QUIRK (0x103c ,0x86e7 ,"HP Spectre x360 15-eb0xxx" ,ALC285_FIXUP_HP_SPECTRE_X360_EB1 ), SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
sound/soc/codecs/Kconfig +9 -9
@@ -517,7 +517,7 @@ config SND_SOC_AK5558 select REGMAP_I2C config SND_SOC_ALC5623 - tristate "Realtek ALC5623 CODEC" + tristate "Realtek ALC5623 CODEC" depends on I2C config SND_SOC_ALC5632
@@ -733,7 +733,7 @@ config SND_SOC_JZ4770_CODEC will be called snd-soc-jz4770-codec. config SND_SOC_L3 - tristate + tristate config SND_SOC_DA7210 tristate
@@ -773,10 +773,10 @@ config SND_SOC_HDMI_CODEC select HDMI config SND_SOC_ES7134 - tristate "Everest Semi ES7134 CODEC" + tristate "Everest Semi ES7134 CODEC" config SND_SOC_ES7241 - tristate "Everest Semi ES7241 CODEC" + tristate "Everest Semi ES7241 CODEC" config SND_SOC_ES8316 tristate "Everest Semi ES8316 CODEC"
@@ -974,10 +974,10 @@ config SND_SOC_PCM186X_SPI select REGMAP_SPI config SND_SOC_PCM3008 - tristate + tristate config SND_SOC_PCM3060 - tristate + tristate config SND_SOC_PCM3060_I2C tristate "Texas Instruments PCM3060 CODEC - I2C"
@@ -1440,7 +1440,7 @@ config SND_SOC_UDA1334 rate) and mute. config SND_SOC_UDA134X - tristate + tristate config SND_SOC_UDA1380 tristate
@@ -1765,8 +1765,8 @@ config SND_SOC_MT6660 Select M to build this as module. config SND_SOC_NAU8540 - tristate "Nuvoton Technology Corporation NAU85L40 CODEC" - depends on I2C + tristate "Nuvoton Technology Corporation NAU85L40 CODEC" + depends on I2C config SND_SOC_NAU8810 tristate "Nuvoton Technology Corporation NAU88C10 CODEC"
sound/soc/generic/Kconfig +1 -1
@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only config SND_SIMPLE_CARD_UTILS - tristate + tristate config SND_SIMPLE_CARD tristate "ASoC Simple sound card support"
sound/soc/intel/boards/Kconfig +1 -1
@@ -552,7 +552,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select SND_SOC_RT715_SDCA_SDW select SND_SOC_RT5682_SDW select SND_SOC_DMIC - help + help Add support for Intel SoundWire-based platforms connected to MAX98373, RT700, RT711, RT1308 and RT715 If unsure select "N".
sound/soc/meson/Kconfig +2 -1
@@ -98,7 +98,8 @@ config SND_MESON_AXG_PDM in the Amlogic AXG SoC family config SND_MESON_CARD_UTILS - tristate + tristate + select SND_DYNAMIC_MINORS config SND_MESON_CODEC_GLUE tristate
sound/soc/pxa/Kconfig +7 -7
@@ -221,13 +221,13 @@ config SND_PXA2XX_SOC_MIOA701 MIO A701. config SND_PXA2XX_SOC_IMOTE2 - tristate "SoC Audio support for IMote 2" - depends on SND_PXA2XX_SOC && MACH_INTELMOTE2 && I2C - select SND_PXA2XX_SOC_I2S - select SND_SOC_WM8940 - help - Say Y if you want to add support for SoC audio on the - IMote 2. + tristate "SoC Audio support for IMote 2" + depends on SND_PXA2XX_SOC && MACH_INTELMOTE2 && I2C + select SND_PXA2XX_SOC_I2S + select SND_SOC_WM8940 + help + Say Y if you want to add support for SoC audio on the + IMote 2. config SND_MMP_SOC_BROWNSTONE tristate "SoC Audio support for Marvell Brownstone"
sound/soc/tegra/tegra186_dspk.c +3 -4
@@ -1,8 +1,7 @@// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // // tegra186_dspk.c - Tegra186 DSPK driver -// -// Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. #include <linux/clk.h> #include <linux/device.h>
@@ -241,14 +240,14 @@ static int tegra186_dspk_hw_params(struct snd_pcm_substream *substream,return -EINVAL ; } - cif_conf.client_bits =TEGRA_ACIF_BITS_24 ; -switch (params_format (params)) {case SNDRV_PCM_FORMAT_S16_LE : cif_conf.audio_bits =TEGRA_ACIF_BITS_16 ; + cif_conf.client_bits =TEGRA_ACIF_BITS_16 ;break ;case SNDRV_PCM_FORMAT_S32_LE : cif_conf.audio_bits =TEGRA_ACIF_BITS_32 ; + cif_conf.client_bits =TEGRA_ACIF_BITS_24 ;break ;default :dev_err (dev,"unsupported format!\n" );
sound/usb/line6/driver.c +3 -3
@@ -202,7 +202,7 @@ int line6_send_raw_message_async(struct usb_line6 *line6, const char *buffer,struct urb *urb;/* create message: */ - msg =kmalloc (sizeof (struct message ),GFP_ATOMIC ); + msg =kzalloc (sizeof (struct message ),GFP_ATOMIC );if (msg ==NULL )return -ENOMEM ;
@@ -688,7 +688,7 @@ static int line6_init_cap_control(struct usb_line6 *line6)int ret;/* initialize USB buffers: */ - line6->buffer_listen =kmalloc (LINE6_BUFSIZE_LISTEN ,GFP_KERNEL ); + line6->buffer_listen =kzalloc (LINE6_BUFSIZE_LISTEN ,GFP_KERNEL );if (!line6->buffer_listen)return -ENOMEM ;
@@ -697,7 +697,7 @@ static int line6_init_cap_control(struct usb_line6 *line6)return -ENOMEM ;if (line6->properties->capabilities &LINE6_CAP_CONTROL_MIDI ) { - line6->buffer_message =kmalloc (LINE6_MIDI_MESSAGE_MAXLEN ,GFP_KERNEL ); + line6->buffer_message =kzalloc (LINE6_MIDI_MESSAGE_MAXLEN ,GFP_KERNEL );if (!line6->buffer_message)return -ENOMEM ;
tools/power/x86/turbostat/turbostat.8 +1 -1
@@ -320,7 +320,7 @@ below the processor's base frequency. Busy% = MPERF_delta/TSC_delta -Bzy_MHz = TSC_delta/APERF_delta/MPERF_delta/measurement_interval +Bzy_MHz = TSC_delta*APERF_delta/MPERF_delta/measurement_interval Note that these calculations depend on TSC_delta, so they are not reliable during intervals when TSC_MHz is not running at the base frequency.
tools/power/x86/turbostat/turbostat.c +4 -3
@@ -1685,9 +1685,10 @@ int sum_counters(struct thread_data *t, struct core_data *c, average.packages.rapl_dram_perf_status += p->rapl_dram_perf_status;for (i =0 , mp = sys.pp; mp; i++, mp = mp->next) { -if (mp->format ==FORMAT_RAW ) -continue ; - average.packages.counter[i] += p->counter[i]; +if ((mp->format ==FORMAT_RAW ) && (topo.num_packages ==0 )) + average.packages.counter[i] = p->counter[i]; +else + average.packages.counter[i] += p->counter[i]; }return 0 ; }
tools/testing/selftests/timers/valid-adjtimex.c +36 -37
90 lines not on this page · raw message