Linux 5.15.93
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.93 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/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 2 arch/parisc/kernel/firmware.c | 5 arch/parisc/kernel/ptrace.c | 15 + arch/powerpc/perf/imc-pmu.c | 14 - arch/riscv/Makefile | 3 arch/riscv/kernel/probes/kprobes.c | 18 + arch/x86/events/intel/core.c | 1 arch/x86/include/asm/debugreg.h | 26 ++ block/bfq-cgroup.c | 8 block/bfq-iosched.c | 10 - drivers/ata/libata-core.c | 2 drivers/bus/sunxi-rsb.c | 8 drivers/firewire/core-cdev.c | 4 drivers/firmware/efi/efi.c | 2 drivers/firmware/efi/memattr.c | 2 drivers/fpga/stratix10-soc.c | 4 drivers/fsi/fsi-sbefifo.c | 6 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 drivers/gpu/drm/i915/display/intel_cdclk.c | 2 drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 9 drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 10 + drivers/gpu/drm/vc4/vc4_hdmi.c | 3 drivers/i2c/busses/i2c-designware-pcidrv.c | 2 drivers/i2c/busses/i2c-mxs.c | 4 drivers/i2c/busses/i2c-rk3x.c | 44 ++-- drivers/iio/accel/hid-sensor-accel-3d.c | 1 drivers/iio/adc/berlin2-adc.c | 4 drivers/iio/adc/stm32-dfsdm-adc.c | 1 drivers/iio/adc/twl6030-gpadc.c | 32 +++ drivers/iio/gyro/hid-sensor-gyro-3d.c | 1 drivers/iio/imu/fxos8700_core.c | 111 +++++++++--- drivers/infiniband/ulp/rtrs/rtrs-clt.c | 2 drivers/input/serio/i8042-x86ia64io.h | 7 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 6 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 9 drivers/net/ethernet/intel/ice/ice.h | 2 drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 23 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 4 drivers/net/ethernet/intel/ice/ice_ethtool.c | 28 ++- drivers/net/ethernet/intel/ice/ice_main.c | 5 drivers/net/ethernet/intel/igc/igc_ptp.c | 14 - drivers/net/ethernet/qlogic/qede/qede_fp.c | 7 drivers/net/ethernet/sfc/efx.c | 5 drivers/net/phy/dp83822.c | 6 drivers/net/phy/meson-gxl.c | 2 drivers/net/virtio_net.c | 8 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 17 + drivers/nvmem/core.c | 10 - drivers/nvmem/qcom-spmi-sdam.c | 1 drivers/phy/qualcomm/phy-qcom-qmp.c | 89 ++++++--- drivers/platform/x86/dell/dell-wmi-base.c | 3 drivers/platform/x86/gigabyte-wmi.c | 1 drivers/scsi/iscsi_tcp.c | 20 +- drivers/scsi/libiscsi.c | 38 +++- drivers/scsi/scsi_scan.c | 7 drivers/target/target_core_file.c | 4 drivers/target/target_core_tmr.c | 4 drivers/tty/serial/8250/8250_dma.c | 26 ++ drivers/tty/vt/vc_screen.c | 9 drivers/usb/dwc3/dwc3-qcom.c | 2 drivers/usb/gadget/function/f_fs.c | 4 drivers/usb/gadget/function/f_uac2.c | 1 drivers/vhost/net.c | 3 drivers/vhost/vhost.c | 3 drivers/vhost/vhost.h | 1 drivers/video/fbdev/core/fbcon.c | 7 drivers/video/fbdev/smscufx.c | 46 +++- drivers/watchdog/diag288_wdt.c | 15 + drivers/xen/pvcalls-back.c | 8 fs/f2fs/gc.c | 18 + fs/gfs2/aops.c | 2 fs/gfs2/bmap.c | 3 fs/gfs2/glops.c | 44 ++-- fs/gfs2/super.c | 27 +- fs/ntfs3/inode.c | 7 fs/overlayfs/export.c | 2 fs/overlayfs/overlayfs.h | 2 fs/proc/task_mmu.c | 4 fs/squashfs/squashfs_fs.h | 2 fs/squashfs/squashfs_fs_sb.h | 2 fs/squashfs/xattr.h | 4 fs/squashfs/xattr_id.c | 4 include/linux/highmem-internal.h | 4 include/linux/hugetlb.h | 13 + include/linux/nvmem-provider.h | 2 include/linux/util_macros.h | 12 + include/scsi/libiscsi.h | 2 kernel/bpf/verifier.c | 108 ++++++++--- kernel/irq/irqdomain.c | 2 kernel/trace/bpf_trace.c | 3 mm/swapfile.c | 1 net/bridge/br_netfilter_hooks.c | 1 net/can/j1939/transport.c | 4 net/ipv4/tcp_bpf.c | 4 net/ipv6/addrconf.c | 59 +++--- net/netrom/af_netrom.c | 5 net/openvswitch/datapath.c | 12 - net/qrtr/ns.c | 5 net/x25/af_x25.c | 6 sound/pci/hda/patch_realtek.c | 1 sound/pci/hda/patch_via.c | 3 sound/soc/intel/boards/bdw-rt5650.c | 2 sound/soc/intel/boards/bdw-rt5677.c | 2 sound/soc/intel/boards/broadwell.c | 2 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 sound/soc/intel/boards/bxt_rt298.c | 2 sound/soc/intel/boards/bytcht_cx2072x.c | 2 sound/soc/intel/boards/bytcht_da7213.c | 2 sound/soc/intel/boards/bytcht_es8316.c | 24 +- sound/soc/intel/boards/bytcr_rt5640.c | 14 - sound/soc/intel/boards/bytcr_rt5651.c | 4 sound/soc/intel/boards/bytcr_wm5102.c | 2 sound/soc/intel/boards/cht_bsw_max98090_ti.c | 4 sound/soc/intel/boards/cht_bsw_nau8824.c | 4 sound/soc/intel/boards/cht_bsw_rt5645.c | 2 sound/soc/intel/boards/cht_bsw_rt5672.c | 2 sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 sound/soc/intel/boards/haswell.c | 2 tools/testing/selftests/net/udpgso_bench.sh | 24 ++ tools/testing/selftests/net/udpgso_bench_rx.c | 4 tools/testing/selftests/net/udpgso_bench_tx.c | 36 +++ 122 files changed, 922 insertions(+), 394 deletions(-)
Abdun Nihaal (1):
fs/ntfs3: Validate attribute data and valid sizes
Al Viro (4):
WRITE is "data source", not destination...
READ is "data destination", not source...
fix iov_iter_bvec() "direction" argument
fix "direction" argument of iov_iter_kvec()
Alexander Egorenkov (2):
watchdog: diag288_wdt: do not use stack buffers for hardware data
watchdog: diag288_wdt: fix __diag288() inline assembly
Andre Kalb (1):
net: phy: dp83822: Fix null pointer access on DP83825/DP83826 devices
Andreas Gruenbacher (2):
gfs2: Cosmetic gfs2_dinode_{in,out} cleanup
gfs2: Always check inode size of inline inodes
Andreas Kemnade (2):
iio:adc:twl6030: Enable measurements of VUSB, VBAT and others iio:adc:twl6030: Enable measurement of VAC
Andreas Schwab (1):
riscv: disable generation of unwind tables
Andrei Gherzan (4):
selftests: net: udpgso_bench_rx: Fix 'used uninitialized' compiler warning
selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided
selftests: net: udpgso_bench: Fix racing bug between the rx/tx programs
selftests: net: udpgso_bench_tx: Cater for pending datagrams zerocopy benchmarking
Andy Shevchenko (4):
ASoC: Intel: bytcht_es8316: Drop reference count of ACPI device after use
ASoC: Intel: bytcr_rt5651: Drop reference count of ACPI device after use
ASoC: Intel: bytcr_rt5640: Drop reference count of ACPI device after use
ASoC: Intel: bytcr_wm5102: Drop reference count of ACPI device after use
Anton Gusev (1):
efi: fix potential NULL deref in efi_mem_reserve_persistent
Ard Biesheuvel (1):
efi: Accept version 2 of memory attributes table
Artemii Karasev (1):
ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path()
Aurabindo Pillai (1):
drm/amd/display: Fix timing not changning when freesync video is enabled
Basavaraj Natikar (1):
i2c: designware-pci: Add new PCI IDs for AMD NAVI GPU
Carlos Song (9):
iio: imu: fxos8700: fix ACCEL measurement range selection
iio: imu: fxos8700: fix incomplete ACCEL and MAGN channels readback
iio: imu: fxos8700: fix IMU data bits returned to user space
iio: imu: fxos8700: fix map label of channel type to MAGN sensor
iio: imu: fxos8700: fix swapped ACCEL and MAGN channels readback
iio: imu: fxos8700: fix incorrect ODR mode readback
iio: imu: fxos8700: fix failed initialization ODR mode assignment
iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN
iio: imu: fxos8700: fix MAGN sensor scale and unit
Chaitanya Kumar Borah (1):
drm/i915/adlp: Fix typo for reference clock
Chao Yu (1):
f2fs: fix to do sanity check on i_extra_isize in is_alive()
Chris Healy (1):
net: phy: meson-gxl: Add generic dummy stubs for MMD register access
Damien Le Moal (1):
ata: libata: Fix sata_down_spd_limit() when no link speed is reported
Dave Ertman (1):
ice: Prevent set_channel from changing queues while RDMA active
Dmitry Perchanov (2):
iio: hid: fix the retval in accel_3d_capture_sample
iio: hid: fix the retval in gyro_3d_capture_sample
Dongliang Mu (1):
fbdev: smscufx: fix error handling code in ufx_usb_probe
Eduard Zingerman (1):
bpf: Fix to preserve reg parent/live fields when copying range info
Eric Auger (1):
vhost/net: Clear the pending messages when the backend is removed
Fedor Pchelkin (2):
squashfs: harden sanity check in squashfs_read_xattr_id_table
net: openvswitch: fix flow memory leak in ovs_flow_cmd_new
Florian Westphal (1):
netfilter: br_netfilter: disable sabotage_in hook after first suppression
George Kennedy (1):
vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF
Greg Kroah-Hartman (2):
kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup() Linux 5.15.93
Guo Ren (1):
riscv: kprobe: Fixup kernel panic when probing an illegal position
Hans Verkuil (1):
drm/vc4: hdmi: make CEC adapter name unique
Hao Sun (1):
bpf: Skip invalid kfunc call in backtrack_insn
Helge Deller (2):
parisc: Fix return code of pdc_iodc_print()
parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case
Hyunwoo Kim (2):
netrom: Fix use-after-free caused by accept on already connected socket net/x25: Fix to not accept on connected socket
Ilpo Järvinen (2):
serial: 8250_dma: Fix DMA Rx completion race
serial: 8250_dma: Fix DMA Rx rearm race
Jakub Sitnicki (1):
bpf, sockmap: Check for any of tcp_bpf_prots when cloning a listener
Joerg Roedel (1):
x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses
Johan Hovold (6):
nvmem: qcom-spmi-sdam: fix module autoloading
phy: qcom-qmp-combo: disable runtime PM on unbind
phy: qcom-qmp-combo: fix memleak on probe deferral
phy: qcom-qmp-usb: fix memleak on probe deferral
phy: qcom-qmp-combo: fix broken power on
phy: qcom-qmp-combo: fix runtime suspend
John Harrison (1):
drm/i915/guc: Fix locking when searching for a hung request
Kan Liang (1):
perf/x86/intel: Add Emerald Rapids
Kees Cook (1):
ovl: Use "buf" flexible array for memcpy() destination
Kevin Kuriakose (1):
platform/x86: gigabyte-wmi: add support for B450M DS3H WIFI-CF
Koba Ko (1):
platform/x86: dell-wmi: Add a keymap for KEY_MUTE in type 0x0010 table
Longlong Xia (1):
mm/swapfile: add cond_resched() in get_swap_pages()
Magnus Karlsson (4):
qede: execute xdp_do_flush() before napi_complete_done()
virtio-net: execute xdp_do_flush() before napi_complete_done()
dpaa_eth: execute xdp_do_flush() before napi_complete_done()
dpaa2-eth: execute xdp_do_flush() before napi_complete_done()
Martin K. Petersen (1):
scsi: Revert "scsi: core: map PQ=1, PDT=other values to SCSI_SCAN_TARGET_PRESENT"
Martin KaFai Lau (2):
bpf: Support <8-byte scalar spill and refill
bpf: Do not reject when the stack read size is different from the tracked scalar size
Matthew Wilcox (Oracle) (1):
highmem: round down the address passed to kunmap_flush_on_unmap()
Maurizio Lombardi (1):
scsi: target: core: Fix warning on RT kernels
Michael Ellerman (1):
powerpc/imc-pmu: Revert nest_init_lock to being a mutex
Michael Walle (1):
nvmem: core: fix cell removal on error
Mike Christie (2):
scsi: iscsi_tcp: Fix UAF during logout when accessing the shost ipaddress
scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress
Mike Kravetz (1):
mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps
Minsuk Kang (1):
wifi: brcmfmac: Check the count value of channel spec to prevent out-of-bounds reads
Natalia Petrova (1):
net: qrtr: free memory on error path in radix_tree_insert()
Neil Armstrong (1):
usb: dwc3: qcom: enable vbus override when in OTG dr-mode
NeilBrown (1):
block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC"
Olivier Moysan (1):
iio: adc: stm32-dfsdm: fill module aliases
Parav Pandit (1):
virtio-net: Keep stop() to follow mirror sequence of open()
Paul Chaignon (1):
bpf: Fix incorrect state pruning for <8B spill/fill
Phillip Lougher (1):
Squashfs: fix handling and sanity checking of xattr_ids count
Pierluigi Passaro (1):
arm64: dts: imx8mm: Fix pad control for UART1_DTE_RX
Pierre-Louis Bossart (2):
ASoC: Intel: boards: fix spelling in comments
ASoC: Intel: bytcht_es8316: move comment to the right place
Pratham Pratap (1):
usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints
Randy Dunlap (1):
i2c: rk3x: fix a bunch of kernel-doc warnings
Rob Clark (1):
drm/i915: Fix potential bit_17 double-free
Russell King (Oracle) (2):
nvmem: core: initialise nvmem->id early
nvmem: core: remove nvmem_config wp_gpio
Samuel Thibault (1):
fbcon: Check font dimension limits
Stefan Wahren (1):
i2c: mxs: suppress probe-deferral error message
Takashi Sakamoto (1):
firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region
Thomas Winter (2):
ip/ip6_gre: Fix changing addr gen mode not generating IPv6 link local address ip/ip6_gre: Fix non-point-to-point tunnel not generating IPv6 link local address
Tom Rix (1):
igc: return an error if the mac type is unknown in igc_ptp_systim_to_hwtstamp()
Udipto Goswami (1):
usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait
Victor Shyba (1):
ALSA: hda/realtek: Add Acer Predator PH315-54
Werner Sembach (1):
Input: i8042 - add Clevo PCX0DX to i8042 quirk table
Xiongfeng Wang (1):
iio: adc: berlin2-adc: Add missing of_node_put() in error path
Yonghong Song (1):
bpf: Fix a possible task gone issue with bpf_send_signal[_thread]() helpers
Yu Kuai (2):
block, bfq: replace 0/1 with false/true in bic apis block, bfq: fix uaf for bfqq in bic_set_bfqq()
Yuan Can (1):
bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
Zheng Yongjun (1):
fpga: stratix10-soc: Fix return value check in s10_ops_write_init()
Ziyang Xuan (1):
can: j1939: fix errant WARN_ON_ONCE in j1939_session_deactivate
Íñigo Huguet (1):
sfc: correctly advertise tunneled IPv6 segmentation
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 92 +SUBLEVEL = 93 EXTRAVERSION = NAME = Trick or Treat
arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h +1 -1
@@ -601,7 +601,7 @@#define MX8MM_IOMUXC_UART1_RXD_GPIO5_IO22 0x234 0x49C 0x000 0x5 0x0#define MX8MM_IOMUXC_UART1_RXD_TPSMP_HDATA24 0x234 0x49C 0x000 0x7 0x0#define MX8MM_IOMUXC_UART1_TXD_UART1_DCE_TX 0x238 0x4A0 0x000 0x0 0x0 -#define MX8MM_IOMUXC_UART1_TXD_UART1_DTE_RX 0x238 0x4A0 0x4F4 0x0 0x0 +#define MX8MM_IOMUXC_UART1_TXD_UART1_DTE_RX 0x238 0x4A0 0x4F4 0x0 0x1#define MX8MM_IOMUXC_UART1_TXD_ECSPI3_MOSI 0x238 0x4A0 0x000 0x1 0x0#define MX8MM_IOMUXC_UART1_TXD_GPIO5_IO23 0x238 0x4A0 0x000 0x5 0x0#define MX8MM_IOMUXC_UART1_TXD_TPSMP_HDATA25 0x238 0x4A0 0x000 0x7 0x0
arch/parisc/kernel/firmware.c +3 -2
@@ -1230,7 +1230,7 @@ static char __attribute__((aligned(64))) iodc_dbuf[4096];*/ int pdc_iodc_print (const unsigned char *str,unsigned count) { -unsigned int i; +unsigned int i, found =0 ;unsigned long flags;for (i =0 ; i < count;) {
@@ -1239,6 +1239,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count) iodc_dbuf[i+0 ] ='\r' ; iodc_dbuf[i+1 ] ='\n' ; i +=2 ; + found =1 ; goto print;default : iodc_dbuf[i] = str[i];
@@ -1255,7 +1256,7 @@ int pdc_iodc_print(const unsigned char *str, unsigned count) __pa(iodc_retbuf), 0, __pa(iodc_dbuf), i, 0);spin_unlock_irqrestore (&pdc_lock, flags); -return i; +return i - found; }#if !defined(BOOTLOADER )
arch/parisc/kernel/ptrace.c +13 -2
@@ -127,6 +127,12 @@ long arch_ptrace(struct task_struct *child, long request,unsigned long tmp;long ret = -EIO ; +unsigned long user_regs_struct_size =sizeof (struct user_regs_struct ); +#ifdef CONFIG_64BIT +if (is_compat_task ()) + user_regs_struct_size /=2 ; +#endif +switch (request) {/* Read the word at location addr in the USER area. For ptraced
@@ -182,14 +188,14 @@ long arch_ptrace(struct task_struct *child, long request,return copy_regset_to_user (child,task_user_regset_view (current),REGSET_GENERAL , -0 ,sizeof (struct user_regs_struct ), +0 , user_regs_struct_size, datap);case PTRACE_SETREGS :/* Set all gp regs in the child. */ return copy_regset_from_user (child,task_user_regset_view (current),REGSET_GENERAL , -0 ,sizeof (struct user_regs_struct ), +0 , user_regs_struct_size, datap);case PTRACE_GETFPREGS :/* Get the child FPU state. */
@@ -303,6 +309,11 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, } }break ; +case PTRACE_GETREGS : +case PTRACE_SETREGS : +case PTRACE_GETFPREGS : +case PTRACE_SETFPREGS : +return arch_ptrace (child, request, addr, data);default : ret =compat_ptrace_request (child, request, addr, data);
arch/powerpc/perf/imc-pmu.c +7 -7
@@ -21,7 +21,7 @@* Used to avoid races in counting the nest-pmu units during hotplug * register and unregister */ -static DEFINE_SPINLOCK (nest_init_lock); +static DEFINE_MUTEX (nest_init_lock); static DEFINE_PER_CPU(struct imc_pmu_ref *, local_nest_imc_refc);static struct imc_pmu **per_nest_pmu_arr;static cpumask_t nest_imc_cpumask;
@@ -1622,7 +1622,7 @@ static void imc_common_mem_free(struct imc_pmu *pmu_ptr)static void imc_common_cpuhp_mem_free (struct imc_pmu *pmu_ptr) {if (pmu_ptr->domain ==IMC_DOMAIN_NEST ) { -spin_lock (&nest_init_lock); +mutex_lock (&nest_init_lock);if (nest_pmus ==1 ) {cpuhp_remove_state (CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE );kfree (nest_imc_refc);
@@ -1632,7 +1632,7 @@ static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)if (nest_pmus >0 ) nest_pmus--; -spin_unlock (&nest_init_lock); +mutex_unlock (&nest_init_lock); }/* Free core_imc memory */
@@ -1789,11 +1789,11 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id* rest. To handle the cpuhotplug callback unregister, we track * the number of nest pmus in "nest_pmus". */ -spin_lock (&nest_init_lock); +mutex_lock (&nest_init_lock);if (nest_pmus ==0 ) { ret =init_nest_pmu_ref ();if (ret) { -spin_unlock (&nest_init_lock); +mutex_unlock (&nest_init_lock);kfree (per_nest_pmu_arr); per_nest_pmu_arr =NULL ; goto err_free_mem;
@@ -1801,7 +1801,7 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id/* Register for cpu hotplug notification. */ ret =nest_pmu_cpumask_init ();if (ret) { -spin_unlock (&nest_init_lock); +mutex_unlock (&nest_init_lock);kfree (nest_imc_refc);kfree (per_nest_pmu_arr); per_nest_pmu_arr =NULL ;
@@ -1809,7 +1809,7 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id } } nest_pmus++; -spin_unlock (&nest_init_lock); +mutex_unlock (&nest_init_lock);break ;case IMC_DOMAIN_CORE : ret =core_imc_pmu_cpumask_init ();
arch/riscv/Makefile +3 -0
@@ -76,6 +76,9 @@ ifeq ($(CONFIG_PERF_EVENTS),y) KBUILD_CFLAGS += -fno-omit-frame-pointer endif +# Avoid generating .eh_frame sections. +KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables + KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax) KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)
arch/riscv/kernel/probes/kprobes.c +18 -0
@@ -46,6 +46,21 @@ static void __kprobes arch_simulate_insn(struct kprobe *p, struct pt_regs *regs)post_kprobe_handler (p, kcb, regs); } +static bool __kprobes arch_check_kprobe (struct kprobe *p) +{ +unsigned long tmp = (unsigned long )p->addr - p->offset; +unsigned long addr = (unsigned long )p->addr; + +while (tmp <= addr) { +if (tmp == addr) +return true; + + tmp +=GET_INSN_LENGTH (*(u16 *)tmp); + } + +return false; +} +int __kprobes arch_prepare_kprobe (struct kprobe *p) {unsigned long probe_addr = (unsigned long )p->addr;
@@ -56,6 +71,9 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p)return -EINVAL ; } +if (!arch_check_kprobe (p)) +return -EILSEQ ; +/* copy instruction */ p->opcode = *p->addr;
arch/x86/events/intel/core.c +1 -0
@@ -6109,6 +6109,7 @@ __init int intel_pmu_init(void)break ;case INTEL_FAM6_SAPPHIRERAPIDS_X : +case INTEL_FAM6_EMERALDRAPIDS_X : pmem = true; x86_pmu.late_ack = true;memcpy (hw_cache_event_ids, spr_hw_cache_event_ids,sizeof (hw_cache_event_ids));
arch/x86/include/asm/debugreg.h +24 -2
@@ -39,7 +39,20 @@ static __always_inline unsigned long native_get_debugreg(int regno) asm("mov %%db6, %0" :"=r" (val));break ;case 7 : - asm("mov %%db7, %0" :"=r" (val)); +/* +* Apply __FORCE_ORDER to DR7 reads to forbid re-ordering them +* with other code. +* +* This is needed because a DR7 access can cause a #VC exception +* when running under SEV-ES. Taking a #VC exception is not a +* safe thing to do just anywhere in the entry code and +* re-ordering might place the access into an unsafe location. +* +* This happened in the NMI handler, where the DR7 read was +* re-ordered to happen before the call to sev_es_ist_enter(), +* causing stack recursion. +*/ + asm volatile("mov %%db7, %0" : "=r" (val) : __FORCE_ORDER);break ;default :BUG ();
@@ -66,7 +79,16 @@ static __always_inline void native_set_debugreg(int regno, unsigned long value) asm("mov %0, %%db6" ::"r" (value));break ;case 7 : - asm("mov %0, %%db7" ::"r" (value)); +/* +* Apply __FORCE_ORDER to DR7 writes to forbid re-ordering them +* with other code. +* +* While is didn't happen with a DR7 write (see the DR7 read +* comment above which explains where it happened), add the +* __FORCE_ORDER here too to avoid similar problems in the +* future. +*/ + asm volatile("mov %0, %%db7" ::"r" (value), __FORCE_ORDER);break ;default :BUG ();
block/bfq-cgroup.c +4 -4
@@ -713,15 +713,15 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,struct bfq_io_cq *bic, struct bfq_group *bfqg) { - struct bfq_queue *async_bfqq = bic_to_bfqq(bic, 0); -struct bfq_queue *sync_bfqq =bic_to_bfqq (bic,1 ); + struct bfq_queue *async_bfqq = bic_to_bfqq(bic, false); +struct bfq_queue *sync_bfqq =bic_to_bfqq (bic, true);struct bfq_entity *entity;if (async_bfqq) { entity = &async_bfqq->entity;if (entity->sched_data != &bfqg->sched_data) { -bic_set_bfqq (bic,NULL ,0 ); +bic_set_bfqq (bic,NULL , false);bfq_release_process_ref (bfqd, async_bfqq); } }
@@ -756,8 +756,8 @@ static void *__bfq_bic_change_cgroup(struct bfq_data *bfqd,* request from the old cgroup. */ bfq_put_cooperator (sync_bfqq); +bic_set_bfqq (bic,NULL , true);bfq_release_process_ref (bfqd, sync_bfqq); -bic_set_bfqq (bic,NULL ,1 ); } } }
block/bfq-iosched.c +6 -4
@@ -3046,7 +3046,7 @@ bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic,/* * Merge queues (that is, let bic redirect its requests to new_bfqq) */ -bic_set_bfqq (bic, new_bfqq,1 ); +bic_set_bfqq (bic, new_bfqq, true);bfq_mark_bfqq_coop (new_bfqq);/* * new_bfqq now belongs to at least two bics (it is a shared queue):
@@ -5359,9 +5359,11 @@ static void bfq_check_ioprio_change(struct bfq_io_cq *bic, struct bio *bio) bfqq =bic_to_bfqq (bic, false);if (bfqq) { -bfq_release_process_ref (bfqd, bfqq); - bfqq =bfq_get_queue (bfqd, bio,BLK_RW_ASYNC , bic, true); +struct bfq_queue *old_bfqq = bfqq; + + bfqq =bfq_get_queue (bfqd, bio, false, bic, true);bic_set_bfqq (bic, bfqq, false); +bfq_release_process_ref (bfqd, old_bfqq); } bfqq =bic_to_bfqq (bic, true);
@@ -6475,7 +6477,7 @@ bfq_split_bfqq(struct bfq_io_cq *bic, struct bfq_queue *bfqq)return bfqq; } -bic_set_bfqq (bic,NULL ,1 ); +bic_set_bfqq (bic,NULL , true);bfq_put_cooperator (bfqq);
drivers/ata/libata-core.c +1 -1
@@ -3076,7 +3076,7 @@ int sata_down_spd_limit(struct ata_link *link, u32 spd_limit)*/ if (spd >1 ) mask &= (1 << (spd -1 )) -1 ; -else +else if (link->sata_spd)return -EINVAL ;/* were we already at the bottom? */
drivers/bus/sunxi-rsb.c +7 -1
@@ -861,7 +861,13 @@ static int __init sunxi_rsb_init(void)return ret; } -return platform_driver_register (&sunxi_rsb_driver); + ret =platform_driver_register (&sunxi_rsb_driver); +if (ret) { +bus_unregister (&sunxi_rsb_bus); +return ret; + } + +return 0 ; }module_init (sunxi_rsb_init);
drivers/firewire/core-cdev.c +3 -1
@@ -818,8 +818,10 @@ static int ioctl_send_response(struct client *client, union ioctl_arg *arg) r = container_of(resource, struct inbound_transaction_resource, resource); -if (is_fcp_request (r->request)) +if (is_fcp_request (r->request)) { +kfree (r->data); goto out; + }if (a->length !=fw_get_response_length (r->request)) { ret = -EINVAL ;
drivers/firmware/efi/efi.c +2 -0
@@ -950,6 +950,8 @@ int __ref efi_mem_reserve_persistent(phys_addr_t addr, u64 size)/* first try to find a slot in an existing linked list entry */ for (prsv = efi_memreserve_root->next; prsv; ) { rsv =memremap (prsv,sizeof (*rsv),MEMREMAP_WB ); +if (!rsv) +return -ENOMEM ; index =atomic_fetch_add_unless (&rsv->count,1 , rsv->size);if (index < rsv->size) { rsv->entry[index].base = addr;
drivers/firmware/efi/memattr.c +1 -1
@@ -33,7 +33,7 @@ int __init efi_memattr_init(void)return -ENOMEM ; } -if (tbl->version >1 ) { +if (tbl->version >2 ) {pr_warn ("Unexpected EFI Memory Attributes table version %d\n" , tbl->version); goto unmap;
drivers/fpga/stratix10-soc.c +2 -2
@@ -213,9 +213,9 @@ static int s10_ops_write_init(struct fpga_manager *mgr,/* Allocate buffers from the service layer's pool. */ for (i =0 ; i <NUM_SVC_BUFS ; i++) { kbuf =stratix10_svc_allocate_memory (priv->chan,SVC_BUF_SIZE ); -if (!kbuf) { +if (IS_ERR (kbuf)) {s10_free_buffers (mgr); - ret = -ENOMEM ; + ret =PTR_ERR (kbuf); goto init_done; }
drivers/fsi/fsi-sbefifo.c +3 -3
@@ -640,7 +640,7 @@ static void sbefifo_collect_async_ffdc(struct sbefifo *sbefifo) } ffdc_iov.iov_base = ffdc; ffdc_iov.iov_len =SBEFIFO_MAX_FFDC_SIZE ; -iov_iter_kvec (&ffdc_iter,WRITE , &ffdc_iov,1 ,SBEFIFO_MAX_FFDC_SIZE ); +iov_iter_kvec (&ffdc_iter,READ , &ffdc_iov,1 ,SBEFIFO_MAX_FFDC_SIZE ); cmd[0 ] =cpu_to_be32 (2 ); cmd[1 ] =cpu_to_be32 (SBEFIFO_CMD_GET_SBE_FFDC ); rc =sbefifo_do_command (sbefifo, cmd,2 , &ffdc_iter);
@@ -737,7 +737,7 @@ int sbefifo_submit(struct device *dev, const __be32 *command, size_t cmd_len, rbytes = (*resp_len) *sizeof (__be32); resp_iov.iov_base = response; resp_iov.iov_len = rbytes; -iov_iter_kvec (&resp_iter,WRITE , &resp_iov,1 , rbytes); +iov_iter_kvec (&resp_iter,READ , &resp_iov,1 , rbytes);/* Perform the command */ mutex_lock (&sbefifo->lock);
@@ -817,7 +817,7 @@ static ssize_t sbefifo_user_read(struct file *file, char __user *buf,/* Prepare iov iterator */ resp_iov.iov_base = buf; resp_iov.iov_len = len; -iov_iter_init (&resp_iter,WRITE , &resp_iov,1 , len); +iov_iter_init (&resp_iter,READ , &resp_iov,1 , len);/* Perform the command */ mutex_lock (&sbefifo->lock);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +7 -0
@@ -10136,6 +10136,13 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,if (!dm_old_crtc_state->stream) goto skip_modeset; +/* Unset freesync video if it was active before */ +if (dm_old_crtc_state->freesync_config.state ==VRR_STATE_ACTIVE_FIXED ) { + dm_new_crtc_state->freesync_config.state =VRR_STATE_INACTIVE ; + dm_new_crtc_state->freesync_config.fixed_refresh_in_uhz =0 ; + } + +/* Now check if we should set freesync video mode */ if (amdgpu_freesync_vid_mode && dm_new_crtc_state->stream &&is_timing_unchanged_for_freesync (new_crtc_state, old_crtc_state)) {
drivers/gpu/drm/i915/display/intel_cdclk.c +1 -1
@@ -1269,7 +1269,7 @@ static const struct intel_cdclk_vals adlp_cdclk_table[] = { { .refclk = 24000, .cdclk = 192000, .divider = 2, .ratio = 16 }, { .refclk = 24000, .cdclk = 312000, .divider = 2, .ratio = 26 }, { .refclk = 24000, .cdclk = 552000, .divider = 2, .ratio = 46 }, - { .refclk = 24400, .cdclk = 648000, .divider = 2, .ratio = 54 }, + { .refclk = 24000, .cdclk = 648000, .divider = 2, .ratio = 54 }, { .refclk = 38400, .cdclk = 179200, .divider = 3, .ratio = 14 }, { .refclk = 38400, .cdclk = 192000, .divider = 2, .ratio = 10 },
drivers/gpu/drm/i915/gem/i915_gem_tiling.c +5 -4
@@ -294,10 +294,6 @@ i915_gem_object_set_tiling(struct drm_i915_gem_object *obj,spin_unlock (&obj->vma.lock); obj->tiling_and_stride = tiling | stride; -i915_gem_object_unlock (obj); - -/* Force the fence to be reacquired for GTT access */ -i915_gem_object_release_mmap_gtt (obj);/* Try to preallocate memory required to save swizzling on put-pages */ if (i915_gem_object_needs_bit17_swizzle (obj)) {
@@ -310,6 +306,11 @@ i915_gem_object_set_tiling(struct drm_i915_gem_object *obj, obj->bit_17 =NULL ; } +i915_gem_object_unlock (obj); + +/* Force the fence to be reacquired for GTT access */ +i915_gem_object_release_mmap_gtt (obj); +return 0 ; }
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +10 -0
@@ -2845,6 +2845,8 @@ void intel_guc_find_hung_context(struct intel_engine_cs *engine)return ;xa_for_each (&guc->context_lookup, index, ce) { +bool found; +if (!intel_context_is_pinned (ce))continue ;
@@ -2856,10 +2858,18 @@ void intel_guc_find_hung_context(struct intel_engine_cs *engine)continue ; } + found = false; +spin_lock (&ce->guc_state.lock);list_for_each_entry (rq, &ce->guc_active.requests, sched.link) {if (i915_test_request_state (rq) !=I915_REQUEST_ACTIVE )continue ; + found = true; +break ; + } +spin_unlock (&ce->guc_state.lock); + +if (found) {intel_engine_set_hung_context (engine, ce);/* Can only cope with one hang at a time... */
drivers/gpu/drm/vc4/vc4_hdmi.c +2 -1
@@ -1854,7 +1854,8 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) } vc4_hdmi->cec_adap =cec_allocate_adapter (&vc4_hdmi_cec_adap_ops, - vc4_hdmi,"vc4" , + vc4_hdmi, + vc4_hdmi->variant->card_name,CEC_CAP_DEFAULTS |CEC_CAP_CONNECTOR_INFO ,1 ); ret =PTR_ERR_OR_ZERO (vc4_hdmi->cec_adap);
drivers/i2c/busses/i2c-designware-pcidrv.c +2 -0
@@ -398,6 +398,8 @@ static const struct pci_device_id i2_designware_pci_ids[] = { { PCI_VDEVICE(ATI, 0x73a4), navi_amd }, { PCI_VDEVICE(ATI, 0x73e4), navi_amd }, { PCI_VDEVICE(ATI, 0x73c4), navi_amd }, + { PCI_VDEVICE(ATI, 0x7444), navi_amd }, + { PCI_VDEVICE(ATI, 0x7464), navi_amd }, { 0,} };MODULE_DEVICE_TABLE (pci, i2_designware_pci_ids);
drivers/i2c/busses/i2c-mxs.c +2 -2
@@ -826,8 +826,8 @@ static int mxs_i2c_probe(struct platform_device *pdev)/* Setup the DMA */ i2c->dmach =dma_request_chan (dev,"rx-tx" );if (IS_ERR (i2c->dmach)) { -dev_err (dev,"Failed to request dma\n" ); -return PTR_ERR (i2c->dmach); +return dev_err_probe (dev,PTR_ERR (i2c->dmach), +"Failed to request dma\n" ); }platform_set_drvdata (pdev, i2c);
drivers/i2c/busses/i2c-rk3x.c +22 -22
123 lines not on this page · raw message
drivers/iio/accel/hid-sensor-accel-3d.c +1 -0
@@ -280,6 +280,7 @@ static int accel_3d_capture_sample(struct hid_sensor_hub_device *hsdev,hid_sensor_convert_timestamp ( &accel_state->common_attributes, *(int64_t *)raw_data); + ret =0 ;break ;default :break ;
drivers/iio/adc/berlin2-adc.c +3 -1
@@ -289,8 +289,10 @@ static int berlin2_adc_probe(struct platform_device *pdev)int ret; indio_dev =devm_iio_device_alloc (&pdev->dev,sizeof (*priv)); -if (!indio_dev) +if (!indio_dev) { +of_node_put (parent_np);return -ENOMEM ; + } priv =iio_priv (indio_dev);platform_set_drvdata (pdev, indio_dev);
drivers/iio/adc/stm32-dfsdm-adc.c +1 -0
@@ -1521,6 +1521,7 @@ static const struct of_device_id stm32_dfsdm_adc_match[] = { }, {} }; +MODULE_DEVICE_TABLE (of, stm32_dfsdm_adc_match);static int stm32_dfsdm_adc_probe (struct platform_device *pdev) {
drivers/iio/adc/twl6030-gpadc.c +32 -0
@@ -57,6 +57,18 @@#define TWL6030_GPADCS BIT(1)#define TWL6030_GPADCR BIT(0) +#define USB_VBUS_CTRL_SET 0x04 +#define USB_ID_CTRL_SET 0x06 + +#define TWL6030_MISC1 0xE4 +#define VBUS_MEAS 0x01 +#define ID_MEAS 0x01 + +#define VAC_MEAS 0x04 +#define VBAT_MEAS 0x02 +#define BB_MEAS 0x01 + +/** * struct twl6030_chnl_calib - channel calibration * @gain: slope coefficient for ideal curve
@@ -927,6 +939,26 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)return ret; } + ret =twl_i2c_write_u8 (TWL_MODULE_USB ,VBUS_MEAS ,USB_VBUS_CTRL_SET ); +if (ret <0 ) { +dev_err (dev,"failed to wire up inputs\n" ); +return ret; + } + + ret =twl_i2c_write_u8 (TWL_MODULE_USB ,ID_MEAS ,USB_ID_CTRL_SET ); +if (ret <0 ) { +dev_err (dev,"failed to wire up inputs\n" ); +return ret; + } + + ret =twl_i2c_write_u8 (TWL6030_MODULE_ID0 , +VBAT_MEAS |BB_MEAS |VAC_MEAS , +TWL6030_MISC1 ); +if (ret <0 ) { +dev_err (dev,"failed to wire up inputs\n" ); +return ret; + } + indio_dev->name =DRIVER_NAME ; indio_dev->info = &twl6030_gpadc_iio_info; indio_dev->modes =INDIO_DIRECT_MODE ;
drivers/iio/gyro/hid-sensor-gyro-3d.c +1 -0
@@ -231,6 +231,7 @@ static int gyro_3d_capture_sample(struct hid_sensor_hub_device *hsdev, gyro_state->timestamp =hid_sensor_convert_timestamp (&gyro_state->common_attributes, *(s64 *)raw_data); + ret =0 ;break ;default :break ;
drivers/iio/imu/fxos8700_core.c +89 -22
201 lines not on this page · raw message
drivers/infiniband/ulp/rtrs/rtrs-clt.c +1 -1
@@ -967,7 +967,7 @@ static void rtrs_clt_init_req(struct rtrs_clt_io_req *req,refcount_set (&req->ref,1 ); req->mp_policy = clt_path->clt->mp_policy; -iov_iter_kvec (&iter,READ , vec,1 , usr_len); +iov_iter_kvec (&iter,WRITE , vec,1 , usr_len); len =_copy_from_iter (req->iu->buf, usr_len, &iter);WARN_ON (len != usr_len);
drivers/input/serio/i8042-x86ia64io.h +7 -0
@@ -1229,6 +1229,13 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "PCX0DX"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX |SERIO_QUIRK_RESET_ALWAYS | +SERIO_QUIRK_NOLOOP |SERIO_QUIRK_NOPNP ) + }, { .matches = { DMI_MATCH(DMI_BOARD_NAME, "X170SM"),
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +3 -3
@@ -2395,6 +2395,9 @@ static int dpaa_eth_poll(struct napi_struct *napi, int budget) cleaned =qman_p_poll_dqrr (np->p, budget); +if (np->xdp_act &XDP_REDIRECT ) +xdp_do_flush (); +if (cleaned < budget) {napi_complete_done (napi, cleaned);qman_p_irqsource_add (np->p,QM_PIRQ_DQRI );
@@ -2402,9 +2405,6 @@ static int dpaa_eth_poll(struct napi_struct *napi, int budget)qman_p_irqsource_add (np->p,QM_PIRQ_DQRI ); } -if (np->xdp_act &XDP_REDIRECT ) -xdp_do_flush (); -return cleaned; }
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +6 -3
@@ -1597,10 +1597,15 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget)if (rx_cleaned >= budget || txconf_cleaned >=DPAA2_ETH_TXCONF_PER_NAPI ) { work_done = budget; +if (ch->xdp.res &XDP_REDIRECT ) +xdp_do_flush (); goto out; } }while (store_cleaned); +if (ch->xdp.res &XDP_REDIRECT ) +xdp_do_flush (); +/* We didn't consume the entire budget, so finish napi and * re-enable data availability notifications */
@@ -1625,9 +1630,7 @@ static int dpaa2_eth_poll(struct napi_struct *napi, int budget) txc_fq->dq_bytes =0 ; } -if (ch->xdp.res &XDP_REDIRECT ) -xdp_do_flush_map (); -else if (rx_cleaned && ch->xdp.res &XDP_TX ) +if (rx_cleaned && ch->xdp.res &XDP_TX )dpaa2_eth_xdp_tx_flush (priv, ch, &priv->fq[flowid]);return work_done;
drivers/net/ethernet/intel/ice/ice.h +1 -1
@@ -641,7 +641,7 @@ void ice_set_ethtool_ops(struct net_device *netdev);void ice_set_ethtool_safe_mode_ops (struct net_device *netdev);u16 ice_get_avail_txq_count (struct ice_pf *pf);u16 ice_get_avail_rxq_count (struct ice_pf *pf); -int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx); +int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx,bool locked);void ice_update_vsi_stats (struct ice_vsi *vsi);void ice_update_pf_stats (struct ice_pf *pf);int ice_up (struct ice_vsi *vsi);
drivers/net/ethernet/intel/ice/ice_dcb_lib.c +13 -10
@@ -355,7 +355,7 @@ int ice_pf_dcb_cfg(struct ice_pf *pf, struct ice_dcbx_cfg *new_cfg, bool locked) goto out; } -ice_pf_dcb_recfg (pf); +ice_pf_dcb_recfg (pf, false); out:ice_ena_vsi (pf_vsi, true);
@@ -644,12 +644,13 @@ static int ice_dcb_noncontig_cfg(struct ice_pf *pf)/** * ice_pf_dcb_recfg - Reconfigure all VEBs and VSIs * @pf: pointer to the PF struct +* @locked: is adev device lock held * * Assumed caller has already disabled all VSIs before * calling this function. Reconfiguring DCB based on * local_dcbx_cfg. */ -void ice_pf_dcb_recfg (struct ice_pf *pf) +void ice_pf_dcb_recfg (struct ice_pf *pf,bool locked) {struct ice_dcbx_cfg *dcbcfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg;struct iidc_event *event;
@@ -688,14 +689,16 @@ void ice_pf_dcb_recfg(struct ice_pf *pf)if (vsi->type ==ICE_VSI_PF )ice_dcbnl_set_all (vsi); } -/* Notify the AUX drivers that TC change is finished */ - event =kzalloc (sizeof (*event),GFP_KERNEL ); -if (!event) -return ; +if (!locked) { +/* Notify the AUX drivers that TC change is finished */ + event =kzalloc (sizeof (*event),GFP_KERNEL ); +if (!event) +return ; -set_bit (IIDC_EVENT_AFTER_TC_CHANGE , event->type); -ice_send_event_to_aux (pf, event); -kfree (event); +set_bit (IIDC_EVENT_AFTER_TC_CHANGE , event->type); +ice_send_event_to_aux (pf, event); +kfree (event); + } }/**
@@ -943,7 +946,7 @@ ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf, }/* changes in configuration update VSI */ -ice_pf_dcb_recfg (pf); +ice_pf_dcb_recfg (pf, false);ice_ena_vsi (pf_vsi, true); unlock_rtnl:
drivers/net/ethernet/intel/ice/ice_dcb_lib.h +2 -2
@@ -23,7 +23,7 @@ u8 ice_dcb_get_tc(struct ice_vsi *vsi, int queue_index);int ice_pf_dcb_cfg (struct ice_pf *pf,struct ice_dcbx_cfg *new_cfg,bool locked);int ice_dcb_bwchk (struct ice_pf *pf,struct ice_dcbx_cfg *dcbcfg); -void ice_pf_dcb_recfg (struct ice_pf *pf); +void ice_pf_dcb_recfg (struct ice_pf *pf,bool locked);void ice_vsi_cfg_dcb_rings (struct ice_vsi *vsi);int ice_init_pf_dcb (struct ice_pf *pf,bool locked);void ice_update_dcb_stats (struct ice_pf *pf);
@@ -113,7 +113,7 @@ ice_is_pfc_causing_hung_q(struct ice_pf __always_unused *pf,return false; } -static inline void ice_pf_dcb_recfg (struct ice_pf *pf) { } +static inline void ice_pf_dcb_recfg (struct ice_pf *pf,bool locked) { }static inline void ice_vsi_cfg_dcb_rings (struct ice_vsi *vsi) { }static inline void ice_update_dcb_stats (struct ice_pf *pf) { } static inline void
drivers/net/ethernet/intel/ice/ice_ethtool.c +24 -4
@@ -3393,7 +3393,9 @@ static int ice_set_channels(struct net_device *dev, struct ethtool_channels *ch)struct ice_vsi *vsi = np->vsi;struct ice_pf *pf = vsi->back;int new_rx =0 , new_tx =0 ; +bool locked = false;u32 curr_combined; +int ret =0 ;/* do not support changing channels in Safe Mode */ if (ice_is_safe_mode (pf)) {
@@ -3442,15 +3444,33 @@ static int ice_set_channels(struct net_device *dev, struct ethtool_channels *ch)return -EINVAL ; } -ice_vsi_recfg_qs (vsi, new_rx, new_tx); +if (pf->adev) { +mutex_lock (&pf->adev_mutex); +device_lock (&pf->adev->dev); + locked = true; +if (pf->adev->dev.driver) { +netdev_err (dev,"Cannot change channels when RDMA is active\n" ); + ret = -EBUSY ; + goto adev_unlock; + } + } + +ice_vsi_recfg_qs (vsi, new_rx, new_tx, locked); -if (!netif_is_rxfh_configured (dev)) -return ice_vsi_set_dflt_rss_lut (vsi, new_rx); +if (!netif_is_rxfh_configured (dev)) { + ret =ice_vsi_set_dflt_rss_lut (vsi, new_rx); + goto adev_unlock; + }/* Update rss_size due to change in Rx queues */ vsi->rss_size =ice_get_valid_rss_size (&pf->hw, new_rx); -return 0 ; +adev_unlock: +if (locked) { +device_unlock (&pf->adev->dev); +mutex_unlock (&pf->adev_mutex); + } +return ret; }/**
drivers/net/ethernet/intel/ice/ice_main.c +3 -2
@@ -3776,12 +3776,13 @@ bool ice_is_wol_supported(struct ice_hw *hw)* @vsi: VSI being changed * @new_rx: new number of Rx queues * @new_tx: new number of Tx queues +* @locked: is adev device_lock held * * Only change the number of queues if new_tx, or new_rx is non-0. * * Returns 0 on success. */ -int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx) +int ice_vsi_recfg_qs (struct ice_vsi *vsi,int new_rx,int new_tx,bool locked) {struct ice_pf *pf = vsi->back;int err =0 , timeout =50 ;
@@ -3810,7 +3811,7 @@ int ice_vsi_recfg_qs(struct ice_vsi *vsi, int new_rx, int new_tx)ice_vsi_close (vsi);ice_vsi_rebuild (vsi, false); -ice_pf_dcb_recfg (pf); +ice_pf_dcb_recfg (pf, locked);ice_vsi_open (vsi); done:clear_bit (ICE_CFG_BUSY , pf->state);
drivers/net/ethernet/intel/igc/igc_ptp.c +9 -5
@@ -418,10 +418,12 @@ static int igc_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin,* * We need to convert the system time value stored in the RX/TXSTMP registers * into a hwtstamp which can be used by the upper level timestamping functions. +* +* Returns 0 on success. **/ -static void igc_ptp_systim_to_hwtstamp (struct igc_adapter *adapter, -struct skb_shared_hwtstamps *hwtstamps, -u64 systim) +static int igc_ptp_systim_to_hwtstamp (struct igc_adapter *adapter, +struct skb_shared_hwtstamps *hwtstamps, +u64 systim) {switch (adapter->hw.mac.type) {case igc_i225:
@@ -431,8 +433,9 @@ static void igc_ptp_systim_to_hwtstamp(struct igc_adapter *adapter, systim & 0xFFFFFFFF);break ;default : -break ; +return -EINVAL ; } +return 0 ; }/**
@@ -657,7 +660,8 @@ static void igc_ptp_tx_hwtstamp(struct igc_adapter *adapter) regval =rd32 (IGC_TXSTMPL ); regval |= (u64 )rd32 (IGC_TXSTMPH ) <<32 ; -igc_ptp_systim_to_hwtstamp (adapter, &shhwtstamps, regval); +if (igc_ptp_systim_to_hwtstamp (adapter, &shhwtstamps, regval)) +return ;switch (adapter->link_speed) {case SPEED_10 :
drivers/net/ethernet/qlogic/qede/qede_fp.c +4 -3
@@ -1439,6 +1439,10 @@ int qede_poll(struct napi_struct *napi, int budget) rx_work_done = (likely (fp->type &QEDE_FASTPATH_RX ) &&qede_has_rx_work (fp->rxq)) ?qede_rx_int (fp, budget) :0 ; + +if (fp->xdp_xmit &QEDE_XDP_REDIRECT ) +xdp_do_flush (); +/* Handle case where we are called by netpoll with a budget of 0 */ if (rx_work_done < budget || !budget) {if (!qede_poll_is_more_work (fp)) {
@@ -1458,9 +1462,6 @@ int qede_poll(struct napi_struct *napi, int budget)qede_update_tx_producer (fp->xdp_tx); } -if (fp->xdp_xmit &QEDE_XDP_REDIRECT ) -xdp_do_flush_map (); -return rx_work_done; }
drivers/net/ethernet/sfc/efx.c +4 -1
@@ -1005,8 +1005,11 @@ static int efx_pci_probe_post_io(struct efx_nic *efx)/* Determine netdevice features */ net_dev->features |= (efx->type->offload_features |NETIF_F_SG |NETIF_F_TSO |NETIF_F_RXCSUM |NETIF_F_RXALL ); -if (efx->type->offload_features & (NETIF_F_IPV6_CSUM |NETIF_F_HW_CSUM )) +if (efx->type->offload_features & (NETIF_F_IPV6_CSUM |NETIF_F_HW_CSUM )) { net_dev->features |=NETIF_F_TSO6 ; +if (efx_has_cap (efx,TX_TSO_V2_ENCAP )) + net_dev->hw_enc_features |=NETIF_F_TSO6 ; + }/* Check whether device supports TSO */ if (!efx->type->tso_versions || !efx->type->tso_versions (efx)) net_dev->features &= ~NETIF_F_ALL_TSO ;
drivers/net/phy/dp83822.c +4 -2
@@ -232,7 +232,8 @@ static int dp83822_config_intr(struct phy_device *phydev)DP83822_ENERGY_DET_INT_EN | DP83822_LINK_QUAL_INT_EN); -if (!dp83822->fx_enabled) +/* Private data pointer is NULL on DP83825/26 */ +if (!dp83822 || !dp83822->fx_enabled) misr_status |=DP83822_ANEG_COMPLETE_INT_EN |DP83822_DUP_MODE_CHANGE_INT_EN |DP83822_SPEED_CHANGED_INT_EN ;
@@ -252,7 +253,8 @@ static int dp83822_config_intr(struct phy_device *phydev)DP83822_PAGE_RX_INT_EN | DP83822_EEE_ERROR_CHANGE_INT_EN); -if (!dp83822->fx_enabled) +/* Private data pointer is NULL on DP83825/26 */ +if (!dp83822 || !dp83822->fx_enabled) misr_status |=DP83822_ANEG_ERR_INT_EN |DP83822_WOL_PKT_INT_EN ;
drivers/net/phy/meson-gxl.c +2 -0
@@ -271,6 +271,8 @@ static struct phy_driver meson_gxl_phy[] = { .handle_interrupt = meson_gxl_handle_interrupt, .suspend = genphy_suspend, .resume = genphy_resume, + .read_mmd = genphy_read_mmd_unsupported, + .write_mmd = genphy_write_mmd_unsupported, }, };
drivers/net/virtio_net.c +4 -4
@@ -1580,13 +1580,13 @@ static int virtnet_poll(struct napi_struct *napi, int budget) received =virtnet_receive (rq, budget, &xdp_xmit); +if (xdp_xmit &VIRTIO_XDP_REDIR ) +xdp_do_flush (); +/* Out of packets? */ if (received < budget)virtqueue_napi_complete (napi, rq->vq, received); -if (xdp_xmit &VIRTIO_XDP_REDIR ) -xdp_do_flush (); -if (xdp_xmit &VIRTIO_XDP_TX ) { sq =virtnet_xdp_get_sq (vi);if (virtqueue_kick_prepare (sq->vq) &&virtqueue_notify (sq->vq)) {
@@ -1995,8 +1995,8 @@ static int virtnet_close(struct net_device *dev)cancel_delayed_work_sync (&vi->refill);for (i =0 ; i < vi->max_queue_pairs; i++) { -xdp_rxq_info_unreg (&vi->rq[i].xdp_rxq);napi_disable (&vi->rq[i].napi); +xdp_rxq_info_unreg (&vi->rq[i].xdp_rxq);virtnet_napi_tx_disable (&vi->sq[i].napi); }
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +17 -0
@@ -90,6 +90,9 @@#define BRCMF_ASSOC_PARAMS_FIXED_SIZE \ (sizeof(struct brcmf_assoc_params_le) - sizeof(u16)) +#define BRCMF_MAX_CHANSPEC_LIST \ + (BRCMF_DCMD_MEDLEN / sizeof(__le32) - 1) +static bool check_vif_up (struct brcmf_cfg80211_vif *vif) {if (!test_bit (BRCMF_VIF_STATUS_READY , &vif->sme_state)) {
@@ -6557,6 +6560,13 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, band->channels[i].flags =IEEE80211_CHAN_DISABLED ; total =le32_to_cpu (list->count); +if (total >BRCMF_MAX_CHANSPEC_LIST ) { +bphy_err (drvr,"Invalid count of channel Spec. (%u)\n" , + total); + err = -EINVAL ; + goto fail_pbuf; + } +for (i =0 ; i < total; i++) { ch.chspec = (u16 )le32_to_cpu (list->element[i]); cfg->d11inf.decchspec (&ch);
@@ -6702,6 +6712,13 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) band =cfg_to_wiphy (cfg)->bands[NL80211_BAND_2GHZ ]; list = (struct brcmf_chanspec_list *)pbuf; num_chan =le32_to_cpu (list->count); +if (num_chan >BRCMF_MAX_CHANSPEC_LIST ) { +bphy_err (drvr,"Invalid count of channel Spec. (%u)\n" , + num_chan); +kfree (pbuf); +return -EINVAL ; + } +for (i =0 ; i < num_chan; i++) { ch.chspec = (u16 )le32_to_cpu (list->element[i]); cfg->d11inf.decchspec (&ch);
drivers/nvmem/core.c +4 -6
@@ -766,9 +766,9 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)return ERR_PTR (rval); } -if (config->wp_gpio) - nvmem->wp_gpio = config->wp_gpio; -else if (!config->ignore_wp) + nvmem->id = rval; + +if (!config->ignore_wp) nvmem->wp_gpio =gpiod_get_optional (config->dev,"wp" ,GPIOD_OUT_HIGH );if (IS_ERR (nvmem->wp_gpio)) {
@@ -781,7 +781,6 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)kref_init (&nvmem->refcnt);INIT_LIST_HEAD (&nvmem->cells); - nvmem->id = rval; nvmem->owner = config->owner;if (!nvmem->owner && config->dev->driver) nvmem->owner = config->dev->driver->owner;
@@ -845,7 +844,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config)if (config->cells) { rval =nvmem_add_cells (nvmem, config->cells, config->ncells);if (rval) - goto err_teardown_compat; + goto err_remove_cells; } rval =nvmem_add_cells_from_table (nvmem);
@@ -862,7 +861,6 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) err_remove_cells:nvmem_device_remove_all_cells (nvmem); -err_teardown_compat:if (config->compat)nvmem_sysfs_remove_compat (nvmem, config); err_device_del:
drivers/nvmem/qcom-spmi-sdam.c +1 -0
@@ -166,6 +166,7 @@ static const struct of_device_id sdam_match_table[] = { { .compatible = "qcom,spmi-sdam" }, {}, }; +MODULE_DEVICE_TABLE (of, sdam_match_table);static struct platform_driver sdam_driver = { .driver = {
drivers/phy/qualcomm/phy-qcom-qmp.c +61 -28
185 lines not on this page · raw message
drivers/platform/x86/dell/dell-wmi-base.c +3 -0
@@ -260,6 +260,9 @@ static const struct key_entry dell_wmi_keymap_type_0010[] = { { KE_KEY, 0x57, { KEY_BRIGHTNESSDOWN } }, { KE_KEY, 0x58, { KEY_BRIGHTNESSUP } }, +/*Speaker Mute*/ + { KE_KEY, 0x109, { KEY_MUTE} }, +/* Mic mute */ { KE_KEY, 0x150, { KEY_MICMUTE } },
drivers/platform/x86/gigabyte-wmi.c +1 -0
@@ -141,6 +141,7 @@ static u8 gigabyte_wmi_detect_sensor_usability(struct wmi_device *wdev)static const struct dmi_system_id gigabyte_wmi_known_working_platforms[] = {DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H-CF" ), +DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M DS3H WIFI-CF" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B450M S2H V2" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B550 AORUS ELITE AX V2" ),DMI_EXACT_MATCH_GIGABYTE_BOARD_NAME ("B550 AORUS ELITE" ),
drivers/scsi/iscsi_tcp.c +15 -5
@@ -848,7 +848,7 @@ static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost, enum iscsi_host_param param, char *buf) { struct iscsi_sw_tcp_host *tcp_sw_host = iscsi_host_priv(shost); -struct iscsi_session *session = tcp_sw_host->session; +struct iscsi_session *session;struct iscsi_conn *conn;struct iscsi_tcp_conn *tcp_conn;struct iscsi_sw_tcp_conn *tcp_sw_conn;
@@ -858,6 +858,7 @@ static int iscsi_sw_tcp_host_get_param(struct Scsi_Host *shost,switch (param) {case ISCSI_HOST_PARAM_IPADDRESS : + session = tcp_sw_host->session;if (!session)return -ENOTCONN ;
@@ -958,11 +959,13 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,if (!cls_session) goto remove_host; session = cls_session->dd_data; - tcp_sw_host =iscsi_host_priv (shost); - tcp_sw_host->session = session;if (iscsi_tcp_r2tpool_alloc (session)) goto remove_session; + +/* We are now fully setup so expose the session to sysfs. */ + tcp_sw_host =iscsi_host_priv (shost); + tcp_sw_host->session = session;return cls_session; remove_session:
@@ -982,10 +985,17 @@ static void iscsi_sw_tcp_session_destroy(struct iscsi_cls_session *cls_session)if (WARN_ON_ONCE (session->leadconn))return ; +iscsi_session_remove (cls_session); +/* +* Our get_host_param needs to access the session, so remove the +* host from sysfs before freeing the session to make sure userspace +* is no longer accessing the callout. +*/ +iscsi_host_remove (shost, false); +iscsi_tcp_r2tpool_free (cls_session->dd_data); -iscsi_session_teardown (cls_session); -iscsi_host_remove (shost, false); +iscsi_session_free (cls_session);iscsi_host_free (shost); }
drivers/scsi/libiscsi.c +31 -7
@@ -3024,17 +3024,32 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, }EXPORT_SYMBOL_GPL (iscsi_session_setup); -/** -* iscsi_session_teardown - destroy session, host, and cls_session -* @cls_session: iscsi session +/* +* issi_session_remove - Remove session from iSCSI class. */ -void iscsi_session_teardown (struct iscsi_cls_session *cls_session) +void iscsi_session_remove (struct iscsi_cls_session *cls_session) {struct iscsi_session *session = cls_session->dd_data; -struct module *owner = cls_session->transport->owner;struct Scsi_Host *shost = session->host;iscsi_remove_session (cls_session); +/* +* host removal only has to wait for its children to be removed from +* sysfs, and iscsi_tcp needs to do iscsi_host_remove before freeing +* the session, so drop the session count here. +*/ +iscsi_host_dec_session_cnt (shost); +} +EXPORT_SYMBOL_GPL (iscsi_session_remove); + +/** +* iscsi_session_free - Free iscsi session and it's resources +* @cls_session: iscsi session +*/ +void iscsi_session_free (struct iscsi_cls_session *cls_session) +{ +struct iscsi_session *session = cls_session->dd_data; +struct module *owner = cls_session->transport->owner;iscsi_pool_free (&session->cmdpool);kfree (session->password);
@@ -3052,10 +3067,19 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)kfree (session->discovery_parent_type);iscsi_free_session (cls_session); - -iscsi_host_dec_session_cnt (shost);module_put (owner); } +EXPORT_SYMBOL_GPL (iscsi_session_free); + +/** +* iscsi_session_teardown - destroy session and cls_session +* @cls_session: iscsi session +*/ +void iscsi_session_teardown (struct iscsi_cls_session *cls_session) +{ +iscsi_session_remove (cls_session); +iscsi_session_free (cls_session); +}EXPORT_SYMBOL_GPL (iscsi_session_teardown);/**
drivers/scsi/scsi_scan.c +3 -4
@@ -1206,8 +1206,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,* that no LUN is present, so don't add sdev in these cases. * Two specific examples are: * 1) NetApp targets: return PQ=1, PDT=0x1f -* 2) IBM/2145 targets: return PQ=1, PDT=0 -* 3) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" +* 2) USB UFI: returns PDT=0x1f, with the PQ bits being "reserved" * in the UFI 1.0 spec (we cannot rely on reserved bits). * * References:
@@ -1221,8 +1220,8 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,* PDT=00h Direct-access device (floppy) * PDT=1Fh none (no FDD connected to the requested logical unit) */ -if (((result[0 ] >>5 ) ==1 || - (starget->pdt_1f_for_no_lun && (result[0 ] &0x1f ) ==0x1f )) && +if (((result[0 ] >>5 ) ==1 || starget->pdt_1f_for_no_lun) && + (result[0 ] &0x1f ) ==0x1f && !scsi_is_wlun (lun)) { SCSI_LOG_SCAN_BUS(3, sdev_printk(KERN_INFO, sdev, "scsi scan: peripheral device type"
drivers/target/target_core_file.c +2 -2
@@ -332,7 +332,7 @@ static int fd_do_rw(struct se_cmd *cmd, struct file *fd, len += sg->length; } -iov_iter_bvec (&iter,READ , bvec, sgl_nents, len); +iov_iter_bvec (&iter, is_write, bvec, sgl_nents, len);if (is_write) ret =vfs_iter_write (fd, &iter, &pos,0 );else
@@ -469,7 +469,7 @@ fd_execute_write_same(struct se_cmd *cmd) len += se_dev->dev_attrib.block_size; } -iov_iter_bvec (&iter,READ , bvec, nolb, len); +iov_iter_bvec (&iter,WRITE , bvec, nolb, len); ret =vfs_iter_write (fd_dev->fd_file, &iter, &pos,0 );kfree (bvec);
drivers/target/target_core_tmr.c +2 -2
@@ -73,8 +73,8 @@ static bool __target_check_io_state(struct se_cmd *se_cmd, {struct se_session *sess = se_cmd->se_sess; -assert_spin_locked (&sess->sess_cmd_lock); -WARN_ON_ONCE (!irqs_disabled ()); +lockdep_assert_held (&sess->sess_cmd_lock); +/* * If command already reached CMD_T_COMPLETE state within * target_complete_cmd() or CMD_T_FABRIC_STOP due to shutdown,
drivers/tty/serial/8250/8250_dma.c +23 -3
@@ -46,19 +46,39 @@ static void __dma_rx_complete(void *param)struct uart_8250_dma *dma = p->dma;struct tty_port *tty_port = &p->port.state->port;struct dma_tx_state state; +enum dma_status dma_status;int count; - dma->rx_running =0 ; -dmaengine_tx_status (dma->rxchan, dma->rx_cookie, &state); +/* +* New DMA Rx can be started during the completion handler before it +* could acquire port's lock and it might still be ongoing. Don't to +* anything in such case. +*/ + dma_status =dmaengine_tx_status (dma->rxchan, dma->rx_cookie, &state); +if (dma_status ==DMA_IN_PROGRESS ) +return ; count = dma->rx_size - state.residue;tty_insert_flip_string (tty_port, dma->rx_buf, count); p->port.icount.rx += count; + dma->rx_running =0 ;tty_flip_buffer_push (tty_port); } +static void dma_rx_complete (void *param) +{ +struct uart_8250_port *p = param; +struct uart_8250_dma *dma = p->dma; +unsigned long flags; + +spin_lock_irqsave (&p->port.lock, flags); +if (dma->rx_running) +__dma_rx_complete (p); +spin_unlock_irqrestore (&p->port.lock, flags); +} +int serial8250_tx_dma (struct uart_8250_port *p) {struct uart_8250_dma *dma = p->dma;
@@ -134,7 +154,7 @@ int serial8250_rx_dma(struct uart_8250_port *p)return -EBUSY ; dma->rx_running =1 ; - desc->callback = __dma_rx_complete; + desc->callback = dma_rx_complete; desc->callback_param = p; dma->rx_cookie =dmaengine_submit (desc);
drivers/tty/vt/vc_screen.c +5 -4
@@ -386,10 +386,6 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) uni_mode =use_unicode (inode); attr =use_attributes (inode); - ret = -ENXIO ; - vc =vcs_vc (inode, &viewed); -if (!vc) - goto unlock_out; ret = -EINVAL ;if (pos <0 )
@@ -407,6 +403,11 @@ vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)unsigned int this_round, skip =0 ;int size; + ret = -ENXIO ; + vc =vcs_vc (inode, &viewed); +if (!vc) + goto unlock_out; +/* Check whether we are above size each round, * as copy_to_user at the end of this loop * could sleep.
drivers/usb/dwc3/dwc3-qcom.c +1 -1
@@ -836,7 +836,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev) qcom->mode =usb_get_dr_mode (&qcom->dwc3->dev);/* enable vbus override for device mode */ -if (qcom->mode ==USB_DR_MODE_PERIPHERAL ) +if (qcom->mode !=USB_DR_MODE_HOST )dwc3_qcom_vbus_override_enable (qcom, true);/* register extcon to override sw_vbus on Vbus change later */
drivers/usb/gadget/function/f_fs.c +3 -1
@@ -279,8 +279,10 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)struct usb_request *req = ffs->ep0req;int ret; -if (!req) +if (!req) { +spin_unlock_irq (&ffs->ev.waitq.lock);return -EINVAL ; + } req->zero = len <le16_to_cpu (ffs->ev.setup.wLength);
drivers/usb/gadget/function/f_uac2.c +1 -0
@@ -1069,6 +1069,7 @@ afunc_bind(struct usb_configuration *cfg, struct usb_function *fn) } std_as_out_if0_desc.bInterfaceNumber = ret; std_as_out_if1_desc.bInterfaceNumber = ret; + std_as_out_if1_desc.bNumEndpoints =1 ; uac2->as_out_intf = ret; uac2->as_out_alt =0 ;
drivers/vhost/net.c +3 -0
@@ -1517,6 +1517,9 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) nvq = &n->vqs[index];mutex_lock (&vq->mutex); +if (fd ==-1 ) +vhost_clear_msg (&n->dev); +/* Verify that ring has been setup correctly. */ if (!vhost_vq_access_ok (vq)) { r = -EFAULT ;
drivers/vhost/vhost.c +2 -1
@@ -669,7 +669,7 @@ void vhost_dev_stop(struct vhost_dev *dev) }EXPORT_SYMBOL_GPL (vhost_dev_stop); -static void vhost_clear_msg (struct vhost_dev *dev) +void vhost_clear_msg (struct vhost_dev *dev) {struct vhost_msg_node *node, *n;
@@ -687,6 +687,7 @@ static void vhost_clear_msg(struct vhost_dev *dev)spin_unlock (&dev->iotlb_lock); } +EXPORT_SYMBOL_GPL (vhost_clear_msg);void vhost_dev_cleanup (struct vhost_dev *dev) {
drivers/vhost/vhost.h +1 -0
@@ -182,6 +182,7 @@ long vhost_dev_ioctl(struct vhost_dev *, unsigned int ioctl, void __user *argp);long vhost_vring_ioctl (struct vhost_dev *d,unsigned int ioctl,void __user *argp);bool vhost_vq_access_ok (struct vhost_virtqueue *vq);bool vhost_log_access_ok (struct vhost_dev *); +void vhost_clear_msg (struct vhost_dev *dev); int vhost_get_vq_desc(struct vhost_virtqueue *, struct iovec iov[], unsigned int iov_count,
drivers/video/fbdev/core/fbcon.c +5 -2
@@ -2507,9 +2507,12 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font, h > FBCON_SWAP(info->var.rotate, info->var.yres, info->var.xres))return -EINVAL ; +if (font->width >32 || font->height >32 ) +return -EINVAL ; +/* Make sure drawing engine can handle the font */ -if (!(info->pixmap.blit_x & (1 << (font->width -1 ))) || - !(info->pixmap.blit_y & (1 << (font->height -1 )))) +if (!(info->pixmap.blit_x &BIT (font->width -1 )) || + !(info->pixmap.blit_y &BIT (font->height -1 )))return -EINVAL ;/* Make sure driver can handle the font length */
drivers/video/fbdev/smscufx.c +31 -15
96 lines not on this page · raw message
drivers/watchdog/diag288_wdt.c +12 -3
@@ -86,7 +86,7 @@ static int __diag288(unsigned int func, unsigned int timeout,"1:\n" EX_TABLE (0b ,1b ) : "+d" (err) : "d"(__func), "d"(__timeout), - "d"(__action), "d"(__len) : "1", "cc"); + "d"(__action), "d"(__len) : "1", "cc", "memory"); return err; }
@@ -268,12 +268,21 @@ static int __init diag288_init(void)char ebc_begin[] = {194 ,197 ,199 ,201 ,213 }; +char *ebc_cmd;watchdog_set_nowayout (&wdt_dev, nowayout_info);if (MACHINE_IS_VM ) { -if (__diag288_vm (WDT_FUNC_INIT ,15 , - ebc_begin,sizeof (ebc_begin)) !=0 ) { + ebc_cmd =kmalloc (sizeof (ebc_begin),GFP_KERNEL ); +if (!ebc_cmd) { +pr_err ("The watchdog cannot be initialized\n" ); +return -ENOMEM ; + } +memcpy (ebc_cmd, ebc_begin,sizeof (ebc_begin)); + ret =__diag288_vm (WDT_FUNC_INIT ,15 , + ebc_cmd,sizeof (ebc_begin)); +kfree (ebc_cmd); +if (ret !=0 ) {pr_err ("The watchdog cannot be initialized\n" );return -EINVAL ; }
drivers/xen/pvcalls-back.c +4 -4
@@ -129,13 +129,13 @@ static bool pvcalls_conn_back_read(void *opaque)if (masked_prod < masked_cons) { vec[0 ].iov_base = data->in + masked_prod; vec[0 ].iov_len = wanted; -iov_iter_kvec (&msg.msg_iter,WRITE , vec,1 , wanted); +iov_iter_kvec (&msg.msg_iter,READ , vec,1 , wanted); }else { vec[0 ].iov_base = data->in + masked_prod; vec[0 ].iov_len = array_size - masked_prod; vec[1 ].iov_base = data->in; vec[1 ].iov_len = wanted - vec[0 ].iov_len; -iov_iter_kvec (&msg.msg_iter,WRITE , vec,2 , wanted); +iov_iter_kvec (&msg.msg_iter,READ , vec,2 , wanted); }atomic_set (&map->read,0 );
@@ -188,13 +188,13 @@ static bool pvcalls_conn_back_write(struct sock_mapping *map)if (pvcalls_mask (prod, array_size) >pvcalls_mask (cons, array_size)) { vec[0 ].iov_base = data->out +pvcalls_mask (cons, array_size); vec[0 ].iov_len = size; -iov_iter_kvec (&msg.msg_iter,READ , vec,1 , size); +iov_iter_kvec (&msg.msg_iter,WRITE , vec,1 , size); }else { vec[0 ].iov_base = data->out +pvcalls_mask (cons, array_size); vec[0 ].iov_len = array_size -pvcalls_mask (cons, array_size); vec[1 ].iov_base = data->out; vec[1 ].iov_len = size - vec[0 ].iov_len; -iov_iter_kvec (&msg.msg_iter,READ , vec,2 , size); +iov_iter_kvec (&msg.msg_iter,WRITE , vec,2 , size); }atomic_set (&map->write,0 );
fs/f2fs/gc.c +12 -6
@@ -1002,7 +1002,7 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, {struct page *node_page;nid_t nid; -unsigned int ofs_in_node, max_addrs; +unsigned int ofs_in_node, max_addrs, base;block_t source_blkaddr; nid =le32_to_cpu (sum->nid);
@@ -1028,11 +1028,17 @@ static bool is_alive(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,return false; } - max_addrs =IS_INODE (node_page) ?DEF_ADDRS_PER_INODE : -DEF_ADDRS_PER_BLOCK ; -if (ofs_in_node >= max_addrs) { -f2fs_err (sbi,"Inconsistent ofs_in_node:%u in summary, ino:%u, nid:%u, max:%u" , - ofs_in_node, dni->ino, dni->nid, max_addrs); +if (IS_INODE (node_page)) { + base =offset_in_addr (F2FS_INODE (node_page)); + max_addrs =DEF_ADDRS_PER_INODE ; + }else { + base =0 ; + max_addrs =DEF_ADDRS_PER_BLOCK ; + } + +if (base + ofs_in_node >= max_addrs) { +f2fs_err (sbi,"Inconsistent blkaddr offset: base:%u, ofs_in_node:%u, max:%u, ino:%u, nid:%u" , + base, ofs_in_node, max_addrs, dni->ino, dni->nid);f2fs_put_page (node_page,1 );return false; }
fs/gfs2/aops.c +0 -2
@@ -452,8 +452,6 @@ static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)return error; kaddr =kmap_atomic (page); -if (dsize >gfs2_max_stuffed_size (ip)) - dsize =gfs2_max_stuffed_size (ip);memcpy (kaddr, dibh->b_data +sizeof (struct gfs2_dinode ), dsize);memset (kaddr + dsize,0 ,PAGE_SIZE - dsize);kunmap_atomic (kaddr);
fs/gfs2/bmap.c +0 -3
@@ -61,9 +61,6 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh,void *kaddr =kmap (page);u64 dsize =i_size_read (inode); -if (dsize >gfs2_max_stuffed_size (ip)) - dsize =gfs2_max_stuffed_size (ip); -memcpy (kaddr, dibh->b_data +sizeof (struct gfs2_dinode ), dsize);memset (kaddr + dsize,0 ,PAGE_SIZE - dsize);kunmap (page);
fs/gfs2/glops.c +24 -20
77 lines not on this page · raw message
fs/gfs2/super.c +14 -13
@@ -378,6 +378,7 @@ static int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp)void gfs2_dinode_out (const struct gfs2_inode *ip,void *buf) { +const struct inode *inode = &ip->i_inode;struct gfs2_dinode *str = buf; str->di_header.mh_magic =cpu_to_be32 (GFS2_MAGIC );
@@ -385,15 +386,15 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) str->di_header.mh_format =cpu_to_be32 (GFS2_FORMAT_DI ); str->di_num.no_addr =cpu_to_be64 (ip->i_no_addr); str->di_num.no_formal_ino =cpu_to_be64 (ip->i_no_formal_ino); - str->di_mode =cpu_to_be32 (ip->i_inode.i_mode); - str->di_uid =cpu_to_be32 (i_uid_read (&ip->i_inode)); - str->di_gid =cpu_to_be32 (i_gid_read (&ip->i_inode)); - str->di_nlink =cpu_to_be32 (ip->i_inode.i_nlink); - str->di_size =cpu_to_be64 (i_size_read (&ip->i_inode)); - str->di_blocks =cpu_to_be64 (gfs2_get_inode_blocks (&ip->i_inode)); - str->di_atime =cpu_to_be64 (ip->i_inode.i_atime.tv_sec); - str->di_mtime =cpu_to_be64 (ip->i_inode.i_mtime.tv_sec); - str->di_ctime =cpu_to_be64 (ip->i_inode.i_ctime.tv_sec); + str->di_mode =cpu_to_be32 (inode->i_mode); + str->di_uid =cpu_to_be32 (i_uid_read (inode)); + str->di_gid =cpu_to_be32 (i_gid_read (inode)); + str->di_nlink =cpu_to_be32 (inode->i_nlink); + str->di_size =cpu_to_be64 (i_size_read (inode)); + str->di_blocks =cpu_to_be64 (gfs2_get_inode_blocks (inode)); + str->di_atime =cpu_to_be64 (inode->i_atime.tv_sec); + str->di_mtime =cpu_to_be64 (inode->i_mtime.tv_sec); + str->di_ctime =cpu_to_be64 (inode->i_ctime.tv_sec); str->di_goal_meta =cpu_to_be64 (ip->i_goal); str->di_goal_data =cpu_to_be64 (ip->i_goal);
@@ -401,16 +402,16 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) str->di_flags =cpu_to_be32 (ip->i_diskflags); str->di_height =cpu_to_be16 (ip->i_height); - str->di_payload_format =cpu_to_be32 (S_ISDIR (ip->i_inode.i_mode) && + str->di_payload_format =cpu_to_be32 (S_ISDIR (inode->i_mode) && !(ip->i_diskflags &GFS2_DIF_EXHASH ) ?GFS2_FORMAT_DE :0 ); str->di_depth =cpu_to_be16 (ip->i_depth); str->di_entries =cpu_to_be32 (ip->i_entries); str->di_eattr =cpu_to_be64 (ip->i_eattr); - str->di_atime_nsec =cpu_to_be32 (ip->i_inode.i_atime.tv_nsec); - str->di_mtime_nsec =cpu_to_be32 (ip->i_inode.i_mtime.tv_nsec); - str->di_ctime_nsec =cpu_to_be32 (ip->i_inode.i_ctime.tv_nsec); + str->di_atime_nsec =cpu_to_be32 (inode->i_atime.tv_nsec); + str->di_mtime_nsec =cpu_to_be32 (inode->i_mtime.tv_nsec); + str->di_ctime_nsec =cpu_to_be32 (inode->i_ctime.tv_nsec); }/**
fs/ntfs3/inode.c +7 -0
@@ -132,6 +132,13 @@ static struct inode *ntfs_read_mft(struct inode *inode,if (le16_to_cpu (attr->name_off) + attr->name_len > asize) goto out; +if (attr->non_res) { + t64 =le64_to_cpu (attr->nres.alloc_size); +if (le64_to_cpu (attr->nres.data_size) > t64 || +le64_to_cpu (attr->nres.valid_size) > t64) + goto out; + } +switch (attr->type) {case ATTR_STD : if (attr->non_res ||
fs/overlayfs/export.c +1 -1
@@ -791,7 +791,7 @@ static struct ovl_fh *ovl_fid_to_fh(struct fid *fid, int buflen, int fh_type)return ERR_PTR (-ENOMEM );/* Copy unaligned inner fh into aligned buffer */ -memcpy (&fh->fb, fid, buflen -OVL_FH_WIRE_OFFSET ); +memcpy (fh->buf, fid, buflen -OVL_FH_WIRE_OFFSET );return fh; }
fs/overlayfs/overlayfs.h +1 -1
@@ -107,7 +107,7 @@ struct ovl_fh {u8 padding[3 ];/* make sure fb.fid is 32bit aligned */ union {struct ovl_fb fb; -u8 buf[0 ]; + DECLARE_FLEX_ARRAY(u8, buf); }; } __packed;
fs/proc/task_mmu.c +1 -3
@@ -714,9 +714,7 @@ static int smaps_hugetlb_range(pte_t *pte, unsigned long hmask, page =pfn_swap_entry_to_page (swpent); }if (page) { -int mapcount =page_mapcount (page); - -if (mapcount >=2 ) +if (page_mapcount (page) >=2 ||hugetlb_pmd_shared (pte)) mss->shared_hugetlb +=huge_page_size (hstate_vma (vma));else mss->private_hugetlb +=huge_page_size (hstate_vma (vma));
fs/squashfs/squashfs_fs.h +1 -1
@@ -183,7 +183,7 @@ static inline int squashfs_block_size(__le32 raw)#define SQUASHFS_ID_BLOCK_BYTES (A ) (SQUASHFS_ID_BLOCKS(A) *\ sizeof(u64))/* xattr id lookup table defines */ -#define SQUASHFS_XATTR_BYTES (A ) ((A) * sizeof(struct squashfs_xattr_id)) +#define SQUASHFS_XATTR_BYTES (A ) (((u64) (A)) * sizeof(struct squashfs_xattr_id))#define SQUASHFS_XATTR_BLOCK (A ) (SQUASHFS_XATTR_BYTES(A) / \ SQUASHFS_METADATA_SIZE)
fs/squashfs/squashfs_fs_sb.h +1 -1
@@ -63,7 +63,7 @@ struct squashfs_sb_info {long long bytes_used;unsigned int inodes;unsigned int fragments; -int xattr_ids; +unsigned int xattr_ids;unsigned int ids;bool panic_on_errors; };
fs/squashfs/xattr.h +2 -2
@@ -10,12 +10,12 @@#ifdef CONFIG_SQUASHFS_XATTR extern __le64 *squashfs_read_xattr_id_table (struct super_block *,u64 , -u64 *,int *); +u64 *,unsigned int *);extern int squashfs_xattr_lookup (struct super_block *,unsigned int ,int *,unsigned int *,unsigned long long *);#else static inline __le64 *squashfs_read_xattr_id_table (struct super_block *sb, -u64 start,u64 *xattr_table_start,int *xattr_ids) +u64 start,u64 *xattr_table_start,unsigned int *xattr_ids) {struct squashfs_xattr_id_table *id_table;
fs/squashfs/xattr_id.c +2 -2
@@ -56,7 +56,7 @@ int squashfs_xattr_lookup(struct super_block *sb, unsigned int index,* Read uncompressed xattr id lookup table indexes from disk into memory */ __le64 *squashfs_read_xattr_id_table (struct super_block *sb,u64 table_start, -u64 *xattr_table_start,int *xattr_ids) +u64 *xattr_table_start,unsigned int *xattr_ids) {struct squashfs_sb_info *msblk = sb->s_fs_info;unsigned int len, indexes;
@@ -76,7 +76,7 @@ __le64 *squashfs_read_xattr_id_table(struct super_block *sb, u64 table_start,/* Sanity check values */ /* there is always at least one xattr id */ -if (*xattr_ids ==0 ) +if (*xattr_ids <=0 )return ERR_PTR (-EINVAL ); len =SQUASHFS_XATTR_BLOCK_BYTES (*xattr_ids);
include/linux/highmem-internal.h +2 -2
@@ -184,7 +184,7 @@ static inline void *kmap_local_pfn(unsigned long pfn)static inline void __kunmap_local (void *addr) {#ifdef ARCH_HAS_FLUSH_ON_KUNMAP -kunmap_flush_on_unmap (addr); +kunmap_flush_on_unmap (PTR_ALIGN_DOWN (addr,PAGE_SIZE ));#endif }
@@ -211,7 +211,7 @@ static inline void *kmap_atomic_pfn(unsigned long pfn)static inline void __kunmap_atomic (void *addr) {#ifdef ARCH_HAS_FLUSH_ON_KUNMAP -kunmap_flush_on_unmap (addr); +kunmap_flush_on_unmap (PTR_ALIGN_DOWN (addr,PAGE_SIZE ));#endif pagefault_enable ();if (IS_ENABLED (CONFIG_PREEMPT_RT ))
include/linux/hugetlb.h +13 -0
@@ -7,6 +7,7 @@#include <linux/fs.h> #include <linux/hugetlb_inline.h> #include <linux/cgroup.h> +#include <linux/page_ref.h> #include <linux/list.h> #include <linux/kref.h> #include <linux/pgtable.h>
@@ -1099,6 +1100,18 @@ static inline __init void hugetlb_cma_check(void) }#endif +#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE +static inline bool hugetlb_pmd_shared (pte_t *pte) +{ +return page_count (virt_to_page (pte)) >1 ; +} +#else +static inline bool hugetlb_pmd_shared (pte_t *pte) +{ +return false; +} +#endif +bool want_pmd_share (struct vm_area_struct *vma,unsigned long addr);#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE
include/linux/nvmem-provider.h +0 -2
@@ -66,7 +66,6 @@ struct nvmem_keepout {* @word_size: Minimum read/write access granularity. * @stride: Minimum read/write access stride. * @priv: User context passed to read/write callbacks. -* @wp-gpio: Write protect pin * @ignore_wp: Write Protect pin is managed by the provider. * * Note: A default "nvmem<id>" name will be assigned to the device if
@@ -81,7 +80,6 @@ struct nvmem_config {const char *name;int id;struct module *owner; -struct gpio_desc *wp_gpio;const struct nvmem_cell_info *cells;int ncells;const struct nvmem_keepout *keepout;
include/linux/util_macros.h +12 -0
@@ -38,4 +38,16 @@*/ #define find_closest_descending (x, a, as) __find_closest(x, a, as, >=) +/** +* is_insidevar - check if the @ptr points inside the @var memory range. +* @ptr: the pointer to a memory address. +* @var: the variable which address and size identify the memory range. +* +* Evaluates to true if the address in @ptr lies within the memory +* range allocated to @var. +*/ +#define is_insidevar (ptr, var) \ + ((uintptr_t)(ptr) >= (uintptr_t)(var) && \ + (uintptr_t)(ptr) < (uintptr_t)(var) + sizeof(var)) +#endif
include/scsi/libiscsi.h +2 -0
@@ -414,6 +414,8 @@ extern int iscsi_host_get_max_scsi_cmds(struct Scsi_Host *shost,extern struct iscsi_cls_session *iscsi_session_setup (struct iscsi_transport *,struct Scsi_Host *shost,uint16_t ,int ,int ,uint32_t ,unsigned int ); +void iscsi_session_remove (struct iscsi_cls_session *cls_session); +void iscsi_session_free (struct iscsi_cls_session *cls_session);extern void iscsi_session_teardown (struct iscsi_cls_session *);extern void iscsi_session_recovery_timedout (struct iscsi_cls_session *); extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
kernel/bpf/verifier.c +76 -32
226 lines not on this page · raw message
kernel/irq/irqdomain.c +1 -1
@@ -1913,7 +1913,7 @@ static void debugfs_add_domain_dir(struct irq_domain *d)static void debugfs_remove_domain_dir (struct irq_domain *d) { -debugfs_remove (debugfs_lookup (d->name, domain_dir)); +debugfs_lookup_and_remove (d->name, domain_dir); }void __init irq_domain_debugfs_init (struct dentry *root)
kernel/trace/bpf_trace.c +2 -1
@@ -776,6 +776,7 @@ static void do_bpf_send_signal(struct irq_work *entry) work = container_of(entry, struct send_signal_irq_work, irq_work);group_send_sig_info (work->sig,SEND_SIG_PRIV , work->task, work->type); +put_task_struct (work->task); }static int bpf_send_signal_common (u32 sig,enum pid_type type)
@@ -812,7 +813,7 @@ static int bpf_send_signal_common(u32 sig, enum pid_type type)* to the irq_work. The current task may change when queued * irq works get executed. */ - work->task = current; + work->task =get_task_struct (current); work->sig = sig; work->type = type;irq_work_queue (&work->irq_work);
mm/swapfile.c +1 -0
@@ -1093,6 +1093,7 @@ int get_swap_pages(int n_goal, swp_entry_t swp_entries[], int entry_size) goto check_out;pr_debug ("scan_swap_map of si %d failed to find offset\n" , si->type); +cond_resched ();spin_lock (&swap_avail_lock); nextsi:
net/bridge/br_netfilter_hooks.c +1 -0
@@ -871,6 +871,7 @@ static unsigned int ip_sabotage_in(void *priv,if (nf_bridge && !nf_bridge->in_prerouting && !netif_is_l3_master (skb->dev) && !netif_is_l3_slave (skb->dev)) { +nf_bridge_info_free (skb); state->okfn (state->net, state->sk, skb);return NF_STOLEN ; }
net/can/j1939/transport.c +0 -4
@@ -1092,10 +1092,6 @@ static bool j1939_session_deactivate(struct j1939_session *session)bool active;j1939_session_list_lock (priv); -/* This function should be called with a session ref-count of at -* least 2. -*/ -WARN_ON_ONCE (kref_read (&session->kref) <2 ); active =j1939_session_deactivate_locked (session);j1939_session_list_unlock (priv);
net/ipv4/tcp_bpf.c +2 -2
@@ -6,6 +6,7 @@#include <linux/bpf.h> #include <linux/init.h> #include <linux/wait.h> +#include <linux/util_macros.h> #include <net/inet_common.h> #include <net/tls.h>
@@ -640,10 +641,9 @@ EXPORT_SYMBOL_GPL(tcp_bpf_update_proto);*/ void tcp_bpf_clone (const struct sock *sk,struct sock *newsk) { -int family = sk->sk_family ==AF_INET6 ?TCP_BPF_IPV6 :TCP_BPF_IPV4 ;struct proto *prot = newsk->sk_prot; -if (prot == &tcp_bpf_prots[family][TCP_BPF_BASE ]) +if (is_insidevar (prot, tcp_bpf_prots)) newsk->sk_prot = sk->sk_prot_creator; }#endif /* CONFIG_BPF_SYSCALL */
net/ipv6/addrconf.c +32 -27
95 lines not on this page · raw message
net/netrom/af_netrom.c +5 -0
@@ -400,6 +400,11 @@ static int nr_listen(struct socket *sock, int backlog)struct sock *sk = sock->sk;lock_sock (sk); +if (sock->state !=SS_UNCONNECTED ) { +release_sock (sk); +return -EINVAL ; + } +if (sk->sk_state !=TCP_LISTEN ) {memset (&nr_sk (sk)->user_addr,0 ,AX25_ADDR_LEN ); sk->sk_max_ack_backlog = backlog;
net/openvswitch/datapath.c +6 -6
@@ -977,14 +977,14 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info) key =kzalloc (sizeof (*key),GFP_KERNEL );if (!key) { error = -ENOMEM ; - goto err_kfree_key; + goto err_kfree_flow; }ovs_match_init (&match, key, false, &mask); error =ovs_nla_get_match (net, &match, a[OVS_FLOW_ATTR_KEY ], a[OVS_FLOW_ATTR_MASK ], log);if (error) - goto err_kfree_flow; + goto err_kfree_key;ovs_flow_mask_key (&new_flow->key, key, true, &mask);
@@ -992,14 +992,14 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info) error =ovs_nla_get_identifier (&new_flow->id, a[OVS_FLOW_ATTR_UFID ], key, log);if (error) - goto err_kfree_flow; + goto err_kfree_key;/* Validate actions. */ error =ovs_nla_copy_actions (net, a[OVS_FLOW_ATTR_ACTIONS ], &new_flow->key, &acts, log);if (error) {OVS_NLERR (log,"Flow actions may not be safe on all matching packets." ); - goto err_kfree_flow; + goto err_kfree_key; } reply = ovs_flow_cmd_alloc_info(acts, &new_flow->id, info, false,
@@ -1099,10 +1099,10 @@ static int ovs_flow_cmd_new(struct sk_buff *skb, struct genl_info *info)kfree_skb (reply); err_kfree_acts:ovs_nla_free_flow_actions (acts); -err_kfree_flow: -ovs_flow_free (new_flow, false); err_kfree_key:kfree (key); +err_kfree_flow: +ovs_flow_free (new_flow, false); error:return error; }
net/qrtr/ns.c +4 -1
@@ -83,7 +83,10 @@ static struct qrtr_node *node_get(unsigned int node_id) node->id = node_id; -radix_tree_insert (&nodes, node_id, node); +if (radix_tree_insert (&nodes, node_id, node)) { +kfree (node); +return NULL ; + }return node; }
net/x25/af_x25.c +6 -0
@@ -482,6 +482,12 @@ static int x25_listen(struct socket *sock, int backlog)int rc = -EOPNOTSUPP ;lock_sock (sk); +if (sock->state !=SS_UNCONNECTED ) { + rc = -EINVAL ; +release_sock (sk); +return rc; + } +if (sk->sk_state !=TCP_LISTEN ) {memset (&x25_sk (sk)->dest_addr,0 ,X25_ADDR_LEN ); sk->sk_max_ack_backlog = backlog;
sound/pci/hda/patch_realtek.c +1 -0
@@ -8873,6 +8873,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x142b ,"Acer Swift SF314-42" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1025 ,0x1430 ,"Acer TravelMate B311R-31" ,ALC256_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1025 ,0x1466 ,"Acer Aspire A515-56" ,ALC255_FIXUP_ACER_HEADPHONE_AND_MIC ), +SND_PCI_QUIRK (0x1025 ,0x1534 ,"Acer Predator PH315-54" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x0470 ,"Dell M101z" ,ALC269_FIXUP_DELL_M101Z ),SND_PCI_QUIRK (0x1028 ,0x053c ,"Dell Latitude E5430" ,ALC292_FIXUP_DELL_E7X ), SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
sound/pci/hda/patch_via.c +3 -0
@@ -821,6 +821,9 @@ static int add_secret_dac_path(struct hda_codec *codec)return 0 ; nums =snd_hda_get_connections (codec, spec->gen.mixer_nid, conn,ARRAY_SIZE (conn) -1 ); +if (nums <0 ) +return nums; +for (i =0 ; i < nums; i++) {if (get_wcaps_type (get_wcaps (codec, conn[i])) ==AC_WID_AUD_OUT )return 0 ;
sound/soc/intel/boards/bdw-rt5650.c +1 -1
@@ -299,7 +299,7 @@ static int bdw_rt5650_probe(struct platform_device *pdev)if (!bdw_rt5650)return -ENOMEM ; -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; ret =snd_soc_fixup_dai_links_platform_name (&bdw_rt5650_card, mach->mach_params.platform);
sound/soc/intel/boards/bdw-rt5677.c +1 -1
@@ -426,7 +426,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev)if (!bdw_rt5677)return -ENOMEM ; -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; ret =snd_soc_fixup_dai_links_platform_name (&bdw_rt5677_card, mach->mach_params.platform);
sound/soc/intel/boards/broadwell.c +1 -1
@@ -292,7 +292,7 @@ static int broadwell_audio_probe(struct platform_device *pdev) broadwell_rt286.dev = &pdev->dev; -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; ret =snd_soc_fixup_dai_links_platform_name (&broadwell_rt286, mach->mach_params.platform);
sound/soc/intel/boards/bxt_da7219_max98357a.c +1 -1
@@ -825,7 +825,7 @@ static int broxton_audio_probe(struct platform_device *pdev) } } -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/bxt_rt298.c +1 -1
@@ -628,7 +628,7 @@ static int broxton_audio_probe(struct platform_device *pdev) card->dev = &pdev->dev;snd_soc_card_set_drvdata (card, ctx); -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/bytcht_cx2072x.c +1 -1
@@ -257,7 +257,7 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev) byt_cht_cx2072x_dais[dai_index].codecs->name = codec_name; } -/* override plaform name, if required */ +/* override platform name, if required */ ret =snd_soc_fixup_dai_links_platform_name (&byt_cht_cx2072x_card, mach->mach_params.platform);if (ret)
sound/soc/intel/boards/bytcht_da7213.c +1 -1
@@ -260,7 +260,7 @@ static int bytcht_da7213_probe(struct platform_device *pdev) dailink[dai_index].codecs->name = codec_name; } -/* override plaform name, if required */ +/* override platform name, if required */ platform_name = mach->mach_params.platform; ret_val =snd_soc_fixup_dai_links_platform_name (card, platform_name);
sound/soc/intel/boards/bytcht_es8316.c +14 -10
@@ -497,21 +497,28 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)if (adev) {snprintf (codec_name,sizeof (codec_name),"i2c-%s" ,acpi_dev_name (adev)); -put_device (&adev->dev); byt_cht_es8316_dais[dai_index].codecs->name = codec_name; }else {dev_err (dev,"Error cannot find '%s' dev\n" , mach->id);return -ENXIO ; } -/* override plaform name, if required */ + codec_dev =acpi_get_first_physical_node (adev); +acpi_dev_put (adev); +if (!codec_dev) +return -EPROBE_DEFER ; + priv->codec_dev =get_device (codec_dev); + +/* override platform name, if required */ byt_cht_es8316_card.dev = dev; platform_name = mach->mach_params.platform; ret =snd_soc_fixup_dai_links_platform_name (&byt_cht_es8316_card, platform_name); -if (ret) +if (ret) { +put_device (codec_dev);return ret; + }/* Check for BYTCR or other platform and setup quirks */ dmi_id =dmi_first_match (byt_cht_es8316_quirk_table);
@@ -539,14 +546,10 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)/* get the clock */ priv->mclk =devm_clk_get (dev,"pmc_plt_clk_3" ); -if (IS_ERR (priv->mclk)) +if (IS_ERR (priv->mclk)) { +put_device (codec_dev);return dev_err_probe (dev,PTR_ERR (priv->mclk),"clk_get pmc_plt_clk_3 failed\n" ); - -/* get speaker enable GPIO */ - codec_dev =acpi_get_first_physical_node (adev); -if (!codec_dev) -return -EPROBE_DEFER ; - priv->codec_dev =get_device (codec_dev); + }if (quirk &BYT_CHT_ES8316_JD_INVERTED ) props[cnt++] =PROPERTY_ENTRY_BOOL ("everest,jack-detect-inverted" );
@@ -568,6 +571,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) } } +/* get speaker enable GPIO */ devm_acpi_dev_add_driver_gpios (codec_dev, byt_cht_es8316_gpios); priv->speaker_en_gpio = gpiod_get_optional(codec_dev, "speaker-enable",
sound/soc/intel/boards/bytcr_rt5640.c +7 -7
@@ -1561,13 +1561,18 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)if (adev) {snprintf (byt_rt5640_codec_name,sizeof (byt_rt5640_codec_name),"i2c-%s" ,acpi_dev_name (adev)); -put_device (&adev->dev); byt_rt5640_dais[dai_index].codecs->name = byt_rt5640_codec_name; }else {dev_err (&pdev->dev,"Error cannot find '%s' dev\n" , mach->id);return -ENXIO ; } + codec_dev =acpi_get_first_physical_node (adev); +acpi_dev_put (adev); +if (!codec_dev) +return -EPROBE_DEFER ; + priv->codec_dev =get_device (codec_dev); +/* * swap SSP0 if bytcr is detected * (will be overridden if DMI quirk is detected)
@@ -1642,11 +1647,6 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) byt_rt5640_quirk = quirk_override; } - codec_dev =acpi_get_first_physical_node (adev); -if (!codec_dev) -return -EPROBE_DEFER ; - priv->codec_dev =get_device (codec_dev); -if (byt_rt5640_quirk &BYT_RT5640_JD_HP_ELITEP_1000G2 ) {acpi_dev_add_driver_gpios (ACPI_COMPANION (priv->codec_dev), byt_rt5640_hp_elitepad_1000g2_gpios);
@@ -1733,7 +1733,7 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) byt_rt5640_card.long_name = byt_rt5640_long_name;#endif -/* override plaform name, if required */ +/* override platform name, if required */ platform_name = mach->mach_params.platform; ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5640_card,
sound/soc/intel/boards/bytcr_rt5651.c +2 -2
@@ -930,7 +930,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)if (adev) {snprintf (byt_rt5651_codec_name,sizeof (byt_rt5651_codec_name),"i2c-%s" ,acpi_dev_name (adev)); -put_device (&adev->dev); byt_rt5651_dais[dai_index].codecs->name = byt_rt5651_codec_name; }else {dev_err (&pdev->dev,"Error cannot find '%s' dev\n" , mach->id);
@@ -938,6 +937,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) } codec_dev =acpi_get_first_physical_node (adev); +acpi_dev_put (adev);if (!codec_dev)return -EPROBE_DEFER ; priv->codec_dev =get_device (codec_dev);
@@ -1104,7 +1104,7 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) byt_rt5651_card.long_name = byt_rt5651_long_name;#endif -/* override plaform name, if required */ +/* override platform name, if required */ platform_name = mach->mach_params.platform; ret_val = snd_soc_fixup_dai_links_platform_name(&byt_rt5651_card,
sound/soc/intel/boards/bytcr_wm5102.c +1 -1
@@ -411,9 +411,9 @@ static int snd_byt_wm5102_mc_probe(struct platform_device *pdev)return -ENOENT ; }snprintf (codec_name,sizeof (codec_name),"spi-%s" ,acpi_dev_name (adev)); -put_device (&adev->dev); codec_dev =bus_find_device_by_name (&spi_bus_type,NULL , codec_name); +acpi_dev_put (adev);if (!codec_dev)return -EPROBE_DEFER ;
sound/soc/intel/boards/cht_bsw_max98090_ti.c +2 -2
@@ -296,7 +296,7 @@ static int cht_max98090_headset_init(struct snd_soc_component *component)int ret;/* -* TI supports 4 butons headset detection +* TI supports 4 buttons headset detection * KEY_MEDIA * KEY_VOICECOMMAND * KEY_VOLUMEUP
@@ -558,7 +558,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)dev_dbg (dev,"Unable to add GPIO mapping table\n" ); } -/* override plaform name, if required */ +/* override platform name, if required */ snd_soc_card_cht.dev = &pdev->dev; mach = pdev->dev.platform_data; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/cht_bsw_nau8824.c +2 -2
@@ -100,7 +100,7 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)struct snd_soc_component *component = codec_dai->component;int ret, jack_type; -/* NAU88L24 supports 4 butons headset detection +/* NAU88L24 supports 4 buttons headset detection * KEY_PLAYPAUSE * KEY_VOICECOMMAND * KEY_VOLUMEUP
@@ -257,7 +257,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)return -ENOMEM ;snd_soc_card_set_drvdata (&snd_soc_card_cht, drv); -/* override plaform name, if required */ +/* override platform name, if required */ snd_soc_card_cht.dev = &pdev->dev; mach = pdev->dev.platform_data; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/cht_bsw_rt5645.c +1 -1
@@ -653,7 +653,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) (cht_rt5645_quirk & CHT_RT5645_SSP0_AIF2)) cht_dailink[dai_index].cpus->dai_name ="ssp0-port" ; -/* override plaform name, if required */ +/* override platform name, if required */ platform_name = mach->mach_params.platform; ret_val = snd_soc_fixup_dai_links_platform_name(card,
sound/soc/intel/boards/cht_bsw_rt5672.c +1 -1
@@ -483,7 +483,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev) drv->use_ssp0 = true; } -/* override plaform name, if required */ +/* override platform name, if required */ snd_soc_card_cht.dev = &pdev->dev; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/glk_rt5682_max98357a.c +1 -1
@@ -604,7 +604,7 @@ static int geminilake_audio_probe(struct platform_device *pdev) card->dev = &pdev->dev;snd_soc_card_set_drvdata (card, ctx); -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; platform_name = mach->mach_params.platform;
sound/soc/intel/boards/haswell.c +1 -1
@@ -175,7 +175,7 @@ static int haswell_audio_probe(struct platform_device *pdev) haswell_rt5640.dev = &pdev->dev; -/* override plaform name, if required */ +/* override platform name, if required */ mach = pdev->dev.platform_data; ret =snd_soc_fixup_dai_links_platform_name (&haswell_rt5640, mach->mach_params.platform);
tools/testing/selftests/net/udpgso_bench.sh +20 -4
@@ -7,6 +7,7 @@ readonly GREEN='\033[0;92m' readonly YELLOW='\033[0;33m' readonly RED='\033[0;31m' readonly NC='\033[0m' # No Color +readonly TESTPORT=8000 readonly KSFT_PASS=0 readonly KSFT_FAIL=1
@@ -56,11 +57,26 @@ trap wake_children EXIT run_one() { local -r args=$@ + local nr_socks=0 + local i=0 + local -r timeout=10 + + ./udpgso_bench_rx -p "$TESTPORT" & + ./udpgso_bench_rx -p "$TESTPORT" -t & + + # Wait for the above test program to get ready to receive connections. + while [ "$i" -lt "$timeout" ]; do + nr_socks="$(ss -lnHi | grep -c "\*:${TESTPORT}")" + [ "$nr_socks" -eq 2 ] && break + i=$((i + 1)) + sleep 1 + done + if [ "$nr_socks" -ne 2 ]; then + echo "timed out while waiting for udpgso_bench_rx" + exit 1 + fi - ./udpgso_bench_rx & - ./udpgso_bench_rx -t & - - ./udpgso_bench_tx ${args} + ./udpgso_bench_tx -p "$TESTPORT" ${args}
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/udpgso_bench_rx.c +3 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/udpgso_bench_tx.c +29 -7
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.