Linux 5.10.103
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.103 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/parisc/kernel/unaligned.c | 14 +-- arch/riscv/kernel/Makefile | 2 arch/riscv/kernel/entry.S | 10 +- arch/riscv/kernel/trace_irq.c | 27 ++++++ arch/riscv/kernel/trace_irq.h | 11 ++ arch/x86/include/asm/fpu/internal.h | 13 +-- arch/x86/kernel/process_32.c | 6 - arch/x86/kernel/process_64.c | 6 - arch/x86/kvm/mmu/mmu.c | 13 ++- drivers/ata/pata_hpt37x.c | 14 +++ drivers/base/dd.c | 5 + drivers/base/regmap/regmap-irq.c | 20 +--- drivers/clk/ingenic/jz4725b-cgu.c | 3 drivers/gpio/gpio-tegra186.c | 14 ++- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 - drivers/gpu/drm/drm_edid.c | 2 drivers/gpu/drm/i915/intel_pm.c | 22 ++--- drivers/hwmon/hwmon.c | 14 +-- drivers/iio/accel/bmc150-accel-core.c | 5 - drivers/iio/accel/kxcjk-1013.c | 5 - drivers/iio/accel/mma9551.c | 5 - drivers/iio/accel/mma9553.c | 5 - drivers/iio/adc/ad7124.c | 2 drivers/iio/adc/men_z188_adc.c | 9 +- drivers/iio/gyro/bmg160_core.c | 5 - drivers/iio/imu/kmx61.c | 5 - drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 6 + drivers/iio/magnetometer/bmc150_magn.c | 5 - drivers/infiniband/core/cma.c | 40 +++++---- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 56 ++++++------- drivers/infiniband/ulp/srp/ib_srp.c | 6 - drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 4 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 2 drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 4 drivers/net/ethernet/xilinx/ll_temac_main.c | 2 drivers/net/usb/cdc_ether.c | 12 ++ drivers/net/usb/cdc_ncm.c | 8 - drivers/net/usb/sr9700.c | 2 drivers/net/usb/zaurus.c | 12 ++ drivers/platform/x86/surface3_power.c | 13 ++- drivers/spi/spi-zynq-qspi.c | 3 drivers/tee/optee/core.c | 8 + drivers/tee/optee/optee_private.h | 2 drivers/tee/optee/rpc.c | 8 + drivers/tee/tee_core.c | 6 - drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 4 drivers/tty/n_gsm.c | 22 +++-- drivers/tty/serial/sc16is7xx.c | 3 drivers/usb/dwc2/core.h | 2 drivers/usb/dwc2/drd.c | 6 - drivers/usb/dwc3/dwc3-pci.c | 4 drivers/usb/dwc3/gadget.c | 2 drivers/usb/gadget/function/rndis.c | 8 + drivers/usb/gadget/function/rndis.h | 1 drivers/usb/gadget/udc/udc-xilinx.c | 6 + drivers/usb/host/xhci.c | 28 ++++-- drivers/usb/serial/ch341.c | 1 drivers/usb/serial/option.c | 12 ++ drivers/vhost/vsock.c | 21 +++- fs/btrfs/tree-checker.c | 15 +++ fs/configfs/dir.c | 14 +++ fs/io_uring.c | 1 fs/tracefs/inode.c | 5 - include/linux/tee_drv.h | 14 +++ include/net/checksum.h | 48 ++++++----- include/net/netfilter/nf_tables.h | 2 include/net/netfilter/nf_tables_offload.h | 2 kernel/bpf/syscall.c | 3 kernel/cgroup/cpuset.c | 2 kernel/trace/trace_events_trigger.c | 52 ++++++++++-- mm/memblock.c | 10 +- net/core/filter.c | 3 net/core/skbuff.c | 4 net/ipv4/af_inet.c | 5 - net/ipv4/ping.c | 1 net/ipv4/udp_tunnel_nic.c | 2 net/ipv6/ip6_offload.c | 2 net/netfilter/nf_tables_api.c | 13 ++- net/netfilter/nf_tables_offload.c | 3 net/netfilter/nft_dup_netdev.c | 6 + net/netfilter/nft_fwd_netdev.c | 6 + net/netfilter/nft_immediate.c | 12 ++ net/openvswitch/actions.c | 46 ++++++++-- net/sched/act_ct.c | 5 - net/smc/smc_pnet.c | 42 ++++----- net/smc/smc_pnet.h | 2 net/tipc/name_table.c | 2 net/tipc/socket.c | 2 tools/perf/util/data.c | 7 - tools/testing/selftests/bpf/progs/test_sockmap_kern.h | 26 ++++-- 95 files changed, 664 insertions(+), 267 deletions(-)
Alexey Bayduraev (1):
perf data: Fix double free in perf_session__delete()
Ariel Levkovich (1):
net/mlx5: Fix wrong limitation of metadata match on ecpf
Bart Van Assche (1):
RDMA/ib_srp: Fix a deadlock
Brian Geffon (1):
x86/fpu: Correct pkru/xstate inconsistency
Changbin Du (1):
riscv: fix oops caused by irqsoff latency tracer
ChenXiaoSong (1):
configfs: fix a race in configfs_{,un}register_subsystem()
Christophe JAILLET (2):
nfp: flower: Fix a potential leak in nfp_tunnel_add_shared_mac()
iio: adc: men_z188_adc: Fix a resource leak in an error handling path
Christophe Leroy (1):
net: Force inlining of checksum functions in net/checksum.h
Chuansheng Liu (1):
thermal: int340x: fix memory leak in int3400_notify()
Cosmin Tanislav (1):
iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits
Daehwan Jung (1):
usb: gadget: rndis: add spinlock for rndis response list
Dan Carpenter (2):
tipc: Fix end of loop tests for list_for_each_entry()
udp_tunnel: Fix end of loop test in udp_tunnel_nic_unregister()
Daniele Palmas (1):
USB: serial: option: add Telit LE910R1 compositions
Dmytro Bagrii (1):
Revert "USB: serial: ch341: add new Product ID for CH341A"
Eric Dumazet (3):
bpf: Add schedule points in batch ops
io_uring: add a schedule point in io_add_buffers()
net: __pskb_pull_tail() & pskb_carve_frag_list() drop_monitor friends
Evan Quan (1):
drm/amdgpu: disable MMHUB PG for Picasso
Fabio M. De Francesco (1):
net/smc: Use a mutex for locking "struct smc_pnettable"
Fabrice Gasnier (1):
usb: dwc2: drd: fix soft connect when gadget is unconfigured
Felix Maurer (2):
bpf: Do not try bpf_msg_push_data with len 0
selftests: bpf: Check bpf_msg_push_data return value
Florian Westphal (1):
netfilter: nf_tables: fix memory leak during stateful obj update
Gal Pressman (1):
net/mlx5e: Fix wrong return value on ioctl EEPROM query failure
Greg Kroah-Hartman (1):
Linux 5.10.103
Guenter Roeck (1):
hwmon: Handle failure to register sensor with thermal zone correctly
Guoqing Jiang (1):
RDMA/rtrs-clt: Kill wait_for_inflight_permits
Hans de Goede (2):
surface: surface3_power: Fix battery readings on batteries without a serial number
usb: dwc3: pci: Fix Bay Trail phy GPIO mappings
Helge Deller (2):
parisc/unaligned: Fix fldd and fstd unaligned handlers on 32-bit kernel parisc/unaligned: Fix ldw() and stw() unalignment handlers
Hongyu Xie (1):
xhci: Prevent futile URB re-submissions due to incorrect return value.
Jason Gunthorpe (1):
RDMA/cma: Do not change route.addr.src_addr outside state checks
Jens Wiklander (2):
tee: export teedev_open() and teedev_close_context()
optee: use driver internal tee_context for some rpc
Liang Zhang (1):
KVM: x86/mmu: make apf token non-zero to fix bug
Lorenzo Bianconi (1):
iio: imu: st_lsm6dsx: wait for settling time in st_lsm6dsx_read_oneshot
Manish Chopra (1):
bnx2x: fix driver load from initrd
Maor Gottlieb (1):
net/mlx5: Fix possible deadlock on rule deletion
Marc Zyngier (1):
gpio: tegra186: Fix chip_data type confusion
Maxime Ripard (1):
drm/edid: Always set RGB444
Md Haris Iqbal (2):
RDMA/rtrs-clt: Fix possible double free in error case RDMA/rtrs-clt: Move free_permit from free_clt to rtrs_clt_close
Miaohe Lin (1):
memblock: use kfree() to release kmalloced memblock regions
Miaoqian Lin (1):
iio: Fix error handling for PM
Mårten Lindahl (1):
driver core: Free DMA range map when device is released
Oliver Neukum (3):
sr9700: sanity check for packet length
USB: zaurus: support another broken Zaurus
CDC-NCM: avoid overflow in sanity checking
Pablo Neira Ayuso (1):
netfilter: nf_tables_offload: incorrect flow offload action array size
Paul Blakey (2):
openvswitch: Fix setting ipv6 fields causing hw csum failure net/sched: act_ct: Fix flow table lookup after ct clear or switching zones
Phil Elwell (1):
sc16is7xx: Fix for incorrect data being transmitted
Prasad Kumpatla (1):
regmap-irq: Update interrupt clear register for proper reset
Puma Hsu (1):
xhci: re-initialize the HC during resume if HCE was set
Sebastian Andrzej Siewior (1):
usb: dwc3: gadget: Let the interrupt handler disable bottom halves.
Sergey Shtylyov (1):
ata: pata_hpt37x: disable primary channel on HPT371
Siarhei Volkau (1):
clk: jz4725b: fix mmc0 clock gating
Slark Xiao (1):
USB: serial: option: add support for DW5829e
Somnath Kotur (1):
bnxt_en: Fix active FEC reporting to ethtool
Stefano Garzarella (1):
vhost/vsock: don't check owner in vhost_vsock_stop() while releasing
Steven Rostedt (Google) (2):
tracing: Have traceon and traceoff trigger honor the instance
tracefs: Set the group ownership in apply_options() not parse_options()
Su Yue (2):
btrfs: tree-checker: check item_size for inode_item
btrfs: tree-checker: check item_size for dev_item
Szymon Heidrich (1):
USB: gadget: validate endpoint index for xilinx udc
Tao Liu (1):
gso: do not skip outer ip header in case of ipip and net_failover
Tariq Toukan (1):
net/mlx5e: kTLS, Use CHECKSUM_UNNECESSARY for device-offloaded packets
Ville Syrjälä (1):
drm/i915: Correctly populate use_sagv_wm for all pipes
Xiaoke Wang (1):
net: ll_temac: check the return value of devm_kmalloc()
Xin Long (1):
ping: remove pr_err from ping_lookup
Zhang Qiao (1):
cgroup/cpuset: Fix a race between cpuset_attach() and cpu hotplug
Zhou Qingyang (1):
spi: spi-zynq-qspi: Fix a NULL pointer dereference in zynq_qspi_exec_mem_op()
[email protected] (5):
tty: n_gsm: fix encoding of control signal octet bit DV
tty: n_gsm: fix proper link termination after failed open
tty: n_gsm: fix NULL pointer access due to DLCI release
tty: n_gsm: fix wrong tty control line for flow control
tty: n_gsm: fix deadlock in gsmtty_open()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 102 +SUBLEVEL = 103 EXTRAVERSION = NAME = Dare mighty things
arch/parisc/kernel/unaligned.c +7 -7
@@ -340,7 +340,7 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop) : "r" (val), "r" (regs->ior), "r" (regs->isr) : "r19", "r20", "r21", "r22", "r1", FIXUP_BRANCH_CLOBBER ); -return 0 ; +return ret; }static int emulate_std (struct pt_regs *regs,int frreg,int flop) {
@@ -397,7 +397,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop) __asm__ __volatile__ (" mtsp %4, %%sr1\n" " zdep %2, 29, 2, %%r19\n" -" dep %%r0, 31, 2, %2\n" +" dep %%r0, 31, 2, %3\n" " mtsar %%r19\n" " zvdepi -2, 32, %%r19\n" "1: ldw 0(%%sr1,%3),%%r20\n"
@@ -409,7 +409,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)" andcm %%r21, %%r19, %%r21\n" " or %1, %%r20, %1\n" " or %2, %%r21, %2\n" -"3: stw %1,0(%%sr1,%1)\n" +"3: stw %1,0(%%sr1,%3)\n" "4: stw %%r1,4(%%sr1,%3)\n" "5: stw %2,8(%%sr1,%3)\n" " copy %%r0, %0\n"
@@ -596,7 +596,6 @@ void handle_unaligned(struct pt_regs *regs) ret =ERR_NOTHANDLED ;/* "undefined", but lets kill them. */ break ; } -#ifdef CONFIG_PA20 switch (regs->iir &OPCODE2_MASK ) {case OPCODE_FLDD_L :
@@ -607,22 +606,23 @@ void handle_unaligned(struct pt_regs *regs) flop=1 ; ret =emulate_std (regs,R2 (regs->iir),1 );break ; +#ifdef CONFIG_PA20 case OPCODE_LDD_L : ret =emulate_ldd (regs,R2 (regs->iir),0 );break ;case OPCODE_STD_L : ret =emulate_std (regs,R2 (regs->iir),0 );break ; - }#endif + }switch (regs->iir &OPCODE3_MASK ) {case OPCODE_FLDW_L : flop=1 ; - ret =emulate_ldw (regs,R2 (regs->iir),0 ); + ret =emulate_ldw (regs,R2 (regs->iir),1 );break ;case OPCODE_LDW_M : - ret =emulate_ldw (regs,R2 (regs->iir),1 ); + ret =emulate_ldw (regs,R2 (regs->iir),0 );break ;case OPCODE_FSTW_L :
arch/riscv/kernel/Makefile +2 -0
@@ -44,6 +44,8 @@ obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o +obj-$(CONFIG_TRACE_IRQFLAGS) += trace_irq.o + obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
arch/riscv/kernel/entry.S +5 -5
@@ -98,7 +98,7 @@ _save_context: .option pop #ifdef CONFIG_TRACE_IRQFLAGS - call trace_hardirqs_off + call __trace_hardirqs_off #endif #ifdef CONFIG_CONTEXT_TRACKING
@@ -131,7 +131,7 @@ skip_context_tracking: andi t0, s1, SR_PIE beqz t0, 1f #ifdef CONFIG_TRACE_IRQFLAGS - call trace_hardirqs_on + call __trace_hardirqs_on #endif csrs CSR_STATUS, SR_IE
@@ -222,7 +222,7 @@ ret_from_exception: REG_L s0, PT_STATUS(sp) csrc CSR_STATUS, SR_IE #ifdef CONFIG_TRACE_IRQFLAGS - call trace_hardirqs_off + call __trace_hardirqs_off #endif #ifdef CONFIG_RISCV_M_MODE /* the MPP value is too large to be used as an immediate arg for addi */
@@ -258,10 +258,10 @@ restore_all: REG_L s1, PT_STATUS(sp) andi t0, s1, SR_PIE beqz t0, 1f - call trace_hardirqs_on + call __trace_hardirqs_on j 2f 1: - call trace_hardirqs_off + call __trace_hardirqs_off 2: #endif REG_L a0, PT_STATUS(sp)
arch/riscv/kernel/trace_irq.c new file +27 -0
@@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Copyright (C) 2022 Changbin Du <[email protected]> +*/ + +#include <linux/irqflags.h> +#include <linux/kprobes.h> +#include "trace_irq.h" + +/* +* trace_hardirqs_on/off require the caller to setup frame pointer properly. +* Otherwise, CALLER_ADDR1 might trigger an pagging exception in kernel. +* Here we add one extra level so they can be safely called by low +* level entry code which $fp is used for other purpose. +*/ + +void __trace_hardirqs_on (void ) +{ +trace_hardirqs_on (); +} +NOKPROBE_SYMBOL (__trace_hardirqs_on); + +void __trace_hardirqs_off (void ) +{ +trace_hardirqs_off (); +} +NOKPROBE_SYMBOL (__trace_hardirqs_off);
arch/riscv/kernel/trace_irq.h new file +11 -0
@@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* +* Copyright (C) 2022 Changbin Du <[email protected]> +*/ +#ifndef __TRACE_IRQ_H +#define __TRACE_IRQ_H + +void __trace_hardirqs_on (void ); +void __trace_hardirqs_off (void ); + +#endif /* __TRACE_IRQ_H */
arch/x86/include/asm/fpu/internal.h +8 -5
@@ -531,9 +531,11 @@ static inline void __fpregs_load_activate(void)* The FPU context is only stored/restored for a user task and * PF_KTHREAD is used to distinguish between kernel and user threads. */ -static inline void switch_fpu_prepare (struct fpu *old_fpu,int cpu) +static inline void switch_fpu_prepare (struct task_struct *prev,int cpu) { -if (static_cpu_has (X86_FEATURE_FPU ) && !(current->flags &PF_KTHREAD )) { +struct fpu *old_fpu = &prev->thread.fpu; + +if (static_cpu_has (X86_FEATURE_FPU ) && !(prev->flags &PF_KTHREAD )) {if (!copy_fpregs_to_fpstate (old_fpu)) old_fpu->last_cpu =-1 ;else
@@ -552,10 +554,11 @@ static inline void switch_fpu_prepare(struct fpu *old_fpu, int cpu)* Load PKRU from the FPU context if available. Delay loading of the * complete FPU state until the return to userland. */ -static inline void switch_fpu_finish (struct fpu *new_fpu) +static inline void switch_fpu_finish (struct task_struct *next) {u32 pkru_val = init_pkru_value;struct pkru_state *pk; +struct fpu *next_fpu = &next->thread.fpu;if (!static_cpu_has (X86_FEATURE_FPU ))return ;
@@ -569,7 +572,7 @@ static inline void switch_fpu_finish(struct fpu *new_fpu)* PKRU state is switched eagerly because it needs to be valid before we * return to userland e.g. for a copy_to_user() operation. */ -if (!(current->flags &PF_KTHREAD )) { +if (!(next->flags &PF_KTHREAD )) {/* * If the PKRU bit in xsave.header.xfeatures is not set, * then the PKRU component was in init state, which means
@@ -578,7 +581,7 @@ static inline void switch_fpu_finish(struct fpu *new_fpu)* in memory is not valid. This means pkru_val has to be * set to 0 and not to init_pkru_value. */ - pk =get_xsave_addr (&new_fpu->state.xsave,XFEATURE_PKRU ); + pk =get_xsave_addr (&next_fpu->state.xsave,XFEATURE_PKRU ); pkru_val = pk ? pk->pkru :0 ; }__write_pkru (pkru_val);
arch/x86/kernel/process_32.c +2 -4
@@ -159,14 +159,12 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {struct thread_struct *prev = &prev_p->thread, *next = &next_p->thread; -struct fpu *prev_fpu = &prev->fpu; -struct fpu *next_fpu = &next->fpu;int cpu =smp_processor_id ();/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */ if (!test_thread_flag (TIF_NEED_FPU_LOAD )) -switch_fpu_prepare (prev_fpu, cpu); +switch_fpu_prepare (prev_p, cpu);/* * Save away %gs. No need to save %fs, as it was saved on the
@@ -213,7 +211,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)this_cpu_write (current_task, next_p); -switch_fpu_finish (next_fpu); +switch_fpu_finish (next_p);/* Load the Intel cache allocation PQR MSR. */ resctrl_sched_in ();
arch/x86/kernel/process_64.c +2 -4
@@ -535,15 +535,13 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) {struct thread_struct *prev = &prev_p->thread;struct thread_struct *next = &next_p->thread; -struct fpu *prev_fpu = &prev->fpu; -struct fpu *next_fpu = &next->fpu;int cpu =smp_processor_id ();WARN_ON_ONCE (IS_ENABLED (CONFIG_DEBUG_ENTRY ) &&this_cpu_read (irq_count) !=-1 );if (!test_thread_flag (TIF_NEED_FPU_LOAD )) -switch_fpu_prepare (prev_fpu, cpu); +switch_fpu_prepare (prev_p, cpu);/* We must save %fs and %gs before load_TLS() because * %fs and %gs may be cleared by load_TLS().
@@ -595,7 +593,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)this_cpu_write (current_task, next_p);this_cpu_write (cpu_current_top_of_stack,task_top_of_stack (next_p)); -switch_fpu_finish (next_fpu); +switch_fpu_finish (next_p);/* Reload sp0. */ update_task_stack (next_p);
arch/x86/kvm/mmu/mmu.c +12 -1
@@ -3631,12 +3631,23 @@ static void shadow_page_table_clear_flood(struct kvm_vcpu *vcpu, gva_t addr)walk_shadow_page_lockless_end (vcpu); } +static u32 alloc_apf_token (struct kvm_vcpu *vcpu) +{ +/* make sure the token value is not 0 */ +u32 id = vcpu->arch.apf.id; + +if (id <<12 ==0 ) + vcpu->arch.apf.id =1 ; + +return (vcpu->arch.apf.id++ <<12 ) | vcpu->vcpu_id; +} +static bool kvm_arch_setup_async_pf (struct kvm_vcpu *vcpu,gpa_t cr2_or_gpa,gfn_t gfn) {struct kvm_arch_async_pf arch; - arch.token = (vcpu->arch.apf.id++ <<12 ) | vcpu->vcpu_id; + arch.token =alloc_apf_token (vcpu); arch.gfn = gfn; arch.direct_map = vcpu->arch.mmu->direct_map; arch.cr3 = vcpu->arch.mmu->get_guest_pgd (vcpu);
drivers/ata/pata_hpt37x.c +14 -0
@@ -917,6 +917,20 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) irqmask &= ~0x10 ;pci_write_config_byte (dev,0x5a , irqmask); +/* +* HPT371 chips physically have only one channel, the secondary one, +* but the primary channel registers do exist! Go figure... +* So, we manually disable the non-existing channel here +* (if the BIOS hasn't done this already). +*/ +if (dev->device ==PCI_DEVICE_ID_TTI_HPT371 ) { +u8 mcr1; + +pci_read_config_byte (dev,0x50 , &mcr1); + mcr1 &= ~0x04 ; +pci_write_config_byte (dev,0x50 , mcr1); + } +/* * default to pci clock. make sure MA15/16 are set to output * to prevent drives having problems with 40-pin cables. Needed
drivers/base/dd.c +5 -0
@@ -592,6 +592,9 @@ static int really_probe(struct device *dev, struct device_driver *drv) drv->remove (dev);devres_release_all (dev); +arch_teardown_dma_ops (dev); +kfree (dev->dma_range_map); + dev->dma_range_map =NULL ;driver_sysfs_remove (dev); dev->driver =NULL ;dev_set_drvdata (dev,NULL );
@@ -1168,6 +1171,8 @@ static void __device_release_driver(struct device *dev, struct device *parent)devres_release_all (dev);arch_teardown_dma_ops (dev); +kfree (dev->dma_range_map); + dev->dma_range_map =NULL ; dev->driver =NULL ;dev_set_drvdata (dev,NULL );if (dev->pm_domain && dev->pm_domain->dismiss)
drivers/base/regmap/regmap-irq.c +6 -14
@@ -170,11 +170,9 @@ static void regmap_irq_sync_unlock(struct irq_data *data) ret =regmap_write (map, reg, d->mask_buf[i]);if (d->chip->clear_ack) {if (d->chip->ack_invert && !ret) - ret =regmap_write (map, reg, - d->mask_buf[i]); + ret =regmap_write (map, reg,UINT_MAX );else if (!ret) - ret =regmap_write (map, reg, - ~d->mask_buf[i]); + ret =regmap_write (map, reg,0 ); }if (ret !=0 ) dev_err(d->map->dev, "Failed to ack 0x%x: %d\n",
@@ -509,11 +507,9 @@ static irqreturn_t regmap_irq_thread(int irq, void *d) data->status_buf[i]);if (chip->clear_ack) {if (chip->ack_invert && !ret) - ret =regmap_write (map, reg, - data->status_buf[i]); + ret =regmap_write (map, reg,UINT_MAX );else if (!ret) - ret =regmap_write (map, reg, - ~data->status_buf[i]); + ret =regmap_write (map, reg,0 ); }if (ret !=0 ) dev_err(map->dev, "Failed to ack 0x%x: %d\n",
@@ -745,13 +741,9 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode, d->status_buf[i] & d->mask_buf[i]);if (chip->clear_ack) {if (chip->ack_invert && !ret) - ret =regmap_write (map, reg, - (d->status_buf[i] & - d->mask_buf[i])); + ret =regmap_write (map, reg,UINT_MAX );else if (!ret) - ret =regmap_write (map, reg, - ~(d->status_buf[i] & - d->mask_buf[i])); + ret =regmap_write (map, reg,0 ); }if (ret !=0 ) { dev_err(map->dev, "Failed to ack 0x%x: %d\n",
drivers/clk/ingenic/jz4725b-cgu.c +1 -2
@@ -139,11 +139,10 @@ static const struct ingenic_cgu_clk_info jz4725b_cgu_clocks[] = { }, [JZ4725B_CLK_I2S] = { -"i2s" ,CGU_CLK_MUX |CGU_CLK_DIV |CGU_CLK_GATE , +"i2s" ,CGU_CLK_MUX |CGU_CLK_DIV , .parents = { JZ4725B_CLK_EXT, JZ4725B_CLK_PLL_HALF, -1, -1 }, .mux = { CGU_REG_CPCCR, 31, 1 }, .div = { CGU_REG_I2SCDR, 0, 1, 9, -1, -1, -1 }, - .gate = { CGU_REG_CLKGR, 6 }, }, [JZ4725B_CLK_SPI] = {
drivers/gpio/gpio-tegra186.c +10 -4
@@ -337,9 +337,12 @@ static int tegra186_gpio_of_xlate(struct gpio_chip *chip,return offset + pin; } +#define to_tegra_gpio (x) container_of((x), struct tegra_gpio, gpio) +static void tegra186_irq_ack (struct irq_data *data) { -struct tegra_gpio *gpio =irq_data_get_irq_chip_data (data); +struct gpio_chip *gc =irq_data_get_irq_chip_data (data); +struct tegra_gpio *gpio =to_tegra_gpio (gc);void __iomem *base; base =tegra186_gpio_get_base (gpio, data->hwirq);
@@ -351,7 +354,8 @@ static void tegra186_irq_ack(struct irq_data *data)static void tegra186_irq_mask (struct irq_data *data) { -struct tegra_gpio *gpio =irq_data_get_irq_chip_data (data); +struct gpio_chip *gc =irq_data_get_irq_chip_data (data); +struct tegra_gpio *gpio =to_tegra_gpio (gc);void __iomem *base;u32 value;
@@ -366,7 +370,8 @@ static void tegra186_irq_mask(struct irq_data *data)static void tegra186_irq_unmask (struct irq_data *data) { -struct tegra_gpio *gpio =irq_data_get_irq_chip_data (data); +struct gpio_chip *gc =irq_data_get_irq_chip_data (data); +struct tegra_gpio *gpio =to_tegra_gpio (gc);void __iomem *base;u32 value;
@@ -381,7 +386,8 @@ static void tegra186_irq_unmask(struct irq_data *data)static int tegra186_irq_set_type (struct irq_data *data,unsigned int type) { -struct tegra_gpio *gpio =irq_data_get_irq_chip_data (data); +struct gpio_chip *gc =irq_data_get_irq_chip_data (data); +struct tegra_gpio *gpio =to_tegra_gpio (gc);void __iomem *base;u32 value;
drivers/gpu/drm/amd/amdgpu/soc15.c +4 -1
@@ -1194,8 +1194,11 @@ static int soc15_common_early_init(void *handle)AMD_CG_SUPPORT_SDMA_MGCG |AMD_CG_SUPPORT_SDMA_LS ; +/* +* MMHUB PG needs to be disabled for Picasso for +* stability reasons. +*/ adev->pg_flags =AMD_PG_SUPPORT_SDMA | -AMD_PG_SUPPORT_MMHUB |AMD_PG_SUPPORT_VCN ; }else { adev->cg_flags = AMD_CG_SUPPORT_GFX_MGCG |
drivers/gpu/drm/drm_edid.c +1 -1
@@ -5132,6 +5132,7 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *ediif (!(edid->input &DRM_EDID_INPUT_DIGITAL ))return quirks; + info->color_formats |=DRM_COLOR_FORMAT_RGB444 ;drm_parse_cea_ext (connector, edid);/*
@@ -5180,7 +5181,6 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *ediDRM_DEBUG ("%s: Assigning EDID-1.4 digital sink color depth as %d bpc.\n" , connector->name, info->bpc); - info->color_formats |=DRM_COLOR_FORMAT_RGB444 ;if (edid->features &DRM_EDID_FEATURE_RGB_YCRCB444 ) info->color_formats |=DRM_COLOR_FORMAT_YCRCB444 ;if (edid->features &DRM_EDID_FEATURE_RGB_YCRCB422 )
drivers/gpu/drm/i915/intel_pm.c +11 -11
@@ -3996,6 +3996,17 @@ static int intel_compute_sagv_mask(struct intel_atomic_state *state)return ret; } +if (intel_can_enable_sagv (dev_priv, new_bw_state) != +intel_can_enable_sagv (dev_priv, old_bw_state)) { + ret =intel_atomic_serialize_global_state (&new_bw_state->base); +if (ret) +return ret; + }else if (new_bw_state->pipe_sagv_reject != old_bw_state->pipe_sagv_reject) { + ret =intel_atomic_lock_global_state (&new_bw_state->base); +if (ret) +return ret; + } +for_each_new_intel_crtc_in_state (state, crtc, new_crtc_state, i) {struct skl_pipe_wm *pipe_wm = &new_crtc_state->wm.skl.optimal;
@@ -4010,17 +4021,6 @@ static int intel_compute_sagv_mask(struct intel_atomic_state *state)intel_can_enable_sagv (dev_priv, new_bw_state); } -if (intel_can_enable_sagv (dev_priv, new_bw_state) != -intel_can_enable_sagv (dev_priv, old_bw_state)) { - ret =intel_atomic_serialize_global_state (&new_bw_state->base); -if (ret) -return ret; - }else if (new_bw_state->pipe_sagv_reject != old_bw_state->pipe_sagv_reject) { - ret =intel_atomic_lock_global_state (&new_bw_state->base); -if (ret) -return ret; - } -return 0 ; }
drivers/hwmon/hwmon.c +8 -6
@@ -178,12 +178,14 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index) tzd =devm_thermal_zone_of_sensor_register (dev, index, tdata, &hwmon_thermal_ops); -/* -* If CONFIG_THERMAL_OF is disabled, this returns -ENODEV, -* so ignore that error but forward any other error. -*/ -if (IS_ERR (tzd) && (PTR_ERR (tzd) != -ENODEV )) -return PTR_ERR (tzd); +if (IS_ERR (tzd)) { +if (PTR_ERR (tzd) != -ENODEV ) +return PTR_ERR (tzd); +dev_info (dev,"temp%d_input not attached to any thermal zone\n" , + index +1 ); +devm_kfree (dev, tdata); +return 0 ; + } err =devm_add_action (dev, hwmon_thermal_remove_sensor, &tdata->node);if (err)
drivers/iio/accel/bmc150-accel-core.c +4 -1
@@ -1648,11 +1648,14 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (dev,"Unable to register iio device\n" ); - goto err_trigger_unregister; + goto err_pm_cleanup; }return 0 ; +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (dev); +pm_runtime_disable (dev); err_trigger_unregister:bmc150_accel_unregister_triggers (data,BMC150_ACCEL_TRIGGERS -1 ); err_buffer_cleanup:
drivers/iio/accel/kxcjk-1013.c +4 -1
@@ -1429,11 +1429,14 @@ static int kxcjk1013_probe(struct i2c_client *client, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (&client->dev,"unable to register iio device\n" ); - goto err_buffer_cleanup; + goto err_pm_cleanup; }return 0 ; +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (&client->dev); +pm_runtime_disable (&client->dev); err_buffer_cleanup:iio_triggered_buffer_cleanup (indio_dev); err_trigger_unregister:
drivers/iio/accel/mma9551.c +4 -1
@@ -495,11 +495,14 @@ static int mma9551_probe(struct i2c_client *client, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (&client->dev,"unable to register iio device\n" ); - goto out_poweroff; + goto err_pm_cleanup; }return 0 ; +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (&client->dev); +pm_runtime_disable (&client->dev); out_poweroff:mma9551_set_device_state (client, false);
drivers/iio/accel/mma9553.c +4 -1
@@ -1134,12 +1134,15 @@ static int mma9553_probe(struct i2c_client *client, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (&client->dev,"unable to register iio device\n" ); - goto out_poweroff; + goto err_pm_cleanup; }dev_dbg (&indio_dev->dev,"Registered device %s\n" , name);return 0 ; +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (&client->dev); +pm_runtime_disable (&client->dev); out_poweroff:mma9551_set_device_state (client, false);return ret;
drivers/iio/adc/ad7124.c +1 -1
@@ -74,7 +74,7 @@#define AD7124_CONFIG_REF_SEL (x) FIELD_PREP(AD7124_CONFIG_REF_SEL_MSK, x)#define AD7124_CONFIG_PGA_MSK GENMASK(2, 0)#define AD7124_CONFIG_PGA (x) FIELD_PREP(AD7124_CONFIG_PGA_MSK, x) -#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(7, 6) +#define AD7124_CONFIG_IN_BUFF_MSK GENMASK(6, 5)#define AD7124_CONFIG_IN_BUFF (x) FIELD_PREP(AD7124_CONFIG_IN_BUFF_MSK, x)/* AD7124_FILTER_X */
drivers/iio/adc/men_z188_adc.c +8 -1
@@ -103,6 +103,7 @@ static int men_z188_probe(struct mcb_device *dev,struct z188_adc *adc;struct iio_dev *indio_dev;struct resource *mem; +int ret; indio_dev =devm_iio_device_alloc (&dev->dev,sizeof (struct z188_adc ));if (!indio_dev)
@@ -128,8 +129,14 @@ static int men_z188_probe(struct mcb_device *dev, adc->mem = mem;mcb_set_drvdata (dev, indio_dev); -return iio_device_register (indio_dev); + ret =iio_device_register (indio_dev); +if (ret) + goto err_unmap; + +return 0 ; +err_unmap: +iounmap (adc->base); err:mcb_release_mem (mem);return -ENXIO ;
drivers/iio/gyro/bmg160_core.c +4 -1
@@ -1170,11 +1170,14 @@ int bmg160_core_probe(struct device *dev, struct regmap *regmap, int irq, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (dev,"unable to register iio device\n" ); - goto err_buffer_cleanup; + goto err_pm_cleanup; }return 0 ; +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (dev); +pm_runtime_disable (dev); err_buffer_cleanup:iio_triggered_buffer_cleanup (indio_dev); err_trigger_unregister:
drivers/iio/imu/kmx61.c +4 -1
@@ -1392,7 +1392,7 @@ static int kmx61_probe(struct i2c_client *client, ret =iio_device_register (data->acc_indio_dev);if (ret <0 ) {dev_err (&client->dev,"Failed to register acc iio device\n" ); - goto err_buffer_cleanup_mag; + goto err_pm_cleanup; } ret =iio_device_register (data->mag_indio_dev);
@@ -1405,6 +1405,9 @@ static int kmx61_probe(struct i2c_client *client, err_iio_unregister_acc:iio_device_unregister (data->acc_indio_dev); +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (&client->dev); +pm_runtime_disable (&client->dev); err_buffer_cleanup_mag:if (client->irq >0 )iio_triggered_buffer_cleanup (data->mag_indio_dev);
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +5 -1
@@ -1558,8 +1558,12 @@ static int st_lsm6dsx_read_oneshot(struct st_lsm6dsx_sensor *sensor,if (err <0 )return err; +/* +* we need to wait for sensor settling time before +* reading data in order to avoid corrupted samples +*/ delay =1000000000 / sensor->odr; -usleep_range (delay,2 * delay); +usleep_range (3 * delay,4 * delay); err =st_lsm6dsx_read_locked (hw, addr, &data,sizeof (data));if (err <0 )
drivers/iio/magnetometer/bmc150_magn.c +3 -2
@@ -941,13 +941,14 @@ int bmc150_magn_probe(struct device *dev, struct regmap *regmap, ret =iio_device_register (indio_dev);if (ret <0 ) {dev_err (dev,"unable to register iio device\n" ); - goto err_disable_runtime_pm; + goto err_pm_cleanup; }dev_dbg (dev,"Registered device %s\n" , name);return 0 ; -err_disable_runtime_pm: +err_pm_cleanup: +pm_runtime_dont_use_autosuspend (dev);pm_runtime_disable (dev); err_buffer_cleanup:iio_triggered_buffer_cleanup (indio_dev);
drivers/infiniband/core/cma.c +24 -16
@@ -3321,22 +3321,30 @@ static int cma_resolve_ib_addr(struct rdma_id_private *id_priv)static int cma_bind_addr (struct rdma_cm_id *id,struct sockaddr *src_addr,const struct sockaddr *dst_addr) { -if (!src_addr || !src_addr->sa_family) { - src_addr = (struct sockaddr *) &id->route.addr.src_addr; - src_addr->sa_family = dst_addr->sa_family; -if (IS_ENABLED (CONFIG_IPV6 ) && - dst_addr->sa_family ==AF_INET6 ) { -struct sockaddr_in6 *src_addr6 = (struct sockaddr_in6 *) src_addr; -struct sockaddr_in6 *dst_addr6 = (struct sockaddr_in6 *) dst_addr; - src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; -if (ipv6_addr_type (&dst_addr6->sin6_addr) &IPV6_ADDR_LINKLOCAL ) - id->route.addr.dev_addr.bound_dev_if = dst_addr6->sin6_scope_id; - }else if (dst_addr->sa_family ==AF_IB ) { - ((struct sockaddr_ib *) src_addr)->sib_pkey = - ((struct sockaddr_ib *) dst_addr)->sib_pkey; - } - } -return rdma_bind_addr (id, src_addr); +struct sockaddr_storage zero_sock = {}; + +if (src_addr && src_addr->sa_family) +return rdma_bind_addr (id, src_addr); + +/* +* When the src_addr is not specified, automatically supply an any addr +*/ + zero_sock.ss_family = dst_addr->sa_family; +if (IS_ENABLED (CONFIG_IPV6 ) && dst_addr->sa_family ==AF_INET6 ) { +struct sockaddr_in6 *src_addr6 = + (struct sockaddr_in6 *)&zero_sock; +struct sockaddr_in6 *dst_addr6 = + (struct sockaddr_in6 *)dst_addr; + + src_addr6->sin6_scope_id = dst_addr6->sin6_scope_id; +if (ipv6_addr_type (&dst_addr6->sin6_addr) &IPV6_ADDR_LINKLOCAL ) + id->route.addr.dev_addr.bound_dev_if = + dst_addr6->sin6_scope_id; + }else if (dst_addr->sa_family ==AF_IB ) { + ((struct sockaddr_ib *)&zero_sock)->sib_pkey = + ((struct sockaddr_ib *)dst_addr)->sib_pkey; + } +return rdma_bind_addr (id, (struct sockaddr *)&zero_sock); }/*
drivers/infiniband/ulp/rtrs/rtrs-clt.c +27 -29
115 lines not on this page · raw message
drivers/infiniband/ulp/srp/ib_srp.c +4 -2
@@ -4045,9 +4045,11 @@ static void srp_remove_one(struct ib_device *device, void *client_data)spin_unlock (&host->target_lock);/* -* Wait for tl_err and target port removal tasks. +* srp_queue_remove_work() queues a call to +* srp_remove_target(). The latter function cancels +* target->tl_err_work so waiting for the remove works to +* finish is sufficient. */ -flush_workqueue (system_long_wq);flush_workqueue (srp_remove_wq);kfree (host);
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +3 -0
@@ -100,6 +100,9 @@ MODULE_LICENSE("GPL");MODULE_FIRMWARE (FW_FILE_NAME_E1 );MODULE_FIRMWARE (FW_FILE_NAME_E1H );MODULE_FIRMWARE (FW_FILE_NAME_E2 ); +MODULE_FIRMWARE (FW_FILE_NAME_E1_V15 ); +MODULE_FIRMWARE (FW_FILE_NAME_E1H_V15 ); +MODULE_FIRMWARE (FW_FILE_NAME_E2_V15 );int bnx2x_num_queues;module_param_named (num_queues, bnx2x_num_queues, int,0444 );
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +3 -0
@@ -1926,6 +1926,9 @@ static int bnxt_get_fecparam(struct net_device *dev,case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_RS272_IEEE_ACTIVE : fec->active_fec |=ETHTOOL_FEC_LLRS ;break ; +case PORT_PHY_QCFG_RESP_ACTIVE_FEC_FEC_NONE_ACTIVE : + fec->active_fec |=ETHTOOL_FEC_OFF ; +break ; }return 0 ; }
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +1 -1
@@ -1746,7 +1746,7 @@ static int mlx5e_get_module_eeprom(struct net_device *netdev,if (size_read <0 ) {netdev_err (priv->netdev,"%s: mlx5_query_eeprom failed:0x%x\n" , __func__, size_read); -return 0 ; +return size_read; } i += size_read;
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +2 -1
@@ -985,7 +985,8 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, }/* True when explicitly set via priv flag, or XDP prog is loaded */ -if (test_bit (MLX5E_RQ_STATE_NO_CSUM_COMPLETE , &rq->state)) +if (test_bit (MLX5E_RQ_STATE_NO_CSUM_COMPLETE , &rq->state) || +get_cqe_tls_offload (cqe)) goto csum_unnecessary;/* CQE csum doesn't cover padding octets in short ethernet
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +0 -4
@@ -2037,10 +2037,6 @@ esw_check_vport_match_metadata_supported(const struct mlx5_eswitch *esw)if (!MLX5_CAP_ESW_FLOWTABLE (esw->dev, flow_source))return false; -if (mlx5_core_is_ecpf_esw_manager (esw->dev) || -mlx5_ecpf_vport_exists (esw->dev)) -return false; -return true; }
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +2 -0
@@ -2034,6 +2034,8 @@ void mlx5_del_flow_rules(struct mlx5_flow_handle *handle) fte->node.del_hw_func =NULL ;up_write_ref_node (&fte->node, false);tree_put_node (&fte->node, false); + }else { +up_write_ref_node (&fte->node, false); }kfree (handle); }
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c +2 -2
@@ -922,8 +922,8 @@ nfp_tunnel_add_shared_mac(struct nfp_app *app, struct net_device *netdev, int port, bool mod) {struct nfp_flower_priv *priv = app->priv; -int ida_idx =NFP_MAX_MAC_INDEX , err;struct nfp_tun_offloaded_mac *entry; +int ida_idx =-1 , err;u16 nfp_mac_idx =0 ; entry =nfp_tunnel_lookup_offloaded_macs (app, netdev->dev_addr);
@@ -997,7 +997,7 @@ nfp_tunnel_add_shared_mac(struct nfp_app *app, struct net_device *netdev, err_free_entry:kfree (entry); err_free_ida: -if (ida_idx !=NFP_MAX_MAC_INDEX ) +if (ida_idx !=-1 )ida_simple_remove (&priv->tun.mac_off_ids, ida_idx);return err;
drivers/net/ethernet/xilinx/ll_temac_main.c +2 -0
@@ -1421,6 +1421,8 @@ static int temac_probe(struct platform_device *pdev) lp->indirect_lock =devm_kmalloc (&pdev->dev,sizeof (*lp->indirect_lock),GFP_KERNEL ); +if (!lp->indirect_lock) +return -ENOMEM ;spin_lock_init (lp->indirect_lock); }
drivers/net/usb/cdc_ether.c +12 -0
@@ -570,6 +570,11 @@ static const struct usb_device_id products[] = { .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \ .bInterfaceProtocol = USB_CDC_PROTO_NONE +#define ZAURUS_FAKE_INTERFACE \ + .bInterfaceClass = USB_CLASS_COMM, \ + .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM, \ + .bInterfaceProtocol = USB_CDC_PROTO_NONE +/* SA-1100 based Sharp Zaurus ("collie"), or compatible; * wire-incompatible with true CDC Ethernet implementations. * (And, it seems, needlessly so...)
@@ -623,6 +628,13 @@ static const struct usb_device_id products[] = { .idProduct = 0x9032, /* SL-6000 */ZAURUS_MASTER_INTERFACE , .driver_info = 0, +}, { + .match_flags =USB_DEVICE_ID_MATCH_INT_INFO + |USB_DEVICE_ID_MATCH_DEVICE , + .idVendor = 0x04DD, + .idProduct = 0x9032, /* SL-6000 */ +ZAURUS_FAKE_INTERFACE , + .driver_info = 0, }, { .match_flags =USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE,
drivers/net/usb/cdc_ncm.c +4 -4
@@ -1702,10 +1702,10 @@ int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in) {struct sk_buff *skb;struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0 ]; -int len; +unsigned int len;int nframes;int x; -int offset; +unsigned int offset;union {struct usb_cdc_ncm_ndp16 *ndp16;struct usb_cdc_ncm_ndp32 *ndp32;
@@ -1777,8 +1777,8 @@ int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)break ; } -/* sanity checking */ -if (((offset + len) > skb_in->len) || +/* sanity checking - watch out for integer wrap*/ +if ((offset > skb_in->len) || (len > skb_in->len - offset) || (len > ctx->rx_max) || (len <ETH_HLEN )) { netif_dbg(dev, rx_err, dev->net, "invalid frame detected (ignored) offset[%u]=%u, length=%u, skb=%p\n",
drivers/net/usb/sr9700.c +1 -1
@@ -410,7 +410,7 @@ static int sr9700_rx_fixup(struct usbnet *dev, struct sk_buff *skb)/* ignore the CRC length */ len = (skb->data[1 ] | (skb->data[2 ] <<8 )) -4 ; -if (len >ETH_FRAME_LEN ) +if (len >ETH_FRAME_LEN || len > skb->len)return 0 ;/* the last packet of current skb */
drivers/net/usb/zaurus.c +12 -0
@@ -256,6 +256,11 @@ static const struct usb_device_id products [] = { .bInterfaceSubClass = USB_CDC_SUBCLASS_ETHERNET, \ .bInterfaceProtocol = USB_CDC_PROTO_NONE +#define ZAURUS_FAKE_INTERFACE \ + .bInterfaceClass = USB_CLASS_COMM, \ + .bInterfaceSubClass = USB_CDC_SUBCLASS_MDLM, \ + .bInterfaceProtocol = USB_CDC_PROTO_NONE +/* SA-1100 based Sharp Zaurus ("collie"), or compatible. */ { .match_flags = USB_DEVICE_ID_MATCH_INT_INFO
@@ -313,6 +318,13 @@ static const struct usb_device_id products [] = { .idProduct = 0x9032, /* SL-6000 */ZAURUS_MASTER_INTERFACE , .driver_info = ZAURUS_PXA_INFO, +}, { + .match_flags =USB_DEVICE_ID_MATCH_INT_INFO + |USB_DEVICE_ID_MATCH_DEVICE , + .idVendor = 0x04DD, + .idProduct = 0x9032, /* SL-6000 */ +ZAURUS_FAKE_INTERFACE , + .driver_info = (unsigned long)&bogus_mdlm_info, }, { .match_flags =USB_DEVICE_ID_MATCH_INT_INFO | USB_DEVICE_ID_MATCH_DEVICE,
drivers/platform/x86/surface3_power.c +10 -3
@@ -233,14 +233,21 @@ static int mshw0011_bix(struct mshw0011_data *cdata, struct bix *bix) } bix->last_full_charg_capacity = ret; -/* get serial number */ +/* +* Get serial number, on some devices (with unofficial replacement +* battery?) reading any of the serial number range addresses gets +* nacked in this case just leave the serial number empty. +*/ ret =i2c_smbus_read_i2c_block_data (client,MSHW0011_BAT0_REG_SERIAL_NO ,sizeof (buf), buf); -if (ret !=sizeof (buf)) { +if (ret == -EREMOTEIO ) { +/* no serial number available */ + }else if (ret !=sizeof (buf)) {dev_err (&client->dev,"Error reading serial no: %d\n" , ret);return ret; + }else { +snprintf (bix->serial,ARRAY_SIZE (bix->serial),"%3pE%6pE" , buf +7 , buf); } -snprintf (bix->serial,ARRAY_SIZE (bix->serial),"%3pE%6pE" , buf +7 , buf);/* get cycle count */ ret =i2c_smbus_read_word_data (client,MSHW0011_BAT0_REG_CYCLE_CNT );
drivers/spi/spi-zynq-qspi.c +3 -0
@@ -570,6 +570,9 @@ static int zynq_qspi_exec_mem_op(struct spi_mem *mem,if (op->dummy.nbytes) { tmpbuf =kzalloc (op->dummy.nbytes,GFP_KERNEL ); +if (!tmpbuf) +return -ENOMEM ; +memset (tmpbuf,0xff , op->dummy.nbytes);reinit_completion (&xqspi->data_completion); xqspi->txbuf = tmpbuf;
drivers/tee/optee/core.c +8 -0
@@ -588,6 +588,7 @@ static int optee_remove(struct platform_device *pdev)/* Unregister OP-TEE specific client devices on TEE bus */ optee_unregister_devices (); +teedev_close_context (optee->ctx);/* * Ask OP-TEE to free all cached shared memory objects to decrease * reference counters and also avoid wild pointers in secure world
@@ -633,6 +634,7 @@ static int optee_probe(struct platform_device *pdev)struct optee *optee =NULL ;void *memremaped_shm =NULL ;struct tee_device *teedev; +struct tee_context *ctx;u32 sec_caps;int rc;
@@ -719,6 +721,12 @@ static int optee_probe(struct platform_device *pdev)optee_supp_init (&optee->supp); optee->memremaped_shm = memremaped_shm; optee->pool = pool; + ctx =teedev_open (optee->teedev); +if (IS_ERR (ctx)) { + rc =PTR_ERR (ctx); + goto err; + } + optee->ctx = ctx;/* * Ensure that there are no pre-existing shm objects before enabling
drivers/tee/optee/optee_private.h +2 -0
@@ -70,6 +70,7 @@ struct optee_supp {* struct optee - main service struct * @supp_teedev: supplicant device * @teedev: client device +* @ctx: driver internal TEE context * @invoke_fn: function to issue smc or hvc * @call_queue: queue of threads waiting to call @invoke_fn * @wait_queue: queue of threads from secure world waiting for a
@@ -87,6 +88,7 @@ struct optee {struct tee_device *supp_teedev;struct tee_device *teedev;optee_invoke_fn *invoke_fn; +struct tee_context *ctx;struct optee_call_queue call_queue;struct optee_wait_queue wait_queue;struct optee_supp supp;
drivers/tee/optee/rpc.c +5 -3
@@ -284,6 +284,7 @@ static struct tee_shm *cmd_alloc_suppl(struct tee_context *ctx, size_t sz) }static void handle_rpc_func_cmd_shm_alloc (struct tee_context *ctx, +struct optee *optee,struct optee_msg_arg *arg,struct optee_call_ctx *call_ctx) {
@@ -313,7 +314,8 @@ static void handle_rpc_func_cmd_shm_alloc(struct tee_context *ctx, shm =cmd_alloc_suppl (ctx, sz);break ;case OPTEE_MSG_RPC_SHM_TYPE_KERNEL : - shm =tee_shm_alloc (ctx, sz,TEE_SHM_MAPPED |TEE_SHM_PRIV ); + shm =tee_shm_alloc (optee->ctx, sz, +TEE_SHM_MAPPED |TEE_SHM_PRIV );break ;default : arg->ret =TEEC_ERROR_BAD_PARAMETERS ;
@@ -470,7 +472,7 @@ static void handle_rpc_func_cmd(struct tee_context *ctx, struct optee *optee,break ;case OPTEE_MSG_RPC_CMD_SHM_ALLOC :free_pages_list (call_ctx); -handle_rpc_func_cmd_shm_alloc (ctx, arg, call_ctx); +handle_rpc_func_cmd_shm_alloc (ctx, optee, arg, call_ctx);break ;case OPTEE_MSG_RPC_CMD_SHM_FREE :handle_rpc_func_cmd_shm_free (ctx, arg);
@@ -501,7 +503,7 @@ void optee_handle_rpc(struct tee_context *ctx, struct optee_rpc_param *param,switch (OPTEE_SMC_RETURN_GET_RPC_FUNC (param->a0)) {case OPTEE_SMC_RPC_FUNC_ALLOC : - shm =tee_shm_alloc (ctx, param->a1, + shm =tee_shm_alloc (optee->ctx, param->a1,TEE_SHM_MAPPED |TEE_SHM_PRIV );if (!IS_ERR (shm) && !tee_shm_get_pa (shm,0 , &pa)) {reg_pair_from_64 (¶m->a1, ¶m->a2, pa);
drivers/tee/tee_core.c +4 -2
@@ -43,7 +43,7 @@ static DEFINE_SPINLOCK(driver_lock);static struct class *tee_class;static dev_t tee_devt; -static struct tee_context *teedev_open (struct tee_device *teedev) +struct tee_context *teedev_open (struct tee_device *teedev) {int rc;struct tee_context *ctx;
@@ -70,6 +70,7 @@ static struct tee_context *teedev_open(struct tee_device *teedev)return ERR_PTR (rc); } +EXPORT_SYMBOL_GPL (teedev_open);void teedev_ctx_get (struct tee_context *ctx) {
@@ -96,13 +97,14 @@ void teedev_ctx_put(struct tee_context *ctx)kref_put (&ctx->refcount, teedev_ctx_release); } -static void teedev_close_context (struct tee_context *ctx) +void teedev_close_context (struct tee_context *ctx) {struct tee_device *teedev = ctx->teedev;teedev_ctx_put (ctx);tee_device_put (teedev); } +EXPORT_SYMBOL_GPL (teedev_close_context);static int tee_open (struct inode *inode,struct file *filp) {
drivers/thermal/intel/int340x_thermal/int3400_thermal.c +4 -0
@@ -402,6 +402,10 @@ static void int3400_notify(acpi_handle handle, thermal_prop[3 ] =kasprintf (GFP_KERNEL ,"EVENT=%d" , therm_event); thermal_prop[4 ] =NULL ;kobject_uevent_env (&priv->thermal->device.kobj,KOBJ_CHANGE , thermal_prop); +kfree (thermal_prop[0 ]); +kfree (thermal_prop[1 ]); +kfree (thermal_prop[2 ]); +kfree (thermal_prop[3 ]); } static int int3400_thermal_get_temp(struct thermal_zone_device *thermal,
drivers/tty/n_gsm.c +15 -7
@@ -434,7 +434,7 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci) modembits |=MDM_RTR ;if (dlci->modem_tx &TIOCM_RI ) modembits |=MDM_IC ; -if (dlci->modem_tx &TIOCM_CD ) +if (dlci->modem_tx &TIOCM_CD || dlci->gsm->initiator) modembits |=MDM_DV ;return modembits; }
@@ -1426,6 +1426,9 @@ static void gsm_dlci_close(struct gsm_dlci *dlci)if (dlci->addr !=0 ) {tty_port_tty_hangup (&dlci->port, false);kfifo_reset (&dlci->fifo); +/* Ensure that gsmtty_open() can return. */ +tty_port_set_initialized (&dlci->port,0 ); +wake_up_interruptible (&dlci->port.open_wait); }else dlci->gsm->dead = true;wake_up (&dlci->gsm->event);
@@ -1485,7 +1488,7 @@ static void gsm_dlci_t1(struct timer_list *t) dlci->mode =DLCI_MODE_ADM ;gsm_dlci_open (dlci); }else { -gsm_dlci_close (dlci); +gsm_dlci_begin_close (dlci);/* prevent half open link */ }break ;
@@ -1719,7 +1722,12 @@ static void gsm_dlci_release(struct gsm_dlci *dlci)gsm_destroy_network (dlci);mutex_unlock (&dlci->mutex); -tty_hangup (tty); +/* We cannot use tty_hangup() because in tty_kref_put() the tty +* driver assumes that the hangup queue is free and reuses it to +* queue release_one_tty() -> NULL pointer panic in +* process_one_work(). +*/ +tty_vhangup (tty);tty_port_tty_set (&dlci->port,NULL );tty_kref_put (tty);
@@ -3173,9 +3181,9 @@ static void gsmtty_throttle(struct tty_struct *tty)if (dlci->state ==DLCI_CLOSED )return ;if (C_CRTSCTS (tty)) - dlci->modem_tx &= ~TIOCM_DTR ; + dlci->modem_tx &= ~TIOCM_RTS ; dlci->throttled = true; -/* Send an MSC with DTR cleared */ +/* Send an MSC with RTS cleared */ gsmtty_modem_update (dlci,0 ); }
@@ -3185,9 +3193,9 @@ static void gsmtty_unthrottle(struct tty_struct *tty)if (dlci->state ==DLCI_CLOSED )return ;if (C_CRTSCTS (tty)) - dlci->modem_tx |=TIOCM_DTR ; + dlci->modem_tx |=TIOCM_RTS ; dlci->throttled = false; -/* Send an MSC with DTR set */ +/* Send an MSC with RTS set */ gsmtty_modem_update (dlci,0 ); }
drivers/tty/serial/sc16is7xx.c +3 -0
@@ -734,12 +734,15 @@ static irqreturn_t sc16is7xx_irq(int irq, void *dev_id)static void sc16is7xx_tx_proc (struct kthread_work *ws) {struct uart_port *port = &(to_sc16is7xx_one (ws, tx_work)->port); +struct sc16is7xx_port *s =dev_get_drvdata (port->dev);if ((port->rs485.flags &SER_RS485_ENABLED ) && (port->rs485.delay_rts_before_send >0 ))msleep (port->rs485.delay_rts_before_send); +mutex_lock (&s->efr_lock);sc16is7xx_handle_tx (port); +mutex_unlock (&s->efr_lock); }static void sc16is7xx_reconf_rs485 (struct uart_port *port)
drivers/usb/dwc2/core.h +2 -0
@@ -1406,6 +1406,7 @@ void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg);void dwc2_hsotg_disconnect (struct dwc2_hsotg *dwc2);int dwc2_hsotg_set_test_mode (struct dwc2_hsotg *hsotg,int testmode);#define dwc2_is_device_connected (hsotg) (hsotg->connected) +#define dwc2_is_device_enabled (hsotg) (hsotg->enabled)int dwc2_backup_device_registers (struct dwc2_hsotg *hsotg);int dwc2_restore_device_registers (struct dwc2_hsotg *hsotg,int remote_wakeup);int dwc2_gadget_enter_hibernation (struct dwc2_hsotg *hsotg);
@@ -1434,6 +1435,7 @@ static inline int dwc2_hsotg_set_test_mode(struct dwc2_hsotg *hsotg, int testmode) {return 0 ; }#define dwc2_is_device_connected (hsotg) (0) +#define dwc2_is_device_enabled (hsotg) (0)static inline int dwc2_backup_device_registers (struct dwc2_hsotg *hsotg) {return 0 ; } static inline int dwc2_restore_device_registers(struct dwc2_hsotg *hsotg,
drivers/usb/dwc2/drd.c +4 -2
@@ -109,8 +109,10 @@ static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) already =dwc2_ovr_avalid (hsotg, true); }else if (role ==USB_ROLE_DEVICE ) { already =dwc2_ovr_bvalid (hsotg, true); -/* This clear DCTL.SFTDISCON bit */ -dwc2_hsotg_core_connect (hsotg); +if (dwc2_is_device_enabled (hsotg)) { +/* This clear DCTL.SFTDISCON bit */ +dwc2_hsotg_core_connect (hsotg); + } }else {if (dwc2_is_device_mode (hsotg)) {if (!dwc2_ovr_bvalid (hsotg, false))
drivers/usb/dwc3/dwc3-pci.c +2 -2
@@ -81,8 +81,8 @@ static const struct acpi_gpio_mapping acpi_dwc3_byt_gpios[] = {static struct gpiod_lookup_table platform_bytcr_gpios = { .dev_id ="0000:00:16.0" , .table = { -GPIO_LOOKUP ("INT33FC:00" ,54 ,"reset" ,GPIO_ACTIVE_HIGH ), -GPIO_LOOKUP ("INT33FC:02" ,14 ,"cs" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("INT33FC:00" ,54 ,"cs" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("INT33FC:02" ,14 ,"reset" ,GPIO_ACTIVE_HIGH ), {} }, };
drivers/usb/dwc3/gadget.c +2 -0
@@ -3775,9 +3775,11 @@ static irqreturn_t dwc3_thread_interrupt(int irq, void *_evt)unsigned long flags;irqreturn_t ret =IRQ_NONE ; +local_bh_disable ();spin_lock_irqsave (&dwc->lock, flags); ret =dwc3_process_event_buf (evt);spin_unlock_irqrestore (&dwc->lock, flags); +local_bh_enable ();return ret; }
drivers/usb/gadget/function/rndis.c +8 -0
@@ -922,6 +922,7 @@ struct rndis_params *rndis_register(void (*resp_avail)(void *v), void *v) params->resp_avail = resp_avail; params->v = v;INIT_LIST_HEAD (¶ms->resp_queue); +spin_lock_init (¶ms->resp_lock);pr_debug ("%s: configNr = %d\n" , __func__, i);return params;
@@ -1015,12 +1016,14 @@ void rndis_free_response(struct rndis_params *params, u8 *buf) {rndis_resp_t *r, *n; +spin_lock (¶ms->resp_lock);list_for_each_entry_safe (r, n, ¶ms->resp_queue, list) {if (r->buf == buf) {list_del (&r->list);kfree (r); } } +spin_unlock (¶ms->resp_lock); }EXPORT_SYMBOL_GPL (rndis_free_response);
@@ -1030,14 +1033,17 @@ u8 *rndis_get_next_response(struct rndis_params *params, u32 *length)if (!length)return NULL ; +spin_lock (¶ms->resp_lock);list_for_each_entry_safe (r, n, ¶ms->resp_queue, list) {if (!r->send) { r->send =1 ; *length = r->length; +spin_unlock (¶ms->resp_lock);return r->buf; } } +spin_unlock (¶ms->resp_lock);return NULL ; }EXPORT_SYMBOL_GPL (rndis_get_next_response);
@@ -1054,7 +1060,9 @@ static rndis_resp_t *rndis_add_response(struct rndis_params *params, u32 length) r->length = length; r->send =0 ; +spin_lock (¶ms->resp_lock);list_add_tail (&r->list, ¶ms->resp_queue); +spin_unlock (¶ms->resp_lock);return r; }
drivers/usb/gadget/function/rndis.h +1 -0
@@ -174,6 +174,7 @@ typedef struct rndis_params {void (*resp_avail)(void *v);void *v;struct list_head resp_queue; +spinlock_t resp_lock; } rndis_params;/* RNDIS Message parser and other useless functions */
drivers/usb/gadget/udc/udc-xilinx.c +6 -0
@@ -1612,6 +1612,8 @@ static void xudc_getstatus(struct xusb_udc *udc)break ;case USB_RECIP_ENDPOINT : epnum = udc->setup.wIndex &USB_ENDPOINT_NUMBER_MASK ; +if (epnum >=XUSB_MAX_ENDPOINTS ) + goto stall; target_ep = &udc->ep[epnum]; epcfgreg = udc->read_fn (udc->addr + target_ep->offset); halt = epcfgreg &XUSB_EP_CFG_STALL_MASK ;
@@ -1679,6 +1681,10 @@ static void xudc_set_clear_feature(struct xusb_udc *udc)case USB_RECIP_ENDPOINT :if (!udc->setup.wValue) { endpoint = udc->setup.wIndex &USB_ENDPOINT_NUMBER_MASK ; +if (endpoint >=XUSB_MAX_ENDPOINTS ) { +xudc_ep0_stall (udc); +return ; + } target_ep = &udc->ep[endpoint]; outinbit = udc->setup.wIndex &USB_ENDPOINT_DIR_MASK ; outinbit = outinbit >>7 ;
drivers/usb/host/xhci.c +19 -9
@@ -1091,6 +1091,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)int retval =0 ;bool comp_timer_running = false;bool pending_portevent = false; +bool reinit_xhc = false;if (!hcd->state)return 0 ;
@@ -1107,10 +1108,11 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)set_bit (HCD_FLAG_HW_ACCESSIBLE , &xhci->shared_hcd->flags);spin_lock_irq (&xhci->lock); -if ((xhci->quirks &XHCI_RESET_ON_RESUME ) || xhci->broken_suspend) - hibernated = true; -if (!hibernated) { +if (hibernated || xhci->quirks &XHCI_RESET_ON_RESUME || xhci->broken_suspend) + reinit_xhc = true; + +if (!reinit_xhc) {/* * Some controllers might lose power during suspend, so wait * for controller not ready bit to clear, just as in xHC init.
@@ -1143,12 +1145,17 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)spin_unlock_irq (&xhci->lock);return -ETIMEDOUT ; } - temp =readl (&xhci->op_regs->status); } -/* If restore operation fails, re-initialize the HC during resume */ -if ((temp &STS_SRE ) || hibernated) { + temp =readl (&xhci->op_regs->status); +/* re-initialize the HC on Restore Error, or Host Controller Error */ +if (temp & (STS_SRE |STS_HCE )) { + reinit_xhc = true; +xhci_warn (xhci,"xHC error in resume, USBSTS 0x%x, Reinit\n" , temp); + } + +if (reinit_xhc) {if ((xhci->quirks &XHCI_COMP_MODE_QUIRK ) && !(xhci_all_ports_seen_u0 (xhci))) {del_timer_sync (&xhci->comp_mode_recovery_timer);
@@ -1480,9 +1487,12 @@ static int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flagstruct urb_priv *urb_priv;int num_tds; -if (!urb ||xhci_check_args (hcd, urb->dev, urb->ep, - true, true, __func__) <=0 ) +if (!urb)return -EINVAL ; + ret =xhci_check_args (hcd, urb->dev, urb->ep, + true, true, __func__); +if (ret <=0 ) +return ret ? ret : -EINVAL ; slot_id = urb->dev->slot_id; ep_index =xhci_get_endpoint_index (&urb->ep->desc);
@@ -3282,7 +3292,7 @@ static int xhci_check_streams_endpoint(struct xhci_hcd *xhci,return -EINVAL ; ret =xhci_check_args (xhci_to_hcd (xhci), udev, ep,1 , true, __func__);if (ret <=0 ) -return -EINVAL ; +return ret ? ret : -EINVAL ;if (usb_ss_max_streams (&ep->ss_ep_comp) ==0 ) { xhci_warn(xhci, "WARN: SuperSpeed Endpoint Companion" " descriptor for ep 0x%x does not support streams\n",
drivers/usb/serial/ch341.c +0 -1
@@ -81,7 +81,6 @@#define CH341_QUIRK_SIMULATE_BREAK BIT(1)static const struct usb_device_id id_table[] = { - {USB_DEVICE (0x1a86 ,0x5512 ) }, {USB_DEVICE (0x1a86 ,0x5523 ) }, {USB_DEVICE (0x1a86 ,0x7522 ) }, {USB_DEVICE (0x1a86 ,0x7523 ) },
drivers/usb/serial/option.c +12 -0
@@ -198,6 +198,8 @@ static void option_instat_callback(struct urb *urb);#define DELL_PRODUCT_5821E 0x81d7#define DELL_PRODUCT_5821E_ESIM 0x81e0 +#define DELL_PRODUCT_5829E_ESIM 0x81e4 +#define DELL_PRODUCT_5829E 0x81e6#define KYOCERA_VENDOR_ID 0x0c88#define KYOCERA_PRODUCT_KPC650 0x17da
@@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = { .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM), .driver_info = RSVD(0) | RSVD(1) | RSVD(6) }, + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5829E), + .driver_info = RSVD(0) | RSVD(6) }, + { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM), + .driver_info = RSVD(0) | RSVD(6) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, /* ADU-E100, ADU-310 */ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
@@ -1273,10 +1279,16 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x7011, 0xff), /* Telit LE910-S1 (ECM) */ .driver_info = NCTRL(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x701a, 0xff), /* Telit LE910R1 (RNDIS) */ + .driver_info = NCTRL(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x701b, 0xff), /* Telit LE910R1 (ECM) */ + .driver_info = NCTRL(2) }, { USB_DEVICE(TELIT_VENDOR_ID, 0x9010), /* Telit SBL FN980 flashing device */ .driver_info = NCTRL(0) | ZLP }, { USB_DEVICE(TELIT_VENDOR_ID, 0x9200), /* Telit LE910S1 flashing device */ .driver_info = NCTRL(0) | ZLP }, + { USB_DEVICE(TELIT_VENDOR_ID, 0x9201), /* Telit LE910R1 flashing device */ + .driver_info = NCTRL(0) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), .driver_info = RSVD(1) },
drivers/vhost/vsock.c +14 -7
@@ -573,16 +573,18 @@ static int vhost_vsock_start(struct vhost_vsock *vsock)return ret; } -static int vhost_vsock_stop (struct vhost_vsock *vsock) +static int vhost_vsock_stop (struct vhost_vsock *vsock,bool check_owner) {size_t i; -int ret; +int ret =0 ;mutex_lock (&vsock->dev.mutex); - ret =vhost_dev_check_owner (&vsock->dev); -if (ret) - goto err; +if (check_owner) { + ret =vhost_dev_check_owner (&vsock->dev); +if (ret) + goto err; + }for (i =0 ; i <ARRAY_SIZE (vsock->vqs); i++) {struct vhost_virtqueue *vq = &vsock->vqs[i];
@@ -697,7 +699,12 @@ static int vhost_vsock_dev_release(struct inode *inode, struct file *file)* inefficient. Room for improvement here. */ vsock_for_each_connected_socket (vhost_vsock_reset_orphans); -vhost_vsock_stop (vsock); +/* Don't check the owner, because we are in the release path, so we +* need to stop the vsock device in any case. +* vhost_vsock_stop() can not fail in this case, so we don't need to +* check the return code. +*/ +vhost_vsock_stop (vsock, false);vhost_vsock_flush (vsock);vhost_dev_stop (&vsock->dev);
@@ -801,7 +808,7 @@ static long vhost_vsock_dev_ioctl(struct file *f, unsigned int ioctl,if (start)return vhost_vsock_start (vsock);else -return vhost_vsock_stop (vsock); +return vhost_vsock_stop (vsock, true);case VHOST_GET_FEATURES : features =VHOST_VSOCK_FEATURES ;if (copy_to_user (argp, &features,sizeof (features)))
fs/btrfs/tree-checker.c +15 -0
@@ -947,6 +947,7 @@ static int check_dev_item(struct extent_buffer *leaf, struct btrfs_key *key, int slot) {struct btrfs_dev_item *ditem; +const u32 item_size =btrfs_item_size_nr (leaf, slot);if (key->objectid !=BTRFS_DEV_ITEMS_OBJECTID ) { dev_item_err(leaf, slot,
@@ -954,6 +955,13 @@ static int check_dev_item(struct extent_buffer *leaf, key->objectid, BTRFS_DEV_ITEMS_OBJECTID);return -EUCLEAN ; } + +if (unlikely (item_size !=sizeof (*ditem))) { +dev_item_err (leaf, slot,"invalid item size: has %u expect %zu" , + item_size,sizeof (*ditem)); +return -EUCLEAN ; + } + ditem = btrfs_item_ptr(leaf, slot, struct btrfs_dev_item);if (btrfs_device_id (leaf, ditem) != key->offset) { dev_item_err(leaf, slot,
@@ -989,6 +997,7 @@ static int check_inode_item(struct extent_buffer *leaf,struct btrfs_inode_item *iitem;u64 super_gen =btrfs_super_generation (fs_info->super_copy);u32 valid_mask = (S_IFMT |S_ISUID |S_ISGID |S_ISVTX |0777 ); +const u32 item_size =btrfs_item_size_nr (leaf, slot);u32 mode;int ret;
@@ -996,6 +1005,12 @@ static int check_inode_item(struct extent_buffer *leaf,if (ret <0 )return ret; +if (unlikely (item_size !=sizeof (*iitem))) { +generic_err (leaf, slot,"invalid item size: has %u expect %zu" , + item_size,sizeof (*iitem)); +return -EUCLEAN ; + } + iitem = btrfs_item_ptr(leaf, slot, struct btrfs_inode_item);/* Here we use super block generation + 1 to handle log tree */
fs/configfs/dir.c +14 -0
@@ -36,6 +36,14 @@*/ DEFINE_SPINLOCK (configfs_dirent_lock); +/* +* All of link_obj/unlink_obj/link_group/unlink_group require that +* subsys->su_mutex is held. +* But parent configfs_subsystem is NULL when config_item is root. +* Use this mutex when config_item is root. +*/ +static DEFINE_MUTEX (configfs_subsystem_mutex); +static void configfs_d_iput (struct dentry * dentry,struct inode * inode) {
@@ -1884,7 +1892,9 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys) group->cg_item.ci_name = group->cg_item.ci_namebuf; sd = root->d_fsdata; +mutex_lock (&configfs_subsystem_mutex);link_group (to_config_group (sd->s_element), group); +mutex_unlock (&configfs_subsystem_mutex);inode_lock_nested (d_inode (root),I_MUTEX_PARENT );
@@ -1909,7 +1919,9 @@ int configfs_register_subsystem(struct configfs_subsystem *subsys)inode_unlock (d_inode (root));if (err) { +mutex_lock (&configfs_subsystem_mutex);unlink_group (group); +mutex_unlock (&configfs_subsystem_mutex);configfs_release_fs (); }put_fragment (frag);
@@ -1956,7 +1968,9 @@ void configfs_unregister_subsystem(struct configfs_subsystem *subsys)dput (dentry); +mutex_lock (&configfs_subsystem_mutex);unlink_group (group); +mutex_unlock (&configfs_subsystem_mutex);configfs_release_fs (); }
fs/io_uring.c +1 -0
@@ -4058,6 +4058,7 @@ static int io_add_buffers(struct io_provide_buf *pbuf, struct io_buffer **head) }else {list_add_tail (&buf->list, &(*head)->list); } +cond_resched (); }return i ? i : -ENOMEM ;
fs/tracefs/inode.c +3 -2
@@ -262,7 +262,6 @@ static int tracefs_parse_options(char *data, struct tracefs_mount_opts *opts)if (!gid_valid (gid))return -EINVAL ; opts->gid = gid; -set_gid (tracefs_mount->mnt_root, gid);break ;case Opt_mode:if (match_octal (&args[0 ], &option))
@@ -289,7 +288,9 @@ static int tracefs_apply_options(struct super_block *sb) inode->i_mode |= opts->mode; inode->i_uid = opts->uid; - inode->i_gid = opts->gid; + +/* Set all the group ids to the mount option */ +set_gid (sb->s_root, opts->gid);return 0 ; }
include/linux/tee_drv.h +14 -0
@@ -582,4 +582,18 @@ struct tee_client_driver {#define to_tee_client_driver (d) \ container_of(d, struct tee_client_driver, driver) +/** +* teedev_open() - Open a struct tee_device +* @teedev: Device to open +* +* @return a pointer to struct tee_context on success or an ERR_PTR on failure. +*/ +struct tee_context *teedev_open (struct tee_device *teedev); + +/** +* teedev_close_context() - closes a struct tee_context +* @ctx: The struct tee_context to close +*/ +void teedev_close_context (struct tee_context *ctx); +#endif /*__TEE_DRV_H*/
include/net/checksum.h +27 -21
149 lines not on this page · raw message
include/net/netfilter/nf_tables.h +1 -1
@@ -825,7 +825,7 @@ struct nft_expr_ops {int (*offload)(struct nft_offload_ctx *ctx,struct nft_flow_rule *flow,const struct nft_expr *expr); -u32 offload_flags; +bool (*offload_action)(const struct nft_expr *expr);const struct nft_expr_type *type;void *data; };
include/net/netfilter/nf_tables_offload.h +0 -2
@@ -67,8 +67,6 @@ struct nft_flow_rule {struct flow_rule *rule; }; -#define NFT_OFFLOAD_F_ACTION (1 << 0) -void nft_flow_rule_set_addr_type (struct nft_flow_rule *flow,enum flow_dissector_key_id addr_type);
kernel/bpf/syscall.c +3 -0
@@ -1308,6 +1308,7 @@ int generic_map_delete_batch(struct bpf_map *map,maybe_wait_bpf_programs (map);if (err)break ; +cond_resched (); }if (copy_to_user (&uattr->batch.count, &cp,sizeof (cp))) err = -EFAULT ;
@@ -1365,6 +1366,7 @@ int generic_map_update_batch(struct bpf_map *map,if (err)break ; +cond_resched (); }if (copy_to_user (&uattr->batch.count, &cp,sizeof (cp)))
@@ -1462,6 +1464,7 @@ int generic_map_lookup_batch(struct bpf_map *map,swap (prev_key, key); retry =MAP_LOOKUP_RETRIES ; cp++; +cond_resched (); }if (err == -EFAULT )
kernel/cgroup/cpuset.c +2 -0
@@ -2212,6 +2212,7 @@ static void cpuset_attach(struct cgroup_taskset *tset)cgroup_taskset_first (tset, &css); cs =css_cs (css); +cpus_read_lock ();percpu_down_write (&cpuset_rwsem);/* prepare for attach */
@@ -2267,6 +2268,7 @@ static void cpuset_attach(struct cgroup_taskset *tset)wake_up (&cpuset_attach_wq);percpu_up_write (&cpuset_rwsem); +cpus_read_unlock (); }/* The various types of files and directories in a cpuset file system */
kernel/trace/trace_events_trigger.c +46 -6
88 lines not on this page · raw message
mm/memblock.c +8 -2
@@ -366,14 +366,20 @@ void __init memblock_discard(void) addr =__pa (memblock.reserved.regions); size =PAGE_ALIGN (sizeof (struct memblock_region ) * memblock.reserved.max); -__memblock_free_late (addr, size); +if (memblock_reserved_in_slab) +kfree (memblock.reserved.regions); +else +__memblock_free_late (addr, size); }if (memblock.memory.regions != memblock_memory_init_regions) { addr =__pa (memblock.memory.regions); size =PAGE_ALIGN (sizeof (struct memblock_region ) * memblock.memory.max); -__memblock_free_late (addr, size); +if (memblock_memory_in_slab) +kfree (memblock.memory.regions); +else +__memblock_free_late (addr, size); } memblock_memory =NULL ;
net/core/filter.c +3 -0
@@ -2730,6 +2730,9 @@ BPF_CALL_4(bpf_msg_push_data, struct sk_msg *, msg, u32, start,if (unlikely (flags))return -EINVAL ; +if (unlikely (len ==0 )) +return 0 ; +/* First find the starting scatterlist element */ i = msg->sg.start; do {
net/core/skbuff.c +2 -2
@@ -2139,7 +2139,7 @@ void *__pskb_pull_tail(struct sk_buff *skb, int delta)/* Free pulled out fragments. */ while ((list =skb_shinfo (skb)->frag_list) != insp) {skb_shinfo (skb)->frag_list = list->next; -kfree_skb (list); +consume_skb (list); }/* And insert new clone at head. */ if (clone) {
@@ -6044,7 +6044,7 @@ static int pskb_carve_frag_list(struct sk_buff *skb,/* Free pulled out fragments. */ while ((list = shinfo->frag_list) != insp) { shinfo->frag_list = list->next; -kfree_skb (list); +consume_skb (list); }/* And insert new clone at head. */ if (clone) {
net/ipv4/af_inet.c +4 -1
@@ -1374,8 +1374,11 @@ struct sk_buff *inet_gso_segment(struct sk_buff *skb, } ops =rcu_dereference (inet_offloads[proto]); -if (likely (ops && ops->callbacks.gso_segment)) +if (likely (ops && ops->callbacks.gso_segment)) { segs = ops->callbacks.gso_segment (skb, features); +if (!segs) + skb->network_header =skb_mac_header (skb) + nhoff - skb->head; + }if (IS_ERR_OR_NULL (segs)) goto out;
net/ipv4/ping.c +0 -1
@@ -187,7 +187,6 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident) (int)ident, &ipv6_hdr(skb)->daddr, dif);#endif }else { -pr_err ("ping: protocol(%x) is not supported\n" ,ntohs (skb->protocol));return NULL ; }
net/ipv4/udp_tunnel_nic.c +1 -1
@@ -846,7 +846,7 @@ udp_tunnel_nic_unregister(struct net_device *dev, struct udp_tunnel_nic *utn)list_for_each_entry (node, &info->shared->devices, list)if (node->dev == dev)break ; -if (node->dev != dev) +if (list_entry_is_head (node, &info->shared->devices, list))return ;list_del (&node->list);
net/ipv6/ip6_offload.c +2 -0
@@ -113,6 +113,8 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,if (likely (ops && ops->callbacks.gso_segment)) {skb_reset_transport_header (skb); segs = ops->callbacks.gso_segment (skb, features); +if (!segs) + skb->network_header =skb_mac_header (skb) + nhoff - skb->head; }if (IS_ERR_OR_NULL (segs))
net/netfilter/nf_tables_api.c +9 -4
@@ -5924,12 +5924,15 @@ static int nf_tables_updobj(const struct nft_ctx *ctx, {struct nft_object *newobj;struct nft_trans *trans; -int err; +int err = -ENOMEM ; + +if (!try_module_get (type->owner)) +return -ENOENT ; trans =nft_trans_alloc (ctx,NFT_MSG_NEWOBJ ,sizeof (struct nft_trans_obj ));if (!trans) -return -ENOMEM ; + goto err_trans; newobj =nft_obj_init (ctx, type, attr);if (IS_ERR (newobj)) {
@@ -5946,6 +5949,8 @@ static int nf_tables_updobj(const struct nft_ctx *ctx, err_free_trans:kfree (trans); +err_trans: +module_put (type->owner);return err; }
@@ -7555,7 +7560,7 @@ static void nft_obj_commit_update(struct nft_trans *trans)if (obj->ops->update) obj->ops->update (obj, newobj); -kfree (newobj); +nft_obj_destroy (&trans->ctx, newobj); }static void nft_commit_release (struct nft_trans *trans)
@@ -8202,7 +8207,7 @@ static int __nf_tables_abort(struct net *net, enum nfnl_abort_action action)break ;case NFT_MSG_NEWOBJ :if (nft_trans_obj_update (trans)) { -kfree (nft_trans_obj_newobj (trans)); +nft_obj_destroy (&trans->ctx,nft_trans_obj_newobj (trans));nft_trans_destroy (trans); }else { trans->ctx.table->use--;
net/netfilter/nf_tables_offload.c +2 -1
@@ -94,7 +94,8 @@ struct nft_flow_rule *nft_flow_rule_create(struct net *net, expr =nft_expr_first (rule);while (nft_expr_more (rule, expr)) { -if (expr->ops->offload_flags &NFT_OFFLOAD_F_ACTION ) +if (expr->ops->offload_action && + expr->ops->offload_action (expr)) num_actions++; expr =nft_expr_next (expr);
net/netfilter/nft_dup_netdev.c +6 -0
@@ -67,6 +67,11 @@ static int nft_dup_netdev_offload(struct nft_offload_ctx *ctx,return nft_fwd_dup_netdev_offload (ctx, flow,FLOW_ACTION_MIRRED , oif); } +static bool nft_dup_netdev_offload_action (const struct nft_expr *expr) +{ +return true; +} +static struct nft_expr_type nft_dup_netdev_type;static const struct nft_expr_ops nft_dup_netdev_ops = { .type = &nft_dup_netdev_type,
@@ -75,6 +80,7 @@ static const struct nft_expr_ops nft_dup_netdev_ops = { .init = nft_dup_netdev_init, .dump = nft_dup_netdev_dump, .offload = nft_dup_netdev_offload, + .offload_action = nft_dup_netdev_offload_action, };static struct nft_expr_type nft_dup_netdev_type__read_mostly = {
net/netfilter/nft_fwd_netdev.c +6 -0
@@ -77,6 +77,11 @@ static int nft_fwd_netdev_offload(struct nft_offload_ctx *ctx,return nft_fwd_dup_netdev_offload (ctx, flow,FLOW_ACTION_REDIRECT , oif); } +static bool nft_fwd_netdev_offload_action (const struct nft_expr *expr) +{ +return true; +} +struct nft_fwd_neigh {enum nft_registers sreg_dev:8 ;enum nft_registers sreg_addr:8 ;
@@ -219,6 +224,7 @@ static const struct nft_expr_ops nft_fwd_netdev_ops = { .dump = nft_fwd_netdev_dump, .validate = nft_fwd_validate, .offload = nft_fwd_netdev_offload, + .offload_action = nft_fwd_netdev_offload_action, }; static const struct nft_expr_ops *
net/netfilter/nft_immediate.c +11 -1
@@ -213,6 +213,16 @@ static int nft_immediate_offload(struct nft_offload_ctx *ctx,return 0 ; } +static bool nft_immediate_offload_action (const struct nft_expr *expr) +{ +const struct nft_immediate_expr *priv =nft_expr_priv (expr); + +if (priv->dreg ==NFT_REG_VERDICT ) +return true; + +return false; +} +static const struct nft_expr_ops nft_imm_ops = { .type = &nft_imm_type, .size =NFT_EXPR_SIZE (sizeof (struct nft_immediate_expr )),
@@ -224,7 +234,7 @@ static const struct nft_expr_ops nft_imm_ops = { .dump = nft_immediate_dump, .validate = nft_immediate_validate, .offload = nft_immediate_offload, - .offload_flags = NFT_OFFLOAD_F_ACTION, + .offload_action = nft_immediate_offload_action, };struct nft_expr_type nft_imm_type__read_mostly = {
net/openvswitch/actions.c +38 -8
68 lines not on this page · raw message
net/sched/act_ct.c +0 -5
@@ -514,11 +514,6 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,struct nf_conn *ct;u8 dir; -/* Previously seen or loopback */ - ct =nf_ct_get (skb, &ctinfo); -if ((ct && !nf_ct_is_template (ct)) || ctinfo ==IP_CT_UNTRACKED ) -return false; -switch (family) {case NFPROTO_IPV4 :if (!tcf_ct_flow_table_fill_tuple_ipv4 (skb, &tuple, &tcph))
net/smc/smc_pnet.c +21 -21
158 lines not on this page · raw message
net/smc/smc_pnet.h +1 -1
@@ -29,7 +29,7 @@ struct smc_link_group;* @pnetlist: List of PNETIDs */ struct smc_pnettable { -rwlock_t lock; +struct mutex lock;struct list_head pnetlist; };
net/tipc/name_table.c +1 -1
@@ -931,7 +931,7 @@ static int __tipc_nl_add_nametable_publ(struct tipc_nl_msg *msg,list_for_each_entry (p, &sr->all_publ, all_publ)if (p->key == *last_key)break ; -if (p->key != *last_key) +if (list_entry_is_head (p, &sr->all_publ, all_publ))return -EPIPE ; }else { p = list_first_entry(&sr->all_publ,
net/tipc/socket.c +1 -1
@@ -3743,7 +3743,7 @@ static int __tipc_nl_list_sk_publ(struct sk_buff *skb,if (p->key == *last_publ)break ; } -if (p->key != *last_publ) { +if (list_entry_is_head (p, &tsk->publications, binding_sock)) {/* We never set seq or call nl_dump_check_consistent() * this means that setting prev_seq here will cause the * consistence check to fail in the netlink callback
tools/perf/util/data.c +3 -4
@@ -44,10 +44,6 @@ int perf_data__create_dir(struct perf_data *data, int nr)if (!files)return -ENOMEM ; - data->dir.version =PERF_DIR_VERSION ; - data->dir.files = files; - data->dir.nr = nr; -for (i =0 ; i < nr; i++) {struct perf_data_file *file = &files[i];
@@ -62,6 +58,9 @@ int perf_data__create_dir(struct perf_data *data, int nr) file->fd = ret; } + data->dir.version =PERF_DIR_VERSION ; + data->dir.files = files; + data->dir.nr = nr;return 0 ; out_err:
tools/testing/selftests/bpf/progs/test_sockmap_kern.h +18 -8
@@ -235,7 +235,7 @@ SEC("sk_msg1")int bpf_prog4 (struct sk_msg_md *msg) {int *bytes, zero =0 , one =1 , two =2 , three =3 , four =4 , five =5 ; -int *start, *end, *start_push, *end_push, *start_pop, *pop; +int *start, *end, *start_push, *end_push, *start_pop, *pop, err =0 ; bytes =bpf_map_lookup_elem (&sock_apply_bytes, &zero);if (bytes)
@@ -249,8 +249,11 @@ int bpf_prog4(struct sk_msg_md *msg)bpf_msg_pull_data (msg, *start, *end,0 ); start_push =bpf_map_lookup_elem (&sock_bytes, &two); end_push =bpf_map_lookup_elem (&sock_bytes, &three); -if (start_push && end_push) -bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (start_push && end_push) { + err =bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (err) +return SK_DROP ; + } start_pop =bpf_map_lookup_elem (&sock_bytes, &four); pop =bpf_map_lookup_elem (&sock_bytes, &five);if (start_pop && pop)
@@ -263,6 +266,7 @@ int bpf_prog6(struct sk_msg_md *msg) {int zero =0 , one =1 , two =2 , three =3 , four =4 , five =5 , key =0 ;int *bytes, *start, *end, *start_push, *end_push, *start_pop, *pop, *f; +int err =0 ;__u64 flags =0 ; bytes =bpf_map_lookup_elem (&sock_apply_bytes, &zero);
@@ -279,8 +283,11 @@ int bpf_prog6(struct sk_msg_md *msg) start_push =bpf_map_lookup_elem (&sock_bytes, &two); end_push =bpf_map_lookup_elem (&sock_bytes, &three); -if (start_push && end_push) -bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (start_push && end_push) { + err =bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (err) +return SK_DROP ; + } start_pop =bpf_map_lookup_elem (&sock_bytes, &four); pop =bpf_map_lookup_elem (&sock_bytes, &five);
@@ -338,7 +345,7 @@ SEC("sk_msg5")int bpf_prog10 (struct sk_msg_md *msg) {int *bytes, *start, *end, *start_push, *end_push, *start_pop, *pop; -int zero =0 , one =1 , two =2 , three =3 , four =4 , five =5 ; +int zero =0 , one =1 , two =2 , three =3 , four =4 , five =5 , err =0 ; bytes =bpf_map_lookup_elem (&sock_apply_bytes, &zero);if (bytes)
@@ -352,8 +359,11 @@ int bpf_prog10(struct sk_msg_md *msg)bpf_msg_pull_data (msg, *start, *end,0 ); start_push =bpf_map_lookup_elem (&sock_bytes, &two); end_push =bpf_map_lookup_elem (&sock_bytes, &three); -if (start_push && end_push) -bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (start_push && end_push) { + err =bpf_msg_push_data (msg, *start_push, *end_push,0 ); +if (err) +return SK_PASS ; + } start_pop =bpf_map_lookup_elem (&sock_bytes, &four); pop =bpf_map_lookup_elem (&sock_bytes, &five);if (start_pop && pop)