Linux 5.15.138
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.138 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/powerpc/kernel/head_fsl_booke.S | 2 arch/powerpc/kernel/setup-common.c | 2 arch/powerpc/mm/mem.c | 1 arch/sparc/lib/checksum_32.S | 2 arch/x86/include/asm/i8259.h | 2 arch/x86/include/asm/setup.h | 46 +- arch/x86/kernel/acpi/boot.c | 3 arch/x86/kernel/i8259.c | 38 + arch/x86/kernel/setup.c | 5 arch/x86/kernel/vmlinux.lds.S | 2 drivers/base/driver.c | 69 +++ drivers/base/platform.c | 28 - drivers/clk/clk.c | 21 - drivers/dma/ste_dma40.c | 1 drivers/firmware/imx/imx-dsp.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 drivers/gpu/drm/amd/amdgpu/vi.c | 2 drivers/gpu/drm/drm_dp_mst_topology.c | 6 drivers/gpu/drm/i915/i915_pmu.c | 9 drivers/gpu/drm/ttm/ttm_device.c | 8 drivers/i2c/busses/i2c-aspeed.c | 3 drivers/i2c/busses/i2c-stm32f7.c | 9 drivers/i2c/muxes/i2c-demux-pinctrl.c | 2 drivers/i2c/muxes/i2c-mux-gpmux.c | 2 drivers/i2c/muxes/i2c-mux-pinctrl.c | 2 drivers/iio/adc/exynos_adc.c | 24 - drivers/iio/adc/xilinx-xadc-core.c | 39 -- drivers/iio/adc/xilinx-xadc.h | 2 drivers/iio/afe/iio-rescale.c | 162 ++++++-- drivers/input/mouse/synaptics.c | 1 drivers/input/rmi4/rmi_smbus.c | 50 +- drivers/irqchip/irq-riscv-intc.c | 10 drivers/irqchip/irq-stm32-exti.c | 1 drivers/mcb/mcb-lpc.c | 35 + drivers/mcb/mcb-parse.c | 15 drivers/misc/fastrpc.c | 10 drivers/misc/pci_endpoint_test.c | 4 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 drivers/net/ethernet/intel/i40e/i40e.h | 2 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 drivers/net/ethernet/intel/igb/igb_ethtool.c | 6 drivers/net/ethernet/intel/igc/igc_ethtool.c | 35 + drivers/net/ethernet/realtek/r8169_main.c | 6 drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 2 drivers/net/gtp.c | 5 drivers/net/ieee802154/adf7242.c | 5 drivers/net/usb/r8152.c | 18 drivers/net/usb/smsc95xx.c | 4 drivers/nvmem/imx-ocotp.c | 6 drivers/pci/quirks.c | 8 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 17 drivers/platform/mellanox/mlxbf-tmfifo.c | 21 - drivers/rpmsg/qcom_glink_native.c | 2 drivers/rpmsg/rpmsg_core.c | 37 + drivers/rpmsg/rpmsg_internal.h | 5 drivers/rpmsg/rpmsg_ns.c | 4 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 drivers/spi/spi-npcm-fiu.c | 5 drivers/tty/n_gsm.c | 2 drivers/tty/serial/8250/8250_pci.c | 327 ++++++++++++++++ drivers/usb/gadget/legacy/raw_gadget.c | 26 - drivers/usb/storage/unusual_cypress.h | 2 drivers/usb/typec/tcpm/tcpm.c | 3 drivers/vhost/vhost.c | 4 drivers/video/fbdev/aty/atyfb_base.c | 4 drivers/video/fbdev/uvesafb.c | 2 drivers/virtio/virtio_balloon.c | 6 drivers/virtio/virtio_mmio.c | 19 fs/ext4/mballoc.c | 51 +- fs/ext4/mballoc.h | 14 fs/nfsd/vfs.c | 12 fs/ntfs3/attrib.c | 6 fs/ntfs3/attrlist.c | 15 fs/ntfs3/bitmap.c | 3 fs/ntfs3/dir.c | 6 fs/ntfs3/frecord.c | 8 fs/ntfs3/fslog.c | 6 fs/ntfs3/fsntfs.c | 13 fs/ntfs3/super.c | 2 include/linux/device/driver.h | 2 include/linux/iio/afe/rescale.h | 36 + include/linux/kasan.h | 6 include/linux/pci_ids.h | 1 include/linux/platform_device.h | 6 include/linux/rpmsg.h | 14 include/net/tcp.h | 2 include/uapi/linux/can/isotp.h | 25 - include/uapi/linux/gtp.h | 2 kernel/events/core.c | 3 kernel/trace/trace_kprobe.c | 4 mm/kasan/report.c | 4 mm/migrate.c | 14 mm/page_alloc.c | 2 net/can/isotp.c | 426 ++++++++++++++-------- net/core/neighbour.c | 67 +-- net/ipv4/tcp.c | 19 net/ipv4/tcp_input.c | 9 net/mptcp/protocol.c | 12 net/netfilter/nfnetlink_log.c | 2 net/sched/cls_u32.c | 2 net/vmw_vsock/virtio_transport.c | 215 +++++++---- sound/hda/intel-dsp-config.c | 6 sound/soc/codecs/rt5645.c | 2 sound/soc/codecs/wcd938x.c | 52 ++ sound/soc/generic/simple-card.c | 6 tools/objtool/check.c | 2 109 files changed, 1641 insertions(+), 671 deletions(-)
Al Viro (2):
nfsd: lock_rename() needs both directories to live on the same fs
sparc32: fix a braino in fault handling in csum_and_copy_..._user()
Alain Volmat (1):
i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
Alessandro Carminati (1):
clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name
Alexandru Matei (1):
vsock/virtio: initialize the_virtio_vsock before using VQs
Andrey Konovalov (1):
usb: raw-gadget: properly handle interrupted requests
Anup Patel (1):
irqchip/riscv-intc: Mark all INTC nodes as initialized
Arnd Bergmann (1):
fbdev: atyfb: only use ioremap_uc() on i386 and ia64
Baokun Li (3):
ext4: add two helper functions extent_logical_end() and pa_logical_end()
ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow
ext4: avoid overlapping preallocations due to overflow
Ben Wolsieffer (1):
irqchip/stm32-exti: add missing DT IRQ flag translation
Bjorn Andersson (1):
rpmsg: glink: Release driver_override
Cameron Williams (9):
tty: 8250: Remove UC-257 and UC-431
tty: 8250: Add support for additional Brainboxes UC cards
tty: 8250: Add support for Brainboxes UP cards
tty: 8250: Add support for Intashield IS-100
tty: 8250: Fix port count of PX-257
tty: 8250: Fix up PX-803/PX-857
tty: 8250: Add support for additional Brainboxes PX cards
tty: 8250: Add support for Intashield IX cards
tty: 8250: Add Brainboxes Oxford Semiconductor-based quirks
Christophe JAILLET (1):
net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show()
Christophe Leroy (1):
powerpc/85xx: Fix math emulation exception
Daniel Starke (1):
tty: n_gsm: fix race condition in status line change on dead connections
Dmitry Torokhov (1):
Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
Douglas Anderson (6):
r8152: Increase USB control msg timeout to 5000ms as per spec
r8152: Run the unload routine if we have errors during probe
r8152: Cancel hw_phy_work if we have an error in probe
r8152: Release firmware if we have an error in probe
r8152: Check for unplug in rtl_phy_patch_request()
r8152: Check for unplug in r8153b_ups_en() / r8153c_ups_en()
Ekansh Gupta (1):
misc: fastrpc: Clean buffers on remote invocation failures
Eric Auger (1):
vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE
Eric Dumazet (3):
tcp: remove dead code from tcp_sendmsg_locked()
tcp: cleanup tcp_remove_empty_skb() use
neighbour: fix various data-races
Florian Westphal (1):
netfilter: nfnetlink_log: silence bogus compiler warning
Fred Chen (1):
tcp: fix wrong RTO timeout when received SACK reneging
Gabriel Marcano (1):
fs/ntfs3: Fix directory element type detection
Gavin Shan (1):
virtio_balloon: Fix endless deflation and inflation on arm64
Greg Kroah-Hartman (1):
Linux 5.15.138
Gregory Price (1):
mm/migrate: fix do_pages_move for compat pointers
Gustavo A. R. Silva (1):
net: sched: cls_u32: Fix allocation size in u32_init()
Haibo Li (1):
kasan: print the original fault addr when access invalid shadow
Hangyu Hua (1):
rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
Hao Ge (1):
firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels()
Herve Codina (3):
i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
Ivan Vecera (2):
i40e: Fix I40E_FLAG_VF_VLAN_PRUNING value
i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
Jian Zhang (1):
i2c: aspeed: Fix i2c bus hang in slave read
Jimmy Hu (1):
usb: typec: tcpm: Fix NULL pointer dereference in tcpm_pd_svdm()
Johan Hovold (2):
ASoC: codecs: wcd938x: fix resource leaks on bind errors
ASoC: codecs: wcd938x: fix runtime PM imbalance on remove
John Sperbeck (1):
objtool/x86: add missing embedded_insn check
Jorge Maidana (1):
fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
Josh Poimboeuf (2):
x86/mm: Simplify RESERVE_BRK() x86/mm: Fix RESERVE_BRK() for older binutils
Juergen Gross (1):
x86: Fix .brk attribute in linker script
Karolina Stolarek (1):
drm/ttm: Reorder sys manager cleanup step
Kemeng Shi (1):
mm/page_alloc: correct start page when guard page debug is enabled
Konstantin Komarov (5):
fs/ntfs3: Add ckeck in ni_update_parent()
fs/ntfs3: Write immediately updated ntfs state
fs/ntfs3: Use kvmalloc instead of kmalloc(... __GFP_NOWARN) fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() fs/ntfs3: Fix NULL pointer dereference on error in attr_allocate_frame()
Krzysztof Kozlowski (5):
pinctrl: qcom: lpass-lpi: fix concurrent register updates
driver: platform: Add helper for safer setting of driver_override
rpmsg: Constify local variable in field store macro
rpmsg: Fix kfree() of static memory on setting driver_override
rpmsg: Fix calling device_lock() on non-initialized device
Kuninori Morimoto (1):
ASoC: simple-card: fixup asoc_simple_probe() error handling
Kunwu Chan (1):
treewide: Spelling fix in comment
Liam Beguin (3):
iio: afe: rescale: reorder includes
iio: afe: rescale: expose scale processing function
iio: afe: rescale: add offset support
LihaSika (1):
usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
Liming Sun (1):
platform/mellanox: mlxbf-tmfifo: Fix a warning message
Linus Walleij (1):
iio: afe: rescale: Accept only offset channels
Lukasz Majczak (1):
drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
Marek Szyprowski (1):
iio: exynos-adc: request second interupt only when touchscreen mode is used
Mario Limonciello (2):
drm/amd: Move helper for dynamic speed switch check out of smu13 drm/amd: Disable ASPM for VI w/ all Intel systems
Mark Hasemeyer (1):
ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection
Mateusz Palczewski (1):
igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
Maximilian Heyne (1):
virtio-mmio: fix memory leak of vm_dev
Michael Ellerman (1):
powerpc/mm: Fix boot crash with FLATMEM
Mirsad Goran Todorovac (3):
r8169: fix the KCSAN reported data-race in rtl_tx() while reading tp->cur_tx
r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1Oliver Hartkopp (7):
can: isotp: set max PDU size to 64 kByte
can: isotp: isotp_bind(): return -EINVAL on incorrect CAN ID formatting
can: isotp: check CAN address family in isotp_bind()
can: isotp: handle wait_event_interruptible() return values
can: isotp: add local echo tx processing and tx without FC
can: isotp: isotp_bind(): do not validate unused address information
can: isotp: isotp_sendmsg(): fix TX state detection and wait behavior
Pablo Neira Ayuso (2):
gtp: uapi: fix GTPA_MAX
gtp: fix fragmentation needed check with gso
Paolo Abeni (1):
mptcp: more conservative check for zero probes
Peng Fan (3):
nvmem: imx: correct nregs for i.MX6ULL
nvmem: imx: correct nregs for i.MX6SLL
nvmem: imx: correct nregs for i.MX6UL
Peter Zijlstra (1):
perf/core: Fix potential NULL deref
Robert Hancock (2):
iio: adc: xilinx-xadc: Don't clobber preset voltage/temperature thresholds
iio: adc: xilinx-xadc: Correct temperature offset/scale for UltraScale
Rodríguez Barbarin, José Javier (2):
mcb: Return actual parsed size when reading chameleon table
mcb-lpc: Reallocate memory region to avoid memory overlapping
Sasha Neftin (1):
igc: Fix ambiguity in the ethtool advertising
Shailend Chand (1):
gve: Fix GFP flags when allocing pages
Shigeru Yoshida (1):
net: usb: smsc95xx: Fix uninit-value access in smsc95xx_read_reg
Shuming Fan (1):
ASoC: rt5650: fix the wrong result of key button
Siddharth Vadapalli (1):
misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support
Stefano Garzarella (2):
vsock/virtio: factor our the code to initialize and delete VQs vsock/virtio: add support for device suspend/resume
Su Hui (2):
fs/ntfs3: Avoid possible memory leak
net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
Thomas Gleixner (1):
x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
Tomas Henzl (1):
scsi: mpt3sas: Fix in error path
Umesh Nerlige Ramappa (1):
drm/i915/pmu: Check if pmu is closed before stopping event
Vicki Pfau (1):
PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
William A. Kennington III (1):
spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0
Yujie Liu (1):
tracing/kprobes: Fix the description of variable length arguments
Zhang Shurong (1):
dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 137 +SUBLEVEL = 138 EXTRAVERSION = NAME = Trick or Treat
arch/powerpc/kernel/head_fsl_booke.S +1 -1
@@ -394,7 +394,7 @@ interrupt_base: #ifdef CONFIG_PPC_FPU FP_UNAVAILABLE_EXCEPTION #else - EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, unknown_exception) + EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, emulation_assist_interrupt) #endif /* System Call Interrupt */
arch/powerpc/kernel/setup-common.c +2 -0
@@ -887,6 +887,8 @@ void __init setup_arch(char **cmdline_p)/* Parse memory topology */ mem_topology_setup (); +/* Set max_mapnr before paging_init() */ +set_max_mapnr (max_pfn);/* * Release secondary cpus out of their spinloops at 0x60 now that
arch/powerpc/mm/mem.c +0 -1
@@ -288,7 +288,6 @@ void __init mem_init(void)#endif high_memory = (void *)__va (max_low_pfn *PAGE_SIZE ); -set_max_mapnr (max_pfn);kasan_late_init ();
arch/sparc/lib/checksum_32.S +1 -1
@@ -453,5 +453,5 @@ ccslow: cmp %g1, 0 * we only bother with faults on loads... */ cc_fault: - ret + retl clr %o0
arch/x86/include/asm/i8259.h +2 -0
@@ -69,6 +69,8 @@ struct legacy_pic {void (*make_irq)(unsigned int irq); }; +void legacy_pic_pcat_compat (void ); +extern struct legacy_pic *legacy_pic;extern struct legacy_pic null_legacy_pic;
arch/x86/include/asm/setup.h +21 -25
60 lines not on this page · raw message
arch/x86/kernel/acpi/boot.c +3 -0
@@ -139,6 +139,9 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)pr_debug ("Local APIC address 0x%08x\n" , madt->address); } +if (madt->flags &ACPI_MADT_PCAT_COMPAT ) +legacy_pic_pcat_compat (); +default_acpi_madt_oem_check (madt->header.oem_id, madt->header.oem_table_id);
arch/x86/kernel/i8259.c +30 -8
@@ -32,6 +32,7 @@*/ static void init_8259A (int auto_eoi); +static bool pcat_compat__ro_after_init ;static int i8259A_auto_eoi;DEFINE_RAW_SPINLOCK (i8259A_lock);
@@ -301,15 +302,32 @@ static void unmask_8259A(void)static int probe_8259A (void ) { +unsigned char new_val, probe_val = ~(1 <<PIC_CASCADE_IR );unsigned long flags; -unsigned char probe_val = ~(1 <<PIC_CASCADE_IR ); -unsigned char new_val; + +/* +* If MADT has the PCAT_COMPAT flag set, then do not bother probing +* for the PIC. Some BIOSes leave the PIC uninitialized and probing +* fails. +* +* Right now this causes problems as quite some code depends on +* nr_legacy_irqs() > 0 or has_legacy_pic() == true. This is silly +* when the system has an IO/APIC because then PIC is not required +* at all, except for really old machines where the timer interrupt +* must be routed through the PIC. So just pretend that the PIC is +* there and let legacy_pic->init() initialize it for nothing. +* +* Alternatively this could just try to initialize the PIC and +* repeat the probe, but for cases where there is no PIC that's +* just pointless. +*/ +if (pcat_compat) +return nr_legacy_irqs (); +/* -* Check to see if we have a PIC. -* Mask all except the cascade and read -* back the value we just wrote. If we don't -* have a PIC, we will read 0xff as opposed to the -* value we wrote. +* Check to see if we have a PIC. Mask all except the cascade and +* read back the value we just wrote. If we don't have a PIC, we +* will read 0xff as opposed to the value we wrote. */ raw_spin_lock_irqsave (&i8259A_lock, flags);
@@ -431,5 +449,9 @@ static int __init i8259A_init_ops(void)return 0 ; } -device_initcall (i8259A_init_ops); + +void __init legacy_pic_pcat_compat (void ) +{ + pcat_compat = true; +}
arch/x86/kernel/setup.c +0 -5
@@ -66,11 +66,6 @@ RESERVE_BRK(dmi_alloc, 65536);#endif -/* -* Range of the BSS area. The size of the BSS area is determined -* at link time, with RESERVE_BRK() facility reserving additional -* chunks. -*/ unsigned long _brk_start = (unsigned long )__brk_base;unsigned long _brk_end = (unsigned long )__brk_base;
arch/x86/kernel/vmlinux.lds.S +1 -1
@@ -414,7 +414,7 @@ SECTIONS .brk : AT(ADDR(.brk) - LOAD_OFFSET) { __brk_base = .; . += 64 * 1024; /* 64k alignment slop space */ - *(.brk_reservation) /* areas brk users have reserved */ + *(.bss..brk) /* areas brk users have reserved */ __brk_limit = .; }
drivers/base/driver.c +69 -0
75 lines not on this page · raw message
drivers/base/platform.c +4 -24
@@ -1270,31 +1270,11 @@ static ssize_t driver_override_store(struct device *dev, const char *buf, size_t count) {struct platform_device *pdev =to_platform_device (dev); -char *driver_override, *old, *cp; - -/* We need to keep extra room for a newline */ -if (count >= (PAGE_SIZE -1 )) -return -EINVAL ; - - driver_override =kstrndup (buf, count,GFP_KERNEL ); -if (!driver_override) -return -ENOMEM ; - - cp =strchr (driver_override,'\n' ); -if (cp) - *cp ='\0' ; - -device_lock (dev); - old = pdev->driver_override; -if (strlen (driver_override)) { - pdev->driver_override = driver_override; - }else { -kfree (driver_override); - pdev->driver_override =NULL ; - } -device_unlock (dev); +int ret; -kfree (old); + ret =driver_set_override (dev, &pdev->driver_override, buf, count); +if (ret) +return ret;return count; }
drivers/clk/clk.c +12 -9
@@ -3182,6 +3182,7 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core, unsigned int i, char terminator) {struct clk_core *parent; +const char *name =NULL ;/* * Go through the following options to fetch a parent's name.
@@ -3196,18 +3197,20 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,* registered (yet). */ parent =clk_core_get_parent_by_index (core, i); -if (parent) +if (parent) {seq_puts (s, parent->name); -else if (core->parents[i].name) + }else if (core->parents[i].name) {seq_puts (s, core->parents[i].name); -else if (core->parents[i].fw_name) + }else if (core->parents[i].fw_name) {seq_printf (s,"<%s>(fw)" , core->parents[i].fw_name); -else if (core->parents[i].index >=0 ) -seq_puts (s, -of_clk_get_parent_name (core->of_node, - core->parents[i].index)); -else -seq_puts (s,"(missing)" ); + }else { +if (core->parents[i].index >=0 ) + name =of_clk_get_parent_name (core->of_node, core->parents[i].index); +if (!name) + name ="(missing)" ; + +seq_puts (s, name); + }seq_putc (s, terminator); }
drivers/dma/ste_dma40.c +1 -0
@@ -3697,6 +3697,7 @@ static int __init d40_probe(struct platform_device *pdev)regulator_disable (base->lcpa_regulator);regulator_put (base->lcpa_regulator); } +pm_runtime_disable (base->dev);kfree (base->lcla_pool.alloc_map);kfree (base->lookup_log_chans);
drivers/firmware/imx/imx-dsp.c +1 -1
@@ -115,11 +115,11 @@ static int imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc) dsp_chan->idx = i %2 ; dsp_chan->ch =mbox_request_channel_byname (cl, chan_name);if (IS_ERR (dsp_chan->ch)) { -kfree (dsp_chan->name); ret =PTR_ERR (dsp_chan->ch);if (ret != -EPROBE_DEFER )dev_err (dev,"Failed to request mbox chan %s ret %d\n" , chan_name, ret); +kfree (dsp_chan->name); goto out; }
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -0
@@ -1285,6 +1285,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,void amdgpu_device_pci_config_reset (struct amdgpu_device *adev);int amdgpu_device_pci_reset (struct amdgpu_device *adev);bool amdgpu_device_need_post (struct amdgpu_device *adev); +bool amdgpu_device_pcie_dynamic_switching_supported (void );bool amdgpu_device_should_use_aspm (struct amdgpu_device *adev);bool amdgpu_device_aspm_support_quirk (void );
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +19 -0
@@ -1319,6 +1319,25 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev)return true; } +/* +* Intel hosts such as Raptor Lake and Sapphire Rapids don't support dynamic +* speed switching. Until we have confirmation from Intel that a specific host +* supports it, it's safer that we keep it disabled for all. +* +* https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/005/pci-express-support/ +* https://gitlab.freedesktop.org/drm/amd/-/issues/2663 +*/ +bool amdgpu_device_pcie_dynamic_switching_supported (void ) +{ +#if IS_ENABLED (CONFIG_X86 ) +struct cpuinfo_x86 *c = &cpu_data (0 ); + +if (c->x86_vendor ==X86_VENDOR_INTEL ) +return false; +#endif +return true; +} +/** * amdgpu_device_should_use_aspm - check if the device should program ASPM *
drivers/gpu/drm/amd/amdgpu/vi.c +1 -1
@@ -1147,7 +1147,7 @@ static void vi_program_aspm(struct amdgpu_device *adev)bool bL1SS = false;bool bClkReqSupport = true; -if (!amdgpu_device_should_use_aspm (adev) || !amdgpu_device_aspm_support_quirk ()) +if (!amdgpu_device_should_use_aspm (adev) || !amdgpu_device_pcie_dynamic_switching_supported ())return ; if (adev->flags & AMD_IS_APU ||
drivers/gpu/drm/drm_dp_mst_topology.c +3 -3
@@ -2615,14 +2615,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(struct drm_dp_mst_branch *found_mstb;struct drm_dp_mst_port *port; +if (!mstb) +return NULL ; +if (memcmp (mstb->guid, guid,16 ) ==0 )return mstb;list_for_each_entry (port, &mstb->ports, next) { -if (!port->mstb) -continue ; - found_mstb =get_mst_branch_device_by_guid_helper (port->mstb, guid);if (found_mstb)
drivers/gpu/drm/i915/i915_pmu.c +9 -0
@@ -761,9 +761,18 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)static void i915_pmu_event_stop (struct perf_event *event,int flags) { +struct drm_i915_private *i915 = +container_of (event->pmu,typeof (*i915), pmu.base); +struct i915_pmu *pmu = &i915->pmu; + +if (pmu->closed) + goto out; +if (flags &PERF_EF_UPDATE )i915_pmu_event_read (event);i915_pmu_disable (event); + +out: event->hw.state =PERF_HES_STOPPED ; }
drivers/gpu/drm/ttm/ttm_device.c +4 -4
@@ -234,10 +234,6 @@ void ttm_device_fini(struct ttm_device *bdev)struct ttm_resource_manager *man;unsigned i; - man =ttm_manager_type (bdev,TTM_PL_SYSTEM ); -ttm_resource_manager_set_used (man, false); -ttm_set_driver_manager (bdev,TTM_PL_SYSTEM ,NULL ); -mutex_lock (&ttm_global_mutex);list_del (&bdev->device_list);mutex_unlock (&ttm_global_mutex);
@@ -247,6 +243,10 @@ void ttm_device_fini(struct ttm_device *bdev)if (ttm_bo_delayed_delete (bdev, true))pr_debug ("Delayed destroy list was clean\n" ); + man =ttm_manager_type (bdev,TTM_PL_SYSTEM ); +ttm_resource_manager_set_used (man, false); +ttm_set_driver_manager (bdev,TTM_PL_SYSTEM ,NULL ); +spin_lock (&bdev->lru_lock);for (i =0 ; i <TTM_MAX_BO_PRIORITY ; ++i)if (list_empty (&man->lru[0 ]))
drivers/i2c/busses/i2c-aspeed.c +2 -1
@@ -744,6 +744,8 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr) func_ctrl_reg_val =readl (bus->base +ASPEED_I2C_FUN_CTRL_REG ); func_ctrl_reg_val |=ASPEED_I2CD_SLAVE_EN ;writel (func_ctrl_reg_val, bus->base +ASPEED_I2C_FUN_CTRL_REG ); + + bus->slave_state =ASPEED_I2C_SLAVE_INACTIVE ; }static int aspeed_i2c_reg_slave (struct i2c_client *client)
@@ -760,7 +762,6 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client)__aspeed_i2c_reg_slave (bus, client->addr); bus->slave = client; - bus->slave_state =ASPEED_I2C_SLAVE_INACTIVE ;spin_unlock_irqrestore (&bus->lock, flags);return 0 ;
drivers/i2c/busses/i2c-stm32f7.c +6 -3
@@ -1063,9 +1063,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,/* Configure PEC */ if ((flags &I2C_CLIENT_PEC ) && f7_msg->size !=I2C_SMBUS_QUICK ) { cr1 |=STM32F7_I2C_CR1_PECEN ; - cr2 |=STM32F7_I2C_CR2_PECBYTE ; -if (!f7_msg->read_write) +if (!f7_msg->read_write) { + cr2 |=STM32F7_I2C_CR2_PECBYTE ; f7_msg->count++; + } }else { cr1 &= ~STM32F7_I2C_CR1_PECEN ; cr2 &= ~STM32F7_I2C_CR2_PECBYTE ;
@@ -1153,8 +1154,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev) f7_msg->stop = true;/* Add one byte for PEC if needed */ -if (cr1 &STM32F7_I2C_CR1_PECEN ) +if (cr1 &STM32F7_I2C_CR1_PECEN ) { + cr2 |=STM32F7_I2C_CR2_PECBYTE ; f7_msg->count++; + }/* Set number of bytes to be transferred */ cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK );
drivers/i2c/muxes/i2c-demux-pinctrl.c +1 -1
@@ -61,7 +61,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 neif (ret) goto err; - adap =of_find_i2c_adapter_by_node (priv->chan[new_chan].parent_np); + adap =of_get_i2c_adapter_by_node (priv->chan[new_chan].parent_np);if (!adap) { ret = -ENODEV ; goto err_with_revert;
drivers/i2c/muxes/i2c-mux-gpmux.c +1 -1
@@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)dev_err (dev,"Cannot parse i2c-parent\n" );return ERR_PTR (-ENODEV ); } - parent =of_find_i2c_adapter_by_node (parent_np); + parent =of_get_i2c_adapter_by_node (parent_np);of_node_put (parent_np);if (!parent)return ERR_PTR (-EPROBE_DEFER );
drivers/i2c/muxes/i2c-mux-pinctrl.c +1 -1
@@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)dev_err (dev,"Cannot parse i2c-parent\n" );return ERR_PTR (-ENODEV ); } - parent =of_find_i2c_adapter_by_node (parent_np); + parent =of_get_i2c_adapter_by_node (parent_np);of_node_put (parent_np);if (!parent)return ERR_PTR (-EPROBE_DEFER );
drivers/iio/adc/exynos_adc.c +14 -10
@@ -826,16 +826,26 @@ static int exynos_adc_probe(struct platform_device *pdev) } } +/* leave out any TS related code if unreachable */ +if (IS_REACHABLE (CONFIG_INPUT )) { + has_ts =of_property_read_bool (pdev->dev.of_node, +"has-touchscreen" ) || pdata; + } + irq =platform_get_irq (pdev,0 );if (irq <0 )return irq; info->irq = irq; - irq =platform_get_irq (pdev,1 ); -if (irq == -EPROBE_DEFER ) -return irq; +if (has_ts) { + irq =platform_get_irq (pdev,1 ); +if (irq == -EPROBE_DEFER ) +return irq; - info->tsirq = irq; + info->tsirq = irq; + }else { + info->tsirq =-1 ; + } info->dev = &pdev->dev;
@@ -900,12 +910,6 @@ static int exynos_adc_probe(struct platform_device *pdev)if (info->data->init_hw) info->data->init_hw (info); -/* leave out any TS related code if unreachable */ -if (IS_REACHABLE (CONFIG_INPUT )) { - has_ts =of_property_read_bool (pdev->dev.of_node, -"has-touchscreen" ) || pdata; - } -if (pdata) info->delay = pdata->delay;else
drivers/iio/adc/xilinx-xadc-core.c +14 -25
@@ -454,6 +454,9 @@ static const struct xadc_ops xadc_zynq_ops = { .interrupt_handler = xadc_zynq_interrupt_handler, .update_alarm = xadc_zynq_update_alarm, .type = XADC_TYPE_S7, + /* Temp in C = (val * 503.975) / 2**bits - 273.15 */ + .temp_scale = 503975, + .temp_offset = 273150, };static const unsigned int xadc_axi_reg_offsets[] = {
@@ -564,6 +567,9 @@ static const struct xadc_ops xadc_7s_axi_ops = { .interrupt_handler = xadc_axi_interrupt_handler, .flags = XADC_FLAGS_BUFFERED, .type = XADC_TYPE_S7, + /* Temp in C = (val * 503.975) / 2**bits - 273.15 */ + .temp_scale = 503975, + .temp_offset = 273150, };static const struct xadc_ops xadc_us_axi_ops = {
@@ -575,6 +581,12 @@ static const struct xadc_ops xadc_us_axi_ops = { .interrupt_handler = xadc_axi_interrupt_handler, .flags = XADC_FLAGS_BUFFERED, .type = XADC_TYPE_US, +/** +* Values below are for UltraScale+ (SYSMONE4) using internal reference. +* See https://docs.xilinx.com/v/u/en-US/ug580-ultrascale-sysmon +*/ + .temp_scale = 509314, + .temp_offset = 280231, }; static int _xadc_update_adc_reg(struct xadc *xadc, unsigned int reg,
@@ -946,8 +958,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev, *val2 = chan->scan_type.realbits;return IIO_VAL_FRACTIONAL_LOG2 ;case IIO_TEMP : -/* Temp in C = (val * 503.975) / 2**bits - 273.15 */ - *val =503975 ; + *val = xadc->ops->temp_scale; *val2 = bits;return IIO_VAL_FRACTIONAL_LOG2 ;default :
@@ -955,7 +966,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev, }case IIO_CHAN_INFO_OFFSET :/* Only the temperature channel has an offset */ - *val = -((273150 << bits) /503975 ); + *val = -((xadc->ops->temp_offset << bits) / xadc->ops->temp_scale);return IIO_VAL_INT ;case IIO_CHAN_INFO_SAMP_FREQ : ret =xadc_read_samplerate (xadc);
@@ -1434,28 +1445,6 @@ static int xadc_probe(struct platform_device *pdev)if (ret)return ret; -/* Disable all alarms */ - ret =xadc_update_adc_reg (xadc,XADC_REG_CONF1 ,XADC_CONF1_ALARM_MASK , -XADC_CONF1_ALARM_MASK ); -if (ret) -return ret; - -/* Set thresholds to min/max */ -for (i =0 ; i <16 ; i++) { -/* -* Set max voltage threshold and both temperature thresholds to -* 0xffff, min voltage threshold to 0. -*/ -if (i %8 <4 || i ==7 ) - xadc->threshold[i] =0xffff ; -else - xadc->threshold[i] =0 ; - ret =xadc_write_adc_reg (xadc,XADC_REG_THRESHOLD (i), - xadc->threshold[i]); -if (ret) -return ret; - } -/* Go to non-buffered mode */ xadc_postdisable (indio_dev);
drivers/iio/adc/xilinx-xadc.h +2 -0
@@ -86,6 +86,8 @@ struct xadc_ops {unsigned int flags;enum xadc_type type; +int temp_scale; +int temp_offset; }; static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg,
drivers/iio/afe/iio-rescale.c +123 -39
213 lines not on this page · raw message
drivers/input/mouse/synaptics.c +1 -0
@@ -1752,6 +1752,7 @@ static int synaptics_create_intertouch(struct psmouse *psmouse,psmouse_matches_pnp_id (psmouse, topbuttonpad_pnp_ids) && !SYN_CAP_EXT_BUTTONS_STICK (info->ext_cap_10);const struct rmi_device_platform_data pdata = { + .reset_delay_ms =30 , .sensor_pdata = { .sensor_type = rmi_sensor_touchpad, .axis_align.flip_y = true,
drivers/input/rmi4/rmi_smbus.c +28 -22
76 lines not on this page · raw message
drivers/irqchip/irq-riscv-intc.c +9 -1
@@ -109,8 +109,16 @@ static int __init riscv_intc_init(struct device_node *node,* for each INTC DT node. We only need to do INTC initialization * for the INTC DT node belonging to boot CPU (or boot HART). */ -if (riscv_hartid_to_cpuid (hartid) !=smp_processor_id ()) +if (riscv_hartid_to_cpuid (hartid) !=smp_processor_id ()) { +/* +* The INTC nodes of each CPU are suppliers for downstream +* interrupt controllers (such as PLIC, IMSIC and APLIC +* direct-mode) so we should mark an INTC node as initialized +* if we are not creating IRQ domain for it. +*/ +fwnode_dev_initialized (of_fwnode_handle (node), true);return 0 ; + } intc_domain =irq_domain_add_linear (node,BITS_PER_LONG , &riscv_intc_domain_ops,NULL );
drivers/irqchip/irq-stm32-exti.c +1 -0
@@ -408,6 +408,7 @@ static const struct irq_domain_ops irq_exti_domain_ops = { .map = irq_map_generic_chip, .alloc = stm32_exti_alloc, .free = stm32_exti_free, + .xlate = irq_domain_xlate_twocell, };static void stm32_irq_ack (struct irq_data *d)
drivers/mcb/mcb-lpc.c +31 -4
@@ -23,7 +23,7 @@ static int mcb_lpc_probe(struct platform_device *pdev) {struct resource *res;struct priv *priv; -int ret =0 ; +int ret =0 , table_size; priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL );if (!priv)
@@ -58,16 +58,43 @@ static int mcb_lpc_probe(struct platform_device *pdev) ret =chameleon_parse_cells (priv->bus, priv->mem->start, priv->base);if (ret <0 ) { -mcb_release_bus (priv->bus); -return ret; + goto out_mcb_bus; } -dev_dbg (&pdev->dev,"Found %d cells\n" , ret); + table_size = ret; + +if (table_size <CHAM_HEADER_SIZE ) { +/* Release the previous resources */ +devm_iounmap (&pdev->dev, priv->base); +devm_release_mem_region (&pdev->dev, priv->mem->start,resource_size (priv->mem)); + +/* Then, allocate it again with the actual chameleon table size */ + res =devm_request_mem_region (&pdev->dev, priv->mem->start, + table_size, +KBUILD_MODNAME ); +if (!res) { +dev_err (&pdev->dev,"Failed to request PCI memory\n" ); + ret = -EBUSY ; + goto out_mcb_bus; + } + + priv->base =devm_ioremap (&pdev->dev, priv->mem->start, table_size); +if (!priv->base) { +dev_err (&pdev->dev,"Cannot ioremap\n" ); + ret = -ENOMEM ; + goto out_mcb_bus; + } + +platform_set_drvdata (pdev, priv); + }mcb_bus_add_devices (priv->bus);return 0 ; +out_mcb_bus: +mcb_release_bus (priv->bus); +return ret; }static int mcb_lpc_remove (struct platform_device *pdev)
drivers/mcb/mcb-parse.c +10 -5
@@ -128,7 +128,7 @@ static void chameleon_parse_bar(void __iomem *base, } } -static int chameleon_get_bar (char __iomem **base,phys_addr_t mapbase, +static int chameleon_get_bar (void __iomem **base,phys_addr_t mapbase,struct chameleon_bar **cb) {struct chameleon_bar *c;
@@ -177,12 +177,13 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase, {struct chameleon_fpga_header *header;struct chameleon_bar *cb; -char __iomem *p = base; +void __iomem *p = base;int num_cells =0 ;uint32_t dtype;int bar_count;int ret;u32 hsize; +u32 table_size; hsize =sizeof (struct chameleon_fpga_header );
@@ -237,12 +238,16 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase, num_cells++; } -if (num_cells ==0 ) - num_cells = -EINVAL ; +if (num_cells ==0 ) { + ret = -EINVAL ; + goto free_bar; + } + table_size = p - base; +pr_debug ("%d cell(s) found. Chameleon table size: 0x%04x bytes\n" , num_cells, table_size);kfree (cb);kfree (header); -return num_cells; +return table_size; free_bar:kfree (cb);
drivers/misc/fastrpc.c +5 -5
@@ -992,11 +992,6 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, err =wait_for_completion_interruptible (&ctx->work); } -if (err) - goto bail; - -/* Check the response from remote dsp */ - err = ctx->retval;if (err) goto bail;
@@ -1009,6 +1004,11 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, goto bail; } +/* Check the response from remote dsp */ + err = ctx->retval; +if (err) + goto bail; + bail:if (err != -ERESTARTSYS && err != -ETIMEDOUT ) {/* We are done with this compute context */
drivers/misc/pci_endpoint_test.c +4 -0
@@ -71,6 +71,7 @@#define PCI_DEVICE_ID_TI_AM654 0xb00c#define PCI_DEVICE_ID_TI_J7200 0xb00f#define PCI_DEVICE_ID_TI_AM64 0xb010 +#define PCI_DEVICE_ID_TI_J721S2 0xb013#define PCI_DEVICE_ID_LS1088A 0x80c0#define is_am654_pci_dev (pdev) \
@@ -1004,6 +1005,9 @@ static const struct pci_device_id pci_endpoint_test_tbl[] = { { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_AM64), .driver_data = (kernel_ulong_t)&j721e_data, }, + { PCI_DEVICE(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_J721S2), + .driver_data = (kernel_ulong_t)&j721e_data, + }, { } };MODULE_DEVICE_TABLE (pci, pci_endpoint_test_tbl);
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +2 -0
@@ -3816,6 +3816,8 @@ int t4_load_phy_fw(struct adapter *adap, int win, FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD)); ret =t4_set_params_timeout (adap, adap->mbox, adap->pf,0 ,1 , ¶m, &val,30000 ); +if (ret) +return ret;/* If we have version number support, then check to see that the new * firmware got loaded properly.
drivers/net/ethernet/google/gve/gve_rx_dqo.c +1 -1
@@ -157,7 +157,7 @@ static int gve_alloc_page_dqo(struct gve_priv *priv,int err; err =gve_alloc_page (priv, &priv->pdev->dev, &buf_state->page_info.page, - &buf_state->addr,DMA_FROM_DEVICE ,GFP_KERNEL ); + &buf_state->addr,DMA_FROM_DEVICE ,GFP_ATOMIC );if (err)return err;
drivers/net/ethernet/intel/i40e/i40e.h +1 -1
@@ -566,7 +566,6 @@ struct i40e_pf {#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)#define I40E_FLAG_RS_FEC BIT(25)#define I40E_FLAG_BASE_R_FEC BIT(26) -#define I40E_FLAG_VF_VLAN_PRUNING BIT(27)/* TOTAL_PORT_SHUTDOWN * Allows to physically disable the link on the NIC's port. * If enabled, (after link down request from the OS)
@@ -589,6 +588,7 @@ struct i40e_pf {* in abilities field of i40e_aq_set_phy_config structure */ #define I40E_FLAG_TOTAL_PORT_SHUTDOWN_ENABLED BIT(27) +#define I40E_FLAG_VF_VLAN_PRUNING BIT(28)struct i40e_client_instance *cinst;bool stat_offsets_loaded;
drivers/net/ethernet/intel/i40e/i40e_txrx.c +1 -1
@@ -2759,7 +2759,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)return budget; } -if (vsi->back->flags &I40E_TXR_FLAGS_WB_ON_ITR ) +if (q_vector->tx.ring[0 ].flags &I40E_TXR_FLAGS_WB_ON_ITR ) q_vector->arm_wb_state = false;/* Exit the polling mode, but don't re-enable interrupts if stack might
drivers/net/ethernet/intel/igb/igb_ethtool.c +5 -1
@@ -2974,11 +2974,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,if (err) goto err_out_w_lock; -igb_update_ethtool_nfc_entry (adapter, input, input->sw_idx); + err =igb_update_ethtool_nfc_entry (adapter, input, input->sw_idx); +if (err) + goto err_out_input_filter;spin_unlock (&adapter->nfc_lock);return 0 ; +err_out_input_filter: +igb_erase_filter (adapter, input); err_out_w_lock:spin_unlock (&adapter->nfc_lock); err_out:
drivers/net/ethernet/intel/igc/igc_ethtool.c +25 -10
@@ -1810,7 +1810,7 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,struct igc_adapter *adapter =netdev_priv (netdev);struct net_device *dev = adapter->netdev;struct igc_hw *hw = &adapter->hw; -u32 advertising; +u16 advertised =0 ;/* When adapter in resetting mode, autoneg/speed/duplex * cannot be changed
@@ -1835,18 +1835,33 @@ igc_ethtool_set_link_ksettings(struct net_device *netdev,while (test_and_set_bit (__IGC_RESETTING, &adapter->state))usleep_range (1000 ,2000 ); -ethtool_convert_link_mode_to_legacy_u32 (&advertising, - cmd->link_modes.advertising); -/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT. -* We have to check this and convert it to ADVERTISE_2500_FULL -* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly. -*/ - if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full)) - advertising |=ADVERTISE_2500_FULL ; +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 2500baseT_Full)) + advertised |=ADVERTISE_2500_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 1000baseT_Full)) + advertised |=ADVERTISE_1000_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 100baseT_Full)) + advertised |=ADVERTISE_100_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 100baseT_Half)) + advertised |=ADVERTISE_100_HALF ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 10baseT_Full)) + advertised |=ADVERTISE_10_FULL ; + +if (ethtool_link_ksettings_test_link_mode (cmd, advertising, + 10baseT_Half)) + advertised |=ADVERTISE_10_HALF ;if (cmd->base.autoneg ==AUTONEG_ENABLE ) { hw->mac.autoneg =1 ; - hw->phy.autoneg_advertised = advertising; + hw->phy.autoneg_advertised = advertised;if (adapter->fc_autoneg) hw->fc.requested_mode = igc_fc_default; }else {
drivers/net/ethernet/realtek/r8169_main.c +3 -3
@@ -4443,7 +4443,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,unsigned int entry = dirty_tx %NUM_TX_DESC ;u32 status; - status =le32_to_cpu (tp->TxDescArray[entry].opts1); + status =le32_to_cpu (READ_ONCE (tp->TxDescArray[entry].opts1));if (status & DescOwn)break ;
@@ -4480,7 +4480,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,* If skb is NULL then we come here again once a tx irq is * triggered after the last fragment is marked transmitted. */ -if (tp->cur_tx != dirty_tx && skb) +if (READ_ONCE (tp->cur_tx) != dirty_tx && skb)rtl8169_doorbell (tp); } }
@@ -4513,7 +4513,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, int budgetdma_addr_t addr;u32 status; - status =le32_to_cpu (desc->opts1); + status =le32_to_cpu (READ_ONCE (desc->opts1));if (status & DescOwn)break ;
drivers/net/ethernet/toshiba/ps3_gelic_wireless.c +1 -1
@@ -1217,7 +1217,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev, key_index = wl->current_key;if (!enc->length && (ext->ext_flags &IW_ENCODE_EXT_SET_TX_KEY )) { -/* reques to change default key index */ +/* request to change default key index */ pr_debug ("%s: request to change default key to %d\n" , __func__, key_index); wl->current_key = key_index;
drivers/net/gtp.c +3 -2
@@ -543,8 +543,9 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev, rt->dst.ops->update_pmtu (&rt->dst,NULL , skb, mtu, false); -if (!skb_is_gso (skb) && (iph->frag_off &htons (IP_DF )) && - mtu <ntohs (iph->tot_len)) { +if (iph->frag_off &htons (IP_DF ) && + ((!skb_is_gso (skb) && skb->len > mtu) || + (skb_is_gso (skb) && !skb_gso_validate_network_len (skb, mtu)))) {netdev_dbg (dev,"packet too big, fragmentation needed\n" );icmp_ndo_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED ,htonl (mtu));
drivers/net/ieee802154/adf7242.c +3 -2
@@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file, void *offset)static void adf7242_debugfs_init (struct adf7242_local *lp) { -char debugfs_dir_name[DNAME_INLINE_LEN +1 ] ="adf7242-" ; +char debugfs_dir_name[DNAME_INLINE_LEN +1 ]; -strncat (debugfs_dir_name,dev_name (&lp->spi->dev),DNAME_INLINE_LEN ); +snprintf (debugfs_dir_name,sizeof (debugfs_dir_name), +"adf7242-%s" ,dev_name (&lp->spi->dev)); lp->debugfs_root =debugfs_create_dir (debugfs_dir_name,NULL );
drivers/net/usb/r8152.c +15 -3
@@ -1208,7 +1208,7 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) ret =usb_control_msg (tp->udev, tp->pipe_ctrl_in,RTL8152_REQ_GET_REGS ,RTL8152_REQT_READ , - value, index, tmp, size,500 ); + value, index, tmp, size,USB_CTRL_GET_TIMEOUT );if (ret <0 )memset (data,0xff , size);else
@@ -1231,7 +1231,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data) ret =usb_control_msg (tp->udev, tp->pipe_ctrl_out,RTL8152_REQ_SET_REGS ,RTL8152_REQT_WRITE , - value, index, tmp, size,500 ); + value, index, tmp, size,USB_CTRL_SET_TIMEOUT );kfree (tmp);
@@ -3648,6 +3648,8 @@ static void r8153b_ups_en(struct r8152 *tp, bool enable)int i;for (i =0 ; i <500 ; i++) { +if (test_bit (RTL8152_UNPLUG , &tp->flags)) +return ;if (ocp_read_word (tp,MCU_TYPE_PLA ,PLA_BOOT_CTRL ) &AUTOLOAD_DONE )break ;
@@ -3688,6 +3690,8 @@ static void r8153c_ups_en(struct r8152 *tp, bool enable)int i;for (i =0 ; i <500 ; i++) { +if (test_bit (RTL8152_UNPLUG , &tp->flags)) +return ;if (ocp_read_word (tp,MCU_TYPE_PLA ,PLA_BOOT_CTRL ) &AUTOLOAD_DONE )break ;
@@ -4051,6 +4055,9 @@ static int rtl_phy_patch_request(struct r8152 *tp, bool request, bool wait)for (i =0 ; wait && i <5000 ; i++) {u32 ocp_data; +if (test_bit (RTL8152_UNPLUG , &tp->flags)) +break ; +usleep_range (1000 ,2000 ); ocp_data =ocp_reg_read (tp,OCP_PHY_PATCH_STAT );if ((ocp_data &PATCH_READY ) ^ check)
@@ -9538,7 +9545,8 @@ u8 rtl8152_get_version(struct usb_interface *intf) ret =usb_control_msg (udev,usb_rcvctrlpipe (udev,0 ),RTL8152_REQ_GET_REGS ,RTL8152_REQT_READ , -PLA_TCR0 ,MCU_TYPE_PLA , tmp,sizeof (*tmp),500 ); +PLA_TCR0 ,MCU_TYPE_PLA , tmp,sizeof (*tmp), +USB_CTRL_GET_TIMEOUT );if (ret >0 ) ocp_data = (__le32_to_cpu (*tmp) >>16 ) &VERSION_MASK ;
@@ -9798,6 +9806,10 @@ static int rtl8152_probe(struct usb_interface *intf, out1:tasklet_kill (&tp->tx_tl); +cancel_delayed_work_sync (&tp->hw_phy_work); +if (tp->rtl_ops.unload) + tp->rtl_ops.unload (tp); +rtl8152_release_firmware (tp);usb_set_intfdata (intf,NULL ); out:free_netdev (netdev);
drivers/net/usb/smsc95xx.c +3 -1
@@ -84,7 +84,9 @@ static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, ret =fn (dev,USB_VENDOR_REQUEST_READ_REGISTER ,USB_DIR_IN |USB_TYPE_VENDOR |USB_RECIP_DEVICE ,0 , index, &buf,4 ); -if (ret <0 ) { +if (ret <4 ) { + ret = ret <0 ? ret : -ENODATA ; +if (ret != -ENODEV )netdev_warn (dev->net,"Failed to read reg index 0x%08x: %d\n" , index, ret);
drivers/nvmem/imx-ocotp.c +3 -3
@@ -485,7 +485,7 @@ static const struct ocotp_params imx6sl_params = { };static const struct ocotp_params imx6sll_params = { - .nregs =128 , + .nregs =80 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT ,
@@ -499,14 +499,14 @@ static const struct ocotp_params imx6sx_params = { };static const struct ocotp_params imx6ul_params = { - .nregs =128 , + .nregs =144 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT , };static const struct ocotp_params imx6ull_params = { - .nregs =64 , + .nregs =80 , .bank_address_words =0 , .set_timing = imx_ocotp_set_imx6_timing, .ctrl =IMX_OCOTP_BM_CTRL_DEFAULT ,
drivers/pci/quirks.c +5 -3
@@ -592,7 +592,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_/* * In the AMD NL platform, this device ([1022:7912]) has a class code of * PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will -* claim it. +* claim it. The same applies on the VanGogh platform device ([1022:163a]). * * But the dwc3 driver is a more specific driver for this device, and we'd * prefer to use it instead of xhci. To prevent xhci from claiming the
@@ -600,7 +600,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_* defines as "USB device (not host controller)". The dwc3 driver can then * claim it based on its Vendor and Device ID. */ -static void quirk_amd_nl_class (struct pci_dev *pdev) +static void quirk_amd_dwc_class (struct pci_dev *pdev) {u32 class = pdev->class;
@@ -610,7 +610,9 @@ static void quirk_amd_nl_class(struct pci_dev *pdev) class, pdev->class); }DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_NL_USB , - quirk_amd_nl_class); + quirk_amd_dwc_class); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_VANGOGH_USB , + quirk_amd_dwc_class);/* * Synopsys USB 3.x host HAPS platform has a class code of
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +11 -6
@@ -102,7 +102,8 @@ struct lpi_pinctrl {char __iomem *tlmm_base;char __iomem *slew_base;struct clk_bulk_data clks[MAX_LPI_NUM_CLKS ]; -struct mutex slew_access_lock; +/* Protects from concurrent register updates */ +struct mutex lock;const struct lpi_pinctrl_variant_data *data; };
@@ -330,9 +331,11 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,if (WARN_ON (i == g->nfuncs))return -EINVAL ; +mutex_lock (&pctrl->lock); val =lpi_gpio_read (pctrl, pin,LPI_GPIO_CFG_REG );u32p_replace_bits (&val, i,LPI_GPIO_FUNCTION_MASK );lpi_gpio_write (pctrl, pin,LPI_GPIO_CFG_REG , val); +mutex_unlock (&pctrl->lock);return 0 ; }
@@ -438,14 +441,14 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,if (slew_offset ==NO_SLEW )break ; -mutex_lock (&pctrl->slew_access_lock); +mutex_lock (&pctrl->lock); sval =ioread32 (pctrl->slew_base +LPI_SLEW_RATE_CTL_REG ); sval &= ~(LPI_SLEW_RATE_MASK << slew_offset); sval |= arg << slew_offset;iowrite32 (sval, pctrl->slew_base +LPI_SLEW_RATE_CTL_REG ); -mutex_unlock (&pctrl->slew_access_lock); +mutex_unlock (&pctrl->lock);break ;default :return -EINVAL ;
@@ -461,6 +464,7 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,lpi_gpio_write (pctrl, group,LPI_GPIO_VALUE_REG , val); } +mutex_lock (&pctrl->lock); val =lpi_gpio_read (pctrl, group,LPI_GPIO_CFG_REG );u32p_replace_bits (&val, pullup,LPI_GPIO_PULL_MASK );
@@ -469,6 +473,7 @@ static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,u32p_replace_bits (&val, output_enabled,LPI_GPIO_OE_MASK );lpi_gpio_write (pctrl, group,LPI_GPIO_CFG_REG , val); +mutex_unlock (&pctrl->lock);return 0 ; }
@@ -642,7 +647,7 @@ static int lpi_pinctrl_probe(struct platform_device *pdev) pctrl->chip.of_gpio_n_cells =2 ; pctrl->chip.can_sleep = false; -mutex_init (&pctrl->slew_access_lock); +mutex_init (&pctrl->lock); pctrl->ctrl =devm_pinctrl_register (dev, &pctrl->desc, pctrl);if (IS_ERR (pctrl->ctrl)) {
@@ -660,7 +665,7 @@ static int lpi_pinctrl_probe(struct platform_device *pdev)return 0 ; err_pinctrl: -mutex_destroy (&pctrl->slew_access_lock); +mutex_destroy (&pctrl->lock);clk_bulk_disable_unprepare (MAX_LPI_NUM_CLKS , pctrl->clks);return ret;
@@ -670,7 +675,7 @@ static int lpi_pinctrl_remove(struct platform_device *pdev) {struct lpi_pinctrl *pctrl =platform_get_drvdata (pdev); -mutex_destroy (&pctrl->slew_access_lock); +mutex_destroy (&pctrl->lock);clk_bulk_disable_unprepare (MAX_LPI_NUM_CLKS , pctrl->clks);return 0 ;
drivers/platform/mellanox/mlxbf-tmfifo.c +11 -10
@@ -588,24 +588,25 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring,if (vring->cur_len +sizeof (u64) <= len) {/* The whole word. */ -if (!IS_VRING_DROP (vring)) { -if (is_rx) +if (is_rx) { +if (!IS_VRING_DROP (vring))memcpy (addr + vring->cur_len, &data,sizeof (u64)); -else -memcpy (&data, addr + vring->cur_len, -sizeof (u64)); + }else { +memcpy (&data, addr + vring->cur_len, +sizeof (u64)); } vring->cur_len +=sizeof (u64); }else {/* Leftover bytes. */ -if (!IS_VRING_DROP (vring)) { -if (is_rx) +if (is_rx) { +if (!IS_VRING_DROP (vring))memcpy (addr + vring->cur_len, &data, len - vring->cur_len); -else -memcpy (&data, addr + vring->cur_len, - len - vring->cur_len); + }else { + data =0 ; +memcpy (&data, addr + vring->cur_len, + len - vring->cur_len); } vring->cur_len = len; }
drivers/rpmsg/qcom_glink_native.c +2 -0
@@ -1395,6 +1395,7 @@ static void qcom_glink_rpdev_release(struct device *dev)struct glink_channel *channel =to_glink_channel (rpdev->ept); channel->rpdev =NULL ; +kfree (rpdev->driver_override);kfree (rpdev); }
@@ -1623,6 +1624,7 @@ static void qcom_glink_device_release(struct device *dev)/* Release qcom_glink_alloc_channel() reference */ kref_put (&channel->refcount, qcom_glink_channel_release); +kfree (rpdev->driver_override);kfree (rpdev); }
drivers/rpmsg/rpmsg_core.c +33 -4
@@ -376,7 +376,8 @@ field##_store(struct device *dev, struct device_attribute *attr, \ const char *buf, size_t sz) \ { \struct rpmsg_device *rpdev =to_rpmsg_device (dev); \ -char *new, *old; \ +const char *old; \ +char *new; \ \ new =kstrndup (buf, sz,GFP_KERNEL ); \if (!new) \
@@ -568,24 +569,52 @@ static struct bus_type rpmsg_bus = { .remove = rpmsg_dev_remove, }; -int rpmsg_register_device (struct rpmsg_device *rpdev) +/* +* A helper for registering rpmsg device with driver override and name. +* Drivers should not be using it, but instead rpmsg_register_device(). +*/ +int rpmsg_register_device_override (struct rpmsg_device *rpdev, +const char *driver_override) {struct device *dev = &rpdev->dev;int ret; +if (driver_override) +strcpy (rpdev->id.name, driver_override); +dev_set_name (&rpdev->dev,"%s.%s.%d.%d" ,dev_name (dev->parent), rpdev->id.name, rpdev->src, rpdev->dst); rpdev->dev.bus = &rpmsg_bus; - ret =device_register (&rpdev->dev); +device_initialize (dev); +if (driver_override) { + ret =driver_set_override (dev, &rpdev->driver_override, + driver_override, +strlen (driver_override)); +if (ret) { +dev_err (dev,"device_set_override failed: %d\n" , ret); +put_device (dev); +return ret; + } + } + + ret =device_add (dev);if (ret) { -dev_err (dev,"device_register failed: %d\n" , ret); +dev_err (dev,"device_add failed: %d\n" , ret); +kfree (rpdev->driver_override); + rpdev->driver_override =NULL ;put_device (&rpdev->dev); }return ret; } +EXPORT_SYMBOL (rpmsg_register_device_override); + +int rpmsg_register_device (struct rpmsg_device *rpdev) +{ +return rpmsg_register_device_override (rpdev,NULL ); +}EXPORT_SYMBOL (rpmsg_register_device);/*
drivers/rpmsg/rpmsg_internal.h +1 -4
@@ -90,10 +90,7 @@ int rpmsg_release_channel(struct rpmsg_device *rpdev,*/ static inline int rpmsg_chrdev_register_device (struct rpmsg_device *rpdev) { -strcpy (rpdev->id.name,"rpmsg_chrdev" ); - rpdev->driver_override ="rpmsg_chrdev" ; - -return rpmsg_register_device (rpdev); +return rpmsg_register_device_override (rpdev,"rpmsg_ctrl" ); }#endif
drivers/rpmsg/rpmsg_ns.c +1 -3
@@ -20,12 +20,10 @@*/ int rpmsg_ns_register_device (struct rpmsg_device *rpdev) { -strcpy (rpdev->id.name,"rpmsg_ns" ); - rpdev->driver_override ="rpmsg_ns" ; rpdev->src =RPMSG_NS_ADDR ; rpdev->dst =RPMSG_NS_ADDR ; -return rpmsg_register_device (rpdev); +return rpmsg_register_device_override (rpdev,"rpmsg_ns" ); }EXPORT_SYMBOL (rpmsg_ns_register_device);
drivers/scsi/mpt3sas/mpt3sas_scsih.c +3 -1
@@ -12899,8 +12899,10 @@ _mpt3sas_init(void)mpt3sas_ctl_init (hbas_to_enumerate); error =pci_register_driver (&mpt3sas_driver); -if (error) +if (error) { +mpt3sas_ctl_exit (hbas_to_enumerate);scsih_exit (); + }return error; }
drivers/spi/spi-npcm-fiu.c +3 -2
@@ -334,8 +334,9 @@ static int npcm_fiu_uma_read(struct spi_mem *mem, uma_cfg |=ilog2 (op->cmd.buswidth); uma_cfg |=ilog2 (op->addr.buswidth) <<NPCM_FIU_UMA_CFG_ADBPCK_SHIFT ; - uma_cfg |=ilog2 (op->dummy.buswidth) - <<NPCM_FIU_UMA_CFG_DBPCK_SHIFT ; +if (op->dummy.nbytes) + uma_cfg |=ilog2 (op->dummy.buswidth) + <<NPCM_FIU_UMA_CFG_DBPCK_SHIFT ; uma_cfg |=ilog2 (op->data.buswidth) <<NPCM_FIU_UMA_CFG_RDBPCK_SHIFT ; uma_cfg |= op->dummy.nbytes <<NPCM_FIU_UMA_CFG_DBSIZ_SHIFT ;
drivers/tty/n_gsm.c +2 -0
@@ -3273,6 +3273,8 @@ static int gsm_modem_upd_via_msc(struct gsm_dlci *dlci, u8 brk)static int gsm_modem_update (struct gsm_dlci *dlci,u8 brk) { +if (dlci->gsm->dead) +return -EL2HLT ;if (dlci->adaption ==2 ) {/* Send convergence layer type 2 empty data frame. */ gsm_modem_upd_via_data (dlci, brk);
drivers/tty/serial/8250/8250_pci.c +320 -7
413 lines not on this page · raw message
drivers/usb/gadget/legacy/raw_gadget.c +16 -10
@@ -663,12 +663,12 @@ static int raw_process_ep0_io(struct raw_dev *dev, struct usb_raw_ep_io *io,if (WARN_ON (in && dev->ep0_out_pending)) { ret = -ENODEV ; dev->state =STATE_DEV_FAILED ; - goto out_done; + goto out_unlock; }if (WARN_ON (!in && dev->ep0_in_pending)) { ret = -ENODEV ; dev->state =STATE_DEV_FAILED ; - goto out_done; + goto out_unlock; } dev->req->buf = data;
@@ -683,7 +683,7 @@ static int raw_process_ep0_io(struct raw_dev *dev, struct usb_raw_ep_io *io, "fail, usb_ep_queue returned %d\n", ret);spin_lock_irqsave (&dev->lock, flags); dev->state =STATE_DEV_FAILED ; - goto out_done; + goto out_queue_failed; } ret =wait_for_completion_interruptible (&dev->ep0_done);
@@ -692,13 +692,16 @@ static int raw_process_ep0_io(struct raw_dev *dev, struct usb_raw_ep_io *io,usb_ep_dequeue (dev->gadget->ep0, dev->req);wait_for_completion (&dev->ep0_done);spin_lock_irqsave (&dev->lock, flags); - goto out_done; +if (dev->ep0_status == -ECONNRESET ) + dev->ep0_status = -EINTR ; + goto out_interrupted; }spin_lock_irqsave (&dev->lock, flags); - ret = dev->ep0_status; -out_done: +out_interrupted: + ret = dev->ep0_status; +out_queue_failed: dev->ep0_urb_queued = false; out_unlock:spin_unlock_irqrestore (&dev->lock, flags);
@@ -1060,7 +1063,7 @@ static int raw_process_ep_io(struct raw_dev *dev, struct usb_raw_ep_io *io, "fail, usb_ep_queue returned %d\n", ret);spin_lock_irqsave (&dev->lock, flags); dev->state =STATE_DEV_FAILED ; - goto out_done; + goto out_queue_failed; } ret =wait_for_completion_interruptible (&done);
@@ -1069,13 +1072,16 @@ static int raw_process_ep_io(struct raw_dev *dev, struct usb_raw_ep_io *io,usb_ep_dequeue (ep->ep, ep->req);wait_for_completion (&done);spin_lock_irqsave (&dev->lock, flags); - goto out_done; +if (ep->status == -ECONNRESET ) + ep->status = -EINTR ; + goto out_interrupted; }spin_lock_irqsave (&dev->lock, flags); - ret = ep->status; -out_done: +out_interrupted: + ret = ep->status; +out_queue_failed: ep->urb_queued = false; out_unlock:spin_unlock_irqrestore (&dev->lock, flags);
drivers/usb/storage/unusual_cypress.h +1 -1
@@ -19,7 +19,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999, "Cypress ISD-300LP", USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0), -UNUSUAL_DEV (0x14cd ,0x6116 ,0x0160 ,0x0160 , +UNUSUAL_DEV (0x14cd ,0x6116 ,0x0150 ,0x0160 ,"Super Top" ,"USB 2.0 SATA BRIDGE" , USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
drivers/usb/typec/tcpm/tcpm.c +3 -0
@@ -1608,6 +1608,9 @@ static int tcpm_pd_svdm(struct tcpm_port *port, struct typec_altmode *adev,if (PD_VDO_VID (p[0 ]) !=USB_SID_PD )break ; +if (IS_ERR_OR_NULL (port->partner)) +break ; +if (PD_VDO_SVDM_VER (p[0 ]) < svdm_version) {typec_partner_set_svdm_version (port->partner,PD_VDO_SVDM_VER (p[0 ]));
drivers/vhost/vhost.c +1 -3
@@ -1171,9 +1171,7 @@ ssize_t vhost_chr_write_iter(struct vhost_dev *dev, goto done; } -if ((msg.type ==VHOST_IOTLB_UPDATE || - msg.type ==VHOST_IOTLB_INVALIDATE ) && - msg.size ==0 ) { +if (msg.type ==VHOST_IOTLB_UPDATE && msg.size ==0 ) { ret = -EINVAL ; goto done; }
drivers/video/fbdev/aty/atyfb_base.c +4 -0
@@ -3447,11 +3447,15 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, } info->fix.mmio_start = raddr; +#if defined(__i386__) || defined(__ia64__)/* * By using strong UC we force the MTRR to never have an * effect on the MMIO region on both non-PAT and PAT systems. */ par->ati_regbase =ioremap_uc (info->fix.mmio_start,0x1000 ); +#else + par->ati_regbase =ioremap (info->fix.mmio_start,0x1000 ); +#endif if (par->ati_regbase ==NULL )return -ENOMEM ;
drivers/video/fbdev/uvesafb.c +1 -1
@@ -1935,10 +1935,10 @@ static void uvesafb_exit(void) } } -cn_del_callback (&uvesafb_cn_id);driver_remove_file (&uvesafb_driver.driver, &driver_attr_v86d);platform_device_unregister (uvesafb_device);platform_driver_unregister (&uvesafb_driver); +cn_del_callback (&uvesafb_cn_id); }module_exit (uvesafb_exit);
drivers/virtio/virtio_balloon.c +5 -1
@@ -402,7 +402,11 @@ static inline s64 towards_target(struct virtio_balloon *vb) virtio_cread_le(vb->vdev, struct virtio_balloon_config, num_pages, &num_pages); - target = num_pages; +/* +* Aligned up to guest page size to avoid inflating and deflating +* balloon endlessly. +*/ + target =ALIGN (num_pages,VIRTIO_BALLOON_PAGES_PER_PAGE );return target - vb->num_pages; }
drivers/virtio/virtio_mmio.c +14 -5
@@ -596,14 +596,17 @@ static int virtio_mmio_probe(struct platform_device *pdev)spin_lock_init (&vm_dev->lock); vm_dev->base =devm_platform_ioremap_resource (pdev,0 ); -if (IS_ERR (vm_dev->base)) -return PTR_ERR (vm_dev->base); +if (IS_ERR (vm_dev->base)) { + rc =PTR_ERR (vm_dev->base); + goto free_vm_dev; + }/* Check magic value */ magic =readl (vm_dev->base +VIRTIO_MMIO_MAGIC_VALUE );if (magic != ('v' |'i' <<8 |'r' <<16 |'t' <<24 )) {dev_warn (&pdev->dev,"Wrong magic value 0x%08lx!\n" , magic); -return -ENODEV ; + rc = -ENODEV ; + goto free_vm_dev; }/* Check device version */
@@ -611,7 +614,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)if (vm_dev->version <1 || vm_dev->version >2 ) {dev_err (&pdev->dev,"Version %ld not supported!\n" , vm_dev->version); -return -ENXIO ; + rc = -ENXIO ; + goto free_vm_dev; } vm_dev->vdev.id.device =readl (vm_dev->base +VIRTIO_MMIO_DEVICE_ID );
@@ -620,7 +624,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)* virtio-mmio device with an ID 0 is a (dummy) placeholder * with no function. End probing now with no error reported. */ -return -ENODEV ; + rc = -ENODEV ; + goto free_vm_dev; } vm_dev->vdev.id.vendor =readl (vm_dev->base +VIRTIO_MMIO_VENDOR_ID );
@@ -650,6 +655,10 @@ static int virtio_mmio_probe(struct platform_device *pdev)put_device (&vm_dev->vdev.dev);return rc; + +free_vm_dev: +kfree (vm_dev); +return rc; }static int virtio_mmio_remove (struct platform_device *pdev)
fs/ext4/mballoc.c +22 -29
116 lines not on this page · raw message
fs/ext4/mballoc.h +14 -0
@@ -219,6 +219,20 @@ static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb, (fex->fe_start <<EXT4_SB (sb)->s_cluster_bits); } +static inline loff_t extent_logical_end (struct ext4_sb_info *sbi, +struct ext4_free_extent *fex) +{ +/* Use loff_t to avoid end exceeding ext4_lblk_t max. */ +return (loff_t )fex->fe_logical +EXT4_C2B (sbi, fex->fe_len); +} + +static inline loff_t pa_logical_end (struct ext4_sb_info *sbi, +struct ext4_prealloc_space *pa) +{ +/* Use loff_t to avoid end exceeding ext4_lblk_t max. */ +return (loff_t )pa->pa_lstart +EXT4_C2B (sbi, pa->pa_len); +} + typedef int (*ext4_mballoc_query_range_fn)( struct super_block *sb, ext4_group_t agno,
fs/nfsd/vfs.c +6 -6
@@ -1762,6 +1762,12 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,if (!flen ||isdotent (fname, flen) || !tlen ||isdotent (tname, tlen)) goto out; + err = (rqstp->rq_vers ==2 ) ? nfserr_acces : nfserr_xdev; +if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt) + goto out; +if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry) + goto out; + retry: host_err =fh_want_write (ffhp);if (host_err) {
@@ -1796,12 +1802,6 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,if (ndentry == trap) goto out_dput_new; - host_err = -EXDEV ; -if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt) - goto out_dput_new; -if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry) - goto out_dput_new; -if ((ndentry->d_sb->s_export_op->flags &EXPORT_OP_CLOSE_BEFORE_UNLINK ) &&nfsd_has_cached_files (ndentry)) { close_cached = true;
fs/ntfs3/attrib.c +2 -4
@@ -1583,10 +1583,8 @@ int attr_allocate_frame(struct ntfs_inode *ni, CLST frame, size_t compr_size, le_b =NULL ; attr_b =ni_find_attr (ni,NULL , &le_b,ATTR_DATA ,NULL ,0 ,NULL , &mi_b); -if (!attr_b) { - err = -ENOENT ; - goto out; - } +if (!attr_b) +return -ENOENT ; attr = attr_b; le = le_b;
fs/ntfs3/attrlist.c +13 -2
@@ -52,7 +52,8 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)if (!attr->non_res) { lsize =le32_to_cpu (attr->res.data_size); - le =kmalloc (al_aligned (lsize),GFP_NOFS | __GFP_NOWARN); +/* attr is resident: lsize < record_size (1K or 4K) */ + le =kvmalloc (al_aligned (lsize),GFP_KERNEL );if (!le) { err = -ENOMEM ; goto out;
@@ -80,7 +81,17 @@ int ntfs_load_attr_list(struct ntfs_inode *ni, struct ATTRIB *attr)if (err <0 ) goto out; - le =kmalloc (al_aligned (lsize),GFP_NOFS | __GFP_NOWARN); +/* attr is nonresident. +* The worst case: +* 1T (2^40) extremely fragmented file. +* cluster = 4K (2^12) => 2^28 fragments +* 2^9 fragments per one record => 2^19 records +* 2^5 bytes of ATTR_LIST_ENTRY per one record => 2^24 bytes. +* +* the result is 16M bytes per attribute list. +* Use kvmalloc to allocate in range [several Kbytes - dozen Mbytes] +*/ + le =kvmalloc (al_aligned (lsize),GFP_KERNEL );if (!le) { err = -ENOMEM ; goto out;
fs/ntfs3/bitmap.c +2 -1
@@ -667,7 +667,8 @@ int wnd_init(struct wnd_bitmap *wnd, struct super_block *sb, size_t nbits) wnd->bits_last = wbits; wnd->free_bits = -kcalloc (wnd->nwnd,sizeof (u16),GFP_NOFS | __GFP_NOWARN); +kvmalloc_array (wnd->nwnd,sizeof (u16),GFP_KERNEL | __GFP_ZERO); +if (!wnd->free_bits)return -ENOMEM ;
fs/ntfs3/dir.c +5 -1
@@ -309,7 +309,11 @@ static inline int ntfs_filldir(struct ntfs_sb_info *sbi, struct ntfs_inode *ni,return 0 ; } - dt_type = (fname->dup.fa &FILE_ATTRIBUTE_DIRECTORY ) ?DT_DIR :DT_REG ; +/* NTFS: symlinks are "dir + reparse" or "file + reparse" */ +if (fname->dup.fa &FILE_ATTRIBUTE_REPARSE_POINT ) + dt_type =DT_LNK ; +else + dt_type = (fname->dup.fa &FILE_ATTRIBUTE_DIRECTORY ) ?DT_DIR :DT_REG ;return !dir_emit (ctx, (s8 *)name, name_len, ino, dt_type); }
fs/ntfs3/frecord.c +7 -1
@@ -2100,7 +2100,7 @@ int ni_readpage_cmpr(struct ntfs_inode *ni, struct page *page)for (i =0 ; i < pages_per_frame; i++) { pg = pages[i]; -if (i == idx) +if (i == idx || !pg)continue ;unlock_page (pg);put_page (pg);
@@ -3144,6 +3144,12 @@ static bool ni_update_parent(struct ntfs_inode *ni, struct NTFS_DUP_INFO *dup,if (!fname || !memcmp (&fname->dup, dup,sizeof (fname->dup)))continue ; +/* Check simple case when parent inode equals current inode. */ +if (ino_get (&fname->home) == ni->vfs_inode.i_ino) { +ntfs_set_state (sbi,NTFS_DIRTY_ERROR ); +continue ; + } +/* ntfs_iget5 may sleep. */ dir =ntfs_iget5 (sb, &fname->home,NULL );if (IS_ERR (dir)) {
fs/ntfs3/fslog.c +4 -2
@@ -2169,8 +2169,10 @@ static int last_log_lsn(struct ntfs_log *log)if (!page) { page =kmalloc (log->page_size,GFP_NOFS ); -if (!page) -return -ENOMEM ; +if (!page) { + err = -ENOMEM ; + goto out; + } }/*
fs/ntfs3/fsntfs.c +3 -10
@@ -958,18 +958,11 @@ int ntfs_set_state(struct ntfs_sb_info *sbi, enum NTFS_DIRTY_FLAGS dirty)if (err)return err; -mark_inode_dirty (&ni->vfs_inode); +mark_inode_dirty_sync (&ni->vfs_inode);/* verify(!ntfs_update_mftmirr()); */ -/* -* If we used wait=1, sync_inode_metadata waits for the io for the -* inode to finish. It hangs when media is removed. -* So wait=0 is sent down to sync_inode_metadata -* and filemap_fdatawrite is used for the data blocks. -*/ - err =sync_inode_metadata (&ni->vfs_inode,0 ); -if (!err) - err =filemap_fdatawrite (ni->vfs_inode.i_mapping); +/* write mft record on disk. */ + err =_ni_write_inode (&ni->vfs_inode,1 );return err; }
fs/ntfs3/super.c +1 -1
@@ -1136,7 +1136,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) goto put_inode_out; } bytes = inode->i_size; - sbi->def_table = t =kmalloc (bytes,GFP_NOFS | __GFP_NOWARN); + sbi->def_table = t =kvmalloc (bytes,GFP_KERNEL );if (!t) { err = -ENOMEM ; goto put_inode_out;
include/linux/device/driver.h +2 -0
@@ -150,6 +150,8 @@ extern int __must_check driver_create_file(struct device_driver *driver,extern void driver_remove_file (struct device_driver *driver,const struct driver_attribute *attr); +int driver_set_override (struct device *dev,const char **override, +const char *s,size_t len); extern int __must_check driver_for_each_device(struct device_driver *drv, struct device *start, void *data,
include/linux/iio/afe/rescale.h new file +36 -0
@@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright (C) 2018 Axentia Technologies AB +*/ + +#ifndef __IIO_RESCALE_H__ +#define __IIO_RESCALE_H__ + +#include <linux/types.h> +#include <linux/iio/iio.h> + +struct device ; +struct rescale ; + +struct rescale_cfg { +enum iio_chan_type type; +int (*props)(struct device *dev,struct rescale *rescale); +}; + +struct rescale { +const struct rescale_cfg *cfg; +struct iio_channel *source; +struct iio_chan_spec chan; +struct iio_chan_spec_ext_info *ext_info; +bool chan_processed; +s32 numerator; +s32 denominator; +s32 offset; +}; + +int rescale_process_scale (struct rescale *rescale,int scale_type, +int *val,int *val2); +int rescale_process_offset (struct rescale *rescale,int scale_type, +int scale,int scale2,int schan_off, +int *val,int *val2); +#endif /* __IIO_RESCALE_H__ */
include/linux/kasan.h +3 -3
@@ -471,10 +471,10 @@ static inline void kasan_free_shadow(const struct vm_struct *vm) {}#endif /* (CONFIG_KASAN_GENERIC || CONFIG_KASAN_SW_TAGS) && !CONFIG_KASAN_VMALLOC */ -#ifdef CONFIG_KASAN_INLINE +#ifdef CONFIG_KASAN void kasan_non_canonical_hook (unsigned long addr); -#else /* CONFIG_KASAN_INLINE */ +#else /* CONFIG_KASAN */ static inline void kasan_non_canonical_hook (unsigned long addr) { } -#endif /* CONFIG_KASAN_INLINE */ +#endif /* CONFIG_KASAN */ #endif /* LINUX_KASAN_H */
include/linux/pci_ids.h +1 -0
@@ -556,6 +556,7 @@#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443 +#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653#define PCI_DEVICE_ID_AMD_19H_M40H_DF_F3 0x167c#define PCI_DEVICE_ID_AMD_19H_M50H_DF_F3 0x166d
include/linux/platform_device.h +5 -1
@@ -31,7 +31,11 @@ struct platform_device {struct resource *resource;const struct platform_device_id *id_entry; -char *driver_override;/* Driver name to force a match */ +/* +* Driver name to force a match. Do not set directly, because core +* frees it. Use driver_set_override() to set or clear it. +*/ +const char *driver_override;/* MFD cell pointer */ struct mfd_cell *mfd_cell;
include/linux/rpmsg.h +12 -2
@@ -41,7 +41,9 @@ struct rpmsg_channel_info {* rpmsg_device - device that belong to the rpmsg bus * @dev: the device struct * @id: device id (used to match between rpmsg drivers and devices) -* @driver_override: driver name to force a match +* @driver_override: driver name to force a match; do not set directly, +* because core frees it; use driver_set_override() to +* set or clear it. * @src: local address * @dst: destination address * @ept: the rpmsg endpoint of this channel
@@ -51,7 +53,7 @@ struct rpmsg_channel_info {struct rpmsg_device {struct device dev;struct rpmsg_device_id id; -char *driver_override; +const char *driver_override;u32 src;u32 dst;struct rpmsg_endpoint *ept;
@@ -163,6 +165,8 @@ static inline __rpmsg64 cpu_to_rpmsg64(struct rpmsg_device *rpdev, u64 val)#if IS_ENABLED (CONFIG_RPMSG ) +int rpmsg_register_device_override (struct rpmsg_device *rpdev, +const char *driver_override);int rpmsg_register_device (struct rpmsg_device *rpdev);int rpmsg_unregister_device (struct device *parent,struct rpmsg_channel_info *chinfo);
@@ -188,6 +192,12 @@ __poll_t rpmsg_poll(struct rpmsg_endpoint *ept, struct file *filp,#else +static inline int rpmsg_register_device_override (struct rpmsg_device *rpdev, +const char *driver_override) +{ +return -ENXIO ; +} +static inline int rpmsg_register_device (struct rpmsg_device *rpdev) {return -ENXIO ;
include/net/tcp.h +1 -1
@@ -314,7 +314,7 @@ void tcp_shutdown(struct sock *sk, int how);int tcp_v4_early_demux (struct sk_buff *skb);int tcp_v4_rcv (struct sk_buff *skb); -void tcp_remove_empty_skb (struct sock *sk,struct sk_buff *skb); +void tcp_remove_empty_skb (struct sock *sk);int tcp_v4_tw_remember_stamp (struct inet_timewait_sock *tw);int tcp_sendmsg (struct sock *sk,struct msghdr *msg,size_t size);int tcp_sendmsg_locked (struct sock *sk,struct msghdr *msg,size_t size);
include/uapi/linux/can/isotp.h +13 -12
@@ -124,18 +124,19 @@ struct can_isotp_ll_options {/* flags for isotp behaviour */ -#define CAN_ISOTP_LISTEN_MODE 0x001/* listen only (do not send FC) */ -#define CAN_ISOTP_EXTEND_ADDR 0x002/* enable extended addressing */ -#define CAN_ISOTP_TX_PADDING 0x004/* enable CAN frame padding tx path */ -#define CAN_ISOTP_RX_PADDING 0x008/* enable CAN frame padding rx path */ -#define CAN_ISOTP_CHK_PAD_LEN 0x010/* check received CAN frame padding */ -#define CAN_ISOTP_CHK_PAD_DATA 0x020/* check received CAN frame padding */ -#define CAN_ISOTP_HALF_DUPLEX 0x040/* half duplex error state handling */ -#define CAN_ISOTP_FORCE_TXSTMIN 0x080/* ignore stmin from received FC */ -#define CAN_ISOTP_FORCE_RXSTMIN 0x100/* ignore CFs depending on rx stmin */ -#define CAN_ISOTP_RX_EXT_ADDR 0x200/* different rx extended addressing */ -#define CAN_ISOTP_WAIT_TX_DONE 0x400/* wait for tx completion */ -#define CAN_ISOTP_SF_BROADCAST 0x800/* 1-to-N functional addressing */ +#define CAN_ISOTP_LISTEN_MODE 0x0001/* listen only (do not send FC) */ +#define CAN_ISOTP_EXTEND_ADDR 0x0002/* enable extended addressing */ +#define CAN_ISOTP_TX_PADDING 0x0004/* enable CAN frame padding tx path */ +#define CAN_ISOTP_RX_PADDING 0x0008/* enable CAN frame padding rx path */ +#define CAN_ISOTP_CHK_PAD_LEN 0x0010/* check received CAN frame padding */ +#define CAN_ISOTP_CHK_PAD_DATA 0x0020/* check received CAN frame padding */ +#define CAN_ISOTP_HALF_DUPLEX 0x0040/* half duplex error state handling */ +#define CAN_ISOTP_FORCE_TXSTMIN 0x0080/* ignore stmin from received FC */ +#define CAN_ISOTP_FORCE_RXSTMIN 0x0100/* ignore CFs depending on rx stmin */ +#define CAN_ISOTP_RX_EXT_ADDR 0x0200/* different rx extended addressing */ +#define CAN_ISOTP_WAIT_TX_DONE 0x0400/* wait for tx completion */ +#define CAN_ISOTP_SF_BROADCAST 0x0800/* 1-to-N functional addressing */ +#define CAN_ISOTP_CF_BROADCAST 0x1000/* 1-to-N transmission w/o FC */ /* protocol machine default values */
include/uapi/linux/gtp.h +1 -1
@@ -32,6 +32,6 @@ enum gtp_attrs {GTPA_PAD , __GTPA_MAX, }; -#define GTPA_MAX (__GTPA_MAX + 1) +#define GTPA_MAX (__GTPA_MAX - 1)#endif /* _UAPI_LINUX_GTP_H_ */
kernel/events/core.c +2 -1
@@ -13277,7 +13277,8 @@ static int inherit_group(struct perf_event *parent_event, !perf_get_aux_event(child_ctr, leader))return -EINVAL ; } - leader->group_generation = parent_event->group_generation; +if (leader) + leader->group_generation = parent_event->group_generation;return 0 ; }
kernel/trace/trace_kprobe.c +2 -2
@@ -945,7 +945,7 @@ EXPORT_SYMBOL_GPL(kprobe_event_cmd_init);* @name: The name of the kprobe event * @loc: The location of the kprobe event * @kretprobe: Is this a return probe? -* @args: Variable number of arg (pairs), one pair for each field +* @...: Variable number of arg (pairs), one pair for each field * * NOTE: Users normally won't want to call this function directly, but * rather use the kprobe_event_gen_cmd_start() wrapper, which automatically
@@ -1018,7 +1018,7 @@ EXPORT_SYMBOL_GPL(__kprobe_event_gen_cmd_start);/** * __kprobe_event_add_fields - Add probe fields to a kprobe command from arg list * @cmd: A pointer to the dynevent_cmd struct representing the new event -* @args: Variable number of arg (pairs), one pair for each field +* @...: Variable number of arg (pairs), one pair for each field * * NOTE: Users normally won't want to call this function directly, but * rather use the kprobe_event_add_fields() wrapper, which
mm/kasan/report.c +1 -3
@@ -457,9 +457,8 @@ bool kasan_report(unsigned long addr, size_t size, bool is_write,return ret; } -#ifdef CONFIG_KASAN_INLINE /* -* With CONFIG_KASAN_INLINE, accesses to bogus pointers (outside the high +* With CONFIG_KASAN, accesses to bogus pointers (outside the high * canonical half of the address space) cause out-of-bounds shadow memory reads * before the actual access. For addresses in the low canonical half of the * address space, as well as most non-canonical addresses, that out-of-bounds
@@ -495,4 +494,3 @@ void kasan_non_canonical_hook(unsigned long addr)pr_alert ("KASAN: %s in range [0x%016lx-0x%016lx]\n" , bug_type, orig_addr, orig_addr +KASAN_GRANULE_SIZE -1 ); } -#endif
mm/migrate.c +12 -2
@@ -1788,6 +1788,7 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,const int __user *nodes, int __user *status, int flags) { + compat_uptr_t __user *compat_pages = (void __user *)pages;int current_node =NUMA_NO_NODE ;LIST_HEAD (pagelist);int start, i;
@@ -1801,8 +1802,17 @@ static int do_pages_move(struct mm_struct *mm, nodemask_t task_nodes,int node; err = -EFAULT ; -if (get_user (p, pages + i)) - goto out_flush; +if (in_compat_syscall ()) { +compat_uptr_t cp; + +if (get_user (cp, compat_pages + i)) + goto out_flush; + + p =compat_ptr (cp); + }else { +if (get_user (p, pages + i)) + goto out_flush; + }if (get_user (node, nodes + i)) goto out_flush; addr = (unsigned long )untagged_addr (p);
mm/page_alloc.c +1 -1
@@ -9481,6 +9481,7 @@ static void break_down_buddy_pages(struct zone *zone, struct page *page, next_page = page; current_buddy = page + size; } + page = next_page;if (set_page_guard (zone, current_buddy, high, migratetype))continue ;
@@ -9488,7 +9489,6 @@ static void break_down_buddy_pages(struct zone *zone, struct page *page,if (current_buddy != target) {add_to_free_list (current_buddy, zone, high, migratetype);set_buddy_order (current_buddy, high); - page = next_page; } } }
net/can/isotp.c +275 -151
277 lines not on this page · raw message
net/core/neighbour.c +35 -32
67 lines not on this page · raw message
net/vmw_vsock/virtio_transport.c +148 -67
215 lines not on this page · raw message
sound/soc/codecs/wcd938x.c +41 -11
52 lines not on this page · 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.