Linux 5.15.175
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.175 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/power/runtime_pm.rst | 4 Makefile | 2 arch/parisc/Kconfig | 1 arch/parisc/include/asm/cache.h | 11 - arch/x86/include/asm/processor.h | 2 arch/x86/include/asm/static_call.h | 15 ++ arch/x86/include/asm/sync_core.h | 6 arch/x86/include/asm/xen/hypercall.h | 36 +++-- arch/x86/kernel/cpu/common.c | 38 +++-- arch/x86/kernel/static_call.c | 10 + arch/x86/xen/enlighten.c | 65 +++++++++ arch/x86/xen/enlighten_hvm.c | 13 - arch/x86/xen/enlighten_pv.c | 4 arch/x86/xen/enlighten_pvh.c | 7 arch/x86/xen/xen-asm.S | 49 +++++- arch/x86/xen/xen-head.S | 99 +++++++++++--- arch/x86/xen/xen-ops.h | 9 + block/blk-iocost.c | 9 + drivers/acpi/acpica/evxfregn.c | 2 drivers/acpi/nfit/core.c | 7 drivers/acpi/resource.c | 6 drivers/ata/sata_highbank.c | 1 drivers/gpu/drm/i915/i915_scheduler.c | 2 drivers/net/bonding/bond_main.c | 1 drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 2 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 2 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 5 drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 11 - drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 2 drivers/net/ethernet/qualcomm/qca_spi.c | 26 +-- drivers/net/ethernet/qualcomm/qca_spi.h | 1 drivers/net/team/team.c | 3 drivers/net/xen-netfront.c | 5 drivers/ptp/ptp_kvm_arm.c | 4 drivers/ptp/ptp_kvm_common.c | 1 drivers/ptp/ptp_kvm_x86.c | 61 ++++++-- drivers/usb/dwc2/hcd.c | 19 +- drivers/usb/gadget/function/u_serial.c | 9 - drivers/usb/host/ehci-sh.c | 9 - drivers/usb/host/max3421-hcd.c | 16 +- fs/exfat/dir.c | 2 fs/xfs/libxfs/xfs_btree.c | 29 +++- fs/xfs/libxfs/xfs_symlink_remote.c | 4 fs/xfs/scrub/trace.h | 2 fs/xfs/xfs_file.c | 8 + include/linux/compiler.h | 32 +++- include/linux/ptp_kvm.h | 1 include/linux/static_call.h | 6 include/net/lapb.h | 2 kernel/bpf/verifier.c | 5 kernel/static_call_inline.c | 2 kernel/trace/trace_kprobe.c | 2 net/batman-adv/translation-table.c | 58 +++++--- net/core/sock_map.c | 1 net/ipv4/tcp_output.c | 6 net/sched/sch_netem.c | 22 ++- net/tipc/udp_media.c | 7 net/vmw_vsock/virtio_transport_common.c | 8 + sound/usb/quirks.c | 33 +++- tools/objtool/check.c | 11 - tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh | 15 -- 61 files changed, 593 insertions(+), 238 deletions(-)
Anumula Murali Mohan Reddy (1):
cxgb4: use port number to set mac addr
Dan Carpenter (1):
ALSA: usb-audio: Fix a DMA to stack memory bug
Daniel Borkmann (2):
bonding: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
team: Fix feature propagation of NETIF_F_GSO_ENCAP_ALL
Daniel Machon (2):
net: sparx5: fix FDMA performance issue
net: sparx5: fix the maximum frame length register
Danielle Ratson (2):
selftests: mlxsw: sharedbuffer: Remove h1 ingress test case
selftests: mlxsw: sharedbuffer: Remove duplicate test cases
Daniil Tatianin (1):
ACPICA: events/evxfregn: don't release the ContextMutex that was never acquired
Darrick J. Wong (4):
xfs: update btree keys correctly when _insrec splits an inode root block
xfs: don't drop errno values when we fail to ficlone the entire range
xfs: return from xfs_symlink_verify early on V4 filesystems
xfs: fix scrub tracepoints when inode-rooted btrees are involved
Eduard Zingerman (1):
bpf: sync_linked_regs() must preserve subreg_def
Eric Dumazet (2):
tipc: fix NULL deref in cleanup_bearer()
net: lapb: increase LAPB_HEADER_LEN
Greg Kroah-Hartman (2):
Revert "parisc: fix a possible DMA corruption" Linux 5.15.175
Ilpo Järvinen (1):
ACPI: resource: Fix memory resource type union access
Jaakko Salo (1):
ALSA: usb-audio: Add implicit feedback quirk for Yamaha THR5
Jeremi Piotrowski (1):
ptp: kvm: Use decrypted memory in confidential guest on x86
Jiasheng Jiang (1):
drm/i915: Fix memory leak by correcting cache object name in error handler
Joe Hattori (1):
ata: sata_highbank: fix OF node reference leak in highbank_initialize_phys()
Juergen Gross (9):
xen/netfront: fix crash when removing device
x86: make get_cpu_vendor() accessible from Xen code objtool/x86: allow syscall instruction
x86/static-call: provide a way to do very early static-call updates x86/xen: don't do PV iret hypercall through hypercall page x86/xen: add central hypercall functions
x86/xen: use new hypercall functions instead of hypercall page x86/xen: remove hypercall page
x86/static-call: fix 32-bit build
Lianqin Hu (1):
usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer
Mark Tomlinson (1):
usb: host: max3421-hcd: Correctly abort a USB request.
Martin Ottens (1):
net/sched: netem: account for backlog updates from child qdisc
Michal Luczaj (2):
bpf, sockmap: Fix update element with same
virtio/vsock: Fix accept_queue memory leak
MoYuanhao (1):
tcp: check space before adding MPTCP SYN options
Nathan Chancellor (1):
blk-iocost: Avoid using clamp() on inuse in __propagate_weights()
Nikolay Kuratov (1):
tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe()
Paul Barker (1):
Documentation: PM: Clarify pm_runtime_resume_and_get() return value
Remi Pommarel (3):
batman-adv: Do not send uninitialized TT changes
batman-adv: Remove uninitialized data in full table TT response
batman-adv: Do not let TT changes list grows indefinitely
Stefan Wahren (5):
usb: dwc2: Fix HCD resume
usb: dwc2: hcd: Fix GetPortStatus & SetPortFeature
usb: dwc2: Fix HCD port connection race
qca_spi: Fix clock speed for multiple QCA7000
qca_spi: Make driver probing reliable
Sungjong Seo (1):
exfat: fix potential deadlock on __exfat_get_dentry_set
Suraj Sonawane (1):
acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl
Thomas Weißschuh (1):
ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init()
Vitalii Mordan (1):
usb: ehci-hcd: fix call balance of clocks handling routines
Greg Kroah-Hartman
maintainerDocumentation/power/runtime_pm.rst +3 -1
@@ -341,7 +341,9 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: `int pm_runtime_resume_and_get(struct device *dev);` - run pm_runtime_resume(dev) and if successful, increment the device's - usage counter; return the result of pm_runtime_resume + usage counter; returns 0 on success (whether or not the device's + runtime PM status was already 'active') or the error code from + pm_runtime_resume() on failure. `int pm_request_idle(struct device *dev);` - submit a request to execute the subsystem-level idle callback for the
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 174 +SUBLEVEL = 175 EXTRAVERSION = NAME = Trick or Treat
arch/parisc/Kconfig +0 -1
@@ -15,7 +15,6 @@ config PARISC select ARCH_SPLIT_ARG64 if !64BIT select ARCH_SUPPORTS_HUGETLBFS if PA20 select ARCH_SUPPORTS_MEMORY_FAILURE - select ARCH_HAS_CACHE_LINE_SIZE select DMA_OPS select RTC_CLASS select RTC_DRV_GENERIC
arch/parisc/include/asm/cache.h +1 -10
@@ -20,16 +20,7 @@#define SMP_CACHE_BYTES L1_CACHE_BYTES -#ifdef CONFIG_PA20 -#define ARCH_DMA_MINALIGN 128 -#else -#define ARCH_DMA_MINALIGN 32 -#endif -#define ARCH_KMALLOC_MINALIGN 16/* ldcw requires 16-byte alignment */ - -#define arch_slab_minalign () ((unsigned)dcache_stride) -#define cache_line_size () dcache_stride -#define dma_get_cache_alignment cache_line_size +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES#define __read_mostly __section(".data..read_mostly")
arch/x86/include/asm/processor.h +2 -0
@@ -196,6 +196,8 @@ static inline unsigned long long l1tf_pfn_limit(void)return BIT_ULL (boot_cpu_data.x86_cache_bits -1 -PAGE_SHIFT ); } +void init_cpu_devs (void ); +void get_cpu_vendor (struct cpuinfo_x86 *c);extern void early_cpu_init (void );extern void identify_boot_cpu (void );extern void identify_secondary_cpu (struct cpuinfo_x86 *);
arch/x86/include/asm/static_call.h +15 -0
@@ -61,4 +61,19 @@extern bool __static_call_fixup (void *tramp,u8 op,void *dest); +extern void __static_call_update_early (void *tramp,void *func); + +#define static_call_update_early (name, _func) \ +({ \ + typeof(&STATIC_CALL_TRAMP(name)) __F = (_func); \ + if (static_call_initialized) { \ + __static_call_update(&STATIC_CALL_KEY(name), \ + STATIC_CALL_TRAMP_ADDR(name), __F);\ + } else { \ + WRITE_ONCE(STATIC_CALL_KEY(name).func, _func); \ + __static_call_update_early(STATIC_CALL_TRAMP_ADDR(name),\ + __F); \ + } \ +}) +#endif /* _ASM_STATIC_CALL_H */
arch/x86/include/asm/sync_core.h +3 -3
@@ -8,7 +8,7 @@#include <asm/special_insns.h> #ifdef CONFIG_X86_32 -static inline void iret_to_self (void ) +static __always_inline void iret_to_self(void) { asmvolatile ( "pushfl\n\t"
@@ -19,7 +19,7 @@ static inline void iret_to_self(void) : ASM_CALL_CONSTRAINT : : "memory"); }#else -static inline void iret_to_self (void ) +static __always_inline void iret_to_self(void) {unsigned int tmp;
@@ -55,7 +55,7 @@ static inline void iret_to_self(void)* Like all of Linux's memory ordering operations, this is a * compiler barrier as well. */ -static inline void sync_core (void ) +static __always_inline void sync_core(void) {/* * The SERIALIZE instruction is the most straightforward way to
arch/x86/include/asm/xen/hypercall.h +22 -14
@@ -39,9 +39,11 @@#include <linux/string.h> #include <linux/types.h> #include <linux/pgtable.h> +#include <linux/instrumentation.h> #include <trace/events/xen.h> +#include <asm/alternative.h> #include <asm/page.h> #include <asm/smap.h> #include <asm/nospec-branch.h>
@@ -86,11 +88,20 @@ struct xen_dm_op_buf;* there aren't more than 5 arguments...) */ -extern struct {char _entry[32 ]; } hypercall_page[]; +void xen_hypercall_func (void ); +DECLARE_STATIC_CALL (xen_hypercall, xen_hypercall_func); -#define __HYPERCALL "call hypercall_page+%c[offset]" -#define __HYPERCALL_ENTRY (x) \ - [offset] "i" (__HYPERVISOR_##x * sizeof(hypercall_page[0])) +#ifdef MODULE +#define __ADDRESSABLE_xen_hypercall +#else +#define __ADDRESSABLE_xen_hypercall __ADDRESSABLE_ASM_STR(__SCK__xen_hypercall) +#endif + +#define __HYPERCALL \ + __ADDRESSABLE_xen_hypercall \ + "call __SCT__xen_hypercall" + +#define __HYPERCALL_ENTRY (x) "a" (x)#ifdef CONFIG_X86_32 #define __HYPERCALL_RETREG "eax"
@@ -148,7 +159,7 @@ extern struct { char _entry[32]; } hypercall_page[];__HYPERCALL_0ARG (); \ asm volatile (__HYPERCALL \ : __HYPERCALL_0PARAM \ - : __HYPERCALL_ENTRY(name) \ + : __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \ : __HYPERCALL_CLOBBER0); \ (type)__res; \ })
@@ -159,7 +170,7 @@ extern struct { char _entry[32]; } hypercall_page[];__HYPERCALL_1ARG (a1); \ asm volatile (__HYPERCALL \ : __HYPERCALL_1PARAM \ - : __HYPERCALL_ENTRY(name) \ + : __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \ : __HYPERCALL_CLOBBER1); \ (type)__res; \ })
@@ -170,7 +181,7 @@ extern struct { char _entry[32]; } hypercall_page[];__HYPERCALL_2ARG (a1, a2); \ asm volatile (__HYPERCALL \ : __HYPERCALL_2PARAM \ - : __HYPERCALL_ENTRY(name) \ + : __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \ : __HYPERCALL_CLOBBER2); \ (type)__res; \ })
@@ -181,7 +192,7 @@ extern struct { char _entry[32]; } hypercall_page[];__HYPERCALL_3ARG (a1, a2, a3); \ asm volatile (__HYPERCALL \ : __HYPERCALL_3PARAM \ - : __HYPERCALL_ENTRY(name) \ + : __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \ : __HYPERCALL_CLOBBER3); \ (type)__res; \ })
@@ -192,7 +203,7 @@ extern struct { char _entry[32]; } hypercall_page[];__HYPERCALL_4ARG (a1, a2, a3, a4); \ asm volatile (__HYPERCALL \ : __HYPERCALL_4PARAM \ - : __HYPERCALL_ENTRY(name) \ + : __HYPERCALL_ENTRY(__HYPERVISOR_ ## name) \ : __HYPERCALL_CLOBBER4); \ (type)__res; \ })
@@ -206,12 +217,9 @@ xen_single_call(unsigned int call, __HYPERCALL_DECLS;__HYPERCALL_5ARG (a1, a2, a3, a4, a5); -if (call >=PAGE_SIZE /sizeof (hypercall_page[0 ])) -return -EINVAL ; - - asmvolatile (CALL_NOSPEC + asm volatile(__HYPERCALL : __HYPERCALL_5PARAM - : [thunk_target] "a" (&hypercall_page[call]) + : __HYPERCALL_ENTRY(call) : __HYPERCALL_CLOBBER5);return (long )__res;
arch/x86/kernel/cpu/common.c +22 -16
@@ -798,7 +798,7 @@ void detect_ht(struct cpuinfo_x86 *c)#endif } -static void get_cpu_vendor (struct cpuinfo_x86 *c) +void get_cpu_vendor (struct cpuinfo_x86 *c) {char *v = c->x86_vendor_id;int i;
@@ -1522,15 +1522,11 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)detect_nopl (); } -void __init early_cpu_init (void ) +void __init init_cpu_devs (void ) {const struct cpu_dev *const *cdev;int count =0 ; -#ifdef CONFIG_PROCESSOR_SELECT -pr_info ("KERNEL supported cpus:\n" ); -#endif -for (cdev = __x86_cpu_dev_start; cdev < __x86_cpu_dev_end; cdev++) {const struct cpu_dev *cpudev = *cdev;
@@ -1538,20 +1534,30 @@ void __init early_cpu_init(void)break ; cpu_devs[count] = cpudev; count++; + } +} +void __init early_cpu_init (void ) +{#ifdef CONFIG_PROCESSOR_SELECT - { -unsigned int j; - -for (j =0 ; j <2 ; j++) { -if (!cpudev->c_ident[j]) -continue ; -pr_info (" %s %s\n" , cpudev->c_vendor, - cpudev->c_ident[j]); - } - } +unsigned int i, j; + +pr_info ("KERNEL supported cpus:\n" );#endif + +init_cpu_devs (); + +#ifdef CONFIG_PROCESSOR_SELECT +for (i =0 ; i <X86_VENDOR_NUM && cpu_devs[i]; i++) { +for (j =0 ; j <2 ; j++) { +if (!cpu_devs[i]->c_ident[j]) +continue ; +pr_info (" %s %s\n" , cpu_devs[i]->c_vendor, + cpu_devs[i]->c_ident[j]); + } } +#endif +early_identify_cpu (&boot_cpu_data); }
arch/x86/kernel/static_call.c +10 -0
@@ -2,6 +2,7 @@#include <linux/static_call.h> #include <linux/memory.h> #include <linux/bug.h> +#include <asm/sync_core.h> #include <asm/text-patching.h> enum insn_type {
@@ -165,6 +166,15 @@ void arch_static_call_transform(void *site, void *tramp, void *func, bool tail) }EXPORT_SYMBOL_GPL (arch_static_call_transform); +noinstr void __static_call_update_early(void *tramp, void *func) +{ +BUG_ON (system_state !=SYSTEM_BOOTING ); +BUG_ON (!early_boot_irqs_disabled); +BUG_ON (static_call_initialized); +__text_gen_insn (tramp,JMP32_INSN_OPCODE , tramp, func,JMP32_INSN_SIZE ); +sync_core (); +} +#ifdef CONFIG_RETHUNK /* * This is called by apply_returns() to fix up static call trampolines,
arch/x86/xen/enlighten.c +64 -1
83 lines not on this page · raw message
arch/x86/xen/enlighten_hvm.c +5 -8
@@ -101,15 +101,8 @@ static void __init init_hvm_pv_info(void)/* PVH set up hypercall page in xen_prepare_pvh(). */ if (xen_pvh_domain ()) pv_info.name ="Xen PVH" ; -else { -u64 pfn; -uint32_t msr; - +else pv_info.name ="Xen HVM" ; - msr =cpuid_ebx (base +2 ); - pfn =__pa (hypercall_page); -wrmsr_safe (msr, (u32 )pfn, (u32)(pfn >>32 )); - }xen_setup_features ();
@@ -284,6 +277,10 @@ static uint32_t __init xen_platform_hvm(void)if (xen_pv_domain ())return 0 ; +/* Set correct hypercall function. */ +if (xen_domain) +xen_hypercall_setfunc (); +if (xen_pvh_domain () && nopv) {/* Guest booting via the Xen-PVH boot entry goes here */ pr_info ("\"nopv\" parameter is ignored in PVH guest\n" );
arch/x86/xen/enlighten_pv.c +3 -1
@@ -1207,6 +1207,9 @@ asmlinkage __visible void __init xen_start_kernel(void) xen_domain_type =XEN_PV_DOMAIN ; xen_start_flags = xen_start_info->flags; +/* Interrupts are guaranteed to be off initially. */ + early_boot_irqs_disabled = true; +static_call_update_early (xen_hypercall, xen_hypercall_pv);xen_setup_features ();
@@ -1304,7 +1307,6 @@ asmlinkage __visible void __init xen_start_kernel(void)WARN_ON (xen_cpuhp_setup (xen_cpu_up_prepare_pv, xen_cpu_dead_pv));local_irq_disable (); - early_boot_irqs_disabled = true;xen_raw_console_write ("mapping kernel into physical memory\n" ); xen_setup_kernel_pagetable((pgd_t *)xen_start_info->pt_base,
arch/x86/xen/enlighten_pvh.c +0 -7
@@ -27,17 +27,10 @@ EXPORT_SYMBOL_GPL(xen_pvh);void __init xen_pvh_init (struct boot_params *boot_params) { -u32 msr; -u64 pfn; - xen_pvh =1 ; xen_domain_type =XEN_HVM_DOMAIN ; xen_start_flags = pvh_start_info.flags; - msr =cpuid_ebx (xen_cpuid_base () +2 ); - pfn =__pa (hypercall_page); -wrmsr_safe (msr, (u32 )pfn, (u32)(pfn >>32 )); -if (xen_initial_domain ()) x86_init.oem.arch_setup = xen_add_preferred_consoles; x86_init.oem.banner = xen_banner;
arch/x86/xen/xen-asm.S +40 -9
79 lines not on this page · raw message
arch/x86/xen/xen-head.S +81 -18
120 lines not on this page · raw message
arch/x86/xen/xen-ops.h +9 -0
@@ -164,4 +164,13 @@ void xen_hvm_post_suspend(int suspend_cancelled);static inline void xen_hvm_post_suspend (int suspend_cancelled) {}#endif +#ifdef CONFIG_XEN_PV +void xen_hypercall_pv (void ); +#endif +void xen_hypercall_hvm (void ); +void xen_hypercall_amd (void ); +void xen_hypercall_intel (void ); +void xen_hypercall_setfunc (void ); +void *__xen_hypercall_setfunc (void ); +#endif /* XEN_OPS_H */
block/blk-iocost.c +8 -1
@@ -1087,7 +1087,14 @@ static void __propagate_weights(struct ioc_gq *iocg, u32 active, u32 inuse, inuse =DIV64_U64_ROUND_UP (active * iocg->child_inuse_sum, iocg->child_active_sum); }else { - inuse =clamp_t (u32, inuse,1 , active); +/* +* It may be tempting to turn this into a clamp expression with +* a lower limit of 1 but active may be 0, which cannot be used +* as an upper limit in that situation. This expression allows +* active to clamp inuse unless it is 0, in which case inuse +* becomes 1. +*/ + inuse =min (inuse, active) ?:1 ; } iocg->last_inuse = iocg->inuse;
drivers/acpi/acpica/evxfregn.c +0 -2
@@ -201,8 +201,6 @@ acpi_remove_address_space_handler(acpi_handle device,/* Now we can delete the handler object */ -acpi_os_release_mutex (handler_obj->address_space. - context_mutex);acpi_ut_remove_reference (handler_obj); goto unlock_and_exit; }
drivers/acpi/nfit/core.c +6 -1
@@ -454,8 +454,13 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,if (cmd_rc) *cmd_rc = -EINVAL ; -if (cmd ==ND_CMD_CALL ) +if (cmd ==ND_CMD_CALL ) { +if (!buf || buf_len <sizeof (*call_pkg)) +return -EINVAL ; + call_pkg = buf; + } + func =cmd_to_func (nfit_mem, cmd, call_pkg, &family);if (func <0 )return func;
drivers/acpi/resource.c +3 -3
@@ -250,6 +250,9 @@ static bool acpi_decode_space(struct resource_win *win,switch (addr->resource_type) {case ACPI_MEMORY_RANGE :acpi_dev_memresource_flags (res, len, wp); + +if (addr->info.mem.caching ==ACPI_PREFETCHABLE_MEMORY ) + res->flags |=IORESOURCE_PREFETCH ;break ;case ACPI_IO_RANGE : acpi_dev_ioresource_flags(res, len, iodec,
@@ -265,9 +268,6 @@ static bool acpi_decode_space(struct resource_win *win,if (addr->producer_consumer ==ACPI_PRODUCER ) res->flags |=IORESOURCE_WINDOW ; -if (addr->info.mem.caching ==ACPI_PREFETCHABLE_MEMORY ) - res->flags |=IORESOURCE_PREFETCH ; -return !(res->flags &IORESOURCE_DISABLED ); }
drivers/ata/sata_highbank.c +1 -0
@@ -348,6 +348,7 @@ static int highbank_initialize_phys(struct device *dev, void __iomem *addr) phy_nodes[phy] = phy_data.np; cphy_base[phy] =of_iomap (phy_nodes[phy],0 );if (cphy_base[phy] ==NULL ) { +of_node_put (phy_data.np);return 0 ; } phy_count +=1 ;
drivers/gpu/drm/i915/i915_scheduler.c +1 -1
@@ -506,6 +506,6 @@ int __init i915_scheduler_module_init(void)return 0 ; err_priorities: -kmem_cache_destroy (slab_priorities); +kmem_cache_destroy (slab_dependencies);return -ENOMEM ; }
drivers/net/bonding/bond_main.c +1 -0
@@ -1384,6 +1384,7 @@ static netdev_features_t bond_fix_features(struct net_device *dev,#define BOND_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \ + NETIF_F_GSO_ENCAP_ALL | \ NETIF_F_HIGHDMA | NETIF_F_LRO)#define BOND_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +1 -1
@@ -2084,7 +2084,7 @@ void t4_idma_monitor(struct adapter *adapter,struct sge_idma_monitor_state *idma, int hz, int ticks);int t4_set_vf_mac_acl (struct adapter *adapter,unsigned int vf, -unsigned int naddr,u8 *addr); +u8 start,unsigned int naddr,u8 *addr);void t4_tp_pio_read (struct adapter *adap,u32 *buff,u32 nregs,u32 start_index,bool sleep_ok); void t4_tp_tm_pio_read(struct adapter *adap, u32 *buff, u32 nregs,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +1 -1
@@ -3247,7 +3247,7 @@ static int cxgb4_mgmt_set_vf_mac(struct net_device *dev, int vf, u8 *mac)dev_info (pi->adapter->pdev_dev,"Setting MAC %pM on VF %d\n" , mac, vf); - ret =t4_set_vf_mac_acl (adap, vf +1 ,1 , mac); + ret =t4_set_vf_mac_acl (adap, vf +1 , pi->lport,1 , mac);if (!ret)ether_addr_copy (adap->vfinfo[vf].vf_mac_addr, mac);return ret;
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +3 -2
@@ -10215,11 +10215,12 @@ int t4_load_cfg(struct adapter *adap, const u8 *cfg_data, unsigned int size)* t4_set_vf_mac_acl - Set MAC address for the specified VF * @adapter: The adapter * @vf: one of the VFs instantiated by the specified PF +* @start: The start port id associated with specified VF * @naddr: the number of MAC addresses * @addr: the MAC address(es) to be set to the specified VF */ int t4_set_vf_mac_acl (struct adapter *adapter,unsigned int vf, -unsigned int naddr,u8 *addr) +u8 start,unsigned int naddr,u8 *addr) {struct fw_acl_mac_cmd cmd;
@@ -10234,7 +10235,7 @@ int t4_set_vf_mac_acl(struct adapter *adapter, unsigned int vf, cmd.en_to_len16 =cpu_to_be32 ((unsigned int )FW_LEN16 (cmd)); cmd.nmac = naddr; -switch (adapter->pf) { +switch (start) {case 3 :memcpy (cmd.macaddr3, addr,sizeof (cmd.macaddr3));break ;
drivers/net/ethernet/microchip/sparx5/sparx5_main.c +5 -6
@@ -647,12 +647,11 @@ static int sparx5_start(struct sparx5 *sparx5) err = -ENXIO ;if (sparx5->fdma_irq >=0 ) {if (GCB_CHIP_ID_REV_ID_GET (sparx5->chip_id) >0 ) - err =devm_request_threaded_irq (sparx5->dev, - sparx5->fdma_irq, -NULL , - sparx5_fdma_handler, -IRQF_ONESHOT , -"sparx5-fdma" , sparx5); + err =devm_request_irq (sparx5->dev, + sparx5->fdma_irq, + sparx5_fdma_handler, +0 , +"sparx5-fdma" , sparx5);if (!err) err =sparx5_fdma_start (sparx5);if (err)
drivers/net/ethernet/microchip/sparx5/sparx5_port.c +1 -1
@@ -1113,7 +1113,7 @@ int sparx5_port_init(struct sparx5 *sparx5,spx5_inst_rmw (DEV10G_MAC_MAXLEN_CFG_MAX_LEN_SET (ETH_MAXLEN ),DEV10G_MAC_MAXLEN_CFG_MAX_LEN , devinst, -DEV10G_MAC_ENA_CFG (0 )); +DEV10G_MAC_MAXLEN_CFG (0 ));/* Handle Signal Detect in 10G PCS */ spx5_inst_wr(PCS10G_BR_PCS_SD_CFG_SD_POL_SET(sd_pol) |
drivers/net/ethernet/qualcomm/qca_spi.c +11 -15
@@ -67,7 +67,7 @@ MODULE_PARM_DESC(qcaspi_burst_len, "Number of data bytes per burst. Use 1-5000."#define QCASPI_PLUGGABLE_MIN 0#define QCASPI_PLUGGABLE_MAX 1 -static int qcaspi_pluggable =QCASPI_PLUGGABLE_MIN ; +static int qcaspi_pluggable =QCASPI_PLUGGABLE_MAX ;module_param (qcaspi_pluggable, int,0 );MODULE_PARM_DESC (qcaspi_pluggable,"Pluggable SPI connection (yes/no)." );
@@ -829,7 +829,6 @@ qcaspi_netdev_init(struct net_device *dev) dev->mtu =QCAFRM_MAX_MTU ; dev->type =ARPHRD_ETHER ; - qca->clkspeed = qcaspi_clkspeed; qca->burst_len = qcaspi_burst_len; qca->spi_thread =NULL ; qca->buffer_size = (dev->mtu + VLAN_ETH_HLEN + QCAFRM_HEADER_LEN +
@@ -918,17 +917,15 @@ qca_spi_probe(struct spi_device *spi) legacy_mode =of_property_read_bool (spi->dev.of_node,"qca,legacy-mode" ); -if (qcaspi_clkspeed ==0 ) { -if (spi->max_speed_hz) - qcaspi_clkspeed = spi->max_speed_hz; -else - qcaspi_clkspeed =QCASPI_CLK_SPEED ; - } +if (qcaspi_clkspeed) + spi->max_speed_hz = qcaspi_clkspeed; +else if (!spi->max_speed_hz) + spi->max_speed_hz =QCASPI_CLK_SPEED ; -if ((qcaspi_clkspeed <QCASPI_CLK_SPEED_MIN ) || - (qcaspi_clkspeed >QCASPI_CLK_SPEED_MAX )) { -dev_err (&spi->dev,"Invalid clkspeed: %d\n" , - qcaspi_clkspeed); +if (spi->max_speed_hz <QCASPI_CLK_SPEED_MIN || + spi->max_speed_hz >QCASPI_CLK_SPEED_MAX ) { +dev_err (&spi->dev,"Invalid clkspeed: %u\n" , + spi->max_speed_hz);return -EINVAL ; }
@@ -953,14 +950,13 @@ qca_spi_probe(struct spi_device *spi)return -EINVAL ; } -dev_info (&spi->dev,"ver=%s, clkspeed=%d, burst_len=%d, pluggable=%d\n" , +dev_info (&spi->dev,"ver=%s, clkspeed=%u, burst_len=%d, pluggable=%d\n" ,QCASPI_DRV_VERSION , - qcaspi_clkspeed, + spi->max_speed_hz, qcaspi_burst_len, qcaspi_pluggable); spi->mode =SPI_MODE_3 ; - spi->max_speed_hz = qcaspi_clkspeed;if (spi_setup (spi) <0 ) {dev_err (&spi->dev,"Unable to setup SPI device\n" );return -EFAULT ;
drivers/net/ethernet/qualcomm/qca_spi.h +0 -1
@@ -101,7 +101,6 @@ struct qcaspi {#endif /* user configurable options */ -u32 clkspeed;u8 legacy_mode;u16 burst_len; };
drivers/net/team/team.c +2 -1
@@ -979,7 +979,8 @@ static void team_port_disable(struct team *team,#define TEAM_VLAN_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | \ - NETIF_F_HIGHDMA | NETIF_F_LRO) + NETIF_F_HIGHDMA | NETIF_F_LRO | \ + NETIF_F_GSO_ENCAP_ALL)#define TEAM_ENC_FEATURES (NETIF_F_HW_CSUM | NETIF_F_SG | \ NETIF_F_RXCSUM | NETIF_F_GSO_SOFTWARE)
drivers/net/xen-netfront.c +4 -1
@@ -869,7 +869,7 @@ static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *devstatic int xennet_close (struct net_device *dev) {struct netfront_info *np =netdev_priv (dev); -unsigned int num_queues = dev->real_num_tx_queues; +unsigned int num_queues = np->queues ? dev->real_num_tx_queues :0 ;unsigned int i;struct netfront_queue *queue;netif_tx_stop_all_queues (np->netdev);
@@ -884,6 +884,9 @@ static void xennet_destroy_queues(struct netfront_info *info) {unsigned int i; +if (!info->queues) +return ; +for (i =0 ; i < info->netdev->real_num_tx_queues; i++) {struct netfront_queue *queue = &info->queues[i];
drivers/ptp/ptp_kvm_arm.c +4 -0
@@ -22,6 +22,10 @@ int kvm_arch_ptp_init(void)return 0 ; } +void kvm_arch_ptp_exit (void ) +{ +} +int kvm_arch_ptp_get_clock (struct timespec64 *ts) {return kvm_arch_ptp_get_crosststamp (NULL , ts,NULL );
drivers/ptp/ptp_kvm_common.c +1 -0
@@ -130,6 +130,7 @@ static struct kvm_ptp_clock kvm_ptp_clock; static void __exit ptp_kvm_exit(void) {ptp_clock_unregister (kvm_ptp_clock.ptp_clock); +kvm_arch_ptp_exit (); }static int __init ptp_kvm_init (void )
drivers/ptp/ptp_kvm_x86.c +49 -12
93 lines not on this page · raw message
drivers/usb/dwc2/hcd.c +8 -11
@@ -3579,11 +3579,9 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, port_status |=USB_PORT_STAT_C_OVERCURRENT <<16 ; } -if (!hsotg->flags.b.port_connect_status) { +if (dwc2_is_device_mode (hsotg)) {/* -* The port is disconnected, which means the core is -* either in device mode or it soon will be. Just -* return 0's for the remainder of the port status +* Just return 0's for the remainder of the port status * since the port register can't be read if the core * is in device mode. */
@@ -3653,13 +3651,11 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq,if (wvalue !=USB_PORT_FEAT_TEST && (!windex || windex >1 )) goto error; -if (!hsotg->flags.b.port_connect_status) { +if (dwc2_is_device_mode (hsotg)) {/* -* The port is disconnected, which means the core is -* either in device mode or it soon will be. Just -* return without doing anything since the port -* register can't be written if the core is in device -* mode. +* Just return 0's for the remainder of the port status +* since the port register can't be read if the core +* is in device mode. */ break ; }
@@ -4382,7 +4378,7 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd)if (hsotg->bus_suspended) goto skip_power_saving; -if (hsotg->flags.b.port_connect_status ==0 ) +if (!(dwc2_read_hprt0 (hsotg) &HPRT0_CONNSTS )) goto skip_power_saving;switch (hsotg->params.power_down) {
@@ -4464,6 +4460,7 @@ static int _dwc2_hcd_resume(struct usb_hcd *hcd)* Power Down mode. */ if (hprt0 &HPRT0_CONNSTS ) { +set_bit (HCD_FLAG_HW_ACCESSIBLE , &hcd->flags); hsotg->lx_state =DWC2_L0 ; goto unlock; }
drivers/usb/gadget/function/u_serial.c +6 -3
@@ -570,9 +570,12 @@ static int gs_start_io(struct gs_port *port)* we didn't in gs_start_tx() */ tty_wakeup (port->port.tty); }else { -gs_free_requests (ep, head, &port->read_allocated); -gs_free_requests (port->port_usb->in, &port->write_pool, - &port->write_allocated); +/* Free reqs only if we are still connected */ +if (port->port_usb) { +gs_free_requests (ep, head, &port->read_allocated); +gs_free_requests (port->port_usb->in, &port->write_pool, + &port->write_allocated); + } status = -EIO ; }
drivers/usb/host/ehci-sh.c +7 -2
@@ -120,8 +120,12 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev)if (IS_ERR (priv->iclk)) priv->iclk =NULL ; -clk_enable (priv->fclk); -clk_enable (priv->iclk); + ret =clk_enable (priv->fclk); +if (ret) + goto fail_request_resource; + ret =clk_enable (priv->iclk); +if (ret) + goto fail_iclk; ret =usb_add_hcd (hcd, irq,IRQF_SHARED );if (ret !=0 ) {
@@ -137,6 +141,7 @@ static int ehci_hcd_sh_probe(struct platform_device *pdev) fail_add_hcd:clk_disable (priv->iclk); +fail_iclk:clk_disable (priv->fclk); fail_request_resource:
drivers/usb/host/max3421-hcd.c +11 -5
@@ -785,11 +785,17 @@ max3421_check_unlink(struct usb_hcd *hcd) retval =1 ;dev_dbg (&spi->dev,"%s: URB %p unlinked=%d" , __func__, urb, urb->unlinked); -usb_hcd_unlink_urb_from_ep (hcd, urb); -spin_unlock_irqrestore (&max3421_hcd->lock, - flags); -usb_hcd_giveback_urb (hcd, urb,0 ); -spin_lock_irqsave (&max3421_hcd->lock, flags); +if (urb == max3421_hcd->curr_urb) { + max3421_hcd->urb_done =1 ; + max3421_hcd->hien &= ~(BIT (MAX3421_HI_HXFRDN_BIT ) | +BIT (MAX3421_HI_RCVDAV_BIT )); + }else { +usb_hcd_unlink_urb_from_ep (hcd, urb); +spin_unlock_irqrestore (&max3421_hcd->lock, + flags); +usb_hcd_giveback_urb (hcd, urb,0 ); +spin_lock_irqsave (&max3421_hcd->lock, flags); + } } } }
fs/exfat/dir.c +1 -1
@@ -878,7 +878,7 @@ struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, num_bh =EXFAT_B_TO_BLK_ROUND_UP (off + num_entries *DENTRY_SIZE , sb);if (num_bh >ARRAY_SIZE (es->__bh)) { - es->bh =kmalloc_array (num_bh,sizeof (*es->bh),GFP_KERNEL ); + es->bh =kmalloc_array (num_bh,sizeof (*es->bh),GFP_NOFS );if (!es->bh) {brelse (bh);kfree (es);
fs/xfs/libxfs/xfs_btree.c +23 -6
@@ -3413,14 +3413,31 @@ xfs_btree_insrec(xfs_btree_log_block (cur, bp,XFS_BB_NUMRECS );/* -* If we just inserted into a new tree block, we have to -* recalculate nkey here because nkey is out of date. +* Update btree keys to reflect the newly added record or keyptr. +* There are three cases here to be aware of. Normally, all we have to +* do is walk towards the root, updating keys as necessary. * -* Otherwise we're just updating an existing block (having shoved -* some records into the new tree block), so use the regular key -* update mechanism. +* If the caller had us target a full block for the insertion, we dealt +* with that by calling the _make_block_unfull function. If the +* "make unfull" function splits the block, it'll hand us back the key +* and pointer of the new block. We haven't yet added the new block to +* the next level up, so if we decide to add the new record to the new +* block (bp->b_bn != old_bn), we have to update the caller's pointer +* so that the caller adds the new block with the correct key. +* +* However, there is a third possibility-- if the selected block is the +* root block of an inode-rooted btree and cannot be expanded further, +* the "make unfull" function moves the root block contents to a new +* block and updates the root block to point to the new block. In this +* case, no block pointer is passed back because the block has already +* been added to the btree. In this case, we need to use the regular +* key update function, just like the first case. This is critical for +* overlapping btrees, because the high key must be updated to reflect +* the entire tree, not just the subtree accessible through the first +* child of the root (which is now two levels down from the root). */ -if (bp &&xfs_buf_daddr (bp) != old_bn) { +if (!xfs_btree_ptr_is_null (cur, &nptr) && + bp &&xfs_buf_daddr (bp) != old_bn) {xfs_btree_get_keys (cur, block, lkey); }else if (xfs_btree_needs_key_update (cur, optr)) { error =xfs_btree_update_keys (cur, level);
fs/xfs/libxfs/xfs_symlink_remote.c +3 -1
@@ -89,8 +89,10 @@ xfs_symlink_verify(struct xfs_mount *mp = bp->b_mount;struct xfs_dsymlink_hdr *dsl = bp->b_addr; +/* no verification of non-crc buffers */ if (!xfs_has_crc (mp)) -return __this_address; +return NULL ; +if (!xfs_verify_magic (bp, dsl->sl_magic))return __this_address;if (!uuid_equal (&dsl->sl_uuid, &mp->m_sb.sb_meta_uuid))
fs/xfs/scrub/trace.h +1 -1
@@ -464,7 +464,7 @@ TRACE_EVENT(xchk_ifork_btree_error,TP_fast_assign ( xfs_fsblock_t fsbno = xchk_btree_cur_fsbno(cur, level); __entry->dev = sc->mp->m_super->s_dev; - __entry->ino = sc->ip->i_ino; + __entry->ino = cur->bc_ino.ip->i_ino; __entry->whichfork = cur->bc_ino.whichfork; __entry->type = sc->sm->sm_type; __entry->btnum = cur->bc_btnum;
fs/xfs/xfs_file.c +8 -0
@@ -1193,6 +1193,14 @@ xfs_file_remap_range(xfs_iunlock2_io_mmap (src, dest);if (ret)trace_xfs_reflink_remap_range_error (dest, ret, _RET_IP_); +/* +* If the caller did not set CAN_SHORTEN, then it is not prepared to +* handle partial results -- either the whole remap succeeds, or we +* must say why it did not. In this case, any error should be returned +* to the caller. +*/ +if (ret && remapped < len && !(remap_flags &REMAP_FILE_CAN_SHORTEN )) +return ret;return remapped >0 ? remapped : ret; }
include/linux/compiler.h +23 -9
@@ -222,6 +222,23 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,#endif /* __KERNEL__ */ +/** +* offset_to_ptr - convert a relative memory offset to an absolute pointer +* @off: the address of the 32-bit offset value +*/ +static inline void *offset_to_ptr (const int *off) +{ +return (void *)((unsigned long )off + *off); +} + +#endif /* __ASSEMBLY__ */ + +#ifdef CONFIG_64BIT +#define ARCH_SEL (a,b) a +#else +#define ARCH_SEL (a,b) b +#endif +/* * Force the compiler to emit 'sym' as a symbol, so that we can reference * it from inline assembler. Necessary in case 'sym' could be inlined
@@ -232,16 +249,13 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, static void * __section(".discard.addressable") __used \__UNIQUE_ID (__PASTE (__addressable_ ,sym )) = (void *)&sym; -/** -* offset_to_ptr - convert a relative memory offset to an absolute pointer -* @off: the address of the 32-bit offset value -*/ -static inline void *offset_to_ptr (const int *off) -{ -return (void *)((unsigned long )off + *off); -} +#define __ADDRESSABLE_ASM (sym) \ + .pushsection .discard.addressable,"aw"; \ + .align ARCH_SEL(8,4); \ + ARCH_SEL(.quad, .long) __stringify(sym); \ + .popsection; -#endif /* __ASSEMBLY__ */ +#define __ADDRESSABLE_ASM_STR (sym) __stringify(__ADDRESSABLE_ASM(sym))/* &a[0] degrades to a pointer: a different type from an array */ #define __must_be_array (a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
include/linux/ptp_kvm.h +1 -0
@@ -12,6 +12,7 @@ struct timespec64;struct clocksource ;int kvm_arch_ptp_init (void ); +void kvm_arch_ptp_exit (void );int kvm_arch_ptp_get_clock (struct timespec64 *ts);int kvm_arch_ptp_get_crosststamp (u64 *cycle,struct timespec64 *tspec,struct clocksource **cs);
include/linux/static_call.h +6 -0
@@ -160,6 +160,8 @@ extern void arch_static_call_transform(void *site, void *tramp, void *func, bool#ifdef CONFIG_HAVE_STATIC_CALL_INLINE +extern bool static_call_initialized; +extern int __init static_call_init (void ); struct static_call_mod {
@@ -215,6 +217,8 @@ extern long __static_call_return0(void);#elif defined(CONFIG_HAVE_STATIC_CALL ) +#define static_call_initialized 0 +static inline int static_call_init (void ) {return 0 ; }#define __DEFINE_STATIC_CALL (name, _func, _func_init) \
@@ -265,6 +269,8 @@ extern long __static_call_return0(void);#else /* Generic implementation */ +#define static_call_initialized 0 +static inline int static_call_init (void ) {return 0 ; }static inline long __static_call_return0 (void )
include/net/lapb.h +1 -1
@@ -4,7 +4,7 @@#include <linux/lapb.h> #include <linux/refcount.h> -#define LAPB_HEADER_LEN 20/* LAPB over Ethernet + a bit more */ +#define LAPB_HEADER_LEN MAX_HEADER/* LAPB over Ethernet + a bit more */ #define LAPB_ACK_PENDING_CONDITION 0x01#define LAPB_REJECT_CONDITION 0x02
kernel/bpf/verifier.c +4 -1
@@ -9223,8 +9223,11 @@ static void find_equal_scalars(struct bpf_verifier_state *vstate,struct bpf_reg_state *reg;bpf_for_each_reg_in_vstate (vstate, state, reg, ({ -if (reg->type ==SCALAR_VALUE && reg->id == known_reg->id) +if (reg->type ==SCALAR_VALUE && reg->id == known_reg->id) { +s32 saved_subreg_def = reg->subreg_def;copy_register_state (reg, known_reg); + reg->subreg_def = saved_subreg_def; + } })); }
kernel/static_call_inline.c +1 -1
@@ -15,7 +15,7 @@ extern struct static_call_site __start_static_call_sites[],extern struct static_call_tramp_key __start_static_call_tramp_key[], __stop_static_call_tramp_key[]; -static bool static_call_initialized; +bool static_call_initialized;/* mutex to protect key modules/sites */ static DEFINE_MUTEX (static_call_mutex);
kernel/trace/trace_kprobe.c +1 -1
@@ -1823,7 +1823,7 @@ create_local_trace_kprobe(char *func, void *addr, unsigned long offs,int ret;char *event; -if (func) { +if (func && !strchr (func,':' )) {unsigned int count; count =number_of_same_symbols (func);
net/batman-adv/translation-table.c +40 -18
127 lines not on this page · raw message
net/core/sock_map.c +1 -0
@@ -158,6 +158,7 @@ static void sock_map_del_link(struct sock *sk, verdict_stop = true;list_del (&link->list);sk_psock_free_link (link); +break ; } }spin_unlock_bh (&psock->link_lock);
net/ipv4/tcp_output.c +4 -2
@@ -824,8 +824,10 @@ static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,unsigned int size;if (mptcp_syn_options (sk, skb, &size, &opts->mptcp)) { - opts->options |=OPTION_MPTCP ; - remaining -= size; +if (remaining >= size) { + opts->options |=OPTION_MPTCP ; + remaining -= size; + } } }
net/sched/sch_netem.c +16 -6
@@ -77,6 +77,8 @@ struct netem_sched_data {struct sk_buff *t_head;struct sk_buff *t_tail; +u32 t_len; +/* optional qdisc for classful handling (NULL at netem init) */ struct Qdisc *qdisc;
@@ -373,6 +375,7 @@ static void tfifo_reset(struct Qdisc *sch)rtnl_kfree_skbs (q->t_head, q->t_tail); q->t_head =NULL ; q->t_tail =NULL ; + q->t_len =0 ; }static void tfifo_enqueue (struct sk_buff *nskb,struct Qdisc *sch)
@@ -402,6 +405,7 @@ static void tfifo_enqueue(struct sk_buff *nskb, struct Qdisc *sch)rb_link_node (&nskb->rbnode, parent, p);rb_insert_color (&nskb->rbnode, &q->t_root); } + q->t_len++; sch->q.qlen++; }
@@ -508,7 +512,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,1 <<(prandom_u32 () %8 ); } -if (unlikely (sch->q.qlen >= sch->limit)) { +if (unlikely (q->t_len >= sch->limit)) {/* re-link segs, so that qdisc_drop_all() frees them all */ skb->next = segs;qdisc_drop_all (skb, sch, to_free);
@@ -692,8 +696,8 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) tfifo_dequeue: skb =__qdisc_dequeue_head (&sch->q);if (skb) { -qdisc_qstats_backlog_dec (sch, skb); deliver: +qdisc_qstats_backlog_dec (sch, skb);qdisc_bstats_update (sch, skb);return skb; }
@@ -709,8 +713,7 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)if (time_to_send <= now && q->slot.slot_next <= now) {netem_erase_head (q, skb); - sch->q.qlen--; -qdisc_qstats_backlog_dec (sch, skb); + q->t_len--; skb->next =NULL ; skb->prev =NULL ;/* skb->dev shares skb->rbnode area,
@@ -737,16 +740,21 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)if (net_xmit_drop_count (err))qdisc_qstats_drop (sch);qdisc_tree_reduce_backlog (sch,1 , pkt_len); + sch->qstats.backlog -= pkt_len; + sch->q.qlen--; } goto tfifo_dequeue; } + sch->q.qlen--; goto deliver; }if (q->qdisc) { skb = q->qdisc->ops->dequeue (q->qdisc); -if (skb) +if (skb) { + sch->q.qlen--; goto deliver; + } } qdisc_watchdog_schedule_ns(&q->watchdog,
@@ -756,8 +764,10 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)if (q->qdisc) { skb = q->qdisc->ops->dequeue (q->qdisc); -if (skb) +if (skb) { + sch->q.qlen--; goto deliver; + } }return NULL ; }
net/tipc/udp_media.c +6 -1
@@ -811,6 +811,7 @@ static void cleanup_bearer(struct work_struct *work) { struct udp_bearer *ub = container_of(work, struct udp_bearer, work);struct udp_replicast *rcast, *tmp; +struct tipc_net *tn;list_for_each_entry_safe (rcast, tmp, &ub->rcast.list, list) {dst_cache_destroy (&rcast->dst_cache);
@@ -818,10 +819,14 @@ static void cleanup_bearer(struct work_struct *work)kfree_rcu (rcast, rcu); } + tn =tipc_net (sock_net (ub->ubsock->sk)); +dst_cache_destroy (&ub->rcast.dst_cache);udp_tunnel_sock_release (ub->ubsock); + +/* Note: could use a call_rcu() to avoid another synchronize_net() */ synchronize_net (); -atomic_dec (&tipc_net (sock_net (ub->ubsock->sk))->wq_count); +atomic_dec (&tn->wq_count);kfree (ub); }
net/vmw_vsock/virtio_transport_common.c +8 -0
@@ -1196,6 +1196,14 @@ virtio_transport_recv_listen(struct sock *sk, struct virtio_vsock_pkt *pkt,return -ENOMEM ; } +/* __vsock_release() might have already flushed accept_queue. +* Subsequent enqueues would lead to a memory leak. +*/ +if (sk->sk_shutdown ==SHUTDOWN_MASK ) { +virtio_transport_reset_no_sock (t, pkt); +return -ESHUTDOWN ; + } + child =vsock_create_connected (sk);if (!child) {virtio_transport_reset_no_sock (t, pkt);
sound/usb/quirks.c +23 -10
@@ -591,7 +591,7 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,static int snd_usb_extigy_boot_quirk (struct usb_device *dev,struct usb_interface *intf) {struct usb_host_config *config = dev->actconfig; -struct usb_device_descriptor new_device_descriptor; +struct usb_device_descriptor *new_device_descriptor =NULL ;int err; if (le16_to_cpu(get_cfg_desc(config)->wTotalLength) == EXTIGY_FIRMWARE_SIZE_OLD ||
@@ -602,15 +602,20 @@ static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interfac 0x10, 0x43, 0x0001, 0x000a, NULL, 0);if (err <0 )dev_dbg (&dev->dev,"error sending boot message: %d\n" , err); + + new_device_descriptor =kmalloc (sizeof (*new_device_descriptor),GFP_KERNEL ); +if (!new_device_descriptor) +return -ENOMEM ; err =usb_get_descriptor (dev,USB_DT_DEVICE ,0 , - &new_device_descriptor,sizeof (new_device_descriptor)); + new_device_descriptor,sizeof (*new_device_descriptor));if (err <0 )dev_dbg (&dev->dev,"error usb_get_descriptor: %d\n" , err); -if (new_device_descriptor.bNumConfigurations > dev->descriptor.bNumConfigurations) +if (new_device_descriptor->bNumConfigurations > dev->descriptor.bNumConfigurations)dev_dbg (&dev->dev,"error too large bNumConfigurations: %d\n" , - new_device_descriptor.bNumConfigurations); + new_device_descriptor->bNumConfigurations);else -memcpy (&dev->descriptor, &new_device_descriptor,sizeof (dev->descriptor)); +memcpy (&dev->descriptor, new_device_descriptor,sizeof (dev->descriptor)); +kfree (new_device_descriptor); err =usb_reset_configuration (dev);if (err <0 )dev_dbg (&dev->dev,"error usb_reset_configuration: %d\n" , err);
@@ -942,7 +947,7 @@ static void mbox2_setup_48_24_magic(struct usb_device *dev)static int snd_usb_mbox2_boot_quirk (struct usb_device *dev) {struct usb_host_config *config = dev->actconfig; -struct usb_device_descriptor new_device_descriptor; +struct usb_device_descriptor *new_device_descriptor =NULL ;int err;u8 bootresponse[0x12 ];int fwsize;
@@ -977,15 +982,21 @@ static int snd_usb_mbox2_boot_quirk(struct usb_device *dev)dev_dbg (&dev->dev,"device initialised!\n" ); + new_device_descriptor =kmalloc (sizeof (*new_device_descriptor),GFP_KERNEL ); +if (!new_device_descriptor) +return -ENOMEM ; + err =usb_get_descriptor (dev,USB_DT_DEVICE ,0 , - &new_device_descriptor,sizeof (new_device_descriptor)); + new_device_descriptor,sizeof (*new_device_descriptor));if (err <0 )dev_dbg (&dev->dev,"error usb_get_descriptor: %d\n" , err); -if (new_device_descriptor.bNumConfigurations > dev->descriptor.bNumConfigurations) +if (new_device_descriptor->bNumConfigurations > dev->descriptor.bNumConfigurations)dev_dbg (&dev->dev,"error too large bNumConfigurations: %d\n" , - new_device_descriptor.bNumConfigurations); + new_device_descriptor->bNumConfigurations);else -memcpy (&dev->descriptor, &new_device_descriptor,sizeof (dev->descriptor)); +memcpy (&dev->descriptor, new_device_descriptor,sizeof (dev->descriptor)); + +kfree (new_device_descriptor); err =usb_reset_configuration (dev);if (err <0 )
@@ -1768,6 +1779,8 @@ static const struct usb_audio_quirk_flags_table quirk_flags_table[] = { QUIRK_FLAG_CTL_MSG_DELAY_1M | QUIRK_FLAG_IGNORE_CTL_ERROR),DEVICE_FLG (0x046d ,0x09a4 ,/* Logitech QuickCam E 3500 */ QUIRK_FLAG_CTL_MSG_DELAY_1M |QUIRK_FLAG_IGNORE_CTL_ERROR ), +DEVICE_FLG (0x0499 ,0x1506 ,/* Yamaha THR5 */ +QUIRK_FLAG_GENERIC_IMPLICIT_FB ),DEVICE_FLG (0x0499 ,0x1509 ,/* Steinberg UR22 */ QUIRK_FLAG_GENERIC_IMPLICIT_FB ), DEVICE_FLG(0x0499, 0x3108, /* Yamaha YIT-W12TX */
tools/objtool/check.c +7 -4
@@ -3206,10 +3206,13 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,break ;case INSN_CONTEXT_SWITCH : -if (func && (!next_insn || !next_insn->hint)) { -WARN_FUNC ("unsupported instruction in callable function" , - sec, insn->offset); -return 1 ; +if (func) { +if (!next_insn || !next_insn->hint) { +WARN_FUNC ("unsupported instruction in callable function" , + sec, insn->offset); +return 1 ; + } +break ; }return 0 ;
tools/testing/selftests/drivers/net/mlxsw/sharedbuffer.sh +0 -15
@@ -108,11 +108,6 @@ port_pool_test() devlink sb occupancy snapshot $DEVLINK_DEV - RET=0 - max_occ=$(sb_occ_pool_check $dl_port1 $SB_POOL_ING $exp_max_occ) - check_err $? "Expected iPool($SB_POOL_ING) max occupancy to be $exp_max_occ, but got $max_occ" - log_test "physical port's($h1) ingress pool" - RET=0 max_occ=$(sb_occ_pool_check $dl_port2 $SB_POOL_ING $exp_max_occ) check_err $? "Expected iPool($SB_POOL_ING) max occupancy to be $exp_max_occ, but got $max_occ"
@@ -136,11 +131,6 @@ port_tc_ip_test() devlink sb occupancy snapshot $DEVLINK_DEV - RET=0 - max_occ=$(sb_occ_itc_check $dl_port2 $SB_ITC $exp_max_occ) - check_err $? "Expected ingress TC($SB_ITC) max occupancy to be $exp_max_occ, but got $max_occ" - log_test "physical port's($h1) ingress TC - IP packet" - RET=0 max_occ=$(sb_occ_itc_check $dl_port2 $SB_ITC $exp_max_occ) check_err $? "Expected ingress TC($SB_ITC) max occupancy to be $exp_max_occ, but got $max_occ"
@@ -167,11 +157,6 @@ port_tc_arp_test() devlink sb occupancy snapshot $DEVLINK_DEV - RET=0 - max_occ=$(sb_occ_itc_check $dl_port2 $SB_ITC $exp_max_occ) - check_err $? "Expected ingress TC($SB_ITC) max occupancy to be $exp_max_occ, but got $max_occ" - log_test "physical port's($h1) ingress TC - ARP packet" - RET=0 max_occ=$(sb_occ_itc_check $dl_port2 $SB_ITC $exp_max_occ) check_err $? "Expected ingress TC($SB_ITC) max occupancy to be $exp_max_occ, but got $max_occ"