Linux 5.15.144
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.144 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
------------
Makefile | 2 arch/arc/mm/init.c | 4 arch/arm64/include/asm/pgtable.h | 6 arch/ia64/mm/contig.c | 2 arch/ia64/mm/init.c | 2 arch/m68k/mm/mcfmmu.c | 3 arch/m68k/mm/motorola.c | 6 arch/mips/include/asm/mach-loongson64/boot_param.h | 6 arch/mips/loongson64/init.c | 42 +-- arch/mips/sgi-ip27/ip27-memory.c | 3 arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 17 - arch/s390/kernel/setup.c | 3 arch/x86/events/intel/uncore_discovery.c | 18 + block/blk-cgroup.c | 13 block/blk-throttle.c | 2 drivers/atm/solos-pci.c | 8 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 28 ++ drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 5 drivers/hid/hid-asus.c | 27 + drivers/hid/hid-glorious.c | 16 + drivers/hid/hid-ids.h | 11 drivers/hid/hid-lenovo.c | 3 drivers/hid/hid-multitouch.c | 5 drivers/hid/hid-quirks.c | 1 drivers/infiniband/hw/irdma/ctrl.c | 6 drivers/infiniband/hw/irdma/type.h | 2 drivers/infiniband/hw/irdma/verbs.c | 10 drivers/md/bcache/bcache.h | 1 drivers/md/bcache/btree.c | 7 drivers/md/bcache/super.c | 4 drivers/md/bcache/writeback.c | 2 drivers/net/ethernet/amazon/ena/ena_eth_com.c | 3 drivers/net/ethernet/amazon/ena/ena_netdev.c | 30 +- drivers/net/ethernet/aquantia/atlantic/aq_ring.c | 5 drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 drivers/net/ethernet/emulex/benet/be_main.c | 2 drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-flower.c | 7 drivers/net/ethernet/freescale/fec_main.c | 27 - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c | 5 drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 55 +++- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 25 + drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c | 2 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 1 drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 4 drivers/net/ethernet/qualcomm/qca_debug.c | 17 - drivers/net/ethernet/qualcomm/qca_spi.c | 20 + drivers/net/ethernet/sfc/tx_tso.c | 2 drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 14 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 13 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 8 drivers/net/team/team.c | 4 drivers/net/usb/aqc111.c | 8 drivers/net/usb/qmi_wwan.c | 1 drivers/net/usb/r8152.c | 177 +++++++------ drivers/pci/controller/pci-loongson.c | 46 +++ drivers/pci/hotplug/acpiphp_glue.c | 9 drivers/platform/x86/intel/telemetry/core.c | 4 drivers/soundwire/stream.c | 7 drivers/staging/gdm724x/gdm_lte.c | 4 drivers/usb/gadget/udc/core.c | 4 fs/afs/rxrpc.c | 2 fs/btrfs/ioctl.c | 9 fs/ext4/mballoc.c | 4 fs/fuse/dax.c | 1 fs/ksmbd/smb2pdu.c | 1 include/asm-generic/qspinlock.h | 2 include/linux/cred.h | 8 include/linux/if_vlan.h | 12 include/linux/memblock.h | 3 include/linux/mm.h | 2 include/linux/usb/r8152.h | 2 include/net/addrconf.h | 12 include/net/if_inet6.h | 4 kernel/cred.c | 64 ++-- kernel/events/core.c | 10 kernel/trace/ring_buffer.c | 56 +--- kernel/trace/trace.c | 4 mm/memblock.c | 9 mm/memory_hotplug.c | 8 net/appletalk/ddp.c | 9 net/atm/ioctl.c | 7 net/batman-adv/soft-interface.c | 2 net/ipv4/tcp_output.c | 6 net/ipv6/addrconf.c | 6 net/netfilter/nft_exthdr.c | 2 net/netfilter/nft_fib.c | 8 net/rose/af_rose.c | 4 net/vmw_vsock/virtio_transport_common.c | 2 scripts/sign-file.c | 12 sound/pci/hda/patch_hdmi.c | 3 sound/pci/hda/patch_realtek.c | 1 95 files changed, 697 insertions(+), 358 deletions(-)
Alex Deucher (1):
drm/amdgpu/sdma5.2: add begin/end_use ring callbacks
Andrew Halaney (1):
net: stmmac: Handle disabled MDIO busses from devicetree
Andy Shevchenko (1):
platform/x86: intel_telemetry: Fix kernel doc descriptions
Antonio Napolitano (1):
r8152: add vendor/device ID pair for D-Link DUB-E250
Aoba K (1):
HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad
Baokun Li (1):
ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
Bjorn Helgaas (1):
Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
Bjørn Mork (1):
r8152: add USB device driver for config selection
Brett Raye (1):
HID: glorious: fix Glorious Model I HID report
Chengfeng Ye (2):
atm: solos-pci: Fix potential deadlock on &cli_queue_lock
atm: solos-pci: Fix potential deadlock on &tx_queue_lock
Christopher Bednarz (1):
RDMA/irdma: Prevent zero-length STAG registration
Colin Ian King (1):
bcache: remove redundant assignment to variable cur_idx
Coly Li (3):
bcache: avoid oversize memory allocation by small stripe_size
bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc()
bcache: avoid NULL checking to c->root in run_cache_set()
David Arinzon (3):
net: ena: Destroy correct number of xdp queues upon failure
net: ena: Fix xdp drops handling due to multibuf packets
net: ena: Fix XDP redirection error
David Hildenbrand (2):
mm/memory_hotplug: handle memblock_add_node() failures in add_memory_resource()
memblock: allow to specify flags with memblock_add_node()
David Howells (1):
afs: Fix refcount underflow from error handling race
Denis Benato (2):
HID: hid-asus: reset the backlight brightness level on resume
HID: hid-asus: add const to read-only outgoing usb buffer
Dinghao Liu (1):
qed: Fix a potential use-after-free in qed_cxt_tables_alloc
Dong Chenchen (1):
net: Remove acked SYN flag from packet in the transmit queue correctly
Florent Revest (1):
team: Fix use-after-free when an option instance allocation fails
Florian Westphal (1):
netfilter: nf_tables: fix 'exist' matching on bigendian arches
Greg Kroah-Hartman (1):
Linux 5.15.144
Hangyu Hua (1):
fuse: dax: set fc->dax to NULL in fuse_dax_conn_free()
Hariprasad Kelam (2):
octeontx2-pf: Fix promisc mcam entry action
octeontx2-af: Update RSS algorithm index
Hartmut Knaack (1):
ALSA: hda/realtek: Apply mute LED quirk for HP15-db
Hayes Wang (3):
r8152: avoid to change cfg for all devices
r8152: remove rtl_vendor_mode function
r8152: fix the autosuspend doesn't work
Hyunwoo Kim (3):
atm: Fix Use-After-Free in do_vcc_ioctl net/rose: Fix Use-After-Free in rose_ioctl
appletalk: Fix Use-After-Free in atalk_ioctl
Igor Russkikh (1):
net: atlantic: fix double free in ring reinit logic
Ioana Ciornei (1):
dpaa2-switch: fix size of the dma_unmap
James Houghton (1):
arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
Jason-JH.Lin (1):
drm/mediatek: Add spinlock for setting vblank event in atomic_begin
Jean Delvare (1):
stmmac: dwmac-loongson: Add architecture dependency
Jens Axboe (1):
cred: switch to using atomic_long_t
Jiaxun Yang (2):
MIPS: Loongson64: Handle more memory types passed from firmware
PCI: loongson: Limit MRRS to 256
Josef Bacik (1):
btrfs: do not allow non subvolume root targets for snapshot
Kai Vehmanen (2):
ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
ALSA: hda/hdmi: add force-connect quirks for ASUSTeK Z170 variants
Kan Liang (1):
perf/x86/uncore: Don't WARN_ON_ONCE() for a broken discovery table
Kelly Kane (1):
r8152: add vendor/device ID pair for ASUS USB-C2500
Krzysztof Kozlowski (1):
soundwire: stream: fix NULL pointer dereference for multi_link
Lech Perczak (1):
net: usb: qmi_wwan: claim interface 4 for ZTE MF290
Linus Torvalds (1):
asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
Maciej Żenczykowski (1):
net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX
Mark Rutland (1):
perf: Fix perf_event_validate_size() lockdep splat
Mikhail Khvainitski (1):
HID: lenovo: Restrict detection of patched firmware only to USB cptkbd
Ming Lei (2):
blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
blk-cgroup: bypass blkcg_deactivate_policy after destroying
Naveen N Rao (2):
powerpc/ftrace: Create a dummy stackframe to fix stack unwind powerpc/ftrace: Fix stack teardown in ftrace_no_trace
Nikolay Kuratov (1):
vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()
Oliver Neukum (2):
usb: aqc111: check packet for fixup for true limit
HID: add ALWAYS_POLL quirk for Apple kb
Radu Bulie (1):
net: fec: correct queue selection
Rasmus Villemoes (1):
net: stmmac: use dev_err_probe() for reporting mdio bus registration failure
Roy Luo (1):
USB: gadget: core: adjust uevent timing on gadget unbind
Stefan Wahren (3):
qca_debug: Prevent crash on TX ring changes
qca_debug: Fix ethtool -G iface tx behavior
qca_spi: Fix reset behavior
Steven Rostedt (Google) (7):
ring-buffer: Fix memory leak of free page
tracing: Update snapshot buffer on resize if it is allocated
ring-buffer: Do not update before stamp when switching sub-buffers
ring-buffer: Have saved event hold the entire event
ring-buffer: Fix writing to the buffer with max_data_size
ring-buffer: Fix a race in rb_time_cmpxchg() for 32 bit archs
ring-buffer: Do not try to put back write_stamp
Vladimir Oltean (1):
net: vlan: introduce skb_vlan_eth_hdr()
Yanteng Si (1):
stmmac: dwmac-loongson: Make sure MDIO is initialized before use
Yusong Gao (1):
sign-file: Fix incorrect return values check
Zhipeng Lu (1):
octeontx2-af: fix a use-after-free in rvu_nix_register_reporters
Zizhi Wo (1):
ksmbd: fix memory leak in smb2_lock()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 143 +SUBLEVEL = 144 EXTRAVERSION = NAME = Trick or Treat
arch/arc/mm/init.c +2 -2
@@ -59,13 +59,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) low_mem_sz = size; in_use =1 ; -memblock_add_node (base, size,0 ); +memblock_add_node (base, size,0 ,MEMBLOCK_NONE ); }else {#ifdef CONFIG_HIGHMEM high_mem_start = base; high_mem_sz = size; in_use =1 ; -memblock_add_node (base, size,1 ); +memblock_add_node (base, size,1 ,MEMBLOCK_NONE );memblock_reserve (base, size);#endif }
arch/arm64/include/asm/pgtable.h +6 -0
@@ -766,6 +766,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)if (pte_hw_dirty (pte)) pte =pte_mkdirty (pte);pte_val (pte) = (pte_val (pte) & ~mask) | (pgprot_val (newprot) & mask); +/* +* If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware +* dirtiness again. +*/ +if (pte_sw_dirty (pte)) + pte =pte_mkdirty (pte);return pte; }
arch/ia64/mm/contig.c +1 -1
@@ -153,7 +153,7 @@ find_memory (void)efi_memmap_walk (find_max_min_low_pfn,NULL ); max_pfn = max_low_pfn; -memblock_add_node (0 ,PFN_PHYS (max_low_pfn),0 ); +memblock_add_node (0 ,PFN_PHYS (max_low_pfn),0 ,MEMBLOCK_NONE );find_initrd ();
arch/ia64/mm/init.c +1 -1
@@ -378,7 +378,7 @@ int __init register_active_ranges(u64 start, u64 len, int nid)#endif if (start < end) -memblock_add_node (__pa (start), end - start, nid); +memblock_add_node (__pa (start), end - start, nid,MEMBLOCK_NONE );return 0 ; }
arch/m68k/mm/mcfmmu.c +2 -1
@@ -174,7 +174,8 @@ void __init cf_bootmem_alloc(void) m68k_memory[0 ].addr = _rambase; m68k_memory[0 ].size = _ramend - _rambase; -memblock_add_node (m68k_memory[0 ].addr, m68k_memory[0 ].size,0 ); +memblock_add_node (m68k_memory[0 ].addr, m68k_memory[0 ].size,0 , +MEMBLOCK_NONE );/* compute total pages in system */ num_pages =PFN_DOWN (_ramend - _rambase);
arch/m68k/mm/motorola.c +4 -2
@@ -410,7 +410,8 @@ void __init paging_init(void) min_addr = m68k_memory[0 ].addr; max_addr = min_addr + m68k_memory[0 ].size; -memblock_add_node (m68k_memory[0 ].addr, m68k_memory[0 ].size,0 ); +memblock_add_node (m68k_memory[0 ].addr, m68k_memory[0 ].size,0 , +MEMBLOCK_NONE );for (i =1 ; i < m68k_num_memory;) {if (m68k_memory[i].addr < min_addr) { printk("Ignoring memory chunk at 0x%lx:0x%lx before the first chunk\n",
@@ -421,7 +422,8 @@ void __init paging_init(void) (m68k_num_memory - i) * sizeof(struct m68k_mem_info));continue ; } -memblock_add_node (m68k_memory[i].addr, m68k_memory[i].size, i); +memblock_add_node (m68k_memory[i].addr, m68k_memory[i].size, i, +MEMBLOCK_NONE ); addr = m68k_memory[i].addr + m68k_memory[i].size;if (addr > max_addr) max_addr = addr;
arch/mips/include/asm/mach-loongson64/boot_param.h +5 -1
@@ -14,7 +14,11 @@#define ADAPTER_ROM 8#define ACPI_TABLE 9#define SMBIOS_TABLE 10 -#define MAX_MEMORY_TYPE 11 +#define UMA_VIDEO_RAM 11 +#define VUMA_VIDEO_RAM 12 +#define MAX_MEMORY_TYPE 13 + +#define MEM_SIZE_IS_IN_BYTES (1 << 31)#define LOONGSON3_BOOT_MEM_MAP_MAX 128struct efi_memory_map_loongson {
arch/mips/loongson64/init.c +27 -15
60 lines not on this page · raw message
arch/mips/sgi-ip27/ip27-memory.c +2 -1
@@ -341,7 +341,8 @@ static void __init szmem(void)continue ; }memblock_add_node (PFN_PHYS (slot_getbasepfn (node, slot)), -PFN_PHYS (slot_psize), node); +PFN_PHYS (slot_psize), node, +MEMBLOCK_NONE ); } } }
arch/powerpc/kernel/trace/ftrace_64_mprofile.S +13 -4
@@ -36,6 +36,9 @@ _GLOBAL(ftrace_regs_caller) /* Save the original return address in A's stack frame */ std r0,LRSAVE(r1) + /* Create a minimal stack frame for representing B */ + stdu r1, -STACK_FRAME_MIN_SIZE(r1) + /* Create our stack frame + pt_regs */ stdu r1,-SWITCH_FRAME_SIZE(r1)
@@ -51,7 +54,7 @@ _GLOBAL(ftrace_regs_caller) SAVE_GPRS(12, 31, r1) /* Save previous stack pointer (r1) */ - addi r8, r1, SWITCH_FRAME_SIZE + addi r8, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE std r8, GPR1(r1) /* Load special regs for save below */
@@ -64,6 +67,8 @@ _GLOBAL(ftrace_regs_caller) mflr r7 /* Save it as pt_regs->nip */ std r7, _NIP(r1) + /* Also save it in B's stackframe header for proper unwind */ + std r7, LRSAVE+SWITCH_FRAME_SIZE(r1) /* Save the read LR in pt_regs->link */ std r0, _LINK(r1)
@@ -118,7 +123,7 @@ ftrace_regs_call: ld r2, 24(r1) /* Pop our stack frame */ - addi r1, r1, SWITCH_FRAME_SIZE + addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE #ifdef CONFIG_LIVEPATCH /* Based on the cmpd above, if the NIP was altered handle livepatch */
@@ -142,7 +147,7 @@ ftrace_no_trace: mflr r3 mtctr r3 REST_GPR(3, r1) - addi r1, r1, SWITCH_FRAME_SIZE + addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE mtlr r0 bctr
@@ -150,6 +155,9 @@ _GLOBAL(ftrace_caller) /* Save the original return address in A's stack frame */ std r0, LRSAVE(r1) + /* Create a minimal stack frame for representing B */ + stdu r1, -STACK_FRAME_MIN_SIZE(r1) + /* Create our stack frame + pt_regs */ stdu r1, -SWITCH_FRAME_SIZE(r1)
@@ -163,6 +171,7 @@ _GLOBAL(ftrace_caller) /* Get the _mcount() call site out of LR */ mflr r7 std r7, _NIP(r1) + std r7, LRSAVE+SWITCH_FRAME_SIZE(r1) /* Save callee's TOC in the ABI compliant location */ std r2, 24(r1)
@@ -197,7 +206,7 @@ ftrace_call: ld r2, 24(r1) /* Pop our stack frame */ - addi r1, r1, SWITCH_FRAME_SIZE + addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE /* Reload original LR */ ld r0, LRSAVE(r1)
arch/s390/kernel/setup.c +2 -1
@@ -596,7 +596,8 @@ static void __init setup_resources(void)* part of the System RAM resource. */ if (crashk_res.end) { -memblock_add_node (crashk_res.start,resource_size (&crashk_res),0 ); +memblock_add_node (crashk_res.start,resource_size (&crashk_res), +0 ,MEMBLOCK_NONE );memblock_reserve (crashk_res.start,resource_size (&crashk_res));insert_resource (&iomem_resource, &crashk_res); }
arch/x86/events/intel/uncore_discovery.c +15 -3
@@ -140,13 +140,21 @@ uncore_insert_box_info(struct uncore_unit_discovery *unit,unsigned int *box_offset, *ids;int i; -if (WARN_ON_ONCE (!unit->ctl || !unit->ctl_offset || !unit->ctr_offset)) +if (!unit->ctl || !unit->ctl_offset || !unit->ctr_offset) { +pr_info ("Invalid address is detected for uncore type %d box %d, " +"Disable the uncore unit.\n" , + unit->box_type, unit->box_id);return ; + }if (parsed) { type =search_uncore_discovery_type (unit->box_type); -if (WARN_ON_ONCE (!type)) +if (!type) { +pr_info ("A spurious uncore type %d is detected, " +"Disable the uncore type.\n" , + unit->box_type);return ; + }/* Store the first box of each die */ if (!type->box_ctrl_die[die]) type->box_ctrl_die[die] = unit->ctl;
@@ -181,8 +189,12 @@ uncore_insert_box_info(struct uncore_unit_discovery *unit, ids[i] = type->ids[i]; box_offset[i] = type->box_offset[i]; -if (WARN_ON_ONCE (unit->box_id == ids[i])) +if (unit->box_id == ids[i]) { +pr_info ("Duplicate uncore type %d box ID %d is detected, " +"Drop the duplicate uncore unit.\n" , + unit->box_type, unit->box_id); goto free_ids; + } } ids[i] = unit->box_id; box_offset[i] = unit->ctl - type->box_ctrl;
block/blk-cgroup.c +13 -0
@@ -425,6 +425,7 @@ static void blkg_destroy_all(struct request_queue *q) {struct blkcg_gq *blkg, *n;int count =BLKG_DESTROY_BATCH_SIZE ; +int i; restart:spin_lock_irq (&q->queue_lock);
@@ -447,6 +448,18 @@ static void blkg_destroy_all(struct request_queue *q) } } +/* +* Mark policy deactivated since policy offline has been done, and +* the free is scheduled, so future blkcg_deactivate_policy() can +* be bypassed +*/ +for (i =0 ; i <BLKCG_MAX_POLS ; i++) { +struct blkcg_policy *pol = blkcg_policy[i]; + +if (pol) +__clear_bit (pol->plid, q->blkcg_pols); + } + q->root_blkg =NULL ;spin_unlock_irq (&q->queue_lock); }
block/blk-throttle.c +2 -0
@@ -1415,6 +1415,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global)tg_bps_limit (tg,READ ),tg_bps_limit (tg,WRITE ), tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE)); +rcu_read_lock ();/* * Update has_rules[] flags for the updated tg's subtree. A tg is * considered to have rules if either the tg itself or any of its
@@ -1442,6 +1443,7 @@ static void tg_conf_updated(struct throtl_grp *tg, bool global) this_tg->latency_target =max (this_tg->latency_target, parent_tg->latency_target); } +rcu_read_unlock ();/* * We're already holding queue_lock and know @tg is valid. Let's
drivers/atm/solos-pci.c +4 -4
@@ -449,9 +449,9 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,struct sk_buff *skb;unsigned int len; -spin_lock (&card->cli_queue_lock); +spin_lock_bh (&card->cli_queue_lock); skb =skb_dequeue (&card->cli_queue[SOLOS_CHAN (atmdev)]); -spin_unlock (&card->cli_queue_lock); +spin_unlock_bh (&card->cli_queue_lock);if (skb ==NULL )return sprintf (buf,"No data.\n" );
@@ -956,14 +956,14 @@ static void pclose(struct atm_vcc *vcc)struct pkt_hdr *header;/* Remove any yet-to-be-transmitted packets from the pending queue */ -spin_lock (&card->tx_queue_lock); +spin_lock_bh (&card->tx_queue_lock); skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {if (SKB_CB (skb)->vcc == vcc) {skb_unlink (skb, &card->tx_queue[port]);solos_pop (vcc, skb); } } -spin_unlock (&card->tx_queue_lock); +spin_unlock_bh (&card->tx_queue_lock); skb =alloc_skb (sizeof (*header),GFP_KERNEL );if (!skb) {
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +28 -0
@@ -1660,6 +1660,32 @@ static void sdma_v5_2_get_clockgating_state(void *handle, u32 *flags) *flags |=AMD_CG_SUPPORT_SDMA_LS ; } +static void sdma_v5_2_ring_begin_use (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; + +/* SDMA 5.2.3 (RMB) FW doesn't seem to properly +* disallow GFXOFF in some cases leading to +* hangs in SDMA. Disallow GFXOFF while SDMA is active. +* We can probably just limit this to 5.2.3, +* but it shouldn't hurt for other parts since +* this GFXOFF will be disallowed anyway when SDMA is +* active, this just makes it explicit. +*/ +amdgpu_gfx_off_ctrl (adev, false); +} + +static void sdma_v5_2_ring_end_use (struct amdgpu_ring *ring) +{ +struct amdgpu_device *adev = ring->adev; + +/* SDMA 5.2.3 (RMB) FW doesn't seem to properly +* disallow GFXOFF in some cases leading to +* hangs in SDMA. Allow GFXOFF when SDMA is complete. +*/ +amdgpu_gfx_off_ctrl (adev, true); +} +const struct amd_ip_funcs sdma_v5_2_ip_funcs = { .name ="sdma_v5_2" , .early_init = sdma_v5_2_early_init,
@@ -1707,6 +1733,8 @@ static const struct amdgpu_ring_funcs sdma_v5_2_ring_funcs = { .test_ib = sdma_v5_2_ring_test_ib, .insert_nop = sdma_v5_2_ring_insert_nop, .pad_ib = sdma_v5_2_ring_pad_ib, + .begin_use = sdma_v5_2_ring_begin_use, + .end_use = sdma_v5_2_ring_end_use, .emit_wreg = sdma_v5_2_ring_emit_wreg, .emit_reg_wait = sdma_v5_2_ring_emit_reg_wait, .emit_reg_write_reg_wait = sdma_v5_2_ring_emit_reg_write_reg_wait,
drivers/gpu/drm/mediatek/mtk_drm_crtc.c +5 -0
@@ -680,6 +680,7 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc, crtc);struct mtk_crtc_state *mtk_crtc_state =to_mtk_crtc_state (crtc_state);struct mtk_drm_crtc *mtk_crtc =to_mtk_crtc (crtc); +unsigned long flags;if (mtk_crtc->event && mtk_crtc_state->base.event)DRM_ERROR ("new event while there is still a pending event\n" );
@@ -687,7 +688,11 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,if (mtk_crtc_state->base.event) { mtk_crtc_state->base.event->pipe =drm_crtc_index (crtc);WARN_ON (drm_crtc_vblank_get (crtc) !=0 ); + +spin_lock_irqsave (&crtc->dev->event_lock, flags); mtk_crtc->event = mtk_crtc_state->base.event; +spin_unlock_irqrestore (&crtc->dev->event_lock, flags); + mtk_crtc_state->base.event =NULL ; } }
drivers/hid/hid-asus.c +23 -4
@@ -382,7 +382,7 @@ static int asus_raw_event(struct hid_device *hdev,return 0 ; } -static int asus_kbd_set_report (struct hid_device *hdev,u8 *buf,size_t buf_size) +static int asus_kbd_set_report (struct hid_device *hdev,const u8 *buf,size_t buf_size) {unsigned char *dmabuf;int ret;
@@ -405,7 +405,7 @@ static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_sizestatic int asus_kbd_init (struct hid_device *hdev) { -u8 buf[] = {FEATURE_KBD_REPORT_ID ,0x41 ,0x53 ,0x55 ,0x53 ,0x20 ,0x54 , +const u8 buf[] = {FEATURE_KBD_REPORT_ID ,0x41 ,0x53 ,0x55 ,0x53 ,0x20 ,0x54 ,0x65 ,0x63 ,0x68 ,0x2e ,0x49 ,0x6e ,0x63 ,0x2e ,0x00 };int ret;
@@ -419,7 +419,7 @@ static int asus_kbd_init(struct hid_device *hdev)static int asus_kbd_get_functions (struct hid_device *hdev,unsigned char *kbd_func) { -u8 buf[] = {FEATURE_KBD_REPORT_ID ,0x05 ,0x20 ,0x31 ,0x00 ,0x08 }; +const u8 buf[] = {FEATURE_KBD_REPORT_ID ,0x05 ,0x20 ,0x31 ,0x00 ,0x08 };u8 *readbuf;int ret;
@@ -450,7 +450,7 @@ static int asus_kbd_get_functions(struct hid_device *hdev,static int rog_nkey_led_init (struct hid_device *hdev) { -u8 buf_init_start[] = {FEATURE_KBD_LED_REPORT_ID1 ,0xB9 }; +const u8 buf_init_start[] = {FEATURE_KBD_LED_REPORT_ID1 ,0xB9 };u8 buf_init2[] = {FEATURE_KBD_LED_REPORT_ID1 ,0x41 ,0x53 ,0x55 ,0x53 ,0x20 ,0x54 ,0x65 ,0x63 ,0x68 ,0x2e ,0x49 ,0x6e ,0x63 ,0x2e ,0x00 };u8 buf_init3[] = {FEATURE_KBD_LED_REPORT_ID1 ,
@@ -1014,6 +1014,24 @@ static int asus_start_multitouch(struct hid_device *hdev)return 0 ; } +static int __maybe_unused asus_resume (struct hid_device *hdev) { +struct asus_drvdata *drvdata =hid_get_drvdata (hdev); +int ret =0 ; + +if (drvdata->kbd_backlight) { +const u8 buf[] = {FEATURE_KBD_REPORT_ID ,0xba ,0xc5 ,0xc4 , + drvdata->kbd_backlight->cdev.brightness }; + ret =asus_kbd_set_report (hdev, buf,sizeof (buf)); +if (ret <0 ) { +hid_err (hdev,"Asus failed to set keyboard backlight: %d\n" , ret); + goto asus_resume_err; + } + } + +asus_resume_err: +return ret; +} +static int __maybe_unused asus_reset_resume (struct hid_device *hdev) {struct asus_drvdata *drvdata =hid_get_drvdata (hdev);
@@ -1305,6 +1323,7 @@ static struct hid_driver asus_driver = { .input_configured = asus_input_configured, #ifdef CONFIG_PM .reset_resume = asus_reset_resume, + .resume = asus_resume, #endif .event = asus_event, .raw_event = asus_raw_event
drivers/hid/hid-glorious.c +14 -2
@@ -21,6 +21,10 @@ MODULE_DESCRIPTION("HID driver for Glorious PC Gaming Race mice");* Glorious Model O and O- specify the const flag in the consumer input * report descriptor, which leads to inputs being ignored. Fix this * by patching the descriptor. +* +* Glorious Model I incorrectly specifes the Usage Minimum for its +* keyboard HID report, causing keycodes to be misinterpreted. +* Fix this by setting Usage Minimum to 0 in that report. */ static __u8 *glorious_report_fixup (struct hid_device *hdev,__u8 *rdesc,unsigned int *rsize)
@@ -32,6 +36,10 @@ static __u8 *glorious_report_fixup(struct hid_device *hdev, __u8 *rdesc, rdesc[85 ] = rdesc[113 ] = rdesc[141 ] = \HID_MAIN_ITEM_VARIABLE |HID_MAIN_ITEM_RELATIVE ; } +if (*rsize ==156 && rdesc[41 ] ==1 ) { +hid_info (hdev,"patching Glorious Model I keyboard report descriptor\n" ); + rdesc[41 ] =0 ; + }return rdesc; }
@@ -44,6 +52,8 @@ static void glorious_update_name(struct hid_device *hdev) model ="Model O" ;break ;case USB_DEVICE_ID_GLORIOUS_MODEL_D : model ="Model D" ;break ; +case USB_DEVICE_ID_GLORIOUS_MODEL_I : + model ="Model I" ;break ; }snprintf (hdev->name,sizeof (hdev->name),"%s %s" ,"Glorious" , model);
@@ -66,10 +76,12 @@ static int glorious_probe(struct hid_device *hdev, }static const struct hid_device_id glorious_devices[] = { - {HID_USB_DEVICE (USB_VENDOR_ID_GLORIOUS , + {HID_USB_DEVICE (USB_VENDOR_ID_SINOWEALTH ,USB_DEVICE_ID_GLORIOUS_MODEL_O ) }, - {HID_USB_DEVICE (USB_VENDOR_ID_GLORIOUS , + {HID_USB_DEVICE (USB_VENDOR_ID_SINOWEALTH ,USB_DEVICE_ID_GLORIOUS_MODEL_D ) }, + {HID_USB_DEVICE (USB_VENDOR_ID_LAVIEW , +USB_DEVICE_ID_GLORIOUS_MODEL_I ) }, { } };MODULE_DEVICE_TABLE (hid, glorious_devices);
drivers/hid/hid-ids.h +7 -4
@@ -482,10 +482,6 @@#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_010A 0x010a#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100 -#define USB_VENDOR_ID_GLORIOUS 0x258a -#define USB_DEVICE_ID_GLORIOUS_MODEL_D 0x0033 -#define USB_DEVICE_ID_GLORIOUS_MODEL_O 0x0036 -#define I2C_VENDOR_ID_GOODIX 0x27c6#define I2C_DEVICE_ID_GOODIX_01F0 0x01f0
@@ -708,6 +704,9 @@#define USB_VENDOR_ID_LABTEC 0x1020#define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 +#define USB_VENDOR_ID_LAVIEW 0x22D4 +#define USB_DEVICE_ID_GLORIOUS_MODEL_I 0x1503 +#define USB_VENDOR_ID_LCPOWER 0x1241#define USB_DEVICE_ID_LCPOWER_LC1000 0xf767
@@ -1094,6 +1093,10 @@#define USB_VENDOR_ID_SIGMATEL 0x066F#define USB_DEVICE_ID_SIGMATEL_STMP3780 0x3780 +#define USB_VENDOR_ID_SINOWEALTH 0x258a +#define USB_DEVICE_ID_GLORIOUS_MODEL_D 0x0033 +#define USB_DEVICE_ID_GLORIOUS_MODEL_O 0x0036 +#define USB_VENDOR_ID_SIS_TOUCH 0x0457#define USB_DEVICE_ID_SIS9200_TOUCH 0x9200#define USB_DEVICE_ID_SIS817_TOUCH 0x0817
drivers/hid/hid-lenovo.c +2 -1
@@ -540,7 +540,8 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,* so set middlebutton_state to 3 * to never apply workaround anymore */ -if (cptkbd_data->middlebutton_state ==1 && +if (hdev->product ==USB_DEVICE_ID_LENOVO_CUSBKBD && + cptkbd_data->middlebutton_state ==1 && usage->type ==EV_REL && (usage->code ==REL_X || usage->code ==REL_Y )) { cptkbd_data->middlebutton_state =3 ;
drivers/hid/hid-multitouch.c +5 -0
@@ -2046,6 +2046,11 @@ static const struct hid_device_id mt_devices[] = { MT_USB_DEVICE(USB_VENDOR_ID_HANVON_ALT, USB_DEVICE_ID_HANVON_ALT_MULTITOUCH) }, +/* HONOR GLO-GXXX panel */ + { .driver_data = MT_CLS_VTL, +HID_DEVICE (BUS_I2C ,HID_GROUP_MULTITOUCH_WIN_8 , + 0x347d, 0x7853) }, + /* Ilitek dual touch panel */ { .driver_data = MT_CLS_NSMU, MT_USB_DEVICE(USB_VENDOR_ID_ILITEK,
drivers/hid/hid-quirks.c +1 -0
@@ -33,6 +33,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_AKAI, USB_DEVICE_ID_AKAI_MPKMINI2), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD), HID_QUIRK_BADPAD }, { HID_USB_DEVICE(USB_VENDOR_ID_AMI, USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE), HID_QUIRK_ALWAYS_POLL }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM), HID_QUIRK_NOGET },
drivers/infiniband/hw/irdma/ctrl.c +6 -0
@@ -1043,6 +1043,9 @@ irdma_sc_alloc_stag(struct irdma_sc_dev *dev,u64 hdr;enum irdma_page_size page_size; +if (!info->total_len && !info->all_memory) +return -EINVAL ; +if (info->page_size ==0x40000000 ) page_size =IRDMA_PAGE_SIZE_1G ;else if (info->page_size ==0x200000 )
@@ -1109,6 +1112,9 @@ irdma_sc_mr_reg_non_shared(struct irdma_sc_dev *dev,u8 addr_type;enum irdma_page_size page_size; +if (!info->total_len && !info->all_memory) +return -EINVAL ; +if (info->page_size ==0x40000000 ) page_size =IRDMA_PAGE_SIZE_1G ;else if (info->page_size ==0x200000 )
drivers/infiniband/hw/irdma/type.h +2 -0
@@ -1013,6 +1013,7 @@ struct irdma_allocate_stag_info { bool remote_access:1; bool use_hmc_fcn_index:1; bool use_pf_rid:1; + bool all_memory:1;u8 hmc_fcn_index; };
@@ -1040,6 +1041,7 @@ struct irdma_reg_ns_stag_info { bool use_hmc_fcn_index:1;u8 hmc_fcn_index; bool use_pf_rid:1; + bool all_memory:1; };struct irdma_fast_reg_stag_info {
drivers/infiniband/hw/irdma/verbs.c +8 -2
@@ -2528,7 +2528,8 @@ static int irdma_hw_alloc_stag(struct irdma_device *iwdev, struct irdma_mr *iwmr) {struct irdma_allocate_stag_info *info; -struct irdma_pd *iwpd =to_iwpd (iwmr->ibmr.pd); +struct ib_pd *pd = iwmr->ibmr.pd; +struct irdma_pd *iwpd =to_iwpd (pd);enum irdma_status_code status;int err =0 ;struct irdma_cqp_request *cqp_request;
@@ -2545,6 +2546,7 @@ static int irdma_hw_alloc_stag(struct irdma_device *iwdev, info->stag_idx = iwmr->stag >>IRDMA_CQPSQ_STAG_IDX_S ; info->pd_id = iwpd->sc_pd.pd_id; info->total_len = iwmr->len; + info->all_memory = pd->flags &IB_PD_UNSAFE_GLOBAL_RKEY ; info->remote_access = true; cqp_info->cqp_cmd =IRDMA_OP_ALLOC_STAG ; cqp_info->post_sq =1 ;
@@ -2595,6 +2597,8 @@ static struct ib_mr *irdma_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type, iwmr->type =IRDMA_MEMREG_TYPE_MEM ; palloc = &iwpbl->pble_alloc; iwmr->page_cnt = max_num_sg; +/* Use system PAGE_SIZE as the sg page sizes are unknown at this point */ + iwmr->len = max_num_sg *PAGE_SIZE ; status =irdma_get_pble (iwdev->rf->pble_rsrc, palloc, iwmr->page_cnt, true);if (status)
@@ -2666,7 +2670,8 @@ static int irdma_hwreg_mr(struct irdma_device *iwdev, struct irdma_mr *iwmr, {struct irdma_pbl *iwpbl = &iwmr->iwpbl;struct irdma_reg_ns_stag_info *stag_info; -struct irdma_pd *iwpd =to_iwpd (iwmr->ibmr.pd); +struct ib_pd *pd = iwmr->ibmr.pd; +struct irdma_pd *iwpd =to_iwpd (pd);struct irdma_pble_alloc *palloc = &iwpbl->pble_alloc;enum irdma_status_code status;int err =0 ;
@@ -2686,6 +2691,7 @@ static int irdma_hwreg_mr(struct irdma_device *iwdev, struct irdma_mr *iwmr, stag_info->total_len = iwmr->len; stag_info->access_rights =irdma_get_mr_access (access); stag_info->pd_id = iwpd->sc_pd.pd_id; + stag_info->all_memory = pd->flags &IB_PD_UNSAFE_GLOBAL_RKEY ;if (stag_info->access_rights &IRDMA_ACCESS_FLAGS_ZERO_BASED ) stag_info->addr_type =IRDMA_ADDR_TYPE_ZERO_BASED ;else
drivers/md/bcache/bcache.h +1 -0
@@ -265,6 +265,7 @@ struct bcache_device {#define BCACHE_DEV_WB_RUNNING 3#define BCACHE_DEV_RATE_DW_RUNNING 4int nr_stripes; +#define BCH_MIN_STRIPE_SZ ((4 << 20) >> SECTOR_SHIFT)unsigned int stripe_size;atomic_t *stripe_sectors_dirty;unsigned long *full_dirty_stripes;
drivers/md/bcache/btree.c +7 -0
@@ -974,6 +974,9 @@ static struct btree *mca_alloc(struct cache_set *c, struct btree_op *op,* * The btree node will have either a read or a write lock held, depending on * level and op->lock. +* +* Note: Only error code or btree pointer will be returned, it is unncessary +* for callers to check NULL pointer. */ struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op, struct bkey *k, int level, bool write,
@@ -1085,6 +1088,10 @@ static void btree_node_free(struct btree *b)mutex_unlock (&b->c->bucket_lock); } +/* +* Only error code or btree pointer will be returned, it is unncessary for +* callers to check NULL pointer. +*/ struct btree *__bch_btree_node_alloc (struct cache_set *c,struct btree_op *op,int level,bool wait,struct btree *parent)
drivers/md/bcache/super.c +3 -1
@@ -909,6 +909,8 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,if (!d->stripe_size) d->stripe_size =1 <<31 ; +else if (d->stripe_size <BCH_MIN_STRIPE_SZ ) + d->stripe_size =roundup (BCH_MIN_STRIPE_SZ , d->stripe_size); n =DIV_ROUND_UP_ULL (sectors, d->stripe_size);if (!n || n > max_stripes) {
@@ -2022,7 +2024,7 @@ static int run_cache_set(struct cache_set *c) c->root =bch_btree_node_get (c,NULL , k, j->btree_level, true,NULL ); -if (IS_ERR_OR_NULL (c->root)) +if (IS_ERR (c->root)) goto err;list_del_init (&c->root->list);
drivers/md/bcache/writeback.c +1 -1
@@ -903,7 +903,7 @@ static int bch_dirty_init_thread(void *arg)int cur_idx, prev_idx, skip_nr; k = p =NULL ; - cur_idx = prev_idx =0 ; + prev_idx =0 ;bch_btree_iter_init (&c->root->keys, &iter,NULL ); k =bch_btree_iter_next_filter (&iter, &c->root->keys, bch_ptr_bad);
drivers/net/ethernet/amazon/ena/ena_eth_com.c +0 -3
@@ -328,9 +328,6 @@ static int ena_com_create_and_store_tx_meta_desc(struct ena_com_io_sq *io_sq,* compare it to the stored version, just create the meta */ if (io_sq->disable_meta_caching) { -if (unlikely (!ena_tx_ctx->meta_valid)) -return -EINVAL ; - *have_meta = true;return ena_com_create_meta (io_sq, ena_meta); }
drivers/net/ethernet/amazon/ena/ena_netdev.c +17 -13
@@ -74,6 +74,8 @@ static void ena_unmap_tx_buff(struct ena_ring *tx_ring, struct ena_tx_buffer *tx_info);static int ena_create_io_tx_queues_in_range (struct ena_adapter *adapter,int first_index,int count); +static void ena_free_all_io_tx_resources_in_range (struct ena_adapter *adapter, +int first_index,int count);/* Increase a stat by cnt while holding syncp seqlock on 32bit machines */ static void ena_increase_stat(u64 *statp, u64 cnt,
@@ -459,23 +461,22 @@ static void ena_init_all_xdp_queues(struct ena_adapter *adapter)static int ena_setup_and_create_all_xdp_queues (struct ena_adapter *adapter) { +u32 xdp_first_ring = adapter->xdp_first_ring; +u32 xdp_num_queues = adapter->xdp_num_queues;int rc =0 ; - rc =ena_setup_tx_resources_in_range (adapter, adapter->xdp_first_ring, - adapter->xdp_num_queues); + rc =ena_setup_tx_resources_in_range (adapter, xdp_first_ring, xdp_num_queues);if (rc) goto setup_err; - rc =ena_create_io_tx_queues_in_range (adapter, - adapter->xdp_first_ring, - adapter->xdp_num_queues); + rc =ena_create_io_tx_queues_in_range (adapter, xdp_first_ring, xdp_num_queues);if (rc) goto create_err;return 0 ; create_err: -ena_free_all_io_tx_resources (adapter); +ena_free_all_io_tx_resources_in_range (adapter, xdp_first_ring, xdp_num_queues); setup_err:return rc; }
@@ -1625,20 +1626,23 @@ static void ena_set_rx_hash(struct ena_ring *rx_ring, } } -static int ena_xdp_handle_buff (struct ena_ring *rx_ring,struct xdp_buff *xdp) +static int ena_xdp_handle_buff (struct ena_ring *rx_ring,struct xdp_buff *xdp,u16 num_descs) {struct ena_rx_buffer *rx_info;int ret; +/* XDP multi-buffer packets not supported */ +if (unlikely (num_descs >1 )) { +netdev_err_once (rx_ring->adapter->netdev, +"xdp: dropped unsupported multi-buffer packets\n" ); +ena_increase_stat (&rx_ring->rx_stats.xdp_drop,1 , &rx_ring->syncp); +return ENA_XDP_DROP ; + } + rx_info = &rx_ring->rx_buffer_info[rx_ring->ena_bufs[0 ].req_id];xdp_prepare_buff (xdp,page_address (rx_info->page), rx_info->page_offset, rx_ring->ena_bufs[0 ].len, false); -/* If for some reason we received a bigger packet than -* we expect, then we simply drop it -*/ -if (unlikely (rx_ring->ena_bufs[0 ].len >ENA_XDP_MAX_MTU )) -return ENA_XDP_DROP ; ret =ena_xdp_execute (rx_ring, xdp);
@@ -1707,7 +1711,7 @@ static int ena_clean_rx_irq(struct ena_ring *rx_ring, struct napi_struct *napi, ena_rx_ctx.l4_proto, ena_rx_ctx.hash);if (ena_xdp_present_ring (rx_ring)) - xdp_verdict =ena_xdp_handle_buff (rx_ring, &xdp); + xdp_verdict =ena_xdp_handle_buff (rx_ring, &xdp, ena_rx_ctx.descs);/* allocate skb and fill it */ if (xdp_verdict ==ENA_XDP_PASS )
drivers/net/ethernet/aquantia/atlantic/aq_ring.c +4 -1
@@ -577,11 +577,14 @@ void aq_ring_free(struct aq_ring_s *self)return ;kfree (self->buff_ring); + self->buff_ring =NULL ; -if (self->dx_ring) +if (self->dx_ring) {dma_free_coherent (aq_nic_get_dev (self->aq_nic), self->size * self->dx_size, self->dx_ring, self->dx_ring_pa); + self->dx_ring =NULL ; + } }unsigned int aq_ring_fill_stats_data (struct aq_ring_s *self,u64 *data)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +1 -2
@@ -1924,8 +1924,7 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,/* Skip VLAN tag if present */ if (ether_type ==ETH_P_8021Q ) { -struct vlan_ethhdr *vhdr = - (struct vlan_ethhdr *)skb->data; +struct vlan_ethhdr *vhdr =skb_vlan_eth_hdr (skb); ether_type =ntohs (vhdr->h_vlan_encapsulated_proto); }
drivers/net/ethernet/emulex/benet/be_main.c +1 -1
@@ -1125,7 +1125,7 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter,struct be_wrb_params *wrb_params) { -struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; +struct vlan_ethhdr *veh =skb_vlan_eth_hdr (skb);unsigned int eth_hdr_len;struct iphdr *ip;
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-flower.c +4 -3
@@ -139,7 +139,8 @@ int dpaa2_switch_acl_entry_add(struct dpaa2_switch_filter_block *filter_block, err =dpsw_acl_add_entry (ethsw->mc_io,0 , ethsw->dpsw_handle, filter_block->acl_id, acl_entry_cfg); -dma_unmap_single (dev, acl_entry_cfg->key_iova,sizeof (cmd_buff), +dma_unmap_single (dev, acl_entry_cfg->key_iova, +DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE ,DMA_TO_DEVICE );if (err) {dev_err (dev,"dpsw_acl_add_entry() failed %d\n" , err);
@@ -181,8 +182,8 @@ dpaa2_switch_acl_entry_remove(struct dpaa2_switch_filter_block *block, err =dpsw_acl_remove_entry (ethsw->mc_io,0 , ethsw->dpsw_handle, block->acl_id, acl_entry_cfg); -dma_unmap_single (dev, acl_entry_cfg->key_iova,sizeof (cmd_buff), -DMA_TO_DEVICE ); +dma_unmap_single (dev, acl_entry_cfg->key_iova, +DPAA2_ETHSW_PORT_ACL_CMD_BUF_SIZE ,DMA_TO_DEVICE );if (err) {dev_err (dev,"dpsw_acl_remove_entry() failed %d\n" , err);kfree (cmd_buff);
drivers/net/ethernet/freescale/fec_main.c +11 -16
@@ -3436,31 +3436,26 @@ static int fec_set_features(struct net_device *netdev,return 0 ; } -static u16 fec_enet_get_raw_vlan_tci (struct sk_buff *skb) -{ -struct vlan_ethhdr *vhdr; -unsigned short vlan_TCI =0 ; - -if (skb->protocol ==htons (ETH_P_ALL )) { - vhdr = (struct vlan_ethhdr *)(skb->data); - vlan_TCI =ntohs (vhdr->h_vlan_TCI); - } - -return vlan_TCI; -} -static u16 fec_enet_select_queue (struct net_device *ndev,struct sk_buff *skb,struct net_device *sb_dev) {struct fec_enet_private *fep =netdev_priv (ndev); -u16 vlan_tag; +u16 vlan_tag =0 ;if (!(fep->quirks &FEC_QUIRK_HAS_AVB ))return netdev_pick_tx (ndev, skb,NULL ); - vlan_tag =fec_enet_get_raw_vlan_tci (skb); -if (!vlan_tag) +/* VLAN is present in the payload.*/ +if (eth_type_vlan (skb->protocol)) { +struct vlan_ethhdr *vhdr =skb_vlan_eth_hdr (skb); + + vlan_tag =ntohs (vhdr->h_vlan_TCI); +/* VLAN is present in the skb but not yet pushed in the payload.*/ + }else if (skb_vlan_tag_present (skb)) { + vlan_tag = skb->vlan_tci; + }else {return vlan_tag; + }return fec_enet_vlan_pri_to_queue[vlan_tag >>13 ]; }
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +1 -1
@@ -1512,7 +1512,7 @@ static int hns3_handle_vtags(struct hns3_enet_ring *tx_ring,if (unlikely (rc <0 ))return rc; - vhdr = (struct vlan_ethhdr *)skb->data; + vhdr =skb_vlan_eth_hdr (skb); vhdr->h_vlan_TCI |=cpu_to_be16 ((skb->priority <<VLAN_PRIO_SHIFT ) &VLAN_PRIO_MASK );
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -1
@@ -2975,7 +2975,7 @@ static inline int i40e_tx_prepare_vlan_flags(struct sk_buff *skb, rc =skb_cow_head (skb,0 );if (rc <0 )return rc; - vhdr = (struct vlan_ethhdr *)skb->data; + vhdr =skb_vlan_eth_hdr (skb); vhdr->h_vlan_TCI =htons (tx_flags >>I40E_TX_FLAGS_VLAN_SHIFT ); }else {
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -1
@@ -8696,7 +8696,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,if (skb_cow_head (skb,0 )) goto out_drop; - vhdr = (struct vlan_ethhdr *)skb->data; + vhdr =skb_vlan_eth_hdr (skb); vhdr->h_vlan_TCI =htons (tx_flags >>IXGBE_TX_FLAGS_VLAN_SHIFT ); }else {
drivers/net/ethernet/marvell/octeontx2/af/rvu_devlink.c +1 -4
@@ -641,7 +641,7 @@ static int rvu_nix_register_reporters(struct rvu_devlink *rvu_dl) rvu_dl->devlink_wq =create_workqueue ("rvu_devlink_wq" );if (!rvu_dl->devlink_wq) - goto err; +return -ENOMEM ;INIT_WORK (&rvu_reporters->intr_work, rvu_nix_intr_work);INIT_WORK (&rvu_reporters->gen_work, rvu_nix_gen_work);
@@ -649,9 +649,6 @@ static int rvu_nix_register_reporters(struct rvu_devlink *rvu_dl)INIT_WORK (&rvu_reporters->ras_work, rvu_nix_ras_work);return 0 ; -err: -rvu_nix_health_reporters_destroy (rvu_dl); -return -ENOMEM ; }static int rvu_nix_health_reporters_create (struct rvu_devlink *rvu_dl)
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +44 -11
108 lines not on this page · raw message
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +22 -3
@@ -1589,6 +1589,21 @@ static void otx2_free_hw_resources(struct otx2_nic *pf)mutex_unlock (&mbox->lock); } +static bool otx2_promisc_use_mce_list (struct otx2_nic *pfvf) +{ +int vf; + +/* The AF driver will determine whether to allow the VF netdev or not */ +if (is_otx2_vf (pfvf->pcifunc)) +return true; + +/* check if there are any trusted VFs associated with the PF netdev */ +for (vf =0 ; vf <pci_num_vf (pfvf->pdev); vf++) +if (pfvf->vf_configs[vf].trusted) +return true; +return false; +} +static void otx2_do_set_rx_mode (struct otx2_nic *pf) {struct net_device *netdev = pf->netdev;
@@ -1621,7 +1636,8 @@ static void otx2_do_set_rx_mode(struct otx2_nic *pf)if (netdev->flags & (IFF_ALLMULTI |IFF_MULTICAST )) req->mode |=NIX_RX_MODE_ALLMULTI ; - req->mode |=NIX_RX_MODE_USE_MCE ; +if (otx2_promisc_use_mce_list (pf)) + req->mode |=NIX_RX_MODE_USE_MCE ;otx2_sync_mbox_msg (&pf->mbox);mutex_unlock (&pf->mbox.lock);
@@ -2440,11 +2456,14 @@ static int otx2_ndo_set_vf_trust(struct net_device *netdev, int vf, pf->vf_configs[vf].trusted = enable; rc =otx2_set_vf_permissions (pf, vf,OTX2_TRUSTED_VF ); -if (rc) +if (rc) { pf->vf_configs[vf].trusted = !enable; -else + }else {netdev_info (pf->netdev,"VF %d is %strusted\n" , vf, enable ?"" :"not " ); +otx2_set_rx_mode (netdev); + } +return rc; }
drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c +1 -1
@@ -1861,7 +1861,7 @@ netxen_tso_check(struct net_device *netdev,if (protocol ==cpu_to_be16 (ETH_P_8021Q )) { - vh = (struct vlan_ethhdr *)skb->data; + vh =skb_vlan_eth_hdr (skb); protocol = vh->h_vlan_encapsulated_proto; flags =FLAGS_VLAN_TAGGED ;
drivers/net/ethernet/qlogic/qed/qed_cxt.c +1 -0
@@ -933,6 +933,7 @@ static void qed_ilt_shadow_free(struct qed_hwfn *p_hwfn) p_dma->virt_addr =NULL ; }kfree (p_mngr->ilt_shadow); + p_mngr->ilt_shadow =NULL ; } static int qed_ilt_blk_alloc(struct qed_hwfn *p_hwfn,
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +2 -2
@@ -317,7 +317,7 @@ static void qlcnic_send_filter(struct qlcnic_adapter *adapter,if (adapter->flags &QLCNIC_VLAN_FILTERING ) {if (protocol ==ETH_P_8021Q ) { - vh = (struct vlan_ethhdr *)skb->data; + vh =skb_vlan_eth_hdr (skb); vlan_id =ntohs (vh->h_vlan_TCI); }else if (skb_vlan_tag_present (skb)) { vlan_id =skb_vlan_tag_get (skb);
@@ -467,7 +467,7 @@ static int qlcnic_tx_pkt(struct qlcnic_adapter *adapter,u32 producer = tx_ring->producer;if (protocol ==ETH_P_8021Q ) { - vh = (struct vlan_ethhdr *)skb->data; + vh =skb_vlan_eth_hdr (skb); flags =QLCNIC_FLAGS_VLAN_TAGGED ; vlan_tci =ntohs (vh->h_vlan_TCI); protocol =ntohs (vh->h_vlan_encapsulated_proto);
drivers/net/ethernet/qualcomm/qca_debug.c +9 -8
@@ -30,6 +30,8 @@#define QCASPI_MAX_REGS 0x20 +#define QCASPI_RX_MAX_FRAMES 4 +static const u16 qcaspi_spi_regs[] = {SPI_REG_BFR_SIZE ,SPI_REG_WRBUF_SPC_AVA ,
@@ -250,31 +252,30 @@ qcaspi_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ring) {struct qcaspi *qca =netdev_priv (dev); - ring->rx_max_pending =4 ; + ring->rx_max_pending =QCASPI_RX_MAX_FRAMES ; ring->tx_max_pending =TX_RING_MAX_LEN ; - ring->rx_pending =4 ; + ring->rx_pending =QCASPI_RX_MAX_FRAMES ; ring->tx_pending = qca->txr.count; }static int qcaspi_set_ringparam (struct net_device *dev,struct ethtool_ringparam *ring) { -const struct net_device_ops *ops = dev->netdev_ops;struct qcaspi *qca =netdev_priv (dev); -if ((ring->rx_pending) || +if (ring->rx_pending !=QCASPI_RX_MAX_FRAMES || (ring->rx_mini_pending) || (ring->rx_jumbo_pending))return -EINVAL ; -if (netif_running (dev)) - ops->ndo_stop (dev); +if (qca->spi_thread) +kthread_park (qca->spi_thread); qca->txr.count =max_t (u32, ring->tx_pending,TX_RING_MIN_LEN ); qca->txr.count =min_t (u16, qca->txr.count,TX_RING_MAX_LEN ); -if (netif_running (dev)) - ops->ndo_open (dev); +if (qca->spi_thread) +kthread_unpark (qca->spi_thread);return 0 ; }
drivers/net/ethernet/qualcomm/qca_spi.c +19 -1
@@ -581,6 +581,18 @@ qcaspi_spi_thread(void *data)netdev_info (qca->net_dev,"SPI thread created\n" );while (!kthread_should_stop ()) {set_current_state (TASK_INTERRUPTIBLE ); +if (kthread_should_park ()) { +netif_tx_disable (qca->net_dev); +netif_carrier_off (qca->net_dev); +qcaspi_flush_tx_ring (qca); +kthread_parkme (); +if (qca->sync ==QCASPI_SYNC_READY ) { +netif_carrier_on (qca->net_dev); +netif_wake_queue (qca->net_dev); + } +continue ; + } +if ((qca->intr_req == qca->intr_svc) && !qca->txr.skb[qca->txr.head])schedule ();
@@ -609,11 +621,17 @@ qcaspi_spi_thread(void *data)if (intr_cause &SPI_INT_CPU_ON ) {qcaspi_qca7k_sync (qca,QCASPI_EVENT_CPUON ); +/* Frame decoding in progress */ +if (qca->frm_handle.state != qca->frm_handle.init) + qca->net_dev->stats.rx_dropped++; + +qcafrm_fsm_init_spi (&qca->frm_handle); + qca->stats.device_reset++; +/* not synced. */ if (qca->sync !=QCASPI_SYNC_READY )continue ; - qca->stats.device_reset++;netif_wake_queue (qca->net_dev);netif_carrier_on (qca->net_dev); }
drivers/net/ethernet/sfc/tx_tso.c +1 -1
@@ -147,7 +147,7 @@ static __be16 efx_tso_check_protocol(struct sk_buff *skb)EFX_WARN_ON_ONCE_PARANOID (((struct ethhdr *)skb->data)->h_proto != protocol);if (protocol ==htons (ETH_P_8021Q )) { -struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; +struct vlan_ethhdr *veh =skb_vlan_eth_hdr (skb); protocol = veh->h_vlan_encapsulated_proto; }
drivers/net/ethernet/stmicro/stmmac/Kconfig +1 -1
@@ -253,7 +253,7 @@ config DWMAC_INTEL config DWMAC_LOONGSON tristate "Loongson PCI DWMAC support" default MACH_LOONGSON64 - depends on STMMAC_ETH && PCI + depends on (MACH_LOONGSON64 || COMPILE_TEST) && STMMAC_ETH && PCI depends on COMMON_CLK help This selects the LOONGSON PCI bus support for the stmmac driver,
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +6 -8
@@ -68,17 +68,15 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_idif (!plat)return -ENOMEM ; + plat->mdio_bus_data =devm_kzalloc (&pdev->dev, +sizeof (*plat->mdio_bus_data), +GFP_KERNEL ); +if (!plat->mdio_bus_data) +return -ENOMEM ; + plat->mdio_node =of_get_child_by_name (np,"mdio" );if (plat->mdio_node) {dev_info (&pdev->dev,"Found MDIO subnode\n" ); - - plat->mdio_bus_data =devm_kzalloc (&pdev->dev, -sizeof (*plat->mdio_bus_data), -GFP_KERNEL ); -if (!plat->mdio_bus_data) { - ret = -ENOMEM ; - goto err_put_node; - } plat->mdio_bus_data->needs_reset = true; }
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +5 -8
@@ -4494,13 +4494,10 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)static void stmmac_rx_vlan (struct net_device *dev,struct sk_buff *skb) { -struct vlan_ethhdr *veth; -__be16 vlan_proto; +struct vlan_ethhdr *veth =skb_vlan_eth_hdr (skb); +__be16 vlan_proto = veth->h_vlan_proto;u16 vlanid; - veth = (struct vlan_ethhdr *)skb->data; - vlan_proto = veth->h_vlan_proto; - if ((vlan_proto == htons(ETH_P_8021Q) && dev->features & NETIF_F_HW_VLAN_CTAG_RX) || (vlan_proto == htons(ETH_P_8021AD) &&
@@ -7242,9 +7239,9 @@ int stmmac_dvr_probe(struct device *device,/* MDIO bus Registration */ ret =stmmac_mdio_register (ndev);if (ret <0 ) { -dev_err (priv->device, -"%s: MDIO bus (id: %d) registration failed" , - __func__, priv->plat->bus_id); +dev_err_probe (priv->device, ret, +"%s: MDIO bus (id: %d) registration failed\n" , + __func__, priv->plat->bus_id); goto error_mdio_register; } }
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +6 -2
@@ -489,8 +489,12 @@ int stmmac_mdio_register(struct net_device *ndev) new_bus->parent = priv->device; err =of_mdiobus_register (new_bus, mdio_node); -if (err !=0 ) { -dev_err (dev,"Cannot register the MDIO bus\n" ); +if (err == -ENODEV ) { + err =0 ; +dev_info (dev,"MDIO bus is disabled\n" ); + goto bus_register_fail; + }else if (err) { +dev_err_probe (dev, err,"Cannot register the MDIO bus\n" ); goto bus_register_fail; }
drivers/net/team/team.c +3 -1
@@ -285,8 +285,10 @@ static int __team_options_register(struct team *team,return 0 ; inst_rollback: -for (i--; i >=0 ; i--) +for (i--; i >=0 ; i--) {__team_option_inst_del_option (team, dst_opts[i]); +list_del (&dst_opts[i]->list); + } i = option_count; alloc_rollback:
drivers/net/usb/aqc111.c +4 -4
@@ -1079,17 +1079,17 @@ static int aqc111_rx_fixup(struct usbnet *dev, struct sk_buff *skb)u16 pkt_count =0 ;u64 desc_hdr =0 ;u16 vlan_tag =0 ; -u32 skb_len =0 ; +u32 skb_len;if (!skb) goto err; -if (skb->len ==0 ) + skb_len = skb->len; +if (skb_len <sizeof (desc_hdr)) goto err; - skb_len = skb->len;/* RX Descriptor Header */ -skb_trim (skb, skb->len -sizeof (desc_hdr)); +skb_trim (skb, skb_len -sizeof (desc_hdr)); desc_hdr =le64_to_cpup ((u64 *)skb_tail_pointer (skb));/* Check these packets */
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1286,6 +1286,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x0168, 4)}, {QMI_FIXED_INTF(0x19d2, 0x0176, 3)}, {QMI_FIXED_INTF(0x19d2, 0x0178, 3)}, + {QMI_FIXED_INTF(0x19d2, 0x0189, 4)}, /* ZTE MF290 */ {QMI_FIXED_INTF(0x19d2, 0x0191, 4)}, /* ZTE EuFi890 */ {QMI_FIXED_INTF(0x19d2, 0x0199, 1)}, /* ZTE MF820S */ {QMI_FIXED_INTF(0x19d2, 0x0200, 1)},
drivers/net/usb/r8152.c +103 -74
222 lines not on this page · raw message
drivers/pci/controller/pci-loongson.c +41 -5
54 lines not on this page · raw message
drivers/pci/hotplug/acpiphp_glue.c +3 -6
@@ -503,15 +503,12 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)if (pass && dev->subordinate) {check_hotplug_bridge (slot, dev);pcibios_resource_survey_bus (dev->subordinate); -if (pci_is_root_bus (bus)) -__pci_bus_size_bridges (dev->subordinate, &add_list); +__pci_bus_size_bridges (dev->subordinate, + &add_list); } } } -if (pci_is_root_bus (bus)) -__pci_bus_assign_resources (bus, &add_list,NULL ); -else -pci_assign_unassigned_bridge_resources (bus->self); +__pci_bus_assign_resources (bus, &add_list,NULL ); }acpiphp_sanitize_bus (bus);
drivers/platform/x86/intel/telemetry/core.c +2 -2
@@ -102,7 +102,7 @@ static const struct telemetry_core_ops telm_defpltops = {/** * telemetry_update_events() - Update telemetry Configuration * @pss_evtconfig: PSS related config. No change if num_evts = 0. -* @pss_evtconfig: IOSS related config. No change if num_evts = 0. +* @ioss_evtconfig: IOSS related config. No change if num_evts = 0. * * This API updates the IOSS & PSS Telemetry configuration. Old config * is overwritten. Call telemetry_reset_events when logging is over
@@ -176,7 +176,7 @@ EXPORT_SYMBOL_GPL(telemetry_reset_events);/** * telemetry_get_eventconfig() - Returns the pss and ioss events enabled * @pss_evtconfig: Pointer to PSS related configuration. -* @pss_evtconfig: Pointer to IOSS related configuration. +* @ioss_evtconfig: Pointer to IOSS related configuration. * @pss_len: Number of u32 elements allocated for pss_evtconfig array * @ioss_len: Number of u32 elements allocated for ioss_evtconfig array *
drivers/soundwire/stream.c +4 -3
@@ -744,14 +744,15 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count)* sdw_ml_sync_bank_switch: Multilink register bank switch * * @bus: SDW bus instance +* @multi_link: whether this is a multi-link stream with hardware-based sync * * Caller function should free the buffers on error */ -static int sdw_ml_sync_bank_switch (struct sdw_bus *bus) +static int sdw_ml_sync_bank_switch (struct sdw_bus *bus,bool multi_link) {unsigned long time_left; -if (!bus->multi_link) +if (!multi_link)return 0 ;/* Wait for completion of transfer */
@@ -847,7 +848,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream) bus->bank_switch_timeout =DEFAULT_BANK_SWITCH_TIMEOUT ;/* Check if bank switch was successful */ - ret =sdw_ml_sync_bank_switch (bus); + ret =sdw_ml_sync_bank_switch (bus, multi_link);if (ret <0 ) {dev_err (bus->dev,"multi link bank switch failed: %d\n" , ret);
drivers/staging/gdm724x/gdm_lte.c +2 -2
@@ -350,7 +350,7 @@ static s32 gdm_lte_tx_nic_type(struct net_device *dev, struct sk_buff *skb)/* Get ethernet protocol */ eth = (struct ethhdr *)skb->data;if (ntohs (eth->h_proto) ==ETH_P_8021Q ) { - vlan_eth = (struct vlan_ethhdr *)skb->data; + vlan_eth =skb_vlan_eth_hdr (skb); mac_proto =ntohs (vlan_eth->h_vlan_encapsulated_proto); network_data = skb->data +VLAN_ETH_HLEN ; nic_type |=NIC_TYPE_F_VLAN ;
@@ -436,7 +436,7 @@ static netdev_tx_t gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)* driver based on the NIC mac */ if (nic_type &NIC_TYPE_F_VLAN ) { -struct vlan_ethhdr *vlan_eth = (struct vlan_ethhdr *)skb->data; +struct vlan_ethhdr *vlan_eth =skb_vlan_eth_hdr (skb); nic->vlan_id =ntohs (vlan_eth->h_vlan_TCI) &VLAN_VID_MASK ; data_buf = skb->data + (VLAN_ETH_HLEN -ETH_HLEN );
drivers/usb/gadget/udc/core.c +2 -2
@@ -1451,8 +1451,6 @@ static void usb_gadget_remove_driver(struct usb_udc *udc)dev_dbg (&udc->dev,"unregistering UDC driver [%s]\n" , udc->driver->function); -kobject_uevent (&udc->dev.kobj,KOBJ_CHANGE ); -usb_gadget_disconnect (udc->gadget);usb_gadget_disable_async_callbacks (udc);if (udc->gadget->irq)
@@ -1462,6 +1460,8 @@ static void usb_gadget_remove_driver(struct usb_udc *udc) udc->driver =NULL ; udc->gadget->dev.driver =NULL ; + +kobject_uevent (&udc->dev.kobj,KOBJ_CHANGE ); }/**
fs/afs/rxrpc.c +1 -1
@@ -420,7 +420,7 @@ void afs_make_call(struct afs_addr_cursor *ac, struct afs_call *call, gfp_t gfp)if (call->async) {if (cancel_work_sync (&call->async_work))afs_put_call (call); -afs_put_call (call); +afs_set_call_complete (call, ret,0 ); } ac->error = ret;
fs/btrfs/ioctl.c +9 -0
@@ -1855,6 +1855,15 @@ static noinline int __btrfs_ioctl_snap_create(struct file *file,* are limited to own subvolumes only */ ret = -EPERM ; + }else if (btrfs_ino (BTRFS_I (src_inode)) !=BTRFS_FIRST_FREE_OBJECTID ) { +/* +* Snapshots must be made with the src_inode referring +* to the subvolume inode, otherwise the permission +* checking above is useless because we may have +* permission on a lower directory but not the subvol +* itself. +*/ + ret = -EINVAL ; }else { ret = btrfs_mksnapshot(&file->f_path, mnt_userns, name, namelen,
fs/ext4/mballoc.c +4 -0
@@ -4137,6 +4137,10 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, start =max (start,rounddown (ac->ac_o_ex.fe_logical, (ext4_lblk_t )EXT4_BLOCKS_PER_GROUP (ac->ac_sb))); +/* avoid unnecessary preallocation that may trigger assertions */ +if (start + size >EXT_MAX_BLOCKS ) + size =EXT_MAX_BLOCKS - start; +/* don't cover already allocated blocks in selected range */ if (ar->pleft && start <= ar->lleft) { size -= ar->lleft +1 - start;
fs/fuse/dax.c +1 -0
@@ -1227,6 +1227,7 @@ void fuse_dax_conn_free(struct fuse_conn *fc)if (fc->dax) {fuse_free_dax_mem_ranges (&fc->dax->free_ranges);kfree (fc->dax); + fc->dax =NULL ; } }
fs/ksmbd/smb2pdu.c +1 -0
@@ -7068,6 +7068,7 @@ int smb2_lock(struct ksmbd_work *work) smb2_remove_blocked_lock, argv);if (rc) { +kfree (argv); err = -ENOMEM ; goto out; }
include/asm-generic/qspinlock.h +1 -1
@@ -41,7 +41,7 @@ static __always_inline int queued_spin_is_locked(struct qspinlock *lock)*/ static __always_inline int queued_spin_value_unlocked(struct qspinlock lock) { -return !atomic_read (&lock.val); +return !lock.val.counter; }/**
include/linux/cred.h +4 -4
@@ -108,7 +108,7 @@ static inline int groups_search(const struct group_info *group_info, kgid_t grp)* same context as task->real_cred. */ struct cred { -atomic_t usage; +atomic_long_t usage;#ifdef CONFIG_DEBUG_CREDENTIALS atomic_t subscribers;/* number of processes subscribed */ void *put_addr;
@@ -228,7 +228,7 @@ static inline bool cap_ambient_invariant_ok(const struct cred *cred)*/ static inline struct cred *get_new_cred (struct cred *cred) { -atomic_inc (&cred->usage); +atomic_long_inc (&cred->usage);return cred; }
@@ -260,7 +260,7 @@ static inline const struct cred *get_cred_rcu(const struct cred *cred)struct cred *nonconst_cred = (struct cred *) cred;if (!cred)return NULL ; -if (!atomic_inc_not_zero (&nonconst_cred->usage)) +if (!atomic_long_inc_not_zero (&nonconst_cred->usage))return NULL ;validate_creds (cred); nonconst_cred->non_rcu =0 ;
@@ -284,7 +284,7 @@ static inline void put_cred(const struct cred *_cred)if (cred) {validate_creds (cred); -if (atomic_dec_and_test (&(cred)->usage)) +if (atomic_long_dec_and_test (&(cred)->usage))__put_cred (cred); } }
include/linux/if_vlan.h +10 -2
@@ -60,6 +60,14 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)return (struct vlan_ethhdr *)skb_mac_header (skb); } +/* Prefer this version in TX path, instead of +* skb_reset_mac_header() + vlan_eth_hdr() +*/ +static inline struct vlan_ethhdr *skb_vlan_eth_hdr (const struct sk_buff *skb) +{ +return (struct vlan_ethhdr *)skb->data; +} +#define VLAN_PRIO_MASK 0xe000/* Priority Code Point */ #define VLAN_PRIO_SHIFT 13#define VLAN_CFI_MASK 0x1000/* Canonical Format Indicator / Drop Eligible Indicator */
@@ -526,7 +534,7 @@ static inline void __vlan_hwaccel_put_tag(struct sk_buff *skb,*/ static inline int __vlan_get_tag (const struct sk_buff *skb,u16 *vlan_tci) { -struct vlan_ethhdr *veth = (struct vlan_ethhdr *)skb->data; +struct vlan_ethhdr *veth =skb_vlan_eth_hdr (skb);if (!eth_type_vlan (veth->h_vlan_proto))return -EINVAL ;
@@ -727,7 +735,7 @@ static inline bool skb_vlan_tagged_multi(struct sk_buff *skb)if (unlikely (!pskb_may_pull (skb,VLAN_ETH_HLEN )))return false; - veh = (struct vlan_ethhdr *)skb->data; + veh =skb_vlan_eth_hdr (skb); protocol = veh->h_vlan_encapsulated_proto; }
include/linux/memblock.h +2 -1
@@ -100,7 +100,8 @@ static inline void memblock_discard(void) {}#endif void memblock_allow_resize (void ); -int memblock_add_node (phys_addr_t base,phys_addr_t size,int nid); +int memblock_add_node (phys_addr_t base,phys_addr_t size,int nid, +enum memblock_flags flags);int memblock_add (phys_addr_t base,phys_addr_t size);int memblock_remove (phys_addr_t base,phys_addr_t size);int memblock_free (phys_addr_t base,phys_addr_t size);
include/linux/mm.h +1 -1
@@ -2454,7 +2454,7 @@ static inline unsigned long get_num_physpages(void)* unsigned long max_zone_pfns[MAX_NR_ZONES] = {max_dma, max_normal_pfn, * max_highmem_pfn}; * for_each_valid_physical_page_range() -* memblock_add_node(base, size, nid) +* memblock_add_node(base, size, nid, MEMBLOCK_NONE) * free_area_init(max_zone_pfns); */ void free_area_init (unsigned long *max_zone_pfn);
include/linux/usb/r8152.h +2 -0
@@ -29,6 +29,8 @@#define VENDOR_ID_LINKSYS 0x13b1#define VENDOR_ID_NVIDIA 0x0955#define VENDOR_ID_TPLINK 0x2357 +#define VENDOR_ID_DLINK 0x2001 +#define VENDOR_ID_ASUS 0x0b05#if IS_REACHABLE (CONFIG_USB_RTL8152 )extern u8 rtl8152_get_version (struct usb_interface *intf);
include/net/addrconf.h +10 -2
@@ -31,17 +31,22 @@ struct prefix_info {__u8 length;__u8 prefix_len; +union __packed { +__u8 flags; +struct __packed {#if defined(__BIG_ENDIAN_BITFIELD) - __u8 onlink : 1, +__u8 onlink :1 , autoconf :1 , reserved :6 ;#elif defined(__LITTLE_ENDIAN_BITFIELD) - __u8 reserved : 6, +__u8 reserved :6 , autoconf :1 , onlink :1 ;#else #error "Please fix <asm/byteorder.h>"#endif + }; + };__be32 valid;__be32 prefered;__be32 reserved2;
@@ -49,6 +54,9 @@ struct prefix_info {struct in6_addr prefix; }; +/* rfc4861 4.6.2: IPv6 PIO is 32 bytes in size */ +static_assert (sizeof (struct prefix_info ) ==32 ); +#include <linux/ipv6.h> #include <linux/netdevice.h> #include <net/if_inet6.h>
include/net/if_inet6.h +0 -4
@@ -22,10 +22,6 @@#define IF_RS_SENT 0x10#define IF_READY 0x80000000 -/* prefix flags */ -#define IF_PREFIX_ONLINK 0x01 -#define IF_PREFIX_AUTOCONF 0x02 -enum {INET6_IFADDR_STATE_PREDAD ,INET6_IFADDR_STATE_DAD ,
kernel/cred.c +32 -32
167 lines not on this page · raw message
kernel/events/core.c +10 -0
@@ -2032,6 +2032,16 @@ static bool perf_event_validate_size(struct perf_event *event) group_leader->nr_siblings + 1) > 16*1024)return false; +/* +* When creating a new group leader, group_leader->ctx is initialized +* after the size has been validated, but we cannot safely use +* for_each_sibling_event() until group_leader->ctx is set. A new group +* leader cannot have any siblings yet, so we can safely skip checking +* the non-existent siblings. +*/ +if (event == group_leader) +return true; +for_each_sibling_event (sibling, group_leader) {if (__perf_event_read_size (sibling->attr.read_format, group_leader->nr_siblings +1 ) >16 *1024 )
kernel/trace/ring_buffer.c +21 -35
117 lines not on this page · raw message
kernel/trace/trace.c +2 -2
@@ -6243,7 +6243,7 @@ static int __tracing_resize_ring_buffer(struct trace_array *tr,if (!tr->array_buffer.buffer)return 0 ; -/* Do not allow tracing while resizng ring buffer */ +/* Do not allow tracing while resizing ring buffer */ tracing_stop_tr (tr); ret =ring_buffer_resize (tr->array_buffer.buffer, size, cpu);
@@ -6251,7 +6251,7 @@ static int __tracing_resize_ring_buffer(struct trace_array *tr, goto out_start;#ifdef CONFIG_TRACER_MAX_TRACE -if (!tr->current_trace->use_max_tr) +if (!tr->allocated_snapshot) goto out; ret =ring_buffer_resize (tr->max_buffer.buffer, size, cpu);
mm/memblock.c +5 -4
@@ -661,6 +661,7 @@ static int __init_memblock memblock_add_range(struct memblock_type *type,* @base: base address of the new region * @size: size of the new region * @nid: nid of the new region +* @flags: flags of the new region * * Add new memblock region [@base, @base + @size) to the "memory" * type. See memblock_add_range() description for mode details
@@ -669,14 +670,14 @@ static int __init_memblock memblock_add_range(struct memblock_type *type,* 0 on success, -errno on failure. */ int __init_memblock memblock_add_node(phys_addr_t base, phys_addr_t size, -int nid) +int nid,enum memblock_flags flags) {phys_addr_t end = base + size -1 ; -memblock_dbg ("%s: [%pa-%pa] nid=%d %pS\n" , __func__, - &base, &end, nid, (void *)_RET_IP_); +memblock_dbg ("%s: [%pa-%pa] nid=%d flags=%x %pS\n" , __func__, + &base, &end, nid, flags, (void *)_RET_IP_); -return memblock_add_range (&memblock.memory, base, size, nid,0 ); +return memblock_add_range (&memblock.memory, base, size, nid, flags); }/**
mm/memory_hotplug.c +6 -2
@@ -1384,8 +1384,11 @@ int __ref add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)mem_hotplug_begin (); -if (IS_ENABLED (CONFIG_ARCH_KEEP_MEMBLOCK )) -memblock_add_node (start, size, nid); +if (IS_ENABLED (CONFIG_ARCH_KEEP_MEMBLOCK )) { + ret =memblock_add_node (start, size, nid,MEMBLOCK_NONE ); +if (ret) + goto error_mem_hotplug_end; + } ret =__try_online_node (nid, false);if (ret <0 )
@@ -1458,6 +1461,7 @@ int __ref add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)rollback_node_hotadd (nid);if (IS_ENABLED (CONFIG_ARCH_KEEP_MEMBLOCK ))memblock_remove (start, size); +error_mem_hotplug_end:mem_hotplug_done ();return ret; }
net/appletalk/ddp.c +4 -5
@@ -1812,15 +1812,14 @@ static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)break ; }case TIOCINQ : { -/* -* These two are safe on a single CPU system as only -* user tasks fiddle here -*/ -struct sk_buff *skb =skb_peek (&sk->sk_receive_queue); +struct sk_buff *skb;long amount =0 ; +spin_lock_irq (&sk->sk_receive_queue.lock); + skb =skb_peek (&sk->sk_receive_queue);if (skb) amount = skb->len -sizeof (struct ddpehdr ); +spin_unlock_irq (&sk->sk_receive_queue.lock); rc =put_user (amount, (int __user *)argp);break ; }
net/atm/ioctl.c +5 -2
@@ -73,14 +73,17 @@ static int do_vcc_ioctl(struct socket *sock, unsigned int cmd,case SIOCINQ : {struct sk_buff *skb; +int amount;if (sock->state !=SS_CONNECTED ) { error = -EINVAL ; goto done; } +spin_lock_irq (&sk->sk_receive_queue.lock); skb =skb_peek (&sk->sk_receive_queue); - error =put_user (skb ? skb->len :0 , - (int __user *)argp) ? -EFAULT :0 ; + amount = skb ? skb->len :0 ; +spin_unlock_irq (&sk->sk_receive_queue.lock); + error =put_user (amount, (int __user *)argp) ? -EFAULT :0 ; goto done; }case ATM_SETSC :
net/batman-adv/soft-interface.c +1 -1
@@ -444,7 +444,7 @@ void batadv_interface_rx(struct net_device *soft_iface,if (!pskb_may_pull (skb,VLAN_ETH_HLEN )) goto dropped; - vhdr = (struct vlan_ethhdr *)skb->data; + vhdr =skb_vlan_eth_hdr (skb);/* drop batman-in-batman packets to prevent loops */ if (vhdr->h_vlan_encapsulated_proto !=htons (ETH_P_BATMAN ))
net/ipv4/tcp_output.c +6 -0
@@ -3171,7 +3171,13 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)if (skb_still_in_host_queue (sk, skb))return -EBUSY ; +start:if (before (TCP_SKB_CB (skb)->seq, tp->snd_una)) { +if (unlikely (TCP_SKB_CB (skb)->tcp_flags &TCPHDR_SYN )) { +TCP_SKB_CB (skb)->tcp_flags &= ~TCPHDR_SYN ; +TCP_SKB_CB (skb)->seq++; + goto start; + }if (unlikely (before (TCP_SKB_CB (skb)->end_seq, tp->snd_una))) {WARN_ON_ONCE (1 );return -EINVAL ;
net/ipv6/addrconf.c +1 -5
@@ -6093,11 +6093,7 @@ static int inet6_fill_prefix(struct sk_buff *skb, struct inet6_dev *idev, pmsg->prefix_len = pinfo->prefix_len; pmsg->prefix_type = pinfo->type; pmsg->prefix_pad3 =0 ; - pmsg->prefix_flags =0 ; -if (pinfo->onlink) - pmsg->prefix_flags |=IF_PREFIX_ONLINK ; -if (pinfo->autoconf) - pmsg->prefix_flags |=IF_PREFIX_AUTOCONF ; + pmsg->prefix_flags = pinfo->flags;if (nla_put (skb,PREFIX_ADDRESS ,sizeof (pinfo->prefix), &pinfo->prefix)) goto nla_put_failure;
net/netfilter/nft_exthdr.c +1 -1
@@ -214,7 +214,7 @@ static void nft_exthdr_tcp_eval(const struct nft_expr *expr, offset = i + priv->offset;if (priv->flags &NFT_EXTHDR_F_PRESENT ) { - *dest =1 ; +nft_reg_store8 (dest,1 ); }else {if (priv->len %NFT_REG32_SIZE ) dest[priv->len /NFT_REG32_SIZE ] =0 ;
net/netfilter/nft_fib.c +6 -2
@@ -140,11 +140,15 @@ void nft_fib_store_result(void *reg, const struct nft_fib *priv,switch (priv->result) {case NFT_FIB_RESULT_OIF : index = dev ? dev->ifindex :0 ; - *dreg = (priv->flags &NFTA_FIB_F_PRESENT ) ? !!index : index; +if (priv->flags &NFTA_FIB_F_PRESENT ) +nft_reg_store8 (dreg, !!index); +else + *dreg = index; +break ;case NFT_FIB_RESULT_OIFNAME :if (priv->flags &NFTA_FIB_F_PRESENT ) - *dreg = !!dev; +nft_reg_store8 (dreg, !!dev);else strncpy (reg, dev ? dev->name :"" ,IFNAMSIZ );break ;
net/rose/af_rose.c +3 -1
@@ -1307,9 +1307,11 @@ static int rose_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)case TIOCINQ : {struct sk_buff *skb;long amount =0L ; -/* These two are safe on a single CPU system as only user tasks fiddle here */ + +spin_lock_irq (&sk->sk_receive_queue.lock);if ((skb =skb_peek (&sk->sk_receive_queue)) !=NULL ) amount = skb->len; +spin_unlock_irq (&sk->sk_receive_queue.lock);return put_user (amount, (unsigned int __user *) argp); }
net/vmw_vsock/virtio_transport_common.c +1 -1
@@ -565,7 +565,7 @@ static s64 virtio_transport_has_space(struct vsock_sock *vsk)struct virtio_vsock_sock *vvs = vsk->trans;s64 bytes; - bytes = vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt); + bytes = (s64 )vvs->peer_buf_alloc - (vvs->tx_cnt - vvs->peer_fwd_cnt);if (bytes <0 ) bytes =0 ;
scripts/sign-file.c +6 -6
@@ -322,7 +322,7 @@ int main(int argc, char **argv)CMS_NOSMIMECAP | use_keyid | use_signed_attrs), "CMS_add1_signer"); -ERR (CMS_final (cms, bm,NULL ,CMS_NOCERTS |CMS_BINARY ) <0 , +ERR (CMS_final (cms, bm,NULL ,CMS_NOCERTS |CMS_BINARY ) !=1 ,"CMS_final" );#else
@@ -341,10 +341,10 @@ int main(int argc, char **argv) b =BIO_new_file (sig_file_name,"wb" );ERR (!b,"%s" , sig_file_name);#ifndef USE_PKCS7 -ERR (i2d_CMS_bio_stream (b, cms,NULL ,0 ) <0 , +ERR (i2d_CMS_bio_stream (b, cms,NULL ,0 ) !=1 ,"%s" , sig_file_name);#else -ERR (i2d_PKCS7_bio (b, pkcs7) <0 , +ERR (i2d_PKCS7_bio (b, pkcs7) !=1 ,"%s" , sig_file_name);#endif BIO_free (b);
@@ -374,9 +374,9 @@ int main(int argc, char **argv)if (!raw_sig) {#ifndef USE_PKCS7 -ERR (i2d_CMS_bio_stream (bd, cms,NULL ,0 ) <0 ,"%s" , dest_name); +ERR (i2d_CMS_bio_stream (bd, cms,NULL ,0 ) !=1 ,"%s" , dest_name);#else -ERR (i2d_PKCS7_bio (bd, pkcs7) <0 ,"%s" , dest_name); +ERR (i2d_PKCS7_bio (bd, pkcs7) !=1 ,"%s" , dest_name);#endif }else {BIO *b;
@@ -396,7 +396,7 @@ int main(int argc, char **argv)ERR (BIO_write (bd, &sig_info,sizeof (sig_info)) <0 ,"%s" , dest_name);ERR (BIO_write (bd, magic_number,sizeof (magic_number) -1 ) <0 ,"%s" , dest_name); -ERR (BIO_free (bd) <0 ,"%s" , dest_name); +ERR (BIO_free (bd) !=1 ,"%s" , dest_name);/* Finally, if we're signing in place, replace the original. */ if (replace_orig)
sound/pci/hda/patch_hdmi.c +3 -0
@@ -1964,7 +1964,10 @@ static const struct snd_pci_quirk force_connect_list[] = {SND_PCI_QUIRK (0x103c ,0x871a ,"HP" ,1 ),SND_PCI_QUIRK (0x103c ,0x8711 ,"HP" ,1 ),SND_PCI_QUIRK (0x103c ,0x8715 ,"HP" ,1 ), +SND_PCI_QUIRK (0x1043 ,0x86ae ,"ASUS" ,1 ),/* Z170 PRO */ +SND_PCI_QUIRK (0x1043 ,0x86c7 ,"ASUS" ,1 ),/* Z170M PLUS */ SND_PCI_QUIRK (0x1462 ,0xec94 ,"MS-7C94" ,1 ), +SND_PCI_QUIRK (0x8086 ,0x2060 ,"Intel NUC5CPYB" ,1 ), SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1), {} };
sound/pci/hda/patch_realtek.c +1 -0
@@ -9050,6 +9050,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x103c ,0x83b9 ,"HP Spectre x360" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x841c ,"HP Pavilion 15-CK0xx" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ),SND_PCI_QUIRK (0x103c ,0x8497 ,"HP Envy x360" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ), +SND_PCI_QUIRK (0x103c ,0x84ae ,"HP 15-db0403ng" ,ALC236_FIXUP_HP_MUTE_LED_COEFBIT2 ),SND_PCI_QUIRK (0x103c ,0x84da ,"HP OMEN dc0019-ur" ,ALC295_FIXUP_HP_OMEN ),SND_PCI_QUIRK (0x103c ,0x84e7 ,"HP Pavilion 15" ,ALC269_FIXUP_HP_MUTE_LED_MIC3 ), SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),