Linux 5.10.175
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.175 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/alpha/kernel/module.c | 4 arch/arm64/include/asm/efi.h | 6 arch/arm64/kernel/efi.c | 2 arch/mips/include/asm/mach-rc32434/pci.h | 2 arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dts | 1 arch/powerpc/kernel/time.c | 4 arch/powerpc/kernel/vmlinux.lds.S | 6 arch/riscv/include/asm/ftrace.h | 2 arch/riscv/include/asm/parse_asm.h | 5 arch/riscv/include/asm/patch.h | 2 arch/riscv/kernel/ftrace.c | 14 + arch/riscv/kernel/patch.c | 28 ++ arch/riscv/kernel/stacktrace.c | 2 arch/riscv/kernel/traps.c | 14 - arch/s390/kernel/vmlinux.lds.S | 2 arch/sh/kernel/vmlinux.lds.S | 1 arch/um/kernel/vmlinux.lds.S | 2 arch/x86/kernel/cpu/amd.c | 9 arch/x86/kvm/vmx/evmcs.h | 11 arch/x86/kvm/vmx/vmx.c | 44 ++- block/bfq-cgroup.c | 8 block/bfq-iosched.c | 19 + drivers/char/ipmi/ipmi_watchdog.c | 8 drivers/char/tpm/eventlog/acpi.c | 6 drivers/gpu/drm/amd/amdgpu/soc15.c | 5 drivers/gpu/drm/drm_atomic.c | 1 drivers/gpu/drm/i915/gt/intel_ring.c | 4 drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 8 drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 16 - drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 drivers/gpu/drm/msm/msm_gem_submit.c | 5 drivers/gpu/drm/msm/msm_ringbuffer.c | 2 drivers/gpu/drm/msm/msm_ringbuffer.h | 7 drivers/gpu/drm/nouveau/dispnv50/disp.c | 16 - drivers/gpu/drm/nouveau/dispnv50/wndw.c | 12 - drivers/gpu/drm/nouveau/dispnv50/wndw.h | 7 drivers/iommu/amd/init.c | 16 + drivers/iommu/intel/pasid.c | 28 +- drivers/irqchip/irq-aspeed-vic.c | 4 drivers/irqchip/irq-bcm7120-l2.c | 2 drivers/irqchip/irq-csky-apb-intc.c | 2 drivers/irqchip/irq-gic-v2m.c | 2 drivers/irqchip/irq-gic-v3-its.c | 10 drivers/irqchip/irq-gic-v3.c | 2 drivers/irqchip/irq-loongson-pch-pic.c | 2 drivers/irqchip/irq-meson-gpio.c | 2 drivers/irqchip/irq-mtk-cirq.c | 2 drivers/irqchip/irq-mxs.c | 4 drivers/irqchip/irq-sun4i.c | 2 drivers/irqchip/irq-ti-sci-inta.c | 2 drivers/irqchip/irq-vic.c | 4 drivers/irqchip/irq-xilinx-intc.c | 2 drivers/macintosh/windfarm_lm75_sensor.c | 4 drivers/macintosh/windfarm_smu_sensors.c | 4 drivers/media/i2c/ov5640.c | 2 drivers/media/rc/gpio-ir-recv.c | 18 + drivers/net/ethernet/broadcom/bgmac.c | 8 drivers/net/ethernet/broadcom/bgmac.h | 2 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 23 + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 drivers/net/phy/microchip.c | 32 ++ drivers/net/phy/phy_device.c | 8 drivers/net/usb/lan78xx.c | 189 ++++++--------- drivers/nfc/fdp/i2c.c | 4 drivers/platform/x86/Kconfig | 3 drivers/s390/block/dasd_diag.c | 7 drivers/s390/block/dasd_fba.c | 7 drivers/s390/block/dasd_int.h | 1 drivers/scsi/hosts.c | 2 drivers/scsi/megaraid/megaraid_sas.h | 2 drivers/scsi/megaraid/megaraid_sas_fp.c | 2 fs/ext4/block_validity.c | 26 +- fs/ext4/ext4.h | 3 fs/ext4/fsmap.c | 2 fs/ext4/inline.c | 1 fs/ext4/inode.c | 7 fs/ext4/ioctl.c | 1 fs/ext4/mballoc.c | 205 +++++++++-------- fs/ext4/namei.c | 36 ++- fs/ext4/page-io.c | 11 fs/ext4/xattr.c | 3 fs/file.c | 1 fs/udf/inode.c | 2 include/asm-generic/vmlinux.lds.h | 5 include/linux/irq.h | 4 include/linux/irqdesc.h | 2 include/linux/irqdomain.h | 2 include/linux/pci_ids.h | 2 include/net/netfilter/nf_tproxy.h | 7 kernel/bpf/btf.c | 1 kernel/fork.c | 2 kernel/irq/chip.c | 2 kernel/irq/dummychip.c | 2 kernel/irq/irqdesc.c | 2 kernel/irq/irqdomain.c | 262 +++++++++++++--------- kernel/irq/manage.c | 6 kernel/irq/msi.c | 2 kernel/irq/timings.c | 2 kernel/watch_queue.c | 1 net/caif/caif_usb.c | 3 net/core/dev.c | 1 net/core/skbuff.c | 1 net/ipv4/netfilter/nf_tproxy_ipv4.c | 2 net/ipv6/ila/ila_xlat.c | 1 net/ipv6/netfilter/nf_tproxy_ipv6.c | 2 net/netfilter/nf_conntrack_netlink.c | 14 - net/nfc/netlink.c | 2 net/smc/af_smc.c | 13 - net/sunrpc/svc.c | 6 scripts/checkkconfigsymbols.py | 13 + scripts/clang-tools/run-clang-tools.py | 21 + scripts/diffconfig | 16 + tools/testing/selftests/netfilter/nft_nat.sh | 2 116 files changed, 855 insertions(+), 544 deletions(-)
Alex Deucher (1):
drm/amdgpu: fix error checking in amdgpu_read_mm_registers for soc15
Alexandre Ghiti (1):
riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode
Alexandru Matei (1):
KVM: VMX: Fix crash due to uninitialized current_vmcs
Alvaro Karsz (1):
PCI: Add SolidRun vendor ID
Andrew Cooper (1):
x86/CPU/AMD: Disable XSAVES on AMD family 0x17
Bart Van Assche (1):
scsi: core: Remove the /proc/scsi/${proc_name} directory earlierBen Skeggs (1):
drm/nouveau/kms/nv50-: remove unused functions
Benjamin Coddington (1):
SUNRPC: Fix a server shutdown leak
Bixuan Cui (1):
irqdomain: Change the type of 'size' in __irq_domain_add() to be consistent
Chandrakanth Patil (1):
scsi: megaraid_sas: Update max supported LD IDs to 240
Conor Dooley (1):
RISC-V: Don't check text_mutex during stop_machine
Corey Minyard (1):
ipmi:watchdog: Set panic count to proper value on a panic
D. Wythe (1):
net/smc: fix fallback failed while sendmsg with fastopen
Daniel Golle (1):
net: ethernet: mtk_eth_soc: fix RX data corruption issue
Darrick J. Wong (1):
ext4: fix another off-by-one fsmap error on 1k block filesystems
David Disseldorp (1):
watch_queue: fix IOC_WATCH_QUEUE_SET_SIZE alloc error paths
Dmitry Baryshkov (3):
drm/msm/a5xx: fix setting of the CP_PREEMPT_ENABLE_LOCAL register drm/msm/a5xx: fix the emptyness check in the preempt code drm/msm/a5xx: fix context faults during ring switch
Edward Humes (1):
alpha: fix R_ALPHA_LITERAL reloc for large modules
Eric Biggers (1):
ext4: fix cgroup writeback accounting with fs-layer encryption
Eric Dumazet (1):
ila: do not generate empty messages in ila_xlat_nl_cmd_get_mapping()
Eric Whitney (1):
ext4: fix RENAME_WHITEOUT handling for inline directories
Fedor Pchelkin (1):
nfc: change order inside nfc_se_io error path
Florian Westphal (1):
netfilter: tproxy: fix deadlock due to missing BH disable
Gavrilov Ilia (1):
iommu/amd: Add a length limitation for the ivrs_acpihid command-line parameter
Greg Kroah-Hartman (1):
Linux 5.10.175
Hangbin Liu (1):
selftests: nft_nat: ensuring the listening side is up before starting the client
Harry Wentland (1):
drm/connector: print max_requested_bpc in state debugfs
Ingo Molnar (1):
irq: Fix typos in comments
Ivan Delalande (1):
netfilter: ctnetlink: revert to dumping mark regardless of event type
Jacob Pan (1):
iommu/vt-d: Fix PASID directory pointer coherency
Jan Kara (3):
udf: Fix off-by-one error when discarding preallocation
ext4: Fix possible corruption when moving a directory
ext4: Fix deadlock during directory rename
Jiri Slaby (SUSE) (1):
drm/nouveau/kms/nv50: fix nv50_wndw_new_ prototype
Johan Hovold (3):
irqdomain: Look for existing mapping only once
irqdomain: Refactor __irq_domain_alloc_irqs()
irqdomain: Fix mapping-creation race
John Harrison (1):
drm/i915: Don't use BAR mappings for ring buffers with LLC
Kang Chen (1):
nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties
Lee Jones (1):
net: usb: lan78xx: Remove lots of set but unused 'ret' variables
Li Jun (1):
media: rc: gpio-ir-recv: add remove function
Liao Chang (1):
riscv: Add header include guards to insn.h
Lorenz Bauer (1):
btf: fix resolving BTF_KIND_VAR after ARRAY, STRUCT, UNION, PTR
Lu Baolu (1):
iommu/vt-d: Fix lockdep splat in intel_pasid_get_entry()
Lukas Czerner (1):
ext4: block range must be validated before use in ext4_mb_clear_bb()
Marc Zyngier (1):
irqdomain: Fix domain registration race
Masahiro Yamada (4):
scripts: handle BrokenPipeError for python scripts
arch: fix broken BuildID for arm64 and riscv
s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36
UML: define RUNTIME_DISCARD_EXIT
Mattias Nissler (1):
riscv: Avoid enabling interrupts in die()
Michael Chan (1):
bnxt_en: Avoid order-5 memory allocation for TPA data
Michael Ellerman (2):
powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
Morten Linderud (1):
tpm/eventlog: Don't abort tpm_read_log on faulty ACPI address
Nathan Chancellor (1):
macintosh: windfarm: Use unsigned type for 1-bit bitfields
NeilBrown (1):
block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC"
Palmer Dabbelt (1):
RISC-V: Avoid dereferening NULL regs in die()
Paul Elder (1):
media: ov5640: Fix analogue gain control
Pierre Gondois (1):
arm64: efi: Make efi_rt_lock a raw_spinlock
Rafał Miłecki (1):
bgmac: fix *initial* chip reset to support BCM5358
Randy Dunlap (1):
platform: x86: MLX_PLATFORM: select REGMAP instead of depending on it
Ritesh Harjani (3):
ext4: refactor ext4_free_blocks() to pull out ext4_mb_clear_bb()
ext4: add ext4_sb_block_valid() refactored out of ext4_inode_block_valid()
ext4: add strict range checks while freeing blocks
Rob Clark (2):
drm/msm: Fix potential invalid ptr free
drm/msm: Document and rename preempt_lock
Rohan McLure (1):
powerpc/kcsan: Exclude udelay to prevent recursive instrumentation
Rongguang Wei (1):
net: stmmac: add to set device wake up flag when stmmac init phy
Russell King (Oracle) (1):
net: phylib: get rid of unnecessary locking
Shigeru Yoshida (1):
net: caif: Fix use-after-free in cfusbl_device_notify()
Stefan Haberland (1):
s390/dasd: add missing discipline function
Tao Liu (1):
skbuff: Fix nfct leak on napi stolen
Theodore Ts'o (1):
fs: prevent out-of-bounds array speculation when closing a file descriptor
Tobias Klauser (1):
fork: allow CLONE_NEWTIME in clone3 flags
Tom Saeger (1):
sh: define RUNTIME_DISCARD_EXIT
Vitaly Kuznetsov (2):
KVM: nVMX: Don't use Enlightened MSR Bitmap for L3
KVM: VMX: Introduce vmx_msr_bitmap_l01_changed() helper
Vladimir Oltean (1):
powerpc: dts: t1040rdb: fix compatible string for Rev A boards
Ye Bin (2):
ext4: move where set the MAY_INLINE_DATA flag is set
ext4: fix WARNING in ext4_update_inline_data
Yejune Deng (1):
ipmi/watchdog: replace atomic_add() and atomic_sub()
Yu Kuai (4):
block, bfq: fix possible uaf for 'bfqq->bic' block, bfq: fix uaf for bfqq in bfq_exit_icq_bfqq block, bfq: replace 0/1 with false/true in bic apis block, bfq: fix uaf for bfqq in bic_set_bfqq()
Yuiko Oshino (1):
net: lan78xx: fix accessing the LAN7800's internal phy specific registers from the MAC driver
Zhihao Cheng (1):
ext4: zero i_disksize when initializing the bootloader inode
xurui (1):
MIPS: Fix a compilation issue
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 174 +SUBLEVEL = 175 EXTRAVERSION = NAME = Dare mighty things
arch/alpha/kernel/module.c +1 -3
@@ -146,10 +146,8 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, base = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr; symtab = (Elf64_Sym *)sechdrs[symindex].sh_addr; -/* The small sections were sorted to the end of the segment. -The following should definitely cover them. */ - gp = (u64 )me->core_layout.base + me->core_layout.size -0x8000 ; got = sechdrs[me->arch.gotsecindex].sh_addr; + gp = got +0x8000 ;for (i =0 ; i < n; i++) {unsigned long r_sym =ELF64_R_SYM (rela[i].r_info);
arch/arm64/include/asm/efi.h +3 -3
@@ -25,7 +25,7 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md); ({ \efi_virtmap_load (); \__efi_fpsimd_begin (); \ -spin_lock (&efi_rt_lock); \ +raw_spin_lock (&efi_rt_lock); \ }) #define arch_efi_call_virt(p, f, args...) \
@@ -37,12 +37,12 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);#define arch_efi_call_virt_teardown () \ ({ \ - spin_unlock(&efi_rt_lock); \ + raw_spin_unlock(&efi_rt_lock); \ __efi_fpsimd_end(); \ efi_virtmap_unload(); \ }) -extern spinlock_t efi_rt_lock; +extern raw_spinlock_t efi_rt_lock;efi_status_t __efi_rt_asm_wrapper (void *,const char *, ...);#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
arch/arm64/kernel/efi.c +1 -1
@@ -144,7 +144,7 @@ asmlinkage efi_status_t efi_handle_corrupted_x18(efi_status_t s, const char *f)return s; } -DEFINE_SPINLOCK (efi_rt_lock); +DEFINE_RAW_SPINLOCK (efi_rt_lock); asmlinkage u64 *efi_rt_stack_top __ro_after_init;
arch/mips/include/asm/mach-rc32434/pci.h +1 -1
@@ -374,7 +374,7 @@ struct pci_msu { PCI_CFG04_STAT_SSE | \ PCI_CFG04_STAT_PE) -#define KORINA_CNFG1 ((KORINA_STAT<<16)|KORINA_CMD) +#define KORINA_CNFG1 (KORINA_STAT | KORINA_CMD)#define KORINA_REVID 0#define KORINA_CLASS_CODE 0
arch/powerpc/boot/dts/fsl/t1040rdb-rev-a.dts +0 -1
@@ -10,7 +10,6 @@ / { model = "fsl,T1040RDB-REV-A"; - compatible = "fsl,T1040RDB-REV-A"; }; &seville_port0 {
arch/powerpc/kernel/time.c +2 -2
@@ -436,7 +436,7 @@ void vtime_flush(struct task_struct *tsk)#define calc_cputime_factors ()#endif -void __delay (unsigned long loops) +void __no_kcsan __delay(unsigned long loops) {unsigned long start;
@@ -457,7 +457,7 @@ void __delay(unsigned long loops) }EXPORT_SYMBOL (__delay); -void udelay (unsigned long usecs) +void __no_kcsan udelay(unsigned long usecs) {__delay (tb_ticks_per_usec * usecs); }
arch/powerpc/kernel/vmlinux.lds.S +5 -1
@@ -8,6 +8,7 @@ #define BSS_FIRST_SECTIONS *(.bss.prominit) #define EMITS_PT_NOTE #define RO_EXCEPTION_TABLE_ALIGN 0 +#define RUNTIME_DISCARD_EXIT #include <asm/page.h> #include <asm-generic/vmlinux.lds.h>
@@ -378,9 +379,12 @@ SECTIONS DISCARDS /DISCARD/ : { *(*.EMB.apuinfo) - *(.glink .iplt .plt .rela* .comment) + *(.glink .iplt .plt .comment) *(.gnu.version*) *(.gnu.attributes) *(.eh_frame) +#ifndef CONFIG_RELOCATABLE + *(.rela*) +#endif } }
arch/riscv/include/asm/ftrace.h +1 -1
@@ -83,6 +83,6 @@ int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec);#define ftrace_init_nop ftrace_init_nop#endif -#endif +#endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* _ASM_RISCV_FTRACE_H */
arch/riscv/include/asm/parse_asm.h +5 -0
@@ -3,6 +3,9 @@* Copyright (C) 2020 SiFive */ +#ifndef _ASM_RISCV_INSN_H +#define _ASM_RISCV_INSN_H +#include <linux/bits.h> /* The bit field of immediate value in I-type instruction */
@@ -217,3 +220,5 @@ static inline bool is_ ## INSN_NAME ## _insn(long insn) \ (RVC_X (x_,RVC_B_IMM_5_OPOFF ,RVC_B_IMM_5_MASK ) <<RVC_B_IMM_5_OFF ) | \ (RVC_X (x_,RVC_B_IMM_7_6_OPOFF ,RVC_B_IMM_7_6_MASK ) <<RVC_B_IMM_7_6_OFF ) | \ (RVC_IMM_SIGN(x_) << RVC_B_IMM_SIGN_OFF); }) + +#endif /* _ASM_RISCV_INSN_H */
arch/riscv/include/asm/patch.h +2 -0
@@ -9,4 +9,6 @@int patch_text_nosync (void *addr,const void *insns,size_t len);int patch_text (void *addr,u32 insn); +extern int riscv_patch_in_stop_machine; +#endif /* _ASM_RISCV_PATCH_H */
arch/riscv/kernel/ftrace.c +12 -2
@@ -15,11 +15,21 @@ int ftrace_arch_code_modify_prepare(void) __acquires(&text_mutex) {mutex_lock (&text_mutex); + +/* +* The code sequences we use for ftrace can't be patched while the +* kernel is running, so we need to use stop_machine() to modify them +* for now. This doesn't play nice with text_mutex, we use this flag +* to elide the check. +*/ + riscv_patch_in_stop_machine = true; +return 0 ; } int ftrace_arch_code_modify_post_process(void) __releases(&text_mutex) { + riscv_patch_in_stop_machine = false;mutex_unlock (&text_mutex);return 0 ; }
@@ -109,9 +119,9 @@ int ftrace_init_nop(struct module *mod, struct dyn_ftrace *rec) {int out; -ftrace_arch_code_modify_prepare (); +mutex_lock (&text_mutex); out =ftrace_make_nop (mod, rec,MCOUNT_ADDR ); -ftrace_arch_code_modify_post_process (); +mutex_unlock (&text_mutex);return out; }
arch/riscv/kernel/patch.c +25 -3
@@ -11,6 +11,7 @@#include <asm/kprobes.h> #include <asm/cacheflush.h> #include <asm/fixmap.h> +#include <asm/ftrace.h> #include <asm/patch.h> struct patch_insn {
@@ -19,6 +20,8 @@ struct patch_insn {atomic_t cpu_count; }; +int riscv_patch_in_stop_machine = false; +#ifdef CONFIG_MMU static void *patch_map (void *addr,int fixmap) {
@@ -55,8 +58,15 @@ static int patch_insn_write(void *addr, const void *insn, size_t len)* Before reaching here, it was expected to lock the text_mutex * already, so we don't need to give another lock here and could * ensure that it was safe between each cores. +* +* We're currently using stop_machine() for ftrace & kprobes, and while +* that ensures text_mutex is held before installing the mappings it +* does not ensure text_mutex is held by the calling thread. That's +* safe but triggers a lockdep failure, so just elide it for that +* specific case. */ -lockdep_assert_held (&text_mutex); +if (!riscv_patch_in_stop_machine) +lockdep_assert_held (&text_mutex);if (across_pages)patch_map (addr + len,FIX_TEXT_POKE1 );
@@ -117,13 +127,25 @@ NOKPROBE_SYMBOL(patch_text_cb);int patch_text (void *addr,u32 insn) { +int ret;struct patch_insn patch = { .addr = addr, .insn = insn, .cpu_count =ATOMIC_INIT (0 ), }; -return stop_machine_cpuslocked (patch_text_cb, - &patch, cpu_online_mask); +/* +* kprobes takes text_mutex, before calling patch_text(), but as we call +* calls stop_machine(), the lockdep assertion in patch_insn_write() +* gets confused by the context in which the lock is taken. +* Instead, ensure the lock is held before calling stop_machine(), and +* set riscv_patch_in_stop_machine to skip the check in +* patch_insn_write(). +*/ +lockdep_assert_held (&text_mutex); + riscv_patch_in_stop_machine = true; + ret =stop_machine_cpuslocked (patch_text_cb, &patch, cpu_online_mask); + riscv_patch_in_stop_machine = false; +return ret; }NOKPROBE_SYMBOL (patch_text);
arch/riscv/kernel/stacktrace.c +1 -1
@@ -96,7 +96,7 @@ void notrace walk_stackframe(struct task_struct *task,while (!kstack_end (ksp)) {if (__kernel_text_address (pc) &&unlikely (fn (pc, arg)))break ; - pc = (*ksp++) -0x4 ; + pc =READ_ONCE_NOCHECK (*ksp++) -0x4 ; } }
arch/riscv/kernel/traps.c +9 -5
@@ -31,25 +31,29 @@ void die(struct pt_regs *regs, const char *str) {static int die_counter;int ret; +long cause; +unsigned long flags;oops_enter (); -spin_lock_irq (&die_lock); +spin_lock_irqsave (&die_lock, flags);console_verbose ();bust_spinlocks (1 );pr_emerg ("%s [#%d]\n" , str, ++die_counter);print_modules (); -show_regs (regs); +if (regs) +show_regs (regs); - ret =notify_die (DIE_OOPS , str, regs,0 , regs->cause,SIGSEGV ); + cause = regs ? regs->cause :-1 ; + ret =notify_die (DIE_OOPS , str, regs,0 , cause,SIGSEGV ); -if (regs &&kexec_should_crash (current)) +if (kexec_should_crash (current))crash_kexec (regs);bust_spinlocks (0 );add_taint (TAINT_DIE ,LOCKDEP_NOW_UNRELIABLE ); -spin_unlock_irq (&die_lock); +spin_unlock_irqrestore (&die_lock, flags);oops_exit ();if (in_interrupt ())
arch/s390/kernel/vmlinux.lds.S +2 -0
@@ -15,6 +15,8 @@ /* Handle ro_after_init data on our own. */ #define RO_AFTER_INIT_DATA +#define RUNTIME_DISCARD_EXIT + #define EMITS_PT_NOTE #include <asm-generic/vmlinux.lds.h>
arch/sh/kernel/vmlinux.lds.S +1 -0
@@ -4,6 +4,7 @@ * Written by Niibe Yutaka and Paul Mundt */ OUTPUT_ARCH(sh) +#define RUNTIME_DISCARD_EXIT #include <asm/thread_info.h> #include <asm/cache.h> #include <asm/vmlinux.lds.h>
arch/um/kernel/vmlinux.lds.S +1 -1
@@ -1,4 +1,4 @@ - +#define RUNTIME_DISCARD_EXIT KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER); #ifdef CONFIG_LD_SCRIPT_STATIC
arch/x86/kernel/cpu/amd.c +9 -0
@@ -932,6 +932,15 @@ void init_spectral_chicken(struct cpuinfo_x86 *c) } }#endif +/* +* Work around Erratum 1386. The XSAVES instruction malfunctions in +* certain circumstances on Zen1/2 uarch, and not all parts have had +* updated microcode at the time of writing (March 2023). +* +* Affected parts all have no supervisor XSAVE states, meaning that +* the XSAVEC instruction (which works fine) is equivalent. +*/ +clear_cpu_cap (c,X86_FEATURE_XSAVES ); }static void init_amd_zn (struct cpuinfo_x86 *c)
arch/x86/kvm/vmx/evmcs.h +0 -11
@@ -166,16 +166,6 @@ static inline u16 evmcs_read16(unsigned long field)return *(u16 *)((char *)current_evmcs + offset); } -static inline void evmcs_touch_msr_bitmap (void ) -{ -if (unlikely (!current_evmcs)) -return ; - -if (current_evmcs->hv_enlightenments_control.msr_bitmap) - current_evmcs->hv_clean_fields &= - ~HV_VMX_ENLIGHTENED_CLEAN_FIELD_MSR_BITMAP ; -} -static inline void evmcs_load (u64 phys_addr) { struct hv_vp_assist_page *vp_ap =
@@ -196,7 +186,6 @@ static inline u64 evmcs_read64(unsigned long field) { return 0; }static inline u32 evmcs_read32 (unsigned long field) {return 0 ; }static inline u16 evmcs_read16 (unsigned long field) {return 0 ; }static inline void evmcs_load (u64 phys_addr) {} -static inline void evmcs_touch_msr_bitmap (void ) {}#endif /* IS_ENABLED(CONFIG_HYPERV) */ enum nested_evmptrld_status {
arch/x86/kvm/vmx/vmx.c +31 -13
74 lines not on this page · raw message
block/bfq-cgroup.c +4 -4
@@ -705,15 +705,15 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,struct bfq_io_cq *bic, struct bfq_group *bfqg) { - struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0); -struct bfq_queue *sync_bfqq =bic_to_bfqq (bic,1 ); + struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false); +struct bfq_queue *sync_bfqq =bic_to_bfqq (bic, true);struct bfq_entity *entity;if (async_bfqq) { entity = &async_bfqq->entity;if (entity->sched_data != &bfqg->sched_data) { -bic_set_bfqq (bic,NULL ,0 ); +bic_set_bfqq (bic,NULL , false);bfq_release_process_ref (bfqd, async_bfqq); } }
@@ -748,8 +748,8 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,* request from the old cgroup. */ bfq_put_cooperator (sync_bfqq); +bic_set_bfqq (bic,NULL , true);bfq_release_process_ref (bfqd, sync_bfqq); -bic_set_bfqq (bic,NULL ,1 ); } } }
block/bfq-iosched.c +13 -6
@@ -373,6 +373,12 @@ struct bfq_queue *bic_to_bfqq(struct bfq_io_cq *bic, bool is_sync)void bic_set_bfqq (struct bfq_io_cq *bic,struct bfq_queue *bfqq,bool is_sync) { +struct bfq_queue *old_bfqq = bic->bfqq[is_sync]; + +/* Clear bic pointer if bfqq is detached from this bic */ +if (old_bfqq && old_bfqq->bic == bic) + old_bfqq->bic =NULL ; + bic->bfqq[is_sync] = bfqq; }
@@ -2810,7 +2816,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,/* * Merge queues (that is, let bic redirect its requests to new_bfqq) */ -bic_set_bfqq (bic, new_bfqq,1 ); +bic_set_bfqq (bic, new_bfqq, true);bfq_mark_bfqq_coop (new_bfqq);/* * new_bfqq now belongs to at least two bics (it is a shared queue):
@@ -4977,9 +4983,8 @@ static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync)unsigned long flags;spin_lock_irqsave (&bfqd->lock, flags); - bfqq->bic =NULL ; -bfq_exit_bfqq (bfqd, bfqq);bic_set_bfqq (bic,NULL , is_sync); +bfq_exit_bfqq (bfqd, bfqq);spin_unlock_irqrestore (&bfqd->lock, flags); } }
@@ -5065,9 +5070,11 @@ static void bfq_check_ioprio_change(struct bfq_io_cq *bic, struct bio *bio) bfqq =bic_to_bfqq (bic, false);if (bfqq) { -bfq_release_process_ref (bfqd, bfqq); - bfqq =bfq_get_queue (bfqd, bio,BLK_RW_ASYNC , bic); +struct bfq_queue *old_bfqq = bfqq; + + bfqq =bfq_get_queue (bfqd, bio, false, bic);bic_set_bfqq (bic, bfqq, false); +bfq_release_process_ref (bfqd, old_bfqq); } bfqq =bic_to_bfqq (bic, true);
@@ -6009,7 +6016,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)return bfqq; } -bic_set_bfqq (bic,NULL ,1 ); +bic_set_bfqq (bic,NULL , true);bfq_put_cooperator (bfqq);
drivers/char/ipmi/ipmi_watchdog.c +4 -4
@@ -503,7 +503,7 @@ static void panic_halt_ipmi_heartbeat(void) msg.cmd =IPMI_WDOG_RESET_TIMER ; msg.data =NULL ; msg.data_len =0 ; -atomic_add (1 , &panic_done_count); +atomic_add (2 , &panic_done_count); rv = ipmi_request_supply_msgs(watchdog_user, (struct ipmi_addr *) &addr, 0,
@@ -513,7 +513,7 @@ static void panic_halt_ipmi_heartbeat(void) &panic_halt_heartbeat_recv_msg, 1);if (rv) -atomic_sub (1 , &panic_done_count); +atomic_sub (2 , &panic_done_count); }static struct ipmi_smi_msg panic_halt_smi_msg = {
@@ -537,12 +537,12 @@ static void panic_halt_ipmi_set_timeout(void)/* Wait for the messages to be free. */ while (atomic_read (&panic_done_count) !=0 )ipmi_poll_interface (watchdog_user); -atomic_add (1 , &panic_done_count); +atomic_add (2 , &panic_done_count); rv =__ipmi_set_timeout (&panic_halt_smi_msg, &panic_halt_recv_msg, &send_heartbeat_now);if (rv) { -atomic_sub (1 , &panic_done_count); +atomic_sub (2 , &panic_done_count);pr_warn ("Unable to extend the watchdog timeout\n" ); }else {if (send_heartbeat_now)
drivers/char/tpm/eventlog/acpi.c +5 -1
@@ -143,8 +143,12 @@ int tpm_read_log_acpi(struct tpm_chip *chip) ret = -EIO ; virt =acpi_os_map_iomem (start, len); -if (!virt) +if (!virt) { +dev_warn (&chip->dev,"%s: Failed to map ACPI memory\n" , __func__); +/* try EFI log next */ + ret = -ENODEV ; goto err; + }memcpy_fromio (log->bios_event_log, virt, len);
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -2
@@ -382,8 +382,9 @@ static int soc15_read_register(struct amdgpu_device *adev, u32 se_num, *value =0 ;for (i =0 ; i <ARRAY_SIZE (soc15_allowed_read_registers); i++) { en = &soc15_allowed_read_registers[i]; -if (adev->reg_offset[en->hwip][en->inst] && - reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg] +if (!adev->reg_offset[en->hwip][en->inst]) +continue ; +else if (reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg] + en->reg_offset))continue ;
drivers/gpu/drm/drm_atomic.c +1 -0
@@ -1010,6 +1010,7 @@ static void drm_atomic_connector_print_state(struct drm_printer *p,drm_printf (p,"connector[%u]: %s\n" , connector->base.id, connector->name);drm_printf (p,"\tcrtc=%s\n" , state->crtc ? state->crtc->name :"(null)" );drm_printf (p,"\tself_refresh_aware=%d\n" , state->self_refresh_aware); +drm_printf (p,"\tmax_requested_bpc=%d\n" , state->max_requested_bpc);if (connector->connector_type ==DRM_MODE_CONNECTOR_WRITEBACK )if (state->writeback_job && state->writeback_job->fb)
drivers/gpu/drm/i915/gt/intel_ring.c +2 -2
@@ -49,7 +49,7 @@ int intel_ring_pin(struct intel_ring *ring, struct i915_gem_ww_ctx *ww)if (unlikely (ret)) goto err_unpin; -if (i915_vma_is_map_and_fenceable (vma)) +if (i915_vma_is_map_and_fenceable (vma) && !HAS_LLC (vma->vm->i915)) addr = (void __force *)i915_vma_pin_iomap (vma);else addr = i915_gem_object_pin_map(vma->obj,
@@ -91,7 +91,7 @@ void intel_ring_unpin(struct intel_ring *ring)return ;i915_vma_unset_ggtt_write (vma); -if (i915_vma_is_map_and_fenceable (vma)) +if (i915_vma_is_map_and_fenceable (vma) && !HAS_LLC (vma->vm->i915))i915_vma_unpin_iomap (vma);else i915_gem_object_unpin_map (vma->obj);
drivers/gpu/drm/msm/adreno/a5xx_gpu.c +4 -4
@@ -36,7 +36,7 @@ void a5xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring,OUT_RING (ring,upper_32_bits (shadowptr (a5xx_gpu, ring))); } -spin_lock_irqsave (&ring->lock, flags); +spin_lock_irqsave (&ring->preempt_lock, flags);/* Copy the shadow to the actual register */ ring->cur = ring->next;
@@ -44,7 +44,7 @@ void a5xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring,/* Make sure to wrap wptr if we need to */ wptr =get_wptr (ring); -spin_unlock_irqrestore (&ring->lock, flags); +spin_unlock_irqrestore (&ring->preempt_lock, flags);/* Make sure everything is posted before making a decision */ mb ();
@@ -144,8 +144,8 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)OUT_RING (ring,1 );/* Enable local preemption for finegrain preemption */ -OUT_PKT7 (ring,CP_PREEMPT_ENABLE_GLOBAL ,1 ); -OUT_RING (ring,0x02 ); +OUT_PKT7 (ring,CP_PREEMPT_ENABLE_LOCAL ,1 ); +OUT_RING (ring,0x1 );/* Allow CP_CONTEXT_SWITCH_YIELD packets in the IB2 */ OUT_PKT7 (ring,CP_YIELD_ENABLE ,1 );
drivers/gpu/drm/msm/adreno/a5xx_preempt.c +8 -8
@@ -45,9 +45,9 @@ static inline void update_wptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)if (!ring)return ; -spin_lock_irqsave (&ring->lock, flags); +spin_lock_irqsave (&ring->preempt_lock, flags); wptr =get_wptr (ring); -spin_unlock_irqrestore (&ring->lock, flags); +spin_unlock_irqrestore (&ring->preempt_lock, flags);gpu_write (gpu,REG_A5XX_CP_RB_WPTR , wptr); }
@@ -62,9 +62,9 @@ static struct msm_ringbuffer *get_next_ring(struct msm_gpu *gpu)bool empty;struct msm_ringbuffer *ring = gpu->rb[i]; -spin_lock_irqsave (&ring->lock, flags); - empty = (get_wptr (ring) == ring->memptrs->rptr); -spin_unlock_irqrestore (&ring->lock, flags); +spin_lock_irqsave (&ring->preempt_lock, flags); + empty = (get_wptr (ring) == gpu->funcs->get_rptr (gpu, ring)); +spin_unlock_irqrestore (&ring->preempt_lock, flags);if (!empty)return ring;
@@ -132,9 +132,9 @@ void a5xx_preempt_trigger(struct msm_gpu *gpu) }/* Make sure the wptr doesn't update while we're in motion */ -spin_lock_irqsave (&ring->lock, flags); +spin_lock_irqsave (&ring->preempt_lock, flags); a5xx_gpu->preempt[ring->id]->wptr =get_wptr (ring); -spin_unlock_irqrestore (&ring->lock, flags); +spin_unlock_irqrestore (&ring->preempt_lock, flags);/* Set the address of the incoming preemption record */ gpu_write64(gpu, REG_A5XX_CP_CONTEXT_SWITCH_RESTORE_ADDR_LO,
@@ -210,6 +210,7 @@ void a5xx_preempt_hw_init(struct msm_gpu *gpu) a5xx_gpu->preempt[i]->wptr =0 ; a5xx_gpu->preempt[i]->rptr =0 ; a5xx_gpu->preempt[i]->rbase = gpu->rb[i]->iova; + a5xx_gpu->preempt[i]->rptr_addr =shadowptr (a5xx_gpu, gpu->rb[i]); }/* Write a 0 to signal that we aren't switching pagetables */
@@ -261,7 +262,6 @@ static int preempt_init_ring(struct a5xx_gpu *a5xx_gpu, ptr->data =0 ; ptr->cntl =MSM_GPU_RB_CNTL_DEFAULT |AXXX_CP_RB_CNTL_NO_UPDATE ; - ptr->rptr_addr =shadowptr (a5xx_gpu, ring); ptr->counter = counters_iova;return 0 ;
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +2 -2
@@ -65,7 +65,7 @@ static void a6xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring)OUT_RING (ring,upper_32_bits (shadowptr (a6xx_gpu, ring))); } -spin_lock_irqsave (&ring->lock, flags); +spin_lock_irqsave (&ring->preempt_lock, flags);/* Copy the shadow to the actual register */ ring->cur = ring->next;
@@ -73,7 +73,7 @@ static void a6xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring)/* Make sure to wrap wptr if we need to */ wptr =get_wptr (ring); -spin_unlock_irqrestore (&ring->lock, flags); +spin_unlock_irqrestore (&ring->preempt_lock, flags);/* Make sure everything is posted before making a decision */ mb ();
drivers/gpu/drm/msm/msm_gem_submit.c +2 -3
@@ -494,8 +494,8 @@ static struct msm_submit_post_dep *msm_parse_post_deps(struct drm_device *dev,int ret =0 ;uint32_t i, j; - post_deps =kmalloc_array (nr_syncobjs,sizeof (*post_deps), -GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY); + post_deps =kcalloc (nr_syncobjs,sizeof (*post_deps), +GFP_KERNEL | __GFP_NOWARN | __GFP_NORETRY);if (!post_deps)return ERR_PTR (-ENOMEM );
@@ -510,7 +510,6 @@ static struct msm_submit_post_dep *msm_parse_post_deps(struct drm_device *dev, } post_deps[i].point = syncobj_desc.point; - post_deps[i].chain =NULL ;if (syncobj_desc.flags) { ret = -EINVAL ;
drivers/gpu/drm/msm/msm_ringbuffer.c +1 -1
@@ -46,7 +46,7 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id, ring->memptrs_iova = memptrs_iova;INIT_LIST_HEAD (&ring->submits); -spin_lock_init (&ring->lock); +spin_lock_init (&ring->preempt_lock);snprintf (name,sizeof (name),"gpu-ring-%d" , ring->id);
drivers/gpu/drm/msm/msm_ringbuffer.h +6 -1
@@ -46,7 +46,12 @@ struct msm_ringbuffer {struct msm_rbmemptrs *memptrs;uint64_t memptrs_iova;struct msm_fence_context *fctx; -spinlock_t lock; + +/* +* preempt_lock protects preemption and serializes wptr updates against +* preemption. Can be aquired from irq context. +*/ +spinlock_t preempt_lock; }; struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
drivers/gpu/drm/nouveau/dispnv50/disp.c +0 -16
@@ -2555,14 +2555,6 @@ nv50_display_fini(struct drm_device *dev, bool runtime, bool suspend) {struct nouveau_drm *drm =nouveau_drm (dev);struct drm_encoder *encoder; -struct drm_plane *plane; - -drm_for_each_plane (plane, dev) { -struct nv50_wndw *wndw =nv50_wndw (plane); -if (plane->funcs != &nv50_wndw) -continue ; -nv50_wndw_fini (wndw); - }list_for_each_entry (encoder, &dev->mode_config.encoder_list, head) {if (encoder->encoder_type !=DRM_MODE_ENCODER_DPMST )
@@ -2578,7 +2570,6 @@ nv50_display_init(struct drm_device *dev, bool resume, bool runtime) {struct nv50_core *core =nv50_disp (dev)->core;struct drm_encoder *encoder; -struct drm_plane *plane;if (resume || runtime) core->func->init (core);
@@ -2591,13 +2582,6 @@ nv50_display_init(struct drm_device *dev, bool resume, bool runtime) } } -drm_for_each_plane (plane, dev) { -struct nv50_wndw *wndw =nv50_wndw (plane); -if (plane->funcs != &nv50_wndw) -continue ; -nv50_wndw_init (wndw); - } -return 0 ; }
drivers/gpu/drm/nouveau/dispnv50/wndw.c +0 -12
@@ -690,18 +690,6 @@ nv50_wndw_notify(struct nvif_notify *notify)return NVIF_NOTIFY_KEEP ; } -void -nv50_wndw_fini (struct nv50_wndw *wndw) -{ -nvif_notify_put (&wndw->notify); -} - -void -nv50_wndw_init (struct nv50_wndw *wndw) -{ -nvif_notify_get (&wndw->notify); -} -static const u64 nv50_cursor_format_modifiers[] = {DRM_FORMAT_MOD_LINEAR ,DRM_FORMAT_MOD_INVALID ,
drivers/gpu/drm/nouveau/dispnv50/wndw.h +3 -4
@@ -38,10 +38,9 @@ struct nv50_wndw {int nv50_wndw_new_ (const struct nv50_wndw_func *,struct drm_device *,enum drm_plane_type ,const char *name,int index, -const u32 *format,enum nv50_disp_interlock_type , -u32 interlock_data,u32 heads,struct nv50_wndw **); -void nv50_wndw_init (struct nv50_wndw *); -void nv50_wndw_fini (struct nv50_wndw *); +const u32 *format,u32 heads, +enum nv50_disp_interlock_type ,u32 interlock_data, +struct nv50_wndw **);void nv50_wndw_flush_set (struct nv50_wndw *,u32 *interlock,struct nv50_wndw_atom *); void nv50_wndw_flush_clr(struct nv50_wndw *, u32 *interlock, bool flush,
drivers/iommu/amd/init.c +15 -1
@@ -3124,15 +3124,26 @@ static int __init parse_ivrs_hpet(char *str)return 1 ; } +#define ACPIID_LEN (ACPIHID_UID_LEN + ACPIHID_HID_LEN) +static int __init parse_ivrs_acpihid (char *str) {u32 seg =0 , bus, dev, fn;char *hid, *uid, *p, *addr; -char acpiid[ACPIHID_UID_LEN +ACPIHID_HID_LEN ] = {0 }; +char acpiid[ACPIID_LEN ] = {0 };int i; addr =strchr (str,'@' );if (!addr) { + addr =strchr (str,'=' ); +if (!addr) + goto not_found; + + ++addr; + +if (strlen (addr) >ACPIID_LEN ) + goto not_found; +if (sscanf (str,"[%x:%x.%x]=%s" , &bus, &dev, &fn, acpiid) ==4 ||sscanf (str,"[%x:%x:%x.%x]=%s" , &seg, &bus, &dev, &fn, acpiid) ==5 ) { pr_warn("ivrs_acpihid%s option format deprecated; use ivrs_acpihid=%s@%04x:%02x:%02x.%d instead\n",
@@ -3145,6 +3156,9 @@ static int __init parse_ivrs_acpihid(char *str)/* We have the '@', make it the terminator to get just the acpiid */ *addr++ =0 ; +if (strlen (str) >ACPIID_LEN +1 ) + goto not_found; +if (sscanf (str,"=%s" , acpiid) !=1 ) goto not_found;
drivers/iommu/intel/pasid.c +20 -8
@@ -24,7 +24,6 @@/* * Intel IOMMU system wide PASID name space: */ -static DEFINE_SPINLOCK (pasid_lock);u32 intel_pasid_max_id =PASID_MAX ;int vcmd_alloc_pasid (struct intel_iommu *iommu,u32 *pasid)
@@ -187,6 +186,9 @@ int intel_pasid_alloc_table(struct device *dev) attach_out:device_attach_pasid_table (info, pasid_table); +if (!ecap_coherent (info->iommu->ecap)) +clflush_cache_range (pasid_table->table, size); +return 0 ; }
@@ -259,19 +261,29 @@ struct pasid_entry *intel_pasid_get_entry(struct device *dev, u32 pasid) dir_index = pasid >>PASID_PDE_SHIFT ; index = pasid &PASID_PTE_MASK ; -spin_lock (&pasid_lock); +retry: entries =get_pasid_table_from_pde (&dir[dir_index]);if (!entries) { entries =alloc_pgtable_page (info->iommu->node); -if (!entries) { -spin_unlock (&pasid_lock); +if (!entries)return NULL ; - } -WRITE_ONCE (dir[dir_index].val, - (u64 )virt_to_phys (entries) |PASID_PTE_PRESENT ); +/* +* The pasid directory table entry won't be freed after +* allocation. No worry about the race with free and +* clear. However, this entry might be populated by others +* while we are preparing it. Use theirs with a retry. +*/ +if (cmpxchg64 (&dir[dir_index].val,0ULL , + (u64 )virt_to_phys (entries) |PASID_PTE_PRESENT )) { +free_pgtable_page (entries); + goto retry; + } +if (!ecap_coherent (info->iommu->ecap)) { +clflush_cache_range (entries,VTD_PAGE_SIZE ); +clflush_cache_range (&dir[dir_index].val,sizeof (*dir)); + } } -spin_unlock (&pasid_lock);return &entries[index]; }
drivers/irqchip/irq-aspeed-vic.c +2 -2
@@ -71,7 +71,7 @@ static void vic_init_hw(struct aspeed_vic *vic)writel (0 , vic->base +AVIC_INT_SELECT );writel (0 , vic->base +AVIC_INT_SELECT +4 ); -/* Some interrupts have a programable high/low level trigger +/* Some interrupts have a programmable high/low level trigger * (4 GPIO direct inputs), for now we assume this was configured * by firmware. We read which ones are edge now. */
@@ -203,7 +203,7 @@ static int __init avic_of_init(struct device_node *node, } vic->base = regs; -/* Initialize soures, all masked */ +/* Initialize sources, all masked */ vic_init_hw (vic);/* Ready to receive interrupts */
drivers/irqchip/irq-bcm7120-l2.c +1 -1
@@ -310,7 +310,7 @@ static int __init bcm7120_l2_intc_probe(struct device_node *dn,if (data->can_wake) {/* This IRQ chip can wake the system, set all -* relevant child interupts in wake_enabled mask +* relevant child interrupts in wake_enabled mask */ gc->wake_enabled =0xffffffff ; gc->wake_enabled &= ~gc->unused;
drivers/irqchip/irq-csky-apb-intc.c +1 -1
@@ -176,7 +176,7 @@ gx_intc_init(struct device_node *node, struct device_node *parent)writel (0x0 , reg_base +GX_INTC_NEN63_32 );/* -* Initial mask reg with all unmasked, because we only use enalbe reg +* Initial mask reg with all unmasked, because we only use enable reg */ writel (0x0 , reg_base +GX_INTC_NMASK31_00 );writel (0x0 , reg_base +GX_INTC_NMASK63_32 );
drivers/irqchip/irq-gic-v2m.c +1 -1
@@ -371,7 +371,7 @@ static int __init gicv2m_init_one(struct fwnode_handle *fwnode,* the MSI data is the absolute value within the range from * spi_start to (spi_start + num_spis). * -* Broadom NS2 GICv2m implementation has an erratum where the MSI data +* Broadcom NS2 GICv2m implementation has an erratum where the MSI data * is 'spi_number - 32' * * Reading that register fails on the Graviton implementation
drivers/irqchip/irq-gic-v3-its.c +5 -5
@@ -1492,7 +1492,7 @@ static void its_vlpi_set_doorbell(struct irq_data *d, bool enable)* * Ideally, we'd issue a VMAPTI to set the doorbell to its LPI * value or to 1023, depending on the enable bit. But that -* would be issueing a mapping for an /existing/ DevID+EventID +* would be issuing a mapping for an /existing/ DevID+EventID * pair, which is UNPREDICTABLE. Instead, let's issue a VMOVI * to the /same/ vPE, using this opportunity to adjust the * doorbell. Mouahahahaha. We loves it, Precious.
@@ -3122,7 +3122,7 @@ static void its_cpu_init_lpis(void)/* * It's possible for CPU to receive VLPIs before it is -* sheduled as a vPE, especially for the first CPU, and the +* scheduled as a vPE, especially for the first CPU, and the * VLPI with INTID larger than 2^(IDbits+1) will be considered * as out of range and dropped by GIC. * So we initialize IDbits to known value to avoid VLPI drop.
@@ -3613,7 +3613,7 @@ static void its_irq_domain_free(struct irq_domain *domain, unsigned int virq,/* * If all interrupts have been freed, start mopping the -* floor. This is conditionned on the device not being shared. +* floor. This is conditioned on the device not being shared. */ if (!its_dev->shared && bitmap_empty(its_dev->event_map.lpi_map,
@@ -4187,7 +4187,7 @@ static int its_sgi_set_affinity(struct irq_data *d, {/* * There is no notion of affinity for virtual SGIs, at least -* not on the host (since they can only be targetting a vPE). +* not on the host (since they can only be targeting a vPE). * Tell the kernel we've done whatever it asked for. */ irq_data_update_effective_affinity (d, mask_val);
@@ -4232,7 +4232,7 @@ static int its_sgi_get_irqchip_state(struct irq_data *d,/* * Locking galore! We can race against two different events: * -* - Concurent vPE affinity change: we must make sure it cannot +* - Concurrent vPE affinity change: we must make sure it cannot * happen, or we'll talk to the wrong redistributor. This is * identical to what happens with vLPIs. *
drivers/irqchip/irq-gic-v3.c +1 -1
@@ -1456,7 +1456,7 @@ static int gic_irq_domain_translate(struct irq_domain *d,/* * Make it clear that broken DTs are... broken. -* Partitionned PPIs are an unfortunate exception. +* Partitioned PPIs are an unfortunate exception. */ WARN_ON (*type ==IRQ_TYPE_NONE && fwspec->param[0 ] !=GIC_IRQ_TYPE_PARTITION );
drivers/irqchip/irq-loongson-pch-pic.c +1 -1
@@ -180,7 +180,7 @@ static void pch_pic_reset(struct pch_pic *priv)int i;for (i =0 ; i <PIC_COUNT ; i++) { -/* Write vectore ID */ +/* Write vectored ID */ writeb (priv->ht_vec_base + i, priv->base +PCH_INT_HTVEC (i));/* Hardcode route to HT0 Lo */ writeb (1 , priv->base +PCH_INT_ROUTE (i));
drivers/irqchip/irq-meson-gpio.c +1 -1
@@ -227,7 +227,7 @@ meson_gpio_irq_request_channel(struct meson_gpio_irq_controller *ctl,/* * Get the hwirq number assigned to this channel through -* a pointer the channel_irq table. The added benifit of this +* a pointer the channel_irq table. The added benefit of this * method is that we can also retrieve the channel index with * it, using the table base. */
drivers/irqchip/irq-mtk-cirq.c +1 -1
@@ -217,7 +217,7 @@ static void mtk_cirq_resume(void) {u32 value; -/* flush recored interrupts, will send signals to parent controller */ +/* flush recorded interrupts, will send signals to parent controller */ value =readl_relaxed (cirq_data->base +CIRQ_CONTROL );writel_relaxed (value |CIRQ_FLUSH , cirq_data->base +CIRQ_CONTROL );
drivers/irqchip/irq-mxs.c +2 -2
@@ -58,7 +58,7 @@ struct icoll_priv {static struct icoll_priv icoll_priv;static struct irq_domain *icoll_domain; -/* calculate bit offset depending on number of intterupt per register */ +/* calculate bit offset depending on number of interrupt per register */ static u32 icoll_intr_bitshift (struct irq_data *d,u32 bit) {/*
@@ -68,7 +68,7 @@ static u32 icoll_intr_bitshift(struct irq_data *d, u32 bit)return bit << ((d->hwirq &3 ) <<3 ); } -/* calculate mem offset depending on number of intterupt per register */ +/* calculate mem offset depending on number of interrupt per register */ static void __iomem *icoll_intr_reg (struct irq_data *d) {/* offset = hwirq / intr_per_reg * 0x10 */
drivers/irqchip/irq-sun4i.c +1 -1
@@ -189,7 +189,7 @@ static void __exception_irq_entry sun4i_handle_irq(struct pt_regs *regs)* 3) spurious irq * So if we immediately get a reading of 0, check the irq-pending reg * to differentiate between 2 and 3. We only do this once to avoid -* the extra check in the common case of 1 hapening after having +* the extra check in the common case of 1 happening after having * read the vector-reg once. */ hwirq =readl (irq_ic_data->irq_base +SUN4I_IRQ_VECTOR_REG ) >>2 ;
drivers/irqchip/irq-ti-sci-inta.c +1 -1
@@ -78,7 +78,7 @@ struct ti_sci_inta_vint_desc {* struct ti_sci_inta_irq_domain - Structure representing a TISCI based * Interrupt Aggregator IRQ domain. * @sci: Pointer to TISCI handle -* @vint: TISCI resource pointer representing IA inerrupts. +* @vint: TISCI resource pointer representing IA interrupts. * @global_event: TISCI resource pointer representing global events. * @vint_list: List of the vints active in the system * @vint_mutex: Mutex to protect vint_list
drivers/irqchip/irq-vic.c +2 -2
@@ -163,7 +163,7 @@ static struct syscore_ops vic_syscore_ops = { };/** -* vic_pm_init - initicall to register VIC pm +* vic_pm_init - initcall to register VIC pm * * This is called via late_initcall() to register * the resources for the VICs due to the early
@@ -397,7 +397,7 @@ static void __init vic_clear_interrupts(void __iomem *base)/* * The PL190 cell from ARM has been modified by ST to handle 64 interrupts. * The original cell has 32 interrupts, while the modified one has 64, -* replocating two blocks 0x00..0x1f in 0x20..0x3f. In that case +* replicating two blocks 0x00..0x1f in 0x20..0x3f. In that case * the probe function is called twice, with base set to offset 000 * and 020 within the page. We call this "second block". */
drivers/irqchip/irq-xilinx-intc.c +1 -1
@@ -210,7 +210,7 @@ static int __init xilinx_intc_of_init(struct device_node *intc,/* * Disable all external interrupts until they are -* explicity requested. +* explicitly requested. */ xintc_write (irqc,IER ,0 );
drivers/macintosh/windfarm_lm75_sensor.c +2 -2
@@ -34,8 +34,8 @@#endif struct wf_lm75_sensor { -int ds1775 :1 ; -int inited :1 ; +unsigned int ds1775 :1 ; +unsigned int inited :1 ;struct i2c_client *i2c;struct wf_sensor sens; };
drivers/macintosh/windfarm_smu_sensors.c +2 -2
@@ -273,8 +273,8 @@ struct smu_cpu_power_sensor {struct list_head link;struct wf_sensor *volts;struct wf_sensor *amps; - int fake_volts : 1; - int quadratic : 1; + unsigned int fake_volts : 1; + unsigned int quadratic : 1;struct wf_sensor sens; };#define to_smu_cpu_power (c) container_of(c, struct smu_cpu_power_sensor, sens)
drivers/media/i2c/ov5640.c +1 -1
@@ -2748,7 +2748,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)/* Auto/manual gain */ ctrls->auto_gain =v4l2_ctrl_new_std (hdl, ops,V4L2_CID_AUTOGAIN ,0 ,1 ,1 ,1 ); - ctrls->gain =v4l2_ctrl_new_std (hdl, ops,V4L2_CID_GAIN , + ctrls->gain =v4l2_ctrl_new_std (hdl, ops,V4L2_CID_ANALOGUE_GAIN ,0 ,1023 ,1 ,0 ); ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
drivers/media/rc/gpio-ir-recv.c +18 -0
@@ -130,6 +130,23 @@ static int gpio_ir_recv_probe(struct platform_device *pdev) "gpio-ir-recv-irq", gpio_dev); } +static int gpio_ir_recv_remove (struct platform_device *pdev) +{ +struct gpio_rc_dev *gpio_dev =platform_get_drvdata (pdev); +struct device *pmdev = gpio_dev->pmdev; + +if (pmdev) { +pm_runtime_get_sync (pmdev); +cpu_latency_qos_remove_request (&gpio_dev->qos); + +pm_runtime_disable (pmdev); +pm_runtime_put_noidle (pmdev); +pm_runtime_set_suspended (pmdev); + } + +return 0 ; +} +#ifdef CONFIG_PM static int gpio_ir_recv_suspend (struct device *dev) {
@@ -189,6 +206,7 @@ MODULE_DEVICE_TABLE(of, gpio_ir_recv_of_match);static struct platform_driver gpio_ir_recv_driver = { .probe = gpio_ir_recv_probe, + .remove = gpio_ir_recv_remove, .driver = { .name =KBUILD_MODNAME , .of_match_table =of_match_ptr (gpio_ir_recv_of_match),
drivers/net/ethernet/broadcom/bgmac.c +6 -2
@@ -890,13 +890,13 @@ static void bgmac_chip_reset_idm_config(struct bgmac *bgmac)if (iost &BGMAC_BCMA_IOST_ATTACHED ) { flags =BGMAC_BCMA_IOCTL_SW_CLKEN ; -if (!bgmac->has_robosw) +if (bgmac->in_init || !bgmac->has_robosw) flags |=BGMAC_BCMA_IOCTL_SW_RESET ; }bgmac_clk_enable (bgmac, flags); } -if (iost &BGMAC_BCMA_IOST_ATTACHED && !bgmac->has_robosw) +if (iost &BGMAC_BCMA_IOST_ATTACHED && (bgmac->in_init || !bgmac->has_robosw))bgmac_idm_write (bgmac,BCMA_IOCTL ,bgmac_idm_read (bgmac,BCMA_IOCTL ) & ~BGMAC_BCMA_IOCTL_SW_RESET );
@@ -1490,6 +1490,8 @@ int bgmac_enet_probe(struct bgmac *bgmac)struct net_device *net_dev = bgmac->net_dev;int err; + bgmac->in_init = true; +bgmac_chip_intrs_off (bgmac); net_dev->irq = bgmac->irq;
@@ -1542,6 +1544,8 @@ int bgmac_enet_probe(struct bgmac *bgmac)/* Omit FCS from max MTU size */ net_dev->max_mtu =BGMAC_RX_MAX_FRAME_SIZE -ETH_FCS_LEN ; + bgmac->in_init = false; + err =register_netdev (bgmac->net_dev);if (err) {dev_err (bgmac->dev,"Cannot register net device\n" );
drivers/net/ethernet/broadcom/bgmac.h +2 -0
@@ -512,6 +512,8 @@ struct bgmac {int irq;u32 int_mask; +bool in_init; +/* Current MAC state */ int mac_speed;int mac_duplex;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +12 -11
@@ -2854,7 +2854,7 @@ static int bnxt_alloc_ring(struct bnxt *bp, struct bnxt_ring_mem_info *rmem)static void bnxt_free_tpa_info (struct bnxt *bp) { -int i; +int i, j;for (i =0 ; i < bp->rx_nr_rings; i++) {struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
@@ -2862,8 +2862,10 @@ static void bnxt_free_tpa_info(struct bnxt *bp)kfree (rxr->rx_tpa_idx_map); rxr->rx_tpa_idx_map =NULL ;if (rxr->rx_tpa) { -kfree (rxr->rx_tpa[0 ].agg_arr); - rxr->rx_tpa[0 ].agg_arr =NULL ; +for (j =0 ; j < bp->max_tpa; j++) { +kfree (rxr->rx_tpa[j].agg_arr); + rxr->rx_tpa[j].agg_arr =NULL ; + } }kfree (rxr->rx_tpa); rxr->rx_tpa =NULL ;
@@ -2872,14 +2874,13 @@ static void bnxt_free_tpa_info(struct bnxt *bp)static int bnxt_alloc_tpa_info (struct bnxt *bp) { -int i, j, total_aggs =0 ; +int i, j; bp->max_tpa =MAX_TPA ;if (bp->flags &BNXT_FLAG_CHIP_P5 ) {if (!bp->max_tpa_v2)return 0 ; bp->max_tpa =max_t (u16, bp->max_tpa_v2,MAX_TPA_P5 ); - total_aggs = bp->max_tpa *MAX_SKB_FRAGS ; }for (i =0 ; i < bp->rx_nr_rings; i++) {
@@ -2893,12 +2894,12 @@ static int bnxt_alloc_tpa_info(struct bnxt *bp)if (!(bp->flags &BNXT_FLAG_CHIP_P5 ))continue ; - agg =kcalloc (total_aggs,sizeof (*agg),GFP_KERNEL ); - rxr->rx_tpa[0 ].agg_arr = agg; -if (!agg) -return -ENOMEM ; -for (j =1 ; j < bp->max_tpa; j++) - rxr->rx_tpa[j].agg_arr = agg + j *MAX_SKB_FRAGS ; +for (j =0 ; j < bp->max_tpa; j++) { + agg =kcalloc (MAX_SKB_FRAGS ,sizeof (*agg),GFP_KERNEL ); +if (!agg) +return -ENOMEM ; + rxr->rx_tpa[j].agg_arr = agg; + } rxr->rx_tpa_idx_map =kzalloc (sizeof (*rxr->rx_tpa_idx_map),GFP_KERNEL );if (!rxr->rx_tpa_idx_map)
drivers/net/ethernet/mediatek/mtk_eth_soc.c +2 -1
@@ -354,7 +354,8 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode, mcr_cur =mtk_r32 (mac->hw,MTK_MAC_MCR (mac->id)); mcr_new = mcr_cur; mcr_new |=MAC_MCR_MAX_RX_1536 |MAC_MCR_IPG_CFG |MAC_MCR_FORCE_MODE | -MAC_MCR_BACKOFF_EN |MAC_MCR_BACKPR_EN |MAC_MCR_FORCE_LINK ; +MAC_MCR_BACKOFF_EN |MAC_MCR_BACKPR_EN |MAC_MCR_FORCE_LINK | +MAC_MCR_RX_FIFO_CLR_DIS ;/* Only update control register when needed! */ if (mcr_new != mcr_cur)
drivers/net/ethernet/mediatek/mtk_eth_soc.h +1 -0
@@ -339,6 +339,7 @@#define MAC_MCR_FORCE_MODE BIT(15)#define MAC_MCR_TX_EN BIT(14)#define MAC_MCR_RX_EN BIT(13) +#define MAC_MCR_RX_FIFO_CLR_DIS BIT(12)#define MAC_MCR_BACKOFF_EN BIT(9)#define MAC_MCR_BACKPR_EN BIT(8)#define MAC_MCR_FORCE_RX_FC BIT(5)
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -0
@@ -1145,6 +1145,7 @@ static int stmmac_init_phy(struct net_device *dev)phylink_ethtool_get_wol (priv->phylink, &wol);device_set_wakeup_capable (priv->device, !!wol.supported); +device_set_wakeup_enable (priv->device, !!wol.wolopts); }return ret;
drivers/net/phy/microchip.c +32 -0
@@ -326,6 +326,37 @@ static int lan88xx_config_aneg(struct phy_device *phydev)return genphy_config_aneg (phydev); } +static void lan88xx_link_change_notify (struct phy_device *phydev) +{ +int temp; + +/* At forced 100 F/H mode, chip may fail to set mode correctly +* when cable is switched between long(~50+m) and short one. +* As workaround, set to 10 before setting to 100 +* at forced 100 F/H mode. +*/ +if (!phydev->autoneg && phydev->speed ==100 ) { +/* disable phy interrupt */ + temp =phy_read (phydev,LAN88XX_INT_MASK ); + temp &= ~LAN88XX_INT_MASK_MDINTPIN_EN_ ; +phy_write (phydev,LAN88XX_INT_MASK , temp); + + temp =phy_read (phydev,MII_BMCR ); + temp &= ~(BMCR_SPEED100 |BMCR_SPEED1000 ); +phy_write (phydev,MII_BMCR , temp);/* set to 10 first */ + temp |=BMCR_SPEED100 ; +phy_write (phydev,MII_BMCR , temp);/* set to 100 later */ + +/* clear pending interrupt generated while workaround */ + temp =phy_read (phydev,LAN88XX_INT_STS ); + +/* enable phy interrupt back */ + temp =phy_read (phydev,LAN88XX_INT_MASK ); + temp |=LAN88XX_INT_MASK_MDINTPIN_EN_ ; +phy_write (phydev,LAN88XX_INT_MASK , temp); + } +} +static struct phy_driver microchip_phy_driver[] = { { .phy_id =0x0007c130 ,
@@ -339,6 +370,7 @@ static struct phy_driver microchip_phy_driver[] = { .config_init = lan88xx_config_init, .config_aneg = lan88xx_config_aneg, + .link_change_notify = lan88xx_link_change_notify, .ack_interrupt = lan88xx_phy_ack_interrupt, .config_intr = lan88xx_phy_config_intr,
drivers/net/phy/phy_device.c +1 -7
@@ -2833,8 +2833,6 @@ static int phy_probe(struct device *dev)if (phydrv->flags &PHY_IS_INTERNAL ) phydev->is_internal = true; -mutex_lock (&phydev->lock); -/* Deassert the reset signal */ phy_device_reset (phydev,0 );
@@ -2903,12 +2901,10 @@ static int phy_probe(struct device *dev) phydev->state =PHY_READY ; out: -/* Assert the reset signal */ +/* Re-assert the reset signal on error */ if (err)phy_device_reset (phydev,1 ); -mutex_unlock (&phydev->lock); -return err; }
@@ -2918,9 +2914,7 @@ static int phy_remove(struct device *dev)cancel_delayed_work_sync (&phydev->state_queue); -mutex_lock (&phydev->lock); phydev->state =PHY_DOWN ; -mutex_unlock (&phydev->lock);sfp_bus_del_upstream (phydev->sfp_bus); phydev->sfp_bus =NULL ;
drivers/net/usb/lan78xx.c +76 -113
464 lines not on this page · raw message
drivers/nfc/fdp/i2c.c +4 -0
@@ -249,6 +249,9 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev, len,sizeof (**fw_vsc_cfg), GFP_KERNEL); +if (!*fw_vsc_cfg) + goto alloc_err; + r =device_property_read_u8_array (dev,FDP_DP_FW_VSC_CFG_NAME , *fw_vsc_cfg, len);
@@ -262,6 +265,7 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev, *fw_vsc_cfg =NULL ; } +alloc_err:dev_dbg (dev,"Clock type: %d, clock frequency: %d, VSC: %s" , *clock_type, *clock_freq, *fw_vsc_cfg !=NULL ?"yes" :"no" ); }
drivers/platform/x86/Kconfig +2 -1
@@ -1195,7 +1195,8 @@ config I2C_MULTI_INSTANTIATE config MLX_PLATFORM tristate "Mellanox Technologies platform support" - depends on I2C && REGMAP + depends on I2C + select REGMAP help This option enables system support for the Mellanox Technologies platform. The Mellanox systems provide data center networking
drivers/s390/block/dasd_diag.c +6 -1
@@ -642,12 +642,17 @@ static void dasd_diag_setup_blk_queue(struct dasd_block *block)blk_queue_segment_boundary (q,PAGE_SIZE -1 ); } +static int dasd_diag_pe_handler (struct dasd_device *device,__u8 tbvpm) +{ +return dasd_generic_verify_path (device, tbvpm); +} +static struct dasd_discipline dasd_diag_discipline = { .owner =THIS_MODULE , .name ="DIAG" , .ebcname ="DIAG" , .check_device = dasd_diag_check_device, - .verify_path = dasd_generic_verify_path, + .pe_handler = dasd_diag_pe_handler, .fill_geometry = dasd_diag_fill_geometry, .setup_blk_queue = dasd_diag_setup_blk_queue, .start_IO = dasd_start_diag,
drivers/s390/block/dasd_fba.c +6 -1
@@ -803,13 +803,18 @@ static void dasd_fba_setup_blk_queue(struct dasd_block *block)blk_queue_flag_set (QUEUE_FLAG_DISCARD , q); } +static int dasd_fba_pe_handler (struct dasd_device *device,__u8 tbvpm) +{ +return dasd_generic_verify_path (device, tbvpm); +} +static struct dasd_discipline dasd_fba_discipline = { .owner =THIS_MODULE , .name ="FBA " , .ebcname ="FBA " , .check_device = dasd_fba_check_characteristics, .do_analysis = dasd_fba_do_analysis, - .verify_path = dasd_generic_verify_path, + .pe_handler = dasd_fba_pe_handler, .setup_blk_queue = dasd_fba_setup_blk_queue, .fill_geometry = dasd_fba_fill_geometry, .start_IO = dasd_start_IO,
drivers/s390/block/dasd_int.h +0 -1
@@ -298,7 +298,6 @@ struct dasd_discipline {* e.g. verify that new path is compatible with the current * configuration. */ -int (*verify_path)(struct dasd_device *,__u8 );int (*pe_handler)(struct dasd_device *,__u8 );/*
drivers/scsi/hosts.c +2 -0
@@ -180,6 +180,7 @@ void scsi_remove_host(struct Scsi_Host *shost)scsi_forget_host (shost);mutex_unlock (&shost->scan_mutex);scsi_proc_host_rm (shost); +scsi_proc_hostdir_rm (shost->hostt);spin_lock_irqsave (shost->host_lock, flags);if (scsi_host_set_state (shost,SHOST_DEL ))
@@ -321,6 +322,7 @@ static void scsi_host_dev_release(struct device *dev)struct Scsi_Host *shost =dev_to_shost (dev);struct device *parent = dev->parent; +/* In case scsi_remove_host() has not been called. */ scsi_proc_hostdir_rm (shost->hostt);/* Wait for functions invoked through call_rcu(&shost->rcu, ...) */
drivers/scsi/megaraid/megaraid_sas.h +2 -0
@@ -1517,6 +1517,8 @@ struct megasas_ctrl_info {#define MEGASAS_MAX_LD_IDS (MEGASAS_MAX_LD_CHANNELS * \ MEGASAS_MAX_DEV_PER_CHANNEL) +#define MEGASAS_MAX_SUPPORTED_LD_IDS 240 +#define MEGASAS_MAX_SECTORS (2*1024)#define MEGASAS_MAX_SECTORS_IEEE (2*128)#define MEGASAS_DBG_LVL 1
drivers/scsi/megaraid/megaraid_sas_fp.c +1 -1
@@ -358,7 +358,7 @@ u8 MR_ValidateMapInfo(struct megasas_instance *instance, u64 map_id) ld =MR_TargetIdToLdGet (i, drv_map);/* For non existing VDs, iterate to next VD*/ -if (ld >= (MAX_LOGICAL_DRIVES_EXT -1 )) +if (ld >=MEGASAS_MAX_SUPPORTED_LD_IDS )continue ; raid =MR_LdRaidGet (ld, drv_map);
fs/ext4/block_validity.c +17 -9
@@ -294,15 +294,10 @@ void ext4_release_system_zone(struct super_block *sb)call_rcu (&system_blks->rcu, ext4_destroy_system_zone); } -/* -* Returns 1 if the passed-in block region (start_blk, -* start_blk+count) is valid; 0 if some part of the block region -* overlaps with some other filesystem metadata blocks. -*/ -int ext4_inode_block_valid (struct inode *inode,ext4_fsblk_t start_blk, -unsigned int count) +int ext4_sb_block_valid (struct super_block *sb,struct inode *inode, +ext4_fsblk_t start_blk,unsigned int count) { -struct ext4_sb_info *sbi =EXT4_SB (inode->i_sb); +struct ext4_sb_info *sbi =EXT4_SB (sb);struct ext4_system_blocks *system_blks;struct ext4_system_zone *entry;struct rb_node *n;
@@ -331,7 +326,9 @@ int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,else if (start_blk >= (entry->start_blk + entry->count)) n = n->rb_right;else { - ret = (entry->ino == inode->i_ino); + ret =0 ; +if (inode) + ret = (entry->ino == inode->i_ino);break ; } }
@@ -340,6 +337,17 @@ int ext4_inode_block_valid(struct inode *inode, ext4_fsblk_t start_blk,return ret; } +/* +* Returns 1 if the passed-in block region (start_blk, +* start_blk+count) is valid; 0 if some part of the block region +* overlaps with some other filesystem metadata blocks. +*/ +int ext4_inode_block_valid (struct inode *inode,ext4_fsblk_t start_blk, +unsigned int count) +{ +return ext4_sb_block_valid (inode->i_sb, inode, start_blk, count); +} +int ext4_check_blockref (const char *function,unsigned int line,struct inode *inode,__le32 *p,unsigned int max) {
fs/ext4/ext4.h +3 -0
@@ -3536,6 +3536,9 @@ extern int ext4_inode_block_valid(struct inode *inode, unsigned int count);extern int ext4_check_blockref (const char *,unsigned int ,struct inode *,__le32 *,unsigned int ); +extern int ext4_sb_block_valid (struct super_block *sb,struct inode *inode, +ext4_fsblk_t start_blk,unsigned int count); +/* extents.c */ struct ext4_ext_path ;
fs/ext4/fsmap.c +2 -0
@@ -486,6 +486,8 @@ static int ext4_getfsmap_datadev(struct super_block *sb, keys[0 ].fmr_physical = bofs;if (keys[1 ].fmr_physical >= eofs) keys[1 ].fmr_physical = eofs -1 ; +if (keys[1 ].fmr_physical < keys[0 ].fmr_physical) +return 0 ; start_fsb = keys[0 ].fmr_physical; end_fsb = keys[1 ].fmr_physical;
fs/ext4/inline.c +0 -1
@@ -157,7 +157,6 @@ int ext4_find_inline_data_nolock(struct inode *inode) (void *)ext4_raw_inode(&is.iloc));EXT4_I (inode)->i_inline_size =EXT4_MIN_INLINE_DATA_SIZE +le32_to_cpu (is.s.here->e_value_size); -ext4_set_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA ); } out:brelse (is.iloc.bh);
fs/ext4/inode.c +6 -1
@@ -4639,8 +4639,13 @@ static inline int ext4_iget_extra_inode(struct inode *inode,if (EXT4_INODE_HAS_XATTR_SPACE (inode) && *magic ==cpu_to_le32 (EXT4_XATTR_MAGIC )) { +int err; +ext4_set_inode_state (inode,EXT4_STATE_XATTR ); -return ext4_find_inline_data_nolock (inode); + err =ext4_find_inline_data_nolock (inode); +if (!err &&ext4_has_inline_data (inode)) +ext4_set_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA ); +return err; }else EXT4_I (inode)->i_inline_off =0 ;return 0 ;
fs/ext4/ioctl.c +1 -0
@@ -180,6 +180,7 @@ static long swap_inode_boot_loader(struct super_block *sb, ei_bl->i_flags =0 ;inode_set_iversion (inode_bl,1 );i_size_write (inode_bl,0 ); +EXT4_I (inode_bl)->i_disksize = inode_bl->i_size; inode_bl->i_mode =S_IFREG ;if (ext4_has_feature_extents (sb)) {ext4_set_inode_flag (inode_bl,EXT4_INODE_EXTENTS );
fs/ext4/mballoc.c +119 -86
263 lines not on this page · raw message
fs/ext4/namei.c +27 -9
@@ -1512,11 +1512,10 @@ static struct buffer_head *__ext4_find_entry(struct inode *dir,int has_inline_data =1 ; ret =ext4_find_inline_entry (dir, fname, res_dir, &has_inline_data); -if (has_inline_data) { -if (inlined) - *inlined =1 ; +if (inlined) + *inlined = has_inline_data; +if (has_inline_data) goto cleanup_and_exit; - } } if ((namelen <= 2) && (name[0] == '.') &&
@@ -3698,7 +3697,8 @@ static void ext4_resetent(handle_t *handle, struct ext4_renament *ent,* so the old->de may no longer valid and need to find it again * before reset old inode info. */ - old.bh =ext4_find_entry (old.dir, &old.dentry->d_name, &old.de,NULL ); + old.bh =ext4_find_entry (old.dir, &old.dentry->d_name, &old.de, + &old.inlined);if (IS_ERR (old.bh)) retval =PTR_ERR (old.bh);if (!old.bh)
@@ -3863,9 +3863,20 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,return retval; } - old.bh =ext4_find_entry (old.dir, &old.dentry->d_name, &old.de,NULL ); -if (IS_ERR (old.bh)) -return PTR_ERR (old.bh); +/* +* We need to protect against old.inode directory getting converted +* from inline directory format into a normal one. +*/ +if (S_ISDIR (old.inode->i_mode)) +inode_lock_nested (old.inode,I_MUTEX_NONDIR2 ); + + old.bh =ext4_find_entry (old.dir, &old.dentry->d_name, &old.de, + &old.inlined); +if (IS_ERR (old.bh)) { + retval =PTR_ERR (old.bh); + goto unlock_moved_dir; + } +/* * Check for inode number is _not_ due to possible IO errors. * We might rmdir the source, keep it as pwd of some process
@@ -3923,8 +3934,10 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry, goto end_rename; } retval =ext4_rename_dir_prepare (handle, &old); -if (retval) +if (retval) { +inode_unlock (old.inode); goto end_rename; + } }/* * If we're renaming a file within an inline_data dir and adding or
@@ -4053,6 +4066,11 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,brelse (old.dir_bh);brelse (old.bh);brelse (new.bh); + +unlock_moved_dir: +if (S_ISDIR (old.inode->i_mode)) +inode_unlock (old.inode); +return retval; }
fs/ext4/page-io.c +6 -5
@@ -416,7 +416,8 @@ static void io_submit_init_bio(struct ext4_io_submit *io,static void io_submit_add_bh (struct ext4_io_submit *io,struct inode *inode, -struct page *page, +struct page *pagecache_page, +struct page *bounce_page,struct buffer_head *bh) {int ret;
@@ -430,10 +431,11 @@ static void io_submit_add_bh(struct ext4_io_submit *io,io_submit_init_bio (io, bh); io->io_bio->bi_write_hint = inode->i_write_hint; } - ret =bio_add_page (io->io_bio, page, bh->b_size,bh_offset (bh)); + ret =bio_add_page (io->io_bio, bounce_page ?: pagecache_page, + bh->b_size,bh_offset (bh));if (ret != bh->b_size) goto submit_and_retry; -wbc_account_cgroup_owner (io->io_wbc, page, bh->b_size); +wbc_account_cgroup_owner (io->io_wbc, pagecache_page, bh->b_size); io->io_next_block++; }
@@ -551,8 +553,7 @@ int ext4_bio_write_page(struct ext4_io_submit *io,do {if (!buffer_async_write (bh))continue ; -io_submit_add_bh (io, inode, - bounce_page ? bounce_page : page, bh); +io_submit_add_bh (io, inode, page, bounce_page, bh); nr_submitted++;clear_buffer_dirty (bh); }while ((bh = bh->b_this_page) != head);
fs/ext4/xattr.c +3 -0
@@ -2804,6 +2804,9 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, (void *)header, total_ino);EXT4_I (inode)->i_extra_isize = new_extra_isize; +if (ext4_has_inline_data (inode)) + error =ext4_find_inline_data_nolock (inode); + cleanup:if (error && (mnt_count !=le16_to_cpu (sbi->s_es->s_mnt_count))) { ext4_warning(inode->i_sb, "Unable to expand inode %lu. Delete some EAs or run e2fsck.",
fs/file.c +1 -0
@@ -677,6 +677,7 @@ static struct file *pick_file(struct files_struct *files, unsigned fd) fdt =files_fdtable (files);if (fd >= fdt->max_fds) goto out_unlock; + fd =array_index_nospec (fd, fdt->max_fds); file = fdt->fd[fd];if (!file) goto out_unlock;
fs/udf/inode.c +1 -1
@@ -442,7 +442,7 @@ static int udf_get_block(struct inode *inode, sector_t block,* Block beyond EOF and prealloc extents? Just discard preallocation * as it is not useful and complicates things. */ -if (((loff_t )block) << inode->i_blkbits > iinfo->i_lenExtents) +if (((loff_t )block) << inode->i_blkbits >= iinfo->i_lenExtents)udf_discard_prealloc (inode);udf_clear_extent_cache (inode); phys =inode_getblk (inode, block, &err, &new);
include/asm-generic/vmlinux.lds.h +5 -0
@@ -906,7 +906,12 @@#define TRACEDATA #endif +/* +* Discard .note.GNU-stack, which is emitted as PROGBITS by the compiler. +* Otherwise, the type of .notes section would become PROGBITS instead of NOTES. +*/ #define NOTES \ + /DISCARD/ : { *(.note.GNU-stack) } \ .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ __start_notes = .; \ KEEP(*(.note.*)) \
include/linux/irq.h +2 -2
@@ -116,7 +116,7 @@ enum {* IRQ_SET_MASK_NOCPY - OK, chip did update irq_common_data.affinity * IRQ_SET_MASK_OK_DONE - Same as IRQ_SET_MASK_OK for core. Special code to * support stacked irqchips, which indicates skipping -* all descendent irqchips. +* all descendant irqchips. */ enum {IRQ_SET_MASK_OK =0 ,
@@ -302,7 +302,7 @@ static inline bool irqd_is_level_type(struct irq_data *d)/* * Must only be called of irqchip.irq_set_affinity() or low level -* hieararchy domain allocation functions. +* hierarchy domain allocation functions. */ static inline void irqd_set_single_target (struct irq_data *d) {
include/linux/irqdesc.h +1 -1
@@ -32,7 +32,7 @@ struct pt_regs;* @last_unhandled: aging timer for unhandled count * @irqs_unhandled: stats field for spurious unhandled interrupts * @threads_handled: stats field for deferred spurious detection of threaded handlers -* @threads_handled_last: comparator field for deferred spurious detection of theraded handlers +* @threads_handled_last: comparator field for deferred spurious detection of threaded handlers * @lock: locking for SMP * @affinity_hint: hint to user space for preferred irq affinity * @affinity_notify: context for notification of affinity changes
include/linux/irqdomain.h +1 -1
@@ -256,7 +256,7 @@ static inline struct fwnode_handle *irq_domain_alloc_fwnode(phys_addr_t *pa) }void irq_domain_free_fwnode (struct fwnode_handle *fwnode); -struct irq_domain *__irq_domain_add (struct fwnode_handle *fwnode,int size, +struct irq_domain *__irq_domain_add (struct fwnode_handle *fwnode,unsigned int size,irq_hw_number_t hwirq_max,int direct_max,const struct irq_domain_ops *ops,void *host_data);
include/linux/pci_ids.h +2 -0
@@ -3115,6 +3115,8 @@#define PCI_VENDOR_ID_3COM_2 0xa727 +#define PCI_VENDOR_ID_SOLIDRUN 0xd063 +#define PCI_VENDOR_ID_DIGIUM 0xd161#define PCI_DEVICE_ID_DIGIUM_HFC4S 0xb410
include/net/netfilter/nf_tproxy.h +7 -0
@@ -17,6 +17,13 @@ static inline bool nf_tproxy_sk_is_transparent(struct sock *sk)return false; } +static inline void nf_tproxy_twsk_deschedule_put (struct inet_timewait_sock *tw) +{ +local_bh_disable (); +inet_twsk_deschedule_put (tw); +local_bh_enable (); +} +/* assign a socket to the skb -- consumes sk */ static inline void nf_tproxy_assign_sock (struct sk_buff *skb,struct sock *sk) {
kernel/bpf/btf.c +1 -0
@@ -3541,6 +3541,7 @@ static int btf_datasec_resolve(struct btf_verifier_env *env,struct btf *btf = env->btf;u16 i; + env->resolve_mode =RESOLVE_TBD ;for_each_vsi_from (i, v->next_member, v->t, vsi) {u32 var_type_id = vsi->type, type_id, type_size =0 ; const struct btf_type *var_type = btf_type_by_id(env->btf,
kernel/fork.c +1 -1
@@ -2726,7 +2726,7 @@ static bool clone3_args_valid(struct kernel_clone_args *kargs)* - make the CLONE_DETACHED bit reuseable for clone3 * - make the CSIGNAL bits reuseable for clone3 */ -if (kargs->flags & (CLONE_DETACHED |CSIGNAL )) +if (kargs->flags & (CLONE_DETACHED | (CSIGNAL & (~CLONE_NEWTIME ))))return false; if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) ==
kernel/irq/chip.c +1 -1
@@ -811,7 +811,7 @@ void handle_edge_irq(struct irq_desc *desc)/* * When another irq arrived while we were handling * one, we could have masked the irq. -* Renable it, if it was not disabled in meantime. +* Reenable it, if it was not disabled in meantime. */ if (unlikely (desc->istate &IRQS_PENDING )) { if (!irqd_irq_disabled(&desc->irq_data) &&
kernel/irq/dummychip.c +1 -1
@@ -13,7 +13,7 @@/* * What should we do if we get a hw irq event on an illegal vector? -* Each architecture has to answer this themself. +* Each architecture has to answer this themselves. */ static void ack_bad (struct irq_data *data) {
kernel/irq/irqdesc.c +1 -1
@@ -31,7 +31,7 @@ static int __init irq_affinity_setup(char *str)cpulist_parse (str, irq_default_affinity);/* * Set at least the boot cpu. We don't want to end up with -* bugreports caused by random comandline masks +* bugreports caused by random commandline masks */ cpumask_set_cpu (smp_processor_id (), irq_default_affinity);return 1 ;
kernel/irq/irqdomain.c +164 -98
408 lines not on this page · raw message
kernel/irq/manage.c +3 -3
@@ -341,7 +341,7 @@ static bool irq_set_affinity_deactivated(struct irq_data *data,* If the interrupt is not yet activated, just store the affinity * mask and do not call the chip driver at all. On activation the * driver has to make sure anyway that the interrupt is in a -* useable state so startup works. +* usable state so startup works. */ if (!IS_ENABLED (CONFIG_IRQ_DOMAIN_HIERARCHY ) ||irqd_is_activated (data) || !irqd_affinity_on_activate (data))
@@ -999,7 +999,7 @@ static void irq_finalize_oneshot(struct irq_desc *desc,* to IRQS_INPROGRESS and the irq line is masked forever. * * This also serializes the state of shared oneshot handlers -* versus "desc->threads_onehsot |= action->thread_mask;" in +* versus "desc->threads_oneshot |= action->thread_mask;" in * irq_wake_thread(). See the comment there which explains the * serialization. */
@@ -1877,7 +1877,7 @@ static struct irqaction *__free_irq(struct irq_desc *desc, void *dev_id)/* Last action releases resources */ if (!desc->action) {/* -* Reaquire bus lock as irq_release_resources() might +* Reacquire bus lock as irq_release_resources() might * require it to deallocate resources over the slow bus. */ chip_bus_lock (desc);
kernel/irq/msi.c +1 -1
@@ -5,7 +5,7 @@* * This file is licensed under GPLv2. * -* This file contains common code to support Message Signalled Interrupt for +* This file contains common code to support Message Signaled Interrupts for * PCI compatible and non PCI compatible devices. */ #include <linux/types.h>
kernel/irq/timings.c +1 -1
@@ -490,7 +490,7 @@ static inline void irq_timings_store(int irq, struct irqt_stat *irqs, u64 ts)/* * The interrupt triggered more than one second apart, that -* ends the sequence as predictible for our purpose. In this +* ends the sequence as predictable for our purpose. In this * case, assume we have the beginning of a sequence and the * timestamp is the first value. As it is impossible to * predict anything at this point, return.
kernel/watch_queue.c +1 -0
@@ -274,6 +274,7 @@ long watch_queue_set_size(struct pipe_inode_info *pipe, unsigned int nr_notes)if (ret <0 ) goto error; + ret = -ENOMEM ; pages =kcalloc (sizeof (struct page *), nr_pages,GFP_KERNEL );if (!pages) goto error;
net/caif/caif_usb.c +3 -0
@@ -134,6 +134,9 @@ static int cfusbl_device_notify(struct notifier_block *me, unsigned long what,struct usb_device *usbdev;int res; +if (what ==NETDEV_UNREGISTER && dev->reg_state >=NETREG_UNREGISTERED ) +return 0 ; +/* Check whether we have a NCM device, and find its VID/PID. */ if (!(dev->dev.parent && dev->dev.parent->driver &&strcmp (dev->dev.parent->driver->name,"cdc_ncm" ) ==0 ))
net/core/dev.c +1 -0
@@ -6111,6 +6111,7 @@ EXPORT_SYMBOL(gro_find_complete_by_type);static void napi_skb_free_stolen_head (struct sk_buff *skb) { +nf_reset_ct (skb);skb_dst_drop (skb);skb_ext_put (skb);kmem_cache_free (skbuff_head_cache, skb);
net/core/skbuff.c +0 -1
@@ -659,7 +659,6 @@ static void kfree_skbmem(struct sk_buff *skb)void skb_release_head_state (struct sk_buff *skb) { -nf_reset_ct (skb);skb_dst_drop (skb);if (skb->destructor) {WARN_ON (in_irq ());
net/ipv4/netfilter/nf_tproxy_ipv4.c +1 -1
@@ -38,7 +38,7 @@ nf_tproxy_handle_time_wait4(struct net *net, struct sk_buff *skb, hp->source, lport ? lport : hp->dest, skb->dev, NF_TPROXY_LOOKUP_LISTENER);if (sk2) { -inet_twsk_deschedule_put (inet_twsk (sk)); +nf_tproxy_twsk_deschedule_put (inet_twsk (sk)); sk = sk2; } }
net/ipv6/ila/ila_xlat.c +1 -0
@@ -477,6 +477,7 @@ int ila_xlat_nl_cmd_get_mapping(struct sk_buff *skb, struct genl_info *info)rcu_read_lock (); + ret = -ESRCH ; ila =ila_lookup_by_params (&xp, ilan);if (ila) { ret = ila_dump_info(ila,
net/ipv6/netfilter/nf_tproxy_ipv6.c +1 -1
@@ -63,7 +63,7 @@ nf_tproxy_handle_time_wait6(struct sk_buff *skb, int tproto, int thoff, lport ? lport : hp->dest, skb->dev, NF_TPROXY_LOOKUP_LISTENER);if (sk2) { -inet_twsk_deschedule_put (inet_twsk (sk)); +nf_tproxy_twsk_deschedule_put (inet_twsk (sk)); sk = sk2; } }
net/netfilter/nf_conntrack_netlink.c +7 -7
@@ -317,11 +317,12 @@ ctnetlink_dump_timestamp(struct sk_buff *skb, const struct nf_conn *ct) }#ifdef CONFIG_NF_CONNTRACK_MARK -static int ctnetlink_dump_mark (struct sk_buff *skb,const struct nf_conn *ct) +static int ctnetlink_dump_mark (struct sk_buff *skb,const struct nf_conn *ct, +bool dump) {u32 mark =READ_ONCE (ct->mark); -if (!mark) +if (!mark && !dump)return 0 ;if (nla_put_be32 (skb,CTA_MARK ,htonl (mark)))
@@ -332,7 +333,7 @@ static int ctnetlink_dump_mark(struct sk_buff *skb, const struct nf_conn *ct) return -1; }#else -#define ctnetlink_dump_mark (a, b) (0) +#define ctnetlink_dump_mark (a, b, c) (0)#endif #ifdef CONFIG_NF_CONNTRACK_SECMARK
@@ -537,7 +538,7 @@ static int ctnetlink_dump_extinfo(struct sk_buff *skb,static int ctnetlink_dump_info (struct sk_buff *skb,struct nf_conn *ct) { if (ctnetlink_dump_status(skb, ct) < 0 || - ctnetlink_dump_mark(skb, ct) < 0 || + ctnetlink_dump_mark(skb, ct, true) < 0 || ctnetlink_dump_secctx(skb, ct) < 0 || ctnetlink_dump_id(skb, ct) < 0 || ctnetlink_dump_use(skb, ct) < 0 ||
@@ -816,8 +817,7 @@ ctnetlink_conntrack_event(unsigned int events, struct nf_ct_event *item) }#ifdef CONFIG_NF_CONNTRACK_MARK -if (events & (1 <<IPCT_MARK ) && -ctnetlink_dump_mark (skb, ct) <0 ) +if (ctnetlink_dump_mark (skb, ct, events & (1 <<IPCT_MARK ))) goto nla_put_failure;#endif nlmsg_end (skb, nlh);
@@ -2734,7 +2734,7 @@ static int __ctnetlink_glue_build(struct sk_buff *skb, struct nf_conn *ct) goto nla_put_failure;#ifdef CONFIG_NF_CONNTRACK_MARK -if (ctnetlink_dump_mark (skb, ct) <0 ) +if (ctnetlink_dump_mark (skb, ct, true) <0 ) goto nla_put_failure;#endif if (ctnetlink_dump_labels (skb, ct) <0 )
net/nfc/netlink.c +1 -1
@@ -1446,8 +1446,8 @@ static int nfc_se_io(struct nfc_dev *dev, u32 se_idx,return rc; error: -kfree (cb_context);device_unlock (&dev->dev); +kfree (cb_context);return rc; }
net/smc/af_smc.c +8 -5
@@ -1988,16 +1988,14 @@ static int smc_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) {struct sock *sk = sock->sk;struct smc_sock *smc; -int rc = -EPIPE ; +int rc; smc =smc_sk (sk);lock_sock (sk); -if ((sk->sk_state !=SMC_ACTIVE ) && - (sk->sk_state !=SMC_APPCLOSEWAIT1 ) && - (sk->sk_state !=SMC_INIT )) - goto out; +/* SMC does not support connect with fastopen */ if (msg->msg_flags &MSG_FASTOPEN ) { +/* not connected yet, fallback */ if (sk->sk_state ==SMC_INIT && !smc->connect_nonblock) {smc_switch_to_fallback (smc); smc->fallback_rsn =SMC_CLC_DECL_OPTUNSUPP ;
@@ -2005,6 +2003,11 @@ static int smc_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) rc = -EINVAL ; goto out; } + }else if ((sk->sk_state !=SMC_ACTIVE ) && + (sk->sk_state !=SMC_APPCLOSEWAIT1 ) && + (sk->sk_state !=SMC_INIT )) { + rc = -EPIPE ; + goto out; }if (smc->use_fallback)
net/sunrpc/svc.c +5 -1
@@ -800,6 +800,7 @@ EXPORT_SYMBOL_GPL(svc_set_num_threads);static int svc_stop_kthreads (struct svc_serv *serv,struct svc_pool *pool,int nrservs) { +struct svc_rqst *rqstp;struct task_struct *task;unsigned int state = serv->sv_nrthreads-1 ;
@@ -808,7 +809,10 @@ svc_stop_kthreads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) task =choose_victim (serv, pool, &state);if (task ==NULL )break ; -kthread_stop (task); + rqstp =kthread_data (task); +/* Did we lose a race to svo_function threadfn? */ +if (kthread_stop (task) == -EINTR ) +svc_exit_thread (rqstp); nrservs++; }while (nrservs <0 );return 0 ;
scripts/checkkconfigsymbols.py +12 -1
@@ -113,7 +113,7 @@ def parse_options(): return args -def main(): +def print_undefined_symbols(): """Main function of this module.""" args = parse_options()
@@ -472,5 +472,16 @@ def parse_kconfig_file(kfile): return defined, references
Lines of this file are not shown. View the raw message.
scripts/clang-tools/run-clang-tools.py +14 -7
Lines of this file are not shown. View the raw message.
tools/testing/selftests/netfilter/nft_nat.sh +2 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.