Linux 6.6.121
Greg Kroah-Hartman
maintainerI'm announcing the release of the 6.6.121 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
------------
Makefile | 2 arch/alpha/include/uapi/asm/ioctls.h | 8 arch/arm/Kconfig | 2 arch/arm/boot/dts/nxp/imx/imx6q-ba16.dtsi | 2 arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi | 1 arch/arm64/boot/dts/freescale/imx8qm-mek.dts | 1 arch/csky/mm/fault.c | 4 arch/loongarch/include/asm/inst.h | 13 + arch/riscv/include/asm/cacheflush.h | 15 - arch/riscv/kernel/probes/uprobes.c | 10 arch/x86/kernel/cpu/microcode/amd.c | 104 +++++--- drivers/atm/he.c | 3 drivers/counter/104-quad-8.c | 20 + drivers/counter/interrupt-cnt.c | 3 drivers/gpio/gpio-pca953x.c | 93 +++++-- drivers/gpio/gpio-rockchip.c | 1 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 8 drivers/gpu/drm/pl111/pl111_drv.c | 2 drivers/gpu/drm/radeon/pptable.h | 2 drivers/hid/hid-quirks.c | 9 drivers/md/dm-exception-store.h | 2 drivers/md/dm-snap.c | 73 ++--- drivers/misc/mei/hw-me-regs.h | 2 drivers/misc/mei/pci-me.c | 2 drivers/net/ethernet/3com/3c59x.c | 2 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 15 - drivers/net/ethernet/broadcom/bnxt/bnxt.h | 4 drivers/net/ethernet/freescale/enetc/enetc.h | 4 drivers/net/ethernet/marvell/prestera/prestera_devlink.c | 2 drivers/net/ethernet/mellanox/mlx5/core/port.c | 3 drivers/net/ethernet/mscc/ocelot.c | 6 drivers/net/usb/pegasus.c | 2 drivers/net/wwan/iosm/iosm_ipc_mux.c | 6 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 2 drivers/powercap/powercap_sys.c | 22 + drivers/scsi/ipr.c | 28 ++ drivers/scsi/libsas/sas_internal.h | 14 - drivers/scsi/sg.c | 20 + drivers/ufs/core/ufshcd.c | 36 ++ fs/btrfs/tree-log.c | 6 fs/nfs/Kconfig | 1 fs/nfs/namespace.c | 5 fs/nfs/nfs2xdr.c | 70 ----- fs/nfs/nfs3xdr.c | 108 +------- fs/nfs/nfs4proc.c | 13 - fs/nfs/nfs4trace.h | 1 fs/nfs/nfs4xdr.c | 4 fs/nfs_common/Makefile | 2 fs/nfs_common/common.c | 66 +++++ fs/nfsd/Kconfig | 1 fs/nfsd/blocklayout.c | 3 fs/nfsd/netns.h | 2 fs/nfsd/nfs3proc.c | 10 fs/nfsd/nfs3xdr.c | 5 fs/nfsd/nfs4proc.c | 13 - fs/nfsd/nfs4state.c | 44 +++ fs/nfsd/nfsctl.c | 5 fs/nfsd/nfsd.h | 1 fs/nfsd/nfsproc.c | 6 fs/nfsd/state.h | 2 fs/nfsd/vfs.c | 26 +- fs/nfsd/vfs.h | 11 fs/nfsd/xdr3.h | 2 fs/smb/client/nterr.h | 6 include/linux/netdevice.h | 3 include/linux/nfs_common.h | 16 + include/net/dst.h | 12 include/net/netfilter/nf_tables.h | 34 ++ include/trace/misc/nfs.h | 3 include/uapi/linux/nfs.h | 1 lib/crypto/aes.c | 4 mm/ksm.c | 126 ++++++++-- net/bpf/test_run.c | 60 +++- net/bridge/br_vlan_tunnel.c | 11 net/can/j1939/transport.c | 2 net/ceph/messenger_v2.c | 2 net/ceph/mon_client.c | 2 net/ceph/osd_client.c | 14 - net/ceph/osdmap.c | 24 + net/core/skbuff.c | 8 net/core/sock.c | 7 net/ipv4/arp.c | 7 net/ipv4/ip_output.c | 15 - net/ipv4/ping.c | 4 net/netfilter/nf_conncount.c | 2 net/netfilter/nf_tables_api.c | 72 +++++ net/netfilter/nft_synproxy.c | 6 net/sched/sch_qfq.c | 2 net/tls/tls_device.c | 18 - net/wireless/wext-core.c | 4 net/wireless/wext-priv.c | 4 sound/ac97/bus.c | 32 +- sound/soc/amd/yc/acp6x-mach.c | 7 sound/soc/fsl/fsl_sai.c | 3 sound/usb/quirks.c | 10 tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c | 96 +++++++ tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c | 4 tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c | 8 98 files changed, 1057 insertions(+), 527 deletions(-)
Alex Deucher (1):
drm/radeon: Remove __counted_by from ClockInfoArray.clockInfo[]
Alexander Stein (1):
ASoC: fsl_sai: Add missing registers to cache default
Alexander Sverdlin (1):
counter: interrupt-cnt: Drop IRQF_NO_THREAD flag
Alexander Usyskin (1):
mei: me: add nova lake point S DID
Alexandre Knecht (1):
bridge: fix C-VLAN preservation in 802.1ad vlan_tunnel egress
Alok Tiwari (1):
net: marvell: prestera: fix NULL dereference on devlink_alloc() failure
Amery Hung (2):
bpf: Make variables in bpf_prog_test_run_xdp less confusing
bpf: Support specifying linear xdp packet data size for BPF_PROG_TEST_RUN
Andrew Elantsev (1):
ASoC: amd: yc: Add quirk for Honor MagicBook X16 2025
Andy Shevchenko (2):
gpio: pca953x: Utilise dev_err_probe() where it makes sense
gpio: pca953x: Utilise temporary variable for struct device
Bartosz Golaszewski (2):
gpio: rockchip: mark the GPIO controller as sleeping
pinctrl: qcom: lpass-lpi: mark the GPIO controller as sleeping
Björn Töpel (2):
riscv: uprobes: Add missing fence.i after building the XOL buffer
riscv: Replace function-like macro by static inline function
Borislav Petkov (AMD) (1):
x86/microcode/AMD: Select which microcode patch to load
Brian Kao (1):
scsi: ufs: core: Fix EH failure after W-LUN resume error
Charlene Liu (1):
drm/amd/display: Fix DP no audio issue
Chen Hanxiao (1):
NFS: trace: show TIMEDOUT instead of 0x6e
ChenXiaoSong (3):
smb/client: fix NT_STATUS_UNABLE_TO_FREE_VM value smb/client: fix NT_STATUS_DEVICE_DOOR_OPEN value smb/client: fix NT_STATUS_NO_DATA_DETECTED value
Chuck Lever (2):
NFSD: NFSv4 file creation neglects setting ACL
NFSD: Remove NFSERR_EAGAIN
Di Zhu (1):
netdev: preserve NETIF_F_ALL_FOR_ALL across TSO updates
Eric Biggers (1):
lib/crypto: aes: Fix missing MMU protection for AES S-box
Eric Dumazet (2):
wifi: avoid kernel-infoleak from struct iw_point
arp: do not assume dev_hard_header() does not change skb->head
Ernest Van Hoecke (1):
gpio: pca953x: handle short interrupt pulses on PCAL devices
Fernando Fernandez Mancera (2):
netfilter: nft_synproxy: avoid possible data-race on update operation
netfilter: nf_conncount: update last_gc only when GC has been performed
Filipe Manana (1):
btrfs: always detect conflicting inodes when logging inode refs
Florian Westphal (1):
netfilter: nf_tables: avoid chain re-validation if possible
Gal Pressman (1):
net/mlx5e: Don't print error message due to invalid module
Greg Kroah-Hartman (1):
Linux 6.6.121
Haibo Chen (1):
arm64: dts: add off-on-delay-us for usdhc2 regulator
Haotian Zhang (1):
counter: 104-quad-8: Fix incorrect return value in IRQ handler
Haoxiang Li (1):
ALSA: ac97: fix a double free in snd_ac97_controller_register()
Hengqi Chen (1):
LoongArch: Add more instruction opcodes and emit_* helpers
Ian Ray (1):
ARM: dts: imx6q-ba16: fix RTC interrupt level
Ilya Dryomov (3):
libceph: replace overzealous BUG_ON in osdmap_apply_incremental()
libceph: return the handler error from mon_handle_auth_done()
libceph: make calc_target() set t->paused, not just clear it
Jeff Layton (1):
nfsd: convert to new timestamp accessors
Jerry Wu (1):
net: mscc: ocelot: Fix crash when adding interface under a lag
Jussi Laako (1):
ALSA: usb-audio: Update for native DSD support quirks
Kuniyuki Iwashima (1):
tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
Marek Vasut (1):
arm64: dts: imx8mp: Fix LAN8740Ai PHY reference clock on DH electronics i.MX8M Plus DHCOM
Miaoqian Lin (1):
drm/pl111: Fix error handling in pl111_amba_probe
Michal Rábek (1):
scsi: sg: Fix occasional bogus elapsed time that exceeds timeout
Mike Snitzer (1):
nfs_common: factor out nfs_errtbl and nfs_stat_to_errno
Mikulas Patocka (1):
dm-snapshot: fix 'scheduling while atomic' on real-time kernels
Mohammad Heib (1):
net: fix memory leak in skb_segment_list for GRO packets
NeilBrown (1):
nfsd: provide locking for v4_end_grace
Pedro Demarchi Gomes (1):
ksm: use range-walk function to jump over holes in scan_get_next_rmap_item
Petko Manolov (1):
net: usb: pegasus: fix memory leak in update_eth_regs_async()
Potin Lai (1):
gpio: pca953x: Add support for level-triggered interrupts
René Rebe (1):
HID: quirks: work around VID/PID conflict for appledisplay
Sam Edwards (1):
libceph: reset sparse-read state in osd_fault()
Sam James (1):
alpha: don't reference obsolete termio struct for TC* constants
Sascha Hauer (1):
gpio: pca953x: fix wrong error probe return value
Scott Mayhew (2):
NFSD: Fix permission check for read access to executable-only files
NFSv4: ensure the open stateid seqid doesn't go backwards
Sebastian Andrzej Siewior (1):
ARM: 9461/1: Disable HIGHPTE on PREEMPT_RT kernels
Sharath Chandra Vurukala (1):
net: Add locking to protect skb->dev access in ip_output
Shardul Bankar (1):
bpf: test_run: Fix ctx leak in bpf_prog_test_run_xdp error path
Srijit Bose (1):
bnxt_en: Fix potential data corruption with HW GRO/LRO
Stephen Smalley (1):
nfsd: set security label during create operations
Sumeet Pawnikar (2):
powercap: fix race condition in register_control_type()
powercap: fix sscanf() error return value handling
Takashi Iwai (1):
ALSA: ac97bus: Use guard() for mutex locks
Tetsuo Handa (2):
bpf: Fix reference count leak in bpf_prog_test_run_xdp()
can: j1939: make j1939_session_activate() fail if device is no longer registered
Thomas Fourier (2):
atm: Fix dma_free_coherent() size
net: 3com: 3c59x: fix possible null dereference in vortex_probe1()
Toke Høiland-Jørgensen (1):
bpf, test_run: Subtract size of xdp_frame from allowed metadata size
Trond Myklebust (2):
nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr()
NFS: Fix up the automount fs_context to use the correct cred
Tuo Li (1):
libceph: make free_choose_arg_map() resilient to partial allocation
Wei Fang (1):
net: enetc: fix build warning when PAGE_SIZE is greater than 128K
Weiming Shi (1):
net: sock: fix hardened usercopy panic in sock_recv_errqueue
Wen Xiong (1):
scsi: ipr: Enable/disable IRQD_NO_BALANCING during reset
Xiang Mei (1):
net/sched: sch_qfq: Fix NULL deref when deactivating inactive aggregate in qfq_reset
Xingui Yang (1):
scsi: Revert "scsi: libsas: Fix exp-attached device scan after probe failure scanned in again after probe failed"
Yang Li (1):
csky: fix csky_cmpxchg_fixup not working
Yonghong Song (1):
bpf: Fix an issue in bpf_prog_test_run_xdp when page size greater than 4K
Zilin Guan (2):
netfilter: nf_tables: fix memory leak in nf_tables_newrule()
net: wwan: iosm: Fix memory leak in ipc_mux_deinit()
yuan.gao (1):
inet: ping: Fix icmp out counting
ziming zhang (1):
libceph: prevent potential out-of-bounds reads in handle_auth_done()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 6 PATCHLEVEL = 6 -SUBLEVEL = 120 +SUBLEVEL = 121 EXTRAVERSION = NAME = Pinguïn Aangedreven
arch/alpha/include/uapi/asm/ioctls.h +4 -4
@@ -23,10 +23,10 @@#define TCSETSW _IOW('t', 21, struct termios)#define TCSETSF _IOW('t', 22, struct termios) -#define TCGETA _IOR('t', 23, struct termio) -#define TCSETA _IOW('t', 24, struct termio) -#define TCSETAW _IOW('t', 25, struct termio) -#define TCSETAF _IOW('t', 28, struct termio) +#define TCGETA 0x40127417 +#define TCSETA 0x80127418 +#define TCSETAW 0x80127419 +#define TCSETAF 0x8012741c#define TCSBRK _IO('t', 29)#define TCXONC _IO('t', 30)
arch/arm/Kconfig +1 -1
@@ -1308,7 +1308,7 @@ config HIGHMEM config HIGHPTE bool "Allocate 2nd-level pagetables from highmem" if EXPERT - depends on HIGHMEM + depends on HIGHMEM && !PREEMPT_RT default y help The VM uses one page of physical memory for each page table.
arch/arm/boot/dts/nxp/imx/imx6q-ba16.dtsi +1 -1
@@ -335,7 +335,7 @@ rtc@32 { pinctrl-0 = <&pinctrl_rtc>; reg = <0x32>; interrupt-parent = <&gpio4>; - interrupts = <10 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <10 IRQ_TYPE_LEVEL_LOW>; }; };
arch/arm64/boot/dts/freescale/imx8mp-dhcom-som.dtsi +1 -0
@@ -105,6 +105,7 @@ mdio { ethphy0f: ethernet-phy@0 { /* SMSC LAN8740Ai */ compatible = "ethernet-phy-id0007.c110", "ethernet-phy-ieee802.3-c22"; + clocks = <&clk IMX8MP_CLK_ENET_QOS>; interrupt-parent = <&gpio3>; interrupts = <19 IRQ_TYPE_LEVEL_LOW>; pinctrl-0 = <&pinctrl_ethphy0>;
arch/arm64/boot/dts/freescale/imx8qm-mek.dts +1 -0
@@ -38,6 +38,7 @@ reg_usdhc2_vmmc: usdhc2-vmmc { regulator-max-microvolt = <3000000>; gpio = <&lsio_gpio4 7 GPIO_ACTIVE_HIGH>; enable-active-high; + off-on-delay-us = <4800>; }; };
arch/csky/mm/fault.c +2 -2
@@ -45,8 +45,8 @@ static inline void csky_cmpxchg_fixup(struct pt_regs *regs)if (trap_no (regs) !=VEC_TLBMODIFIED )return ; -if (instruction_pointer (regs) == csky_cmpxchg_stw) -instruction_pointer_set (regs, csky_cmpxchg_ldw); +if (instruction_pointer (regs) == (unsigned long )&csky_cmpxchg_stw) +instruction_pointer_set (regs, (unsigned long )&csky_cmpxchg_ldw); return; }#endif
arch/loongarch/include/asm/inst.h +13 -0
@@ -65,6 +65,8 @@ enum reg2_op { revbd_op =0x0f , revh2w_op =0x10 , revhd_op =0x11 , + extwh_op =0x16 , + extwb_op = 0x17, }; enum reg2i5_op {
@@ -556,6 +558,8 @@ static inline void emit_##NAME(union loongarch_instruction *insn, \ DEF_EMIT_REG2_FORMAT(revb2h, revb2h_op) DEF_EMIT_REG2_FORMAT(revb2w, revb2w_op) DEF_EMIT_REG2_FORMAT(revbd, revbd_op) +DEF_EMIT_REG2_FORMAT(extwh, extwh_op) +DEF_EMIT_REG2_FORMAT(extwb, extwb_op)#define DEF_EMIT_REG2I5_FORMAT (NAME ,OP ) \ static inline void emit_##NAME(union loongarch_instruction *insn, \
@@ -607,6 +611,9 @@ DEF_EMIT_REG2I12_FORMAT(lu52id, lu52id_op) DEF_EMIT_REG2I12_FORMAT(andi, andi_op) DEF_EMIT_REG2I12_FORMAT(ori, ori_op) DEF_EMIT_REG2I12_FORMAT(xori, xori_op) +DEF_EMIT_REG2I12_FORMAT(ldb, ldb_op) +DEF_EMIT_REG2I12_FORMAT(ldh, ldh_op) +DEF_EMIT_REG2I12_FORMAT(ldw, ldw_op) DEF_EMIT_REG2I12_FORMAT(ldbu, ldbu_op) DEF_EMIT_REG2I12_FORMAT(ldhu, ldhu_op)DEF_EMIT_REG2I12_FORMAT (ldwu, ldwu_op)
@@ -695,9 +702,12 @@ static inline void emit_##NAME(union loongarch_instruction *insn, \ insn->reg3_format.rk = rk; \ } +DEF_EMIT_REG3_FORMAT(addw, addw_op) DEF_EMIT_REG3_FORMAT(addd, addd_op) DEF_EMIT_REG3_FORMAT(subd, subd_op) DEF_EMIT_REG3_FORMAT(muld, muld_op) +DEF_EMIT_REG3_FORMAT(divd, divd_op) +DEF_EMIT_REG3_FORMAT(modd, modd_op) DEF_EMIT_REG3_FORMAT(divdu, divdu_op) DEF_EMIT_REG3_FORMAT(moddu, moddu_op)DEF_EMIT_REG3_FORMAT (and, and_op)
@@ -709,6 +719,9 @@ DEF_EMIT_REG3_FORMAT(srlw, srlw_op) DEF_EMIT_REG3_FORMAT(srld, srld_op) DEF_EMIT_REG3_FORMAT(sraw, sraw_op) DEF_EMIT_REG3_FORMAT(srad, srad_op) +DEF_EMIT_REG3_FORMAT(ldxb, ldxb_op) +DEF_EMIT_REG3_FORMAT(ldxh, ldxh_op) +DEF_EMIT_REG3_FORMAT(ldxw, ldxw_op) DEF_EMIT_REG3_FORMAT(ldxbu, ldxbu_op) DEF_EMIT_REG3_FORMAT(ldxhu, ldxhu_op)DEF_EMIT_REG3_FORMAT (ldxwu, ldxwu_op)
arch/riscv/include/asm/cacheflush.h +10 -5
@@ -34,11 +34,6 @@ static inline void flush_dcache_page(struct page *page)flush_dcache_folio (page_folio (page)); } -/* -* RISC-V doesn't have an instruction to flush parts of the instruction cache, -* so instead we just flush the whole thing. -*/ -#define flush_icache_range (start, end) flush_icache_all()#define flush_icache_user_page (vma, pg, addr, len) \ flush_icache_mm(vma->vm_mm, 0)
@@ -59,6 +54,16 @@ void flush_icache_mm(struct mm_struct *mm, bool local);#endif /* CONFIG_SMP */ +/* +* RISC-V doesn't have an instruction to flush parts of the instruction cache, +* so instead we just flush the whole thing. +*/ +#define flush_icache_range flush_icache_range +static inline void flush_icache_range (unsigned long start,unsigned long end) +{ +flush_icache_all (); +} +extern unsigned int riscv_cbom_block_size;extern unsigned int riscv_cboz_block_size;void riscv_init_cbo_blocksizes (void );
arch/riscv/kernel/probes/uprobes.c +2 -8
@@ -167,6 +167,7 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr,/* Initialize the slot */ void *kaddr =kmap_atomic (page);void *dst = kaddr + (vaddr & ~PAGE_MASK ); +unsigned long start = (unsigned long )dst;memcpy (dst, src, len);
@@ -176,13 +177,6 @@ void arch_uprobe_copy_ixol(struct page *page, unsigned long vaddr, *(uprobe_opcode_t *)dst = __BUG_INSN_32; } +flush_icache_range (start, start + len);kunmap_atomic (kaddr); - -/* -* We probably need flush_icache_user_page() but it needs vma. -* This should work on most of architectures by default. If -* architecture needs to do something different it can define -* its own version of the function. -*/ -flush_dcache_page (page); }
arch/x86/kernel/cpu/microcode/amd.c +67 -37
129 lines not on this page · raw message
drivers/atm/he.c +2 -1
@@ -1587,7 +1587,8 @@ he_stop(struct he_dev *he_dev) he_dev->tbrq_base, he_dev->tbrq_phys);if (he_dev->tpdrq_base) -dma_free_coherent (&he_dev->pci_dev->dev,CONFIG_TBRQ_SIZE *sizeof (struct he_tbrq ), +dma_free_coherent (&he_dev->pci_dev->dev, +CONFIG_TPDRQ_SIZE *sizeof (struct he_tpdrq ), he_dev->tpdrq_base, he_dev->tpdrq_phys);dma_pool_destroy (he_dev->tpd_pool);
drivers/counter/104-quad-8.c +14 -6
@@ -1192,6 +1192,7 @@ static irqreturn_t quad8_irq_handler(int irq, void *private) {struct counter_device *counter = private;struct quad8 *const priv =counter_priv (counter); +struct device *dev = counter->parent;unsigned int status;unsigned long irq_status;unsigned long channel;
@@ -1200,8 +1201,11 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)int ret; ret =regmap_read (priv->map,QUAD8_INTERRUPT_STATUS , &status); -if (ret) -return ret; +if (ret) { +dev_WARN_ONCE (dev, true, +"Attempt to read Interrupt Status Register failed: %d\n" , ret); +return IRQ_NONE ; + }if (!status)return IRQ_NONE ;
@@ -1223,8 +1227,9 @@ static irqreturn_t quad8_irq_handler(int irq, void *private)break ;default :/* should never reach this path */ -WARN_ONCE (true,"invalid interrupt trigger function %u configured for channel %lu\n" , - flg_pins, channel); +dev_WARN_ONCE (dev, true, +"invalid interrupt trigger function %u configured for channel %lu\n" , + flg_pins, channel);continue ; }
@@ -1232,8 +1237,11 @@ static irqreturn_t quad8_irq_handler(int irq, void *private) } ret =regmap_write (priv->map,QUAD8_CHANNEL_OPERATION ,CLEAR_PENDING_INTERRUPTS ); -if (ret) -return ret; +if (ret) { +dev_WARN_ONCE (dev, true, +"Attempt to clear pending interrupts by writing to Channel Operation Register failed: %d\n" , ret); +return IRQ_HANDLED ; + }return IRQ_HANDLED ; }
drivers/counter/interrupt-cnt.c +1 -2
@@ -229,8 +229,7 @@ static int interrupt_cnt_probe(struct platform_device *pdev)irq_set_status_flags (priv->irq,IRQ_NOAUTOEN ); ret =devm_request_irq (dev, priv->irq, interrupt_cnt_isr, -IRQF_TRIGGER_RISING |IRQF_NO_THREAD , -dev_name (dev), counter); +IRQF_TRIGGER_RISING ,dev_name (dev), counter);if (ret)return ret;
drivers/gpio/gpio-pca953x.c +67 -26
196 lines not on this page · raw message
drivers/gpio/gpio-rockchip.c +1 -0
@@ -584,6 +584,7 @@ static int rockchip_gpiolib_register(struct rockchip_pin_bank *bank) gc->ngpio = bank->nr_pins; gc->label = bank->name; gc->parent = bank->dev; + gc->can_sleep = true; ret =gpiochip_add_data (gc, bank);if (ret) {
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +4 -4
@@ -1097,13 +1097,13 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)if (dc->current_state->res_ctx.pipe_ctx[i].stream_res.audio !=NULL ) num_audio++; } +if (num_audio >=1 && clk_mgr->funcs->enable_pme_wa) { +/*wake AZ from D3 first before access az endpoint*/ + clk_mgr->funcs->enable_pme_wa (clk_mgr); + } pipe_ctx->stream_res.audio->funcs->az_enable (pipe_ctx->stream_res.audio); -if (num_audio >=1 && clk_mgr->funcs->enable_pme_wa) -/*this is the first audio. apply the PME w/a in order to wake AZ from D3*/ - clk_mgr->funcs->enable_pme_wa (clk_mgr); - link_hwss->enable_audio_packet (pipe_ctx);if (pipe_ctx->stream_res.audio)
drivers/gpu/drm/pl111/pl111_drv.c +1 -1
@@ -294,7 +294,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev, variant->name, priv);if (ret !=0 ) {dev_err (dev,"%s failed irq %d\n" , __func__, ret); -return ret; + goto dev_put; } ret =pl111_modeset_init (drm);
drivers/gpu/drm/radeon/pptable.h +1 -1
@@ -450,7 +450,7 @@ typedef struct _ClockInfoArray{//sizeof(ATOM_PPLIB_CLOCK_INFO) UCHAR ucEntrySize; - UCHAR clockInfo[] __counted_by(ucNumEntries); +UCHAR clockInfo[]/*__counted_by(ucNumEntries)*/ ; }ClockInfoArray; typedef struct _NonClockInfoArray{
drivers/hid/hid-quirks.c +9 -0
@@ -232,6 +232,15 @@ static const struct hid_device_id hid_quirks[] = {* used as a driver. See hid_scan_report(). */ static const struct hid_device_id hid_have_special_driver[] = { +#if IS_ENABLED(CONFIG_APPLEDISPLAY) + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9218 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9219 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x921c ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x921d ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9222 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9226 ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_APPLE ,0x9236 ) }, +#endif #if IS_ENABLED(CONFIG_HID_A4TECH) {HID_USB_DEVICE (USB_VENDOR_ID_A4TECH ,USB_DEVICE_ID_A4TECH_WCP32PU ) }, { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
drivers/md/dm-exception-store.h +1 -1
@@ -29,7 +29,7 @@ typedef sector_t chunk_t;* chunk within the device. */ struct dm_exception { -struct hlist_bl_node hash_list; +struct hlist_node hash_list;chunk_t old_chunk;chunk_t new_chunk;
drivers/md/dm-snap.c +34 -39
182 lines not on this page · raw message
drivers/misc/mei/hw-me-regs.h +2 -0
@@ -122,6 +122,8 @@#define MEI_DEV_ID_WCL_P 0x4D70/* Wildcat Lake P */ +#define MEI_DEV_ID_NVL_S 0x6E68/* Nova Lake Point S */ +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +2 -0
@@ -129,6 +129,8 @@ static const struct pci_device_id mei_me_pci_tbl[] = { {MEI_PCI_DEVICE(MEI_DEV_ID_WCL_P, MEI_ME_PCH15_CFG)}, + {MEI_PCI_DEVICE(MEI_DEV_ID_NVL_S, MEI_ME_PCH15_CFG)}, +/* required last entry */ {0, } };
drivers/net/ethernet/3com/3c59x.c +1 -1
@@ -1473,7 +1473,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,return 0 ; free_ring: -dma_free_coherent (&pdev->dev, +dma_free_coherent (gendev,sizeof (struct boom_rx_desc ) *RX_RING_SIZE +sizeof (struct boom_tx_desc ) *TX_RING_SIZE , vp->rx_ring, vp->rx_ring_dma);
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -3
@@ -1268,9 +1268,11 @@ static u16 bnxt_alloc_agg_idx(struct bnxt_rx_ring_info *rxr, u16 agg_id)struct bnxt_tpa_idx_map *map = rxr->rx_tpa_idx_map;u16 idx = agg_id &MAX_TPA_P5_MASK ; -if (test_bit (idx, map->agg_idx_bmap)) - idx =find_first_zero_bit (map->agg_idx_bmap, -BNXT_AGG_IDX_BMAP_SIZE ); +if (test_bit (idx, map->agg_idx_bmap)) { + idx =find_first_zero_bit (map->agg_idx_bmap,MAX_TPA_P5 ); +if (idx >=MAX_TPA_P5 ) +return INVALID_HW_RING_ID ; + }__set_bit (idx, map->agg_idx_bmap); map->agg_id_tbl[agg_id] = idx;return idx;
@@ -1303,6 +1305,13 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,if (bp->flags &BNXT_FLAG_CHIP_P5 ) { agg_id =TPA_START_AGG_ID_P5 (tpa_start); agg_id =bnxt_alloc_agg_idx (rxr, agg_id); +if (unlikely (agg_id ==INVALID_HW_RING_ID )) { +netdev_warn (bp->dev,"Unable to allocate agg ID for ring %d, agg 0x%x\n" , + rxr->bnapi->index, +TPA_START_AGG_ID_P5 (tpa_start)); +bnxt_sched_reset_rxr (bp, rxr); +return ; + } }else { agg_id =TPA_START_AGG_ID (tpa_start); }
drivers/net/ethernet/broadcom/bnxt/bnxt.h +1 -3
@@ -898,11 +898,9 @@ struct bnxt_tpa_info {struct rx_agg_cmp *agg_arr; }; -#define BNXT_AGG_IDX_BMAP_SIZE (MAX_TPA_P5 / BITS_PER_LONG) -struct bnxt_tpa_idx_map {u16 agg_id_tbl[1024 ]; -unsigned long agg_idx_bmap[BNXT_AGG_IDX_BMAP_SIZE ]; + DECLARE_BITMAP(agg_idx_bmap, MAX_TPA_P5); };struct bnxt_rx_ring_info {
drivers/net/ethernet/freescale/enetc/enetc.h +2 -2
@@ -44,9 +44,9 @@ struct enetc_tx_swbd {#define ENETC_RXB_TRUESIZE (PAGE_SIZE >> 1)#define ENETC_RXB_PAD NET_SKB_PAD/* add extra space if needed */ #define ENETC_RXB_DMA_SIZE \ - (SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - ENETC_RXB_PAD) + min(SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - ENETC_RXB_PAD, 0xffff)#define ENETC_RXB_DMA_SIZE_XDP \ - (SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - XDP_PACKET_HEADROOM) + min(SKB_WITH_OVERHEAD(ENETC_RXB_TRUESIZE) - XDP_PACKET_HEADROOM, 0xffff)struct enetc_rx_swbd {dma_addr_t dma;
drivers/net/ethernet/marvell/prestera/prestera_devlink.c +2 -0
@@ -387,6 +387,8 @@ struct prestera_switch *prestera_devlink_alloc(struct prestera_device *dev) dl =devlink_alloc (&prestera_dl_ops,sizeof (struct prestera_switch ), dev->dev); +if (!dl) +return NULL ;return devlink_priv (dl); }
drivers/net/ethernet/mellanox/mlx5/core/port.c +2 -1
@@ -432,7 +432,8 @@ int mlx5_query_module_eeprom(struct mlx5_core_dev *dev,mlx5_qsfp_eeprom_params_set (&query.i2c_address, &query.page, &offset);break ;default : -mlx5_core_err (dev,"Module ID not recognized: 0x%x\n" , module_id); +mlx5_core_dbg (dev,"Module ID not recognized: 0x%x\n" , + module_id);return -EINVAL ; }
drivers/net/ethernet/mscc/ocelot.c +4 -2
@@ -2307,14 +2307,16 @@ static void ocelot_set_aggr_pgids(struct ocelot *ocelot)/* Now, set PGIDs for each active LAG */ for (lag =0 ; lag < ocelot->num_phys_ports; lag++) { -struct net_device *bond = ocelot->ports[lag]->bond; +struct ocelot_port *ocelot_port = ocelot->ports[lag];int num_active_ports =0 ; +struct net_device *bond;unsigned long bond_mask;u8 aggr_idx[16 ]; -if (!bond || (visited &BIT (lag))) +if (!ocelot_port || !ocelot_port->bond || (visited &BIT (lag)))continue ; + bond = ocelot_port->bond; bond_mask =ocelot_get_bond_mask (ocelot, bond);for_each_set_bit (port, &bond_mask, ocelot->num_phys_ports) {
drivers/net/usb/pegasus.c +2 -0
@@ -168,6 +168,8 @@ static int update_eth_regs_async(pegasus_t *pegasus)netif_device_detach (pegasus->net);netif_err (pegasus, drv, pegasus->net,"%s returned %d\n" , __func__, ret); +usb_free_urb (async_urb); +kfree (req); }return ret; }
drivers/net/wwan/iosm/iosm_ipc_mux.c +6 -0
@@ -456,6 +456,7 @@ void ipc_mux_deinit(struct iosm_mux *ipc_mux)struct sk_buff_head *free_list;union mux_msg mux_msg;struct sk_buff *skb; +int i;if (!ipc_mux->initialized)return ;
@@ -479,5 +480,10 @@ void ipc_mux_deinit(struct iosm_mux *ipc_mux) ipc_mux->channel->dl_pipe.is_open = false; } +if (ipc_mux->protocol !=MUX_LITE ) { +for (i =0 ; i <IPC_MEM_MUX_IP_SESSION_ENTRIES ; i++) +kfree (ipc_mux->ul_adb.pp_qlt[i]); + } +kfree (ipc_mux); }
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +1 -1
@@ -464,7 +464,7 @@ int lpi_pinctrl_probe(struct platform_device *pdev) pctrl->chip.base =-1 ; pctrl->chip.ngpio = data->npins; pctrl->chip.label =dev_name (dev); - pctrl->chip.can_sleep = false; + pctrl->chip.can_sleep = true;mutex_init (&pctrl->lock);
drivers/powercap/powercap_sys.c +14 -8
@@ -68,7 +68,7 @@ static ssize_t show_constraint_##_attr(struct device *dev, \int id; \struct powercap_zone_constraint *pconst;\ \ -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) \ +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 ) \return -EINVAL ; \if (id >= power_zone->const_id_cnt) \return -EINVAL ; \
@@ -93,7 +93,7 @@ static ssize_t store_constraint_##_attr(struct device *dev,\int id; \struct powercap_zone_constraint *pconst;\ \ -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) \ +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 ) \return -EINVAL ; \if (id >= power_zone->const_id_cnt) \return -EINVAL ; \
@@ -162,7 +162,7 @@ static ssize_t show_constraint_name(struct device *dev,ssize_t len = -ENODATA ;struct powercap_zone_constraint *pconst; -if (!sscanf (dev_attr->attr.name,"constraint_%d_" , &id)) +if (sscanf (dev_attr->attr.name,"constraint_%d_" , &id) !=1 )return -EINVAL ;if (id >= power_zone->const_id_cnt)return -EINVAL ;
@@ -625,17 +625,23 @@ struct powercap_control_type *powercap_register_control_type(INIT_LIST_HEAD (&control_type->node); control_type->dev.class = &powercap_class;dev_set_name (&control_type->dev,"%s" , name); - result =device_register (&control_type->dev); -if (result) { -put_device (&control_type->dev); -return ERR_PTR (result); - }idr_init (&control_type->idr);mutex_lock (&powercap_cntrl_list_lock);list_add_tail (&control_type->node, &powercap_cntrl_list);mutex_unlock (&powercap_cntrl_list_lock); + result =device_register (&control_type->dev); +if (result) { +mutex_lock (&powercap_cntrl_list_lock); +list_del (&control_type->node); +mutex_unlock (&powercap_cntrl_list_lock); + +idr_destroy (&control_type->idr); +put_device (&control_type->dev); +return ERR_PTR (result); + } +return control_type; }EXPORT_SYMBOL_GPL (powercap_register_control_type);
drivers/scsi/ipr.c +27 -1
@@ -61,8 +61,8 @@#include <linux/hdreg.h> #include <linux/reboot.h> #include <linux/stringify.h> +#include <linux/irq.h> #include <asm/io.h> -#include <asm/irq.h> #include <asm/processor.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h>
@@ -7892,6 +7892,30 @@ static int ipr_dump_mailbox_wait(struct ipr_cmnd *ipr_cmd)return IPR_RC_JOB_RETURN ; } +/** +* ipr_set_affinity_nobalance +* @ioa_cfg: ipr_ioa_cfg struct for an ipr device +* @flag: bool +* true: ensable "IRQ_NO_BALANCING" bit for msix interrupt +* false: disable "IRQ_NO_BALANCING" bit for msix interrupt +* Description: This function will be called to disable/enable +* "IRQ_NO_BALANCING" to avoid irqbalance daemon +* kicking in during adapter reset. +**/ +static void ipr_set_affinity_nobalance (struct ipr_ioa_cfg *ioa_cfg,bool flag) +{ +int irq, i; + +for (i =0 ; i < ioa_cfg->nvectors; i++) { + irq =pci_irq_vector (ioa_cfg->pdev, i); + +if (flag) +irq_set_status_flags (irq,IRQ_NO_BALANCING ); +else +irq_clear_status_flags (irq,IRQ_NO_BALANCING ); + } +} +/** * ipr_reset_restore_cfg_space - Restore PCI config space. * @ipr_cmd: ipr command struct
@@ -7916,6 +7940,7 @@ static int ipr_reset_restore_cfg_space(struct ipr_cmnd *ipr_cmd)return IPR_RC_JOB_CONTINUE ; } +ipr_set_affinity_nobalance (ioa_cfg, false);ipr_fail_all_ops (ioa_cfg);if (ioa_cfg->sis64) {
@@ -7995,6 +8020,7 @@ static int ipr_reset_start_bist(struct ipr_cmnd *ipr_cmd) rc =pci_write_config_byte (ioa_cfg->pdev,PCI_BIST ,PCI_BIST_START );if (rc ==PCIBIOS_SUCCESSFUL ) { +ipr_set_affinity_nobalance (ioa_cfg, true); ipr_cmd->job_step = ipr_reset_bist_done;ipr_reset_start_timer (ipr_cmd,IPR_WAIT_FOR_BIST_TIMEOUT ); rc =IPR_RC_JOB_RETURN ;
drivers/scsi/libsas/sas_internal.h +0 -14
@@ -133,20 +133,6 @@ static inline void sas_fail_probe(struct domain_device *dev, const char *func, i func, dev->parent ?"exp-attached" :"direct-attached" , SAS_ADDR(dev->sas_addr), err); - -/* -* If the device probe failed, the expander phy attached address -* needs to be reset so that the phy will not be treated as flutter -* in the next revalidation -*/ -if (dev->parent && !dev_is_expander (dev->dev_type)) { -struct sas_phy *phy = dev->phy; -struct domain_device *parent = dev->parent; -struct ex_phy *ex_phy = &parent->ex_dev.ex_phy[phy->number]; - -memset (ex_phy->attached_sas_addr,0 ,SAS_ADDR_SIZE ); - } -sas_unregister_dev (dev->port, dev); }
drivers/scsi/sg.c +13 -7
@@ -731,6 +731,8 @@ sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,sg_remove_request (sfp, srp);return -EFAULT ; } + hp->duration =jiffies_to_msecs (jiffies); +if (hp->interface_id !='S' ) {sg_remove_request (sfp, srp);return -ENOSYS ;
@@ -815,7 +817,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,return -ENODEV ; } - hp->duration =jiffies_to_msecs (jiffies);if (hp->interface_id !='\0' &&/* v3 (or later) interface */ (SG_FLAG_Q_AT_TAIL & hp->flags)) at_head =0 ;
@@ -1339,9 +1340,6 @@ sg_rq_end_io(struct request *rq, blk_status_t status)"sg_cmd_done: pack_id=%d, res=0x%x\n" , srp->header.pack_id, result)); srp->header.resid = resid; - ms =jiffies_to_msecs (jiffies); - srp->header.duration = (ms > srp->header.duration) ? - (ms - srp->header.duration) :0 ;if (0 != result) {struct scsi_sense_hdr sshdr;
@@ -1390,6 +1388,9 @@ sg_rq_end_io(struct request *rq, blk_status_t status) done =0 ; } srp->done = done; + ms =jiffies_to_msecs (jiffies); + srp->header.duration = (ms > srp->header.duration) ? + (ms - srp->header.duration) :0 ;write_unlock_irqrestore (&sfp->rq_list_lock, iflags);if (likely (done)) {
@@ -2537,6 +2538,7 @@ static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp)const sg_io_hdr_t *hp;const char * cp;unsigned int ms; +unsigned int duration; k =0 ;list_for_each_entry (fp, &sdp->sfds, sfd_siblings) {
@@ -2574,13 +2576,17 @@ static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp)seq_printf (s," id=%d blen=%d" , srp->header.pack_id, blen);if (srp->done) -seq_printf (s," dur=%d" , hp->duration); +seq_printf (s," dur=%u" , hp->duration);else { ms =jiffies_to_msecs (jiffies); -seq_printf (s," t_o/elap=%d/%d" , + duration =READ_ONCE (hp->duration); +if (duration) + duration = (ms > duration ? + ms - duration :0 ); +seq_printf (s," t_o/elap=%u/%u" , (new_interface ? hp->timeout :jiffies_to_msecs (fp->timeout)), - (ms > hp->duration ? ms - hp->duration :0 )); + duration); }seq_printf (s,"ms sgat=%d op=0x%02x\n" , usg, (int ) srp->data.cmd_opcode);
drivers/ufs/core/ufshcd.c +28 -8
@@ -6383,6 +6383,11 @@ static void ufshcd_clk_scaling_suspend(struct ufs_hba *hba, bool suspend)static void ufshcd_err_handling_prepare (struct ufs_hba *hba) { +/* +* A WLUN resume failure could potentially lead to the HBA being +* runtime suspended, so take an extra reference on hba->dev. +*/ +pm_runtime_get_sync (hba->dev);ufshcd_rpm_get_sync (hba);if (pm_runtime_status_suspended (&hba->ufs_device_wlun->sdev_gendev) || hba->is_sys_suspended) {
@@ -6423,6 +6428,7 @@ static void ufshcd_err_handling_unprepare(struct ufs_hba *hba)if (ufshcd_is_clkscaling_supported (hba))ufshcd_clk_scaling_suspend (hba, false);ufshcd_rpm_put (hba); +pm_runtime_put (hba->dev); }static inline bool ufshcd_err_handling_should_stop (struct ufs_hba *hba)
@@ -6437,28 +6443,42 @@ static inline bool ufshcd_err_handling_should_stop(struct ufs_hba *hba)#ifdef CONFIG_PM static void ufshcd_recover_pm_error (struct ufs_hba *hba) { +struct scsi_target *starget = hba->ufs_device_wlun->sdev_target;struct Scsi_Host *shost = hba->host;struct scsi_device *sdev;struct request_queue *q; -int ret; +bool resume_sdev_queues = false; hba->is_sys_suspended = false; +/* -* Set RPM status of wlun device to RPM_ACTIVE, -* this also clears its runtime error. +* Ensure the parent's error status is cleared before proceeding +* to the child, as the parent must be active to activate the child. */ - ret =pm_runtime_set_active (&hba->ufs_device_wlun->sdev_gendev); +if (hba->dev->power.runtime_error) { +/* hba->dev has no functional parent thus simplily set RPM_ACTIVE */ +pm_runtime_set_active (hba->dev); + resume_sdev_queues = true; + } + +if (hba->ufs_device_wlun->sdev_gendev.power.runtime_error) { +/* +* starget, parent of wlun, might be suspended if wlun resume failed. +* Make sure parent is resumed before set child (wlun) active. +*/ +pm_runtime_get_sync (&starget->dev); +pm_runtime_set_active (&hba->ufs_device_wlun->sdev_gendev); +pm_runtime_put_sync (&starget->dev); + resume_sdev_queues = true; + } -/* hba device might have a runtime error otherwise */ -if (ret) - ret =pm_runtime_set_active (hba->dev);/* * If wlun device had runtime error, we also need to resume those * consumer scsi devices in case any of them has failed to be * resumed due to supplier runtime resume failure. This is to unblock * blk_queue_enter in case there are bios waiting inside it. */ -if (!ret) { +if (resume_sdev_queues) {shost_for_each_device (sdev, shost) { q = sdev->request_queue; if (q->dev && (q->rpm_status == RPM_SUSPENDED ||
fs/btrfs/tree-log.c +2 -4
@@ -6002,10 +6002,8 @@ static int copy_inode_items_to_log(struct btrfs_trans_handle *trans,* and no keys greater than that, so bail out. */ break ; - }else if ((min_key->type ==BTRFS_INODE_REF_KEY || - min_key->type ==BTRFS_INODE_EXTREF_KEY ) && - (inode->generation == trans->transid || - ctx->logging_conflict_inodes)) { + }else if (min_key->type ==BTRFS_INODE_REF_KEY || + min_key->type ==BTRFS_INODE_EXTREF_KEY ) {u64 other_ino =0 ;u64 other_parent =0 ;
fs/nfs/Kconfig +1 -0
@@ -5,6 +5,7 @@ config NFS_FS select CRC32 select LOCKD select SUNRPC + select NFS_COMMON select NFS_ACL_SUPPORT if NFS_V3_ACL help Choose Y here if you want to access files residing on other
fs/nfs/namespace.c +5 -0
@@ -170,6 +170,11 @@ struct vfsmount *nfs_d_automount(struct path *path)if (!ctx->clone_data.fattr) goto out_fc; +if (fc->cred != server->cred) { +put_cred (fc->cred); + fc->cred =get_cred (server->cred); + } +if (fc->net_ns != client->cl_net) {put_net (fc->net_ns); fc->net_ns =get_net (client->cl_net);
fs/nfs/nfs2xdr.c +1 -69
93 lines not on this page · raw message
fs/nfs/nfs3xdr.c +20 -88
237 lines not on this page · raw message
fs/nfs/nfs4proc.c +11 -2
@@ -1700,8 +1700,17 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,if (nfs_stateid_is_sequential (state, stateid))break ; -if (status) -break ; +if (status) { +if (nfs4_stateid_match_other (stateid, &state->open_stateid) && + !nfs4_stateid_is_newer (stateid, &state->open_stateid)) { +trace_nfs4_open_stateid_update_skip (state->inode, + stateid, status); +return ; + }else { +break ; + } + } +/* Rely on seqids for serialisation with NFSv4.0 */ if (!nfs4_has_session (NFS_SERVER (state->inode)->nfs_client))break ;
fs/nfs/nfs4trace.h +1 -0
@@ -1248,6 +1248,7 @@ DEFINE_NFS4_INODE_STATEID_EVENT(nfs4_setattr);DEFINE_NFS4_INODE_STATEID_EVENT (nfs4_delegreturn);DEFINE_NFS4_INODE_STATEID_EVENT (nfs4_open_stateid_update);DEFINE_NFS4_INODE_STATEID_EVENT (nfs4_open_stateid_update_wait); +DEFINE_NFS4_INODE_STATEID_EVENT (nfs4_open_stateid_update_skip);DEFINE_NFS4_INODE_STATEID_EVENT (nfs4_close_stateid_update_wait); DECLARE_EVENT_CLASS(nfs4_getattr_event,
fs/nfs/nfs4xdr.c +1 -3
@@ -52,6 +52,7 @@#include <linux/nfs.h> #include <linux/nfs4.h> #include <linux/nfs_fs.h> +#include <linux/nfs_common.h> #include "nfs4_fs.h" #include "nfs4trace.h"
@@ -63,9 +64,6 @@#define NFSDBG_FACILITY NFSDBG_XDR -/* Mapping from NFS error code to "errno" error code. */ -#define errno_NFSERR_IO EIO -struct compound_hdr ;static int nfs4_stat_to_errno (int ); static void encode_layoutget(struct xdr_stream *xdr,
fs/nfs_common/Makefile +2 -0
@@ -8,3 +8,5 @@ nfs_acl-objs := nfsacl.o obj-$(CONFIG_GRACE_PERIOD) += grace.o obj-$(CONFIG_NFS_V4_2_SSC_HELPER) += nfs_ssc.o + +obj-$(CONFIG_NFS_COMMON) += common.o
fs/nfs_common/common.c new file +66 -0
66 lines not on this page · raw message
fs/nfsd/Kconfig +1 -0
@@ -8,6 +8,7 @@ config NFSD select LOCKD select SUNRPC select EXPORTFS + select NFS_COMMON select NFS_ACL_SUPPORT if NFSD_V2_ACL select NFS_ACL_SUPPORT if NFSD_V3_ACL depends on MULTIUSER
fs/nfsd/blocklayout.c +2 -1
@@ -119,11 +119,12 @@ static __be32 nfsd4_block_commit_blocks(struct inode *inode, struct nfsd4_layoutcommit *lcp, struct iomap *iomaps, int nr_iomaps) { + struct timespec64 mtime = inode_get_mtime(inode);struct iattr iattr = { .ia_valid =0 };int error;if (lcp->lc_mtime.tv_nsec ==UTIME_NOW || -timespec64_compare (&lcp->lc_mtime, &inode->i_mtime) <0 ) +timespec64_compare (&lcp->lc_mtime, &mtime) <0 ) lcp->lc_mtime =current_time (inode); iattr.ia_valid |=ATTR_ATIME |ATTR_CTIME |ATTR_MTIME ; iattr.ia_atime = iattr.ia_ctime = iattr.ia_mtime = lcp->lc_mtime;
fs/nfsd/netns.h +2 -0
@@ -65,6 +65,8 @@ struct nfsd_net {struct lock_manager nfsd4_manager;bool grace_ended; +bool grace_end_forced; +bool client_tracking_active;time64_t boot_time;struct dentry *nfsd_client_dir;
fs/nfsd/nfs3proc.c +6 -4
@@ -71,13 +71,15 @@ nfsd3_proc_setattr(struct svc_rqst *rqstp)struct nfsd_attrs attrs = { .na_iattr = &argp->attrs, }; +const struct timespec64 *guardtime =NULL ;dprintk ("nfsd: SETATTR(3) %s\n" ,SVCFH_fmt (&argp->fh));fh_copy (&resp->fh, &argp->fh); - resp->status =nfsd_setattr (rqstp, &resp->fh, &attrs, - argp->check_guard, argp->guardtime); +if (argp->check_guard) + guardtime = &argp->guardtime; + resp->status =nfsd_setattr (rqstp, &resp->fh, &attrs, guardtime);return rpc_success; }
@@ -294,8 +296,8 @@ nfsd3_create_file(struct svc_rqst *rqstp, struct svc_fh *fhp, status = nfserr_exist;break ;case NFS3_CREATE_EXCLUSIVE : -if (d_inode (child)->i_mtime.tv_sec == v_mtime && -d_inode (child)->i_atime.tv_sec == v_atime && +if (inode_get_mtime_sec (d_inode (child)) == v_mtime && +inode_get_atime_sec (d_inode (child)) == v_atime &&d_inode (child)->i_size ==0 ) {break ; }
fs/nfsd/nfs3xdr.c +1 -4
@@ -295,17 +295,14 @@ svcxdr_decode_sattr3(struct svc_rqst *rqstp, struct xdr_stream *xdr,static bool svcxdr_decode_sattrguard3 (struct xdr_stream *xdr,struct nfsd3_sattrargs *args) { -__be32 *p;u32 check;if (xdr_stream_decode_bool (xdr, &check) <0 )return false;if (check) { - p =xdr_inline_decode (xdr,XDR_UNIT *2 ); -if (!p) +if (!svcxdr_decode_nfstime3 (xdr, &args->guardtime))return false; args->check_guard =1 ; - args->guardtime =be32_to_cpup (p); }else args->check_guard =0 ;
fs/nfsd/nfs4proc.c +6 -7
@@ -322,8 +322,8 @@ nfsd4_create_file(struct svc_rqst *rqstp, struct svc_fh *fhp, status = nfserr_exist;break ;case NFS4_CREATE_EXCLUSIVE : -if (d_inode (child)->i_mtime.tv_sec == v_mtime && -d_inode (child)->i_atime.tv_sec == v_atime && +if (inode_get_mtime_sec (d_inode (child)) == v_mtime && +inode_get_atime_sec (d_inode (child)) == v_atime &&d_inode (child)->i_size ==0 ) { open->op_created = true;break ;/* subtle */
@@ -331,8 +331,8 @@ nfsd4_create_file(struct svc_rqst *rqstp, struct svc_fh *fhp, status = nfserr_exist;break ;case NFS4_CREATE_EXCLUSIVE4_1 : -if (d_inode (child)->i_mtime.tv_sec == v_mtime && -d_inode (child)->i_atime.tv_sec == v_atime && +if (inode_get_mtime_sec (d_inode (child)) == v_mtime && +inode_get_atime_sec (d_inode (child)) == v_atime &&d_inode (child)->i_size ==0 ) { open->op_created = true; goto set_attr;/* subtle */
@@ -1160,8 +1160,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, goto out; save_no_wcc = cstate->current_fh.fh_no_wcc; cstate->current_fh.fh_no_wcc = true; - status =nfsd_setattr (rqstp, &cstate->current_fh, &attrs, -0 , (time64_t )0 ); + status =nfsd_setattr (rqstp, &cstate->current_fh, &attrs,NULL ); cstate->current_fh.fh_no_wcc = save_no_wcc;if (!status) status =nfserrno (attrs.na_labelerr);
@@ -1355,7 +1354,7 @@ static __be32 nfsd4_ssc_setup_dul(struct nfsd_net *nn, char *ipaddr, (schedule_timeout(20*HZ) == 0)) {finish_wait (&nn->nfsd_ssc_waitq, &wait);kfree (work); -return nfserr_eagain; +return nfserr_jukebox; }finish_wait (&nn->nfsd_ssc_waitq, &wait); goto try_again;
fs/nfsd/nfs4state.c +41 -3
92 lines not on this page · raw message
fs/nfsd/nfsctl.c +2 -3
@@ -1110,10 +1110,9 @@ static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size)case 'Y' :case 'y' :case '1' : -if (!nn->nfsd_serv) +if (!nfsd4_force_end_grace (nn))return -EBUSY ;trace_nfsd_end_grace (netns (file)); -nfsd4_end_grace (nn);break ;default :return -EINVAL ;
@@ -1140,7 +1139,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode)/* Following advice from simple_fill_super documentation: */ inode->i_ino =iunique (sb, NFSD_MaxReserved); inode->i_mode = mode; - inode->i_atime = inode->i_mtime =inode_set_ctime_current (inode); +simple_inode_init_ts (inode);switch (mode &S_IFMT ) {case S_IFDIR : inode->i_fop = &simple_dir_operations;
fs/nfsd/nfsd.h +0 -1
@@ -201,7 +201,6 @@ void nfsd_lockd_shutdown(void);#define nfserr_noent cpu_to_be32(NFSERR_NOENT)#define nfserr_io cpu_to_be32(NFSERR_IO)#define nfserr_nxio cpu_to_be32(NFSERR_NXIO) -#define nfserr_eagain cpu_to_be32(NFSERR_EAGAIN)#define nfserr_acces cpu_to_be32(NFSERR_ACCES)#define nfserr_exist cpu_to_be32(NFSERR_EXIST)#define nfserr_xdev cpu_to_be32(NFSERR_XDEV)
fs/nfsd/nfsproc.c +3 -3
@@ -103,7 +103,7 @@ nfsd_proc_setattr(struct svc_rqst *rqstp) } } - resp->status =nfsd_setattr (rqstp, fhp, &attrs,0 , (time64_t )0 ); + resp->status =nfsd_setattr (rqstp, fhp, &attrs,NULL );if (resp->status != nfs_ok) goto out;
@@ -390,8 +390,8 @@ nfsd_proc_create(struct svc_rqst *rqstp)*/ attr->ia_valid &=ATTR_SIZE ;if (attr->ia_valid) - resp->status =nfsd_setattr (rqstp, newfhp, &attrs,0 , - (time64_t )0 ); + resp->status =nfsd_setattr (rqstp, newfhp, &attrs, +NULL ); } out_unlock:
fs/nfsd/state.h +1 -1
@@ -717,7 +717,7 @@ static inline void get_nfs4_file(struct nfs4_file *fi)struct nfsd_file *find_any_file (struct nfs4_file *f);/* grace period management */ -void nfsd4_end_grace (struct nfsd_net *nn); +bool nfsd4_force_end_grace (struct nfsd_net *nn);/* nfs4recover operations */ extern int nfsd4_client_tracking_init (struct net *net);
fs/nfsd/vfs.c +16 -10
@@ -459,7 +459,6 @@ static int __nfsd_setattr(struct dentry *dentry, struct iattr *iap)* @rqstp: controlling RPC transaction * @fhp: filehandle of target * @attr: attributes to set -* @check_guard: set to 1 if guardtime is a valid timestamp * @guardtime: do not act if ctime.tv_sec does not match this timestamp * * This call may adjust the contents of @attr (in particular, this
@@ -471,8 +470,7 @@ static int __nfsd_setattr(struct dentry *dentry, struct iattr *iap)*/ __be32 nfsd_setattr (struct svc_rqst *rqstp,struct svc_fh *fhp, -struct nfsd_attrs *attr, -int check_guard,time64_t guardtime) +struct nfsd_attrs *attr,const struct timespec64 *guardtime) {struct dentry *dentry;struct inode *inode;
@@ -521,9 +519,6 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,nfsd_sanitize_attrs (inode, iap); -if (check_guard && guardtime !=inode_get_ctime (inode).tv_sec) -return nfserr_notsync; -/* * The size case is special, it changes the file in addition to the * attributes, and file systems don't expect it to be mixed with
@@ -541,6 +536,16 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, err =fh_fill_pre_attrs (fhp);if (err) goto out_unlock; + +if (guardtime) { +struct timespec64 ctime =inode_get_ctime (inode); +if ((u32 )guardtime->tv_sec != (u32 )ctime.tv_sec || + guardtime->tv_nsec != ctime.tv_nsec) { + err = nfserr_notsync; + goto out_fill_attrs; + } + } +for (retries =1 ;;) {struct iattr attrs;
@@ -568,6 +573,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, attr->na_aclerr =set_posix_acl (&nop_mnt_idmap, dentry,ACL_TYPE_DEFAULT , attr->na_dpacl); +out_fill_attrs:fh_fill_post_attrs (fhp); out_unlock:inode_unlock (inode);
@@ -1373,8 +1379,8 @@ nfsd_create_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp,* Callers expect new file metadata to be committed even * if the attributes have not changed. */ -if (iap->ia_valid) - status =nfsd_setattr (rqstp, resfhp, attrs,0 , (time64_t )0 ); +if (nfsd_attrs_valid (attrs)) + status =nfsd_setattr (rqstp, resfhp, attrs,NULL );else status =nfserrno (commit_metadata (resfhp));
@@ -2474,8 +2480,8 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp,/* Allow read access to binaries even when mode 111 */ if (err == -EACCES &&S_ISREG (inode->i_mode) && - (acc == (NFSD_MAY_READ |NFSD_MAY_OWNER_OVERRIDE ) || - acc == (NFSD_MAY_READ |NFSD_MAY_READ_IF_EXEC ))) + (((acc &NFSD_MAY_MASK ) ==NFSD_MAY_READ ) && + (acc & (NFSD_MAY_OWNER_OVERRIDE |NFSD_MAY_READ_IF_EXEC )))) err =inode_permission (&nop_mnt_idmap, inode,MAY_EXEC );return err?nfserrno (err) :0 ;
fs/nfsd/vfs.h +10 -1
@@ -60,6 +60,15 @@ static inline void nfsd_attrs_free(struct nfsd_attrs *attrs)posix_acl_release (attrs->na_dpacl); } +static inline bool nfsd_attrs_valid (struct nfsd_attrs *attrs) +{ +struct iattr *iap = attrs->na_iattr; + +return (iap->ia_valid || (attrs->na_seclabel && + attrs->na_seclabel->len) || + attrs->na_pacl || attrs->na_dpacl); +} +__be32 nfserrno (int errno);int nfsd_cross_mnt (struct svc_rqst *rqstp,struct dentry **dpp,struct svc_export **expp);
@@ -69,7 +78,7 @@ __be32 nfsd_lookup_dentry(struct svc_rqst *, struct svc_fh *, const char *, unsigned int, struct svc_export **, struct dentry **);__be32 nfsd_setattr (struct svc_rqst *,struct svc_fh *, -struct nfsd_attrs *,int ,time64_t ); +struct nfsd_attrs *,const struct timespec64 *);int nfsd_mountpoint (struct dentry *,struct svc_export *);#ifdef CONFIG_NFSD_V4 __be32 nfsd4_vfs_fallocate(struct svc_rqst *, struct svc_fh *,
fs/nfsd/xdr3.h +1 -1
@@ -14,7 +14,7 @@ struct nfsd3_sattrargs {struct svc_fh fh;struct iattr attrs;int check_guard; -time64_t guardtime; +struct timespec64 guardtime; };struct nfsd3_diropargs {
fs/smb/client/nterr.h +3 -3
@@ -41,10 +41,10 @@ extern const struct nt_err_code_struct nt_errs[];#define NT_STATUS_MEDIA_CHANGED 0x8000001c#define NT_STATUS_END_OF_MEDIA 0x8000001e#define NT_STATUS_MEDIA_CHECK 0x80000020 -#define NT_STATUS_NO_DATA_DETECTED 0x8000001c +#define NT_STATUS_NO_DATA_DETECTED 0x80000022#define NT_STATUS_STOPPED_ON_SYMLINK 0x8000002d#define NT_STATUS_DEVICE_REQUIRES_CLEANING 0x80000288 -#define NT_STATUS_DEVICE_DOOR_OPEN 0x80000288 +#define NT_STATUS_DEVICE_DOOR_OPEN 0x80000289#define NT_STATUS_UNSUCCESSFUL 0xC0000000 | 0x0001#define NT_STATUS_NOT_IMPLEMENTED 0xC0000000 | 0x0002#define NT_STATUS_INVALID_INFO_CLASS 0xC0000000 | 0x0003
@@ -70,7 +70,7 @@ extern const struct nt_err_code_struct nt_errs[];#define NT_STATUS_NO_MEMORY 0xC0000000 | 0x0017#define NT_STATUS_CONFLICTING_ADDRESSES 0xC0000000 | 0x0018#define NT_STATUS_NOT_MAPPED_VIEW 0xC0000000 | 0x0019 -#define NT_STATUS_UNABLE_TO_FREE_VM 0x80000000 | 0x001a +#define NT_STATUS_UNABLE_TO_FREE_VM 0xC0000000 | 0x001a#define NT_STATUS_UNABLE_TO_DELETE_SECTION 0xC0000000 | 0x001b#define NT_STATUS_INVALID_SYSTEM_SERVICE 0xC0000000 | 0x001c#define NT_STATUS_ILLEGAL_INSTRUCTION 0xC0000000 | 0x001d
include/linux/netdevice.h +2 -1
@@ -4998,7 +4998,8 @@ netdev_features_t netdev_increment_features(netdev_features_t all,static inline netdev_features_t netdev_add_tso_features (netdev_features_t features,netdev_features_t mask) { -return netdev_increment_features (features,NETIF_F_ALL_TSO , mask); +return netdev_increment_features (features,NETIF_F_ALL_TSO | +NETIF_F_ALL_FOR_ALL , mask); }int __netdev_update_features (struct net_device *dev);
include/linux/nfs_common.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* This file contains constants and methods used by both NFS client and server. +*/ +#ifndef _LINUX_NFS_COMMON_H +#define _LINUX_NFS_COMMON_H + +#include <linux/errno.h> +#include <uapi/linux/nfs.h> + +/* Mapping from NFS error code to "errno" error code. */ +#define errno_NFSERR_IO EIO + +int nfs_stat_to_errno (enum nfs_stat status); + +#endif /* _LINUX_NFS_COMMON_H */
include/net/dst.h +12 -0
@@ -569,6 +569,18 @@ static inline void skb_dst_update_pmtu_no_confirm(struct sk_buff *skb, u32 mtu) dst->ops->update_pmtu (dst,NULL , skb, mtu, false); } +static inline struct net_device *dst_dev_rcu (const struct dst_entry *dst) +{ +/* In the future, use rcu_dereference(dst->dev) */ +WARN_ON_ONCE (!rcu_read_lock_held ()); +return READ_ONCE (dst->dev); +} + +static inline struct net_device *skb_dst_dev_rcu (const struct sk_buff *skb) +{ +return dst_dev_rcu (skb_dst (skb)); +} +struct dst_entry *dst_blackhole_check (struct dst_entry *dst,u32 cookie);void dst_blackhole_update_pmtu (struct dst_entry *dst,struct sock *sk,struct sk_buff *skb,u32 mtu,bool confirm_neigh);
include/net/netfilter/nf_tables.h +26 -8
@@ -1079,6 +1079,29 @@ struct nft_rule_blob { __attribute__((aligned(__alignof__(struct nft_rule_dp)))); }; +enum nft_chain_types { +NFT_CHAIN_T_DEFAULT =0 , +NFT_CHAIN_T_ROUTE , +NFT_CHAIN_T_NAT , +NFT_CHAIN_T_MAX +}; + +/** +* struct nft_chain_validate_state - validation state +* +* If a chain is encountered again during table validation it is +* possible to avoid revalidation provided the calling context is +* compatible. This structure stores relevant calling context of +* previous validations. +* +* @hook_mask: the hook numbers and locations the chain is linked to +* @depth: the deepest call chain level the chain is linked to +*/ +struct nft_chain_validate_state { +u8 hook_mask[NFT_CHAIN_T_MAX ]; +u8 depth; +}; +/** * struct nft_chain - nf_tables chain *
@@ -1097,6 +1120,7 @@ struct nft_rule_blob {* @udlen: user data length * @udata: user data in the chain * @blob_next: rule blob pointer to the next in the chain +* @vstate: validation state */ struct nft_chain {struct nft_rule_blob __rcu *blob_gen_0;
@@ -1116,9 +1140,10 @@ struct nft_chain {/* Only used during control plane commit phase: */ struct nft_rule_blob *blob_next; +struct nft_chain_validate_state vstate; }; -int nft_chain_validate (const struct nft_ctx *ctx,const struct nft_chain *chain); +int nft_chain_validate (const struct nft_ctx *ctx,struct nft_chain *chain);int nft_setelem_validate (const struct nft_ctx *ctx,struct nft_set *set,const struct nft_set_iter *iter,struct nft_set_elem *elem);
@@ -1126,13 +1151,6 @@ int nft_set_catchall_validate(const struct nft_ctx *ctx, struct nft_set *set);int nf_tables_bind_chain (const struct nft_ctx *ctx,struct nft_chain *chain);void nf_tables_unbind_chain (const struct nft_ctx *ctx,struct nft_chain *chain); -enum nft_chain_types { -NFT_CHAIN_T_DEFAULT =0 , -NFT_CHAIN_T_ROUTE , -NFT_CHAIN_T_NAT , -NFT_CHAIN_T_MAX -}; -/** * struct nft_chain_type - nf_tables chain type info *
include/trace/misc/nfs.h +1 -2
@@ -16,7 +16,6 @@ TRACE_DEFINE_ENUM(NFSERR_PERM);TRACE_DEFINE_ENUM (NFSERR_NOENT );TRACE_DEFINE_ENUM (NFSERR_IO );TRACE_DEFINE_ENUM (NFSERR_NXIO ); -TRACE_DEFINE_ENUM (NFSERR_EAGAIN );TRACE_DEFINE_ENUM (NFSERR_ACCES );TRACE_DEFINE_ENUM (NFSERR_EXIST );TRACE_DEFINE_ENUM (NFSERR_XDEV );
@@ -52,7 +51,7 @@ TRACE_DEFINE_ENUM(NFSERR_JUKEBOX); { NFSERR_IO, "IO" }, \ { NFSERR_NXIO, "NXIO" }, \ { ECHILD, "CHILD" }, \ - { NFSERR_EAGAIN, "AGAIN" }, \ + { ETIMEDOUT, "TIMEDOUT" }, \ { NFSERR_ACCES, "ACCES" }, \ { NFSERR_EXIST, "EXIST" }, \ { NFSERR_XDEV, "XDEV" }, \
include/uapi/linux/nfs.h +0 -1
@@ -49,7 +49,6 @@NFSERR_NOENT =2 ,/* v2 v3 v4 */ NFSERR_IO =5 ,/* v2 v3 v4 */ NFSERR_NXIO =6 ,/* v2 v3 v4 */ -NFSERR_EAGAIN =11 ,/* v2 v3 */ NFSERR_ACCES =13 ,/* v2 v3 v4 */ NFSERR_EXIST =17 ,/* v2 v3 v4 */ NFSERR_XDEV = 18, /* v3 v4 */
lib/crypto/aes.c +2 -2
@@ -12,7 +12,7 @@* Emit the sbox as volatile const to prevent the compiler from doing * constant folding on sbox references involving fixed indexes. */ -static volatile const u8 __cacheline_aligned aes_sbox[] = { +static volatile const u8 ____cacheline_aligned aes_sbox[] = {0x63 ,0x7c ,0x77 ,0x7b ,0xf2 ,0x6b ,0x6f ,0xc5 ,0x30 ,0x01 ,0x67 ,0x2b ,0xfe ,0xd7 ,0xab ,0x76 ,0xca ,0x82 ,0xc9 ,0x7d ,0xfa ,0x59 ,0x47 ,0xf0 ,
@@ -47,7 +47,7 @@ static volatile const u8 __cacheline_aligned aes_sbox[] = { 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16, }; -static volatile const u8 __cacheline_aligned aes_inv_sbox[] = { +static volatile const u8 ____cacheline_aligned aes_inv_sbox[] = {0x52 ,0x09 ,0x6a ,0xd5 ,0x30 ,0x36 ,0xa5 ,0x38 ,0xbf ,0x40 ,0xa3 ,0x9e ,0x81 ,0xf3 ,0xd7 ,0xfb ,0x7c ,0xe3 ,0x39 ,0x82 ,0x9b ,0x2f ,0xff ,0x87 ,
mm/ksm.c +113 -13
151 lines not on this page · raw message
net/bpf/test_run.c +39 -21
134 lines not on this page · raw message
net/bridge/br_vlan_tunnel.c +7 -4
@@ -187,7 +187,6 @@ int br_handle_egress_vlan_tunnel(struct sk_buff *skb, {struct metadata_dst *tunnel_dst;__be64 tunnel_id; -int err;if (!vlan)return 0 ;
@@ -197,9 +196,13 @@ int br_handle_egress_vlan_tunnel(struct sk_buff *skb,return 0 ;skb_dst_drop (skb); - err =skb_vlan_pop (skb); -if (err) -return err; +/* For 802.1ad (QinQ), skb_vlan_pop() incorrectly moves the C-VLAN +* from payload to hwaccel after clearing S-VLAN. We only need to +* clear the hwaccel S-VLAN; the C-VLAN must stay in payload for +* correct VXLAN encapsulation. This is also correct for 802.1Q +* where no C-VLAN exists in payload. +*/ +__vlan_hwaccel_clear_tag (skb);if (BR_INPUT_SKB_CB (skb)->backup_nhid) { tunnel_dst = __ip_tun_set_dst(0, 0, 0, 0, 0, TUNNEL_KEY,
net/can/j1939/transport.c +2 -0
@@ -1571,6 +1571,8 @@ int j1939_session_activate(struct j1939_session *session)if (active) {j1939_session_put (active); ret = -EAGAIN ; + }else if (priv->ndev->reg_state !=NETREG_REGISTERED ) { + ret = -ENODEV ; }else {WARN_ON_ONCE (session->state !=J1939_SESSION_NEW ); list_add_tail(&session->active_session_list_entry,
net/ceph/messenger_v2.c +2 -0
@@ -2409,7 +2409,9 @@ static int process_auth_done(struct ceph_connection *con, void *p, void *end)ceph_decode_64_safe (&p, end, global_id, bad);ceph_decode_32_safe (&p, end, con->v2.con_mode, bad); +ceph_decode_32_safe (&p, end, payload_len, bad); +ceph_decode_need (&p, end, payload_len, bad);dout ("%s con %p global_id %llu con_mode %d payload_len %d\n" , __func__, con, global_id, con->v2.con_mode, payload_len);
net/ceph/mon_client.c +1 -1
@@ -1417,7 +1417,7 @@ static int mon_handle_auth_done(struct ceph_connection *con,if (!ret)finish_hunting (monc);mutex_unlock (&monc->mutex); -return 0 ; +return ret; } static int mon_handle_auth_bad_method(struct ceph_connection *con,
net/ceph/osd_client.c +12 -2
@@ -1611,6 +1611,7 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc,struct ceph_pg_pool_info *pi;struct ceph_pg pgid, last_pgid;struct ceph_osds up, acting; +bool should_be_paused;bool is_read = t->flags &CEPH_OSD_FLAG_READ ;bool is_write = t->flags &CEPH_OSD_FLAG_WRITE ;bool force_resend = false;
@@ -1679,10 +1680,16 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc, &last_pgid)) force_resend = true; -if (t->paused && !target_should_be_paused (osdc, t, pi)) { - t->paused = false; + should_be_paused =target_should_be_paused (osdc, t, pi); +if (t->paused && !should_be_paused) { unpaused = true; } +if (t->paused != should_be_paused) { +dout ("%s t %p paused %d -> %d\n" , __func__, t, t->paused, + should_be_paused); + t->paused = should_be_paused; + } + legacy_change =ceph_pg_compare (&t->pgid, &pgid) ||ceph_osds_changed (&t->acting, &acting, t->used_replica || any_change);
@@ -4306,6 +4313,9 @@ static void osd_fault(struct ceph_connection *con) goto out_unlock; } + osd->o_sparse_op_idx =-1 ; +ceph_init_sparse_read (&osd->o_sparse_read); +if (!reopen_osd (osd))kick_osd_requests (osd);maybe_request_map (osdc);
net/ceph/osdmap.c +15 -9
@@ -241,22 +241,26 @@ static struct crush_choose_arg_map *alloc_choose_arg_map(void)static void free_choose_arg_map (struct crush_choose_arg_map *arg_map) { -if (arg_map) { -int i, j; +int i, j; + +if (!arg_map) +return ; -WARN_ON (!RB_EMPTY_NODE (&arg_map->node)); +WARN_ON (!RB_EMPTY_NODE (&arg_map->node)); +if (arg_map->args) {for (i =0 ; i < arg_map->size; i++) {struct crush_choose_arg *arg = &arg_map->args[i]; - -for (j =0 ; j < arg->weight_set_size; j++) -kfree (arg->weight_set[j].weights); -kfree (arg->weight_set); +if (arg->weight_set) { +for (j =0 ; j < arg->weight_set_size; j++) +kfree (arg->weight_set[j].weights); +kfree (arg->weight_set); + }kfree (arg->ids); }kfree (arg_map->args); -kfree (arg_map); } +kfree (arg_map); } DEFINE_RB_FUNCS(choose_arg_map, struct crush_choose_arg_map, choose_args_index,
@@ -1979,11 +1983,13 @@ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end, bool msgr2, sizeof(u64) + sizeof(u32), e_inval);ceph_decode_copy (p, &fsid,sizeof (fsid)); epoch =ceph_decode_32 (p); -BUG_ON (epoch != map->epoch+1 );ceph_decode_copy (p, &modified,sizeof (modified)); new_pool_max =ceph_decode_64 (p); new_flags =ceph_decode_32 (p); +if (epoch != map->epoch +1 ) + goto e_inval; +/* full map? */ ceph_decode_32_safe (p, end, len, e_inval);if (len >0 ) {
net/core/skbuff.c +5 -3
@@ -4344,12 +4344,14 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb, {struct sk_buff *list_skb =skb_shinfo (skb)->frag_list;unsigned int tnl_hlen =skb_tnl_header_len (skb); -unsigned int delta_truesize =0 ;unsigned int delta_len =0 ;struct sk_buff *tail =NULL ;struct sk_buff *nskb, *tmp;int len_diff, err; +/* Only skb_gro_receive_list generated skbs arrive here */ +DEBUG_NET_WARN_ON_ONCE (!(skb_shinfo (skb)->gso_type &SKB_GSO_FRAGLIST )); +skb_push (skb, -skb_network_offset (skb) + offset);/* Ensure the head is writeable before touching the shared info */
@@ -4363,8 +4365,9 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb, nskb = list_skb; list_skb = list_skb->next; +DEBUG_NET_WARN_ON_ONCE (nskb->sk); + err =0 ; - delta_truesize += nskb->truesize;if (skb_shared (nskb)) { tmp =skb_clone (nskb,GFP_ATOMIC );if (tmp) {
@@ -4407,7 +4410,6 @@ struct sk_buff *skb_segment_list(struct sk_buff *skb, goto err_linearize; } - skb->truesize = skb->truesize - delta_truesize; skb->data_len = skb->data_len - delta_len; skb->len = skb->len - delta_len;
net/core/sock.c +4 -3
@@ -3653,7 +3653,7 @@ void sock_enable_timestamp(struct sock *sk, enum sock_flags flag)int sock_recv_errqueue (struct sock *sk,struct msghdr *msg,int len,int level,int type) { -struct sock_exterr_skb *serr; +struct sock_extended_err ee;struct sk_buff *skb;int copied, err;
@@ -3673,8 +3673,9 @@ int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len,sock_recv_timestamp (msg, sk, skb); - serr =SKB_EXT_ERR (skb); -put_cmsg (msg, level, type,sizeof (serr->ee), &serr->ee); +/* We must use a bounce buffer for CONFIG_HARDENED_USERCOPY=y */ + ee =SKB_EXT_ERR (skb)->ee; +put_cmsg (msg, level, type,sizeof (ee), &ee); msg->msg_flags |=MSG_ERRQUEUE ; err = copied;
net/ipv4/arp.c +4 -3
@@ -563,7 +563,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,skb_reserve (skb, hlen);skb_reset_network_header (skb); - arp =skb_put (skb,arp_hdr_len (dev)); +skb_put (skb,arp_hdr_len (dev)); skb->dev = dev; skb->protocol =htons (ETH_P_ARP );if (!src_hw)
@@ -571,12 +571,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,if (!dest_hw) dest_hw = dev->broadcast; -/* -* Fill the device header for the ARP frame +/* Fill the device header for the ARP frame. +* Note: skb->head can be changed. */ if (dev_hard_header (skb, dev, ptype, dest_hw, src_hw, skb->len) <0 ) goto out; + arp =arp_hdr (skb);/* * Fill out the arp protocol part. *
net/ipv4/ip_output.c +10 -5
@@ -425,15 +425,20 @@ int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb)int ip_output (struct net *net,struct sock *sk,struct sk_buff *skb) { -struct net_device *dev =skb_dst (skb)->dev, *indev = skb->dev; +struct net_device *dev, *indev = skb->dev; +int ret_val; +rcu_read_lock (); + dev =skb_dst_dev_rcu (skb); skb->dev = dev; skb->protocol =htons (ETH_P_IP ); -return NF_HOOK_COND (NFPROTO_IPV4 ,NF_INET_POST_ROUTING , - net, sk, skb, indev, dev, - ip_finish_output, - !(IPCB (skb)->flags &IPSKB_REROUTED )); + ret_val =NF_HOOK_COND (NFPROTO_IPV4 ,NF_INET_POST_ROUTING , + net, sk, skb, indev, dev, + ip_finish_output, + !(IPCB (skb)->flags &IPSKB_REROUTED )); +rcu_read_unlock (); +return ret_val; }EXPORT_SYMBOL (ip_output);
net/ipv4/ping.c +1 -3
@@ -839,10 +839,8 @@ static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) out_free:if (free)kfree (ipc.opt); -if (!err) { -icmp_out_count (sock_net (sk), user_icmph.type); +if (!err)return len; - }return err; do_confirm:
net/netfilter/nf_conncount.c +1 -1
@@ -229,6 +229,7 @@ static int __nf_conncount_add(struct net *net,nf_ct_put (found_ct); } + list->last_gc = (u32 )jiffies; add_new_node:if (WARN_ON_ONCE (list->count >INT_MAX )) {
@@ -248,7 +249,6 @@ static int __nf_conncount_add(struct net *net, conn->jiffies32 = (u32 )jiffies;list_add_tail (&conn->node, &list->head); list->count++; - list->last_gc = (u32 )jiffies; out_put:if (refcounted)
net/netfilter/nf_tables_api.c +67 -5
132 lines not on this page · raw message
net/netfilter/nft_synproxy.c +3 -3
@@ -48,7 +48,7 @@ static void nft_synproxy_eval_v4(const struct nft_synproxy *priv,struct tcphdr *_tcph, struct synproxy_options *opts) { - struct nf_synproxy_info info = priv->info; + struct nf_synproxy_info info = READ_ONCE(priv->info);struct net *net =nft_net (pkt);struct synproxy_net *snet =synproxy_pernet (net);struct sk_buff *skb = pkt->skb;
@@ -79,7 +79,7 @@ static void nft_synproxy_eval_v6(const struct nft_synproxy *priv,struct tcphdr *_tcph, struct synproxy_options *opts) { - struct nf_synproxy_info info = priv->info; + struct nf_synproxy_info info = READ_ONCE(priv->info);struct net *net =nft_net (pkt);struct synproxy_net *snet =synproxy_pernet (net);struct sk_buff *skb = pkt->skb;
@@ -340,7 +340,7 @@ static void nft_synproxy_obj_update(struct nft_object *obj,struct nft_synproxy *newpriv =nft_obj_data (newobj);struct nft_synproxy *priv =nft_obj_data (obj); - priv->info = newpriv->info; +WRITE_ONCE (priv->info, newpriv->info); }static struct nft_object_type nft_synproxy_obj_type;
net/sched/sch_qfq.c +1 -1
@@ -1484,7 +1484,7 @@ static void qfq_reset_qdisc(struct Qdisc *sch)for (i =0 ; i < q->clhash.hashsize; i++) {hlist_for_each_entry (cl, &q->clhash.hash[i], common.hnode) { -if (cl->qdisc->q.qlen >0 ) +if (cl_is_active (cl))qfq_deactivate_class (q, cl);qdisc_reset (cl->qdisc);
net/tls/tls_device.c +10 -8
@@ -125,17 +125,19 @@ static void tls_device_queue_ctx_destruction(struct tls_context *ctx)/* We assume that the socket is already connected */ static struct net_device *get_netdev_for_sock (struct sock *sk) { -struct dst_entry *dst =sk_dst_get (sk); -struct net_device *netdev =NULL ; +struct net_device *dev, *lowest_dev =NULL ; +struct dst_entry *dst; -if (likely (dst)) { - netdev =netdev_sk_get_lowest_dev (dst->dev, sk); -dev_hold (netdev); +rcu_read_lock (); + dst =__sk_dst_get (sk); + dev = dst ?dst_dev_rcu (dst) :NULL ; +if (likely (dev)) { + lowest_dev =netdev_sk_get_lowest_dev (dev, sk); +dev_hold (lowest_dev); } +rcu_read_unlock (); -dst_release (dst); - -return netdev; +return lowest_dev; }static void destroy_record (struct tls_record_info *record)
net/wireless/wext-core.c +4 -0
@@ -1103,6 +1103,10 @@ static int compat_standard_call(struct net_device *dev,return ioctl_standard_call (dev, iwr, cmd, info, handler); iwp_compat = (struct compat_iw_point *) &iwr->u.data; + +/* struct iw_point has a 32bit hole on 64bit arches. */ +memset (&iwp,0 ,sizeof (iwp)); + iwp.pointer =compat_ptr (iwp_compat->pointer); iwp.length = iwp_compat->length; iwp.flags = iwp_compat->flags;
net/wireless/wext-priv.c +4 -0
@@ -228,6 +228,10 @@ int compat_private_call(struct net_device *dev, struct iwreq *iwr,struct iw_point iwp; iwp_compat = (struct compat_iw_point *) &iwr->u.data; + +/* struct iw_point has a 32bit hole on 64bit arches. */ +memset (&iwp,0 ,sizeof (iwp)); + iwp.pointer =compat_ptr (iwp_compat->pointer); iwp.length = iwp_compat->length; iwp.flags = iwp_compat->flags;
sound/ac97/bus.c +14 -18
@@ -242,10 +242,9 @@ static ssize_t cold_reset_store(struct device *dev, {struct ac97_controller *ac97_ctrl; -mutex_lock (&ac97_controllers_mutex); +guard (mutex)(&ac97_controllers_mutex); ac97_ctrl =to_ac97_controller (dev); ac97_ctrl->ops->reset (ac97_ctrl); -mutex_unlock (&ac97_controllers_mutex);return len; }static DEVICE_ATTR_WO (cold_reset);
@@ -259,10 +258,9 @@ static ssize_t warm_reset_store(struct device *dev,if (!dev)return -ENODEV ; -mutex_lock (&ac97_controllers_mutex); +guard (mutex)(&ac97_controllers_mutex); ac97_ctrl =to_ac97_controller (dev); ac97_ctrl->ops->warm_reset (ac97_ctrl); -mutex_unlock (&ac97_controllers_mutex);return len; }static DEVICE_ATTR_WO (warm_reset);
@@ -285,10 +283,10 @@ static const struct attribute_group *ac97_adapter_groups[] = {static void ac97_del_adapter (struct ac97_controller *ac97_ctrl) { -mutex_lock (&ac97_controllers_mutex); -ac97_ctrl_codecs_unregister (ac97_ctrl); -list_del (&ac97_ctrl->controllers); -mutex_unlock (&ac97_controllers_mutex); + scoped_guard(mutex, &ac97_controllers_mutex) { +ac97_ctrl_codecs_unregister (ac97_ctrl); +list_del (&ac97_ctrl->controllers); + }device_unregister (&ac97_ctrl->adap); }
@@ -301,6 +299,7 @@ static void ac97_adapter_release(struct device *dev)idr_remove (&ac97_adapter_idr, ac97_ctrl->nr);dev_dbg (&ac97_ctrl->adap,"adapter unregistered by %s\n" ,dev_name (ac97_ctrl->parent)); +kfree (ac97_ctrl); }static const struct device_type ac97_adapter_type = {
@@ -312,7 +311,7 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl) {int ret; -mutex_lock (&ac97_controllers_mutex); +guard (mutex)(&ac97_controllers_mutex); ret =idr_alloc (&ac97_adapter_idr, ac97_ctrl,0 ,0 ,GFP_KERNEL ); ac97_ctrl->nr = ret;if (ret >=0 ) {
@@ -322,14 +321,14 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl) ret =device_register (&ac97_ctrl->adap);if (ret)put_device (&ac97_ctrl->adap); - } -if (!ret) -list_add (&ac97_ctrl->controllers, &ac97_controllers); -mutex_unlock (&ac97_controllers_mutex); + }else +kfree (ac97_ctrl); -if (!ret) +if (!ret) { +list_add (&ac97_ctrl->controllers, &ac97_controllers);dev_dbg (&ac97_ctrl->adap,"adapter registered by %s\n" ,dev_name (ac97_ctrl->parent)); + }return ret; }
@@ -365,14 +364,11 @@ struct ac97_controller *snd_ac97_controller_register( ret =ac97_add_adapter (ac97_ctrl);if (ret) - goto err; +return ERR_PTR (ret);ac97_bus_reset (ac97_ctrl);ac97_bus_scan (ac97_ctrl);return ac97_ctrl; -err:
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/prog_tests/xdp_adjust_tail.c +89 -7
96 lines not on this page · raw message
tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c +1 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c +7 -1
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.