Linux 5.4.240
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.240 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arc/mm/dma.c | 8 - arch/arm/mm/dma-mapping.c | 8 - arch/arm/xen/mm.c | 12 +- arch/arm64/mm/dma-mapping.c | 8 - arch/c6x/mm/dma-coherent.c | 14 +- arch/csky/mm/dma-mapping.c | 8 - arch/hexagon/kernel/dma.c | 4 arch/ia64/mm/init.c | 4 arch/m68k/kernel/dma.c | 4 arch/m68k/kernel/traps.c | 4 arch/microblaze/kernel/dma.c | 14 +- arch/mips/bmips/dma.c | 7 + arch/mips/bmips/setup.c | 8 + arch/mips/jazz/jazzdma.c | 17 +-- arch/mips/mm/dma-noncoherent.c | 12 +- arch/nds32/kernel/dma.c | 8 - arch/nios2/mm/dma-mapping.c | 8 - arch/openrisc/kernel/dma.c | 2 arch/parisc/kernel/pci-dma.c | 8 - arch/powerpc/mm/dma-noncoherent.c | 8 - arch/riscv/include/uapi/asm/setup.h | 8 + arch/s390/lib/uaccess.c | 2 arch/sh/include/asm/processor_32.h | 1 arch/sh/kernel/dma-coherent.c | 6 - arch/sh/kernel/signal_32.c | 3 arch/sparc/kernel/ioport.c | 4 arch/xtensa/kernel/pci-dma.c | 8 - drivers/atm/idt77252.c | 11 ++ drivers/bluetooth/btqcomsmd.c | 17 +++ drivers/bluetooth/btsdio.c | 1 drivers/bus/imx-weim.c | 2 drivers/firmware/arm_scmi/driver.c | 37 +++++++ drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 10 + drivers/hwmon/it87.c | 4 drivers/i2c/busses/i2c-imx-lpi2c.c | 4 drivers/i2c/busses/i2c-xgene-slimpro.c | 3 drivers/input/mouse/alps.c | 16 +-- drivers/input/mouse/focaltech.c | 8 - drivers/input/touchscreen/goodix.c | 14 ++ drivers/iommu/dma-iommu.c | 10 - drivers/md/dm-crypt.c | 1 drivers/md/dm-stats.c | 7 + drivers/md/dm-stats.h | 2 drivers/md/dm-thin.c | 2 drivers/md/dm.c | 4 drivers/md/md.c | 3 drivers/mtd/nand/raw/meson_nand.c | 8 + drivers/net/dsa/mv88e6xxx/chip.c | 9 + drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 - drivers/net/ethernet/intel/i40e/i40e_diag.c | 11 +- drivers/net/ethernet/intel/i40e/i40e_diag.h | 2 drivers/net/ethernet/intel/iavf/iavf_common.c | 2 drivers/net/ethernet/intel/iavf/iavf_txrx.c | 2 drivers/net/ethernet/intel/igb/igb_main.c | 2 drivers/net/ethernet/intel/igbvf/netdev.c | 8 + drivers/net/ethernet/intel/igbvf/vf.c | 13 +- drivers/net/ethernet/marvell/mvneta.c | 66 ++++++++---- drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 6 - drivers/net/ethernet/natsemi/sonic.c | 4 drivers/net/ethernet/qlogic/qed/qed_sriov.c | 5 drivers/net/ethernet/qualcomm/emac/emac.c | 6 + drivers/net/ethernet/toshiba/ps3_gelic_net.c | 41 ++++--- drivers/net/ethernet/toshiba/ps3_gelic_net.h | 5 drivers/net/ethernet/xircom/xirc2ps_cs.c | 5 drivers/net/ieee802154/ca8210.c | 5 drivers/net/net_failover.c | 8 - drivers/net/phy/mdio-thunder.c | 1 drivers/net/tun.c | 109 +++++++++++---------- drivers/net/usb/cdc_mbim.c | 5 drivers/net/usb/qmi_wwan.c | 1 drivers/net/usb/smsc95xx.c | 6 + drivers/net/xen-netback/common.h | 2 drivers/net/xen-netback/netback.c | 25 ++++ drivers/pinctrl/pinctrl-at91-pio4.c | 1 drivers/pinctrl/pinctrl-ocelot.c | 2 drivers/platform/chrome/cros_ec_chardev.c | 2 drivers/power/supply/da9150-charger.c | 1 drivers/ptp/ptp_qoriq.c | 2 drivers/regulator/fixed.c | 4 drivers/s390/crypto/vfio_ap_drv.c | 3 drivers/scsi/device_handler/scsi_dh_alua.c | 6 - drivers/scsi/lpfc/lpfc_sli.c | 8 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 drivers/scsi/qla2xxx/qla_os.c | 11 ++ drivers/scsi/scsi_devinfo.c | 1 drivers/scsi/ufs/ufshcd.c | 1 drivers/target/iscsi/iscsi_target_parameters.c | 12 +- drivers/thunderbolt/nhi.c | 2 drivers/tty/hvc/hvc_xen.c | 19 +++ drivers/usb/cdns3/cdns3-pci-wrap.c | 5 drivers/usb/chipidea/ci.h | 2 drivers/usb/chipidea/core.c | 11 +- drivers/usb/chipidea/otg.c | 5 drivers/usb/gadget/function/u_audio.c | 2 drivers/usb/storage/unusual_uas.h | 7 + drivers/video/fbdev/au1200fb.c | 3 drivers/video/fbdev/geode/lxfb_core.c | 3 drivers/video/fbdev/intelfb/intelfbdrv.c | 3 drivers/video/fbdev/nvidia/nvidia.c | 2 drivers/video/fbdev/tgafb.c | 3 drivers/xen/swiotlb-xen.c | 8 - fs/btrfs/volumes.c | 11 +- fs/cifs/cifsfs.h | 5 fs/cifs/cifssmb.c | 9 + fs/cifs/smb2ops.c | 2 fs/ext4/inode.c | 3 fs/gfs2/aops.c | 2 fs/gfs2/bmap.c | 3 fs/gfs2/glops.c | 3 fs/nfs/nfs4proc.c | 5 fs/nilfs2/ioctl.c | 2 fs/ocfs2/aops.c | 18 +++ fs/verity/enable.c | 24 ++-- fs/verity/verify.c | 12 +- include/linux/dma-noncoherent.h | 20 +-- include/linux/netdevice.h | 2 include/linux/nvme-tcp.h | 5 include/xen/swiotlb-xen.h | 8 - kernel/bpf/core.c | 2 kernel/compat.c | 2 kernel/dma/direct.c | 14 +- kernel/sched/core.c | 7 - kernel/sched/fair.c | 54 +++++++++- net/can/bcm.c | 16 +-- net/core/rtnetlink.c | 6 - net/ipv4/ip_gre.c | 4 net/ipv6/ip6_gre.c | 4 net/mac80211/wme.c | 6 - net/sched/cls_api.c | 6 - net/sched/sch_api.c | 25 ++-- net/sched/sch_generic.c | 22 ++-- net/tls/tls_main.c | 9 - security/keys/request_key.c | 9 + sound/pci/asihpi/hpi6205.c | 2 sound/pci/hda/patch_ca0132.c | 4 sound/pci/hda/patch_conexant.c | 6 - sound/usb/format.c | 8 + tools/testing/selftests/bpf/test_btf.c | 28 +++++ 139 files changed, 829 insertions(+), 393 deletions(-)
Adrien Thierry (1):
scsi: ufs: core: Add soft dependency on governor_simpleondemand
Akihiko Odaki (1):
igbvf: Regard vf reset nack as success
Al Viro (1):
sh: sanitize the flags on sigreturn
Alexander Aring (1):
ca8210: fix mac_len negative array access
Alexander Lobakin (2):
iavf: fix inverted Rx hash condition leading to disabled hash
iavf: fix non-tunneled IPv6 UDP packet type and hashing
Alexander Stein (1):
i2c: imx-lpi2c: check only for enabled interrupt flags
Alexandre Ghiti (1):
riscv: Bump COMMAND_LINE_SIZE value to 1024
Alvin Šipraga (1):
usb: gadget: u_audio: don't let userspace block driver unbind
Anand Jain (1):
btrfs: scan device in non-exclusive mode
Andreas Gruenbacher (1):
gfs2: Always check inode size of inline inodes
Arseniy Krasnov (1):
mtd: rawnand: meson: invalidate cache on polling ECC bit
Caleb Sander (1):
nvme-tcp: fix nvme_tcp_term_pdu to match spec
Christoph Hellwig (1):
dma-mapping: drop the dev argument to arch_sync_dma_for_*
Christophe JAILLET (1):
regulator: Handle deferred clk
Colin Ian King (1):
regulator: fix spelling mistake "Cant" -> "Can't"
Coly Li (1):
dm thin: fix deadlock when swapping to thin device
Cristian Marussi (1):
firmware: arm_scmi: Fix device node validation for mailbox transport
Daniel Borkmann (1):
bpf: Adjust insufficient default bpf_jit_limit
Daniil Tatianin (1):
qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info
David Disseldorp (1):
cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
David Howells (1):
keys: Do not cache key in task struct if key is requested from kernel thread
Enrico Sau (2):
net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990
net: usb: qmi_wwan: add Telit 0x1080 composition
Eric Biggers (1):
fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY
Eric Dumazet (3):
erspan: do not use skb_mac_header() in ndo_start_xmit()
net_sched: add __rcu annotation to netdev->qdisc
net: sched: fix race condition in qdisc_graft()
Faicker Mo (1):
net/net_failover: fix txq exceeding warning
Felix Fietkau (1):
wifi: mac80211: fix qos on mesh interfaces
Frank Crawford (1):
hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs
Gaosheng Cui (1):
intel/igbvf: free irq on the error path in igbvf_request_msix()
Geoff Levand (2):
net/ps3_gelic_net: Fix RX sk_buff length
net/ps3_gelic_net: Use dma_mapping_error
George Kennedy (1):
tun: avoid double free in tun_free_netdev
Greg Kroah-Hartman (1):
Linux 5.4.240
Hangyu Hua (1):
net: tls: fix possible race condition between do_tls_getsockopt_conf() and do_tls_setsockopt_conf()
Hans de Goede (1):
Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
Harshit Mogalapalli (1):
ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
Heiko Carstens (1):
s390/uaccess: add missing earlyclobber annotations to __clear_user()
Horatiu Vultur (1):
pinctrl: ocelot: Fix alt mode for ocelot
Ivan Bornyakov (1):
bus: imx-weim: fix branch condition evaluates to a garbage value
Ivan Orlov (1):
can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write
Jakob Koschel (1):
scsi: lpfc: Avoid usage of list iterator variable after loop
Jan Kara via Ocfs2-devel (1):
ocfs2: fix data corruption after failed write
Jason A. Donenfeld (1):
Input: focaltech - use explicitly signed char type
Jiasheng Jiang (1):
dm stats: check for and propagate alloc_percpu failure
Joel Selvaraj (1):
scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR
Johan Hovold (1):
pinctrl: at91-pio4: fix domain name assignment
Juergen Gross (1):
xen/netback: don't do grant copy across page boundary
Kalesh AP (1):
bnxt_en: Fix typo in PCI id to device description string mapping
Kuninori Morimoto (2):
ALSA: asihpi: check pao in control_message()
ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
Li Zetao (1):
atm: idt77252: fix kmemleak when rmmod idt77252
Liang He (1):
net: mdio: thunder: Add missing fwnode_handle_put()
Lin Ma (1):
igb: revert rtnl_lock() that causes deadlock
Linus Torvalds (1):
sched_getaffinity: don't assume 'cpumask_size()' is fully initialized
Lorenz Bauer (1):
selftests/bpf: check that modifier resolves after pointer
Lorenzo Bianconi (1):
net: mvneta: make tx buffer array agnostic
Lucas Stach (1):
drm/etnaviv: fix reference leak when mmaping imported buffer
Maher Sanalla (1):
net/mlx5: Read the TC mapping of all priorities on ETS query
Mario Limonciello (1):
thunderbolt: Use const qualifier for ring_interrupt_index
Maurizio Lombardi (1):
scsi: target: iscsi: Fix an error message in iscsi_check_key()
Michael Schmitz (1):
m68k: Only force 030 bus error if PC not in exception table
Mikulas Patocka (1):
dm crypt: add cond_resched() to dmcrypt_write()
Nathan Huckleberry (1):
fsverity: Remove WQ_UNBOUND from fsverity read workqueue
NeilBrown (1):
md: avoid signed overflow in slot_store()
Nilesh Javali (1):
scsi: qla2xxx: Perform lockless command completion in abort path
Paulo Alcantara (1):
cifs: prevent infinite recursion in CIFSGetDFSRefer()
Pawel Laszczak (1):
usb: cdns3: Fix issue with using incorrect PCI device function
Radoslaw Tyl (1):
i40e: fix registers dump after run ethtool adapter self test
Roger Pau Monne (1):
hvc/xen: prevent concurrent accesses to the shared ring
Ryusuke Konishi (1):
nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy()
Shyam Prasad N (1):
cifs: empty interface list when server doesn't support query interfaces
SongJingyi (1):
ptp_qoriq: fix memory leak in probe()
Steffen Bätz (1):
net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
Stephan Gerhold (1):
Bluetooth: btqcomsmd: Fix command timeout after setting BD address
Szymon Heidrich (1):
net: usb: smsc95xx: Limit packet length to skb->len
Takashi Iwai (2):
ALSA: hda/conexant: Partial revert of a quirk for Lenovo
ALSA: usb-audio: Fix regression on detection of Roland VS-100
Tomas Henzl (1):
scsi: megaraid_sas: Fix crash after a double completion
Tony Krowiak (1):
s390/vfio-ap: fix memory leak in vfio_ap device driver
Trond Myklebust (1):
NFSv4: Fix hangs when recovering open state after a server reboot
Tzung-Bi Shih (1):
platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl
Vincent Guittot (1):
sched/fair: Sanitize vruntime of entity being migrated
Wei Chen (6):
i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer()
fbdev: tgafb: Fix potential divide by zero
fbdev: nvidia: Fix potential divide by zero
fbdev: intelfb: Fix potential divide by zero
fbdev: lxfb: Fix potential divide by zero
fbdev: au1200fb: Fix potential divide by zero
Xu Yang (2):
usb: chipdea: core: fix return -EINVAL if request role is the same with current role
usb: chipidea: core: fix possible concurrent when switch role
Yaroslav Furman (1):
uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2
Ye Bin (1):
ext4: fix kernel BUG in 'ext4_write_inline_data_end()'
Yu Kuai (1):
scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate()
Zhang Changzhong (1):
net/sonic: use dma_mapping_error() for error check
Zhang Qiao (1):
sched/fair: sanitize vruntime of entity being placed
Zheng Wang (4):
power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition
xirc2ps_cs: Fix use after free bug in xirc2ps_detach
net: qcom/emac: Fix use after free bug in emac_remove due to race condition
Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
msizanoen (1):
Input: alps - fix compatibility with -funsigned-char
Álvaro Fernández Rojas (1):
mips: bmips: BCM6358: disable RAC flush for TP1
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 239 +SUBLEVEL = 240 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arc/mm/dma.c +4 -4
@@ -48,8 +48,8 @@ void arch_dma_prep_coherent(struct page *page, size_t size)* upper layer functions (in include/linux/dma-mapping.h) */ -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_TO_DEVICE :
@@ -69,8 +69,8 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, } } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_TO_DEVICE :
arch/arm/mm/dma-mapping.c +4 -4
@@ -2332,15 +2332,15 @@ void arch_teardown_dma_ops(struct device *dev) }#ifdef CONFIG_SWIOTLB -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_page_cpu_to_dev (phys_to_page (paddr), paddr & (PAGE_SIZE -1 ), size, dir); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_page_dev_to_cpu (phys_to_page (paddr), paddr & (PAGE_SIZE -1 ), size, dir);
arch/arm/xen/mm.c +6 -6
@@ -70,20 +70,20 @@ static void dma_cache_maint(dma_addr_t handle, size_t size, u32 op)* pfn_valid returns true the pages is local and we can use the native * dma-direct functions, otherwise we call the Xen specific version. */ -void xen_dma_sync_for_cpu (struct device *dev,dma_addr_t handle, -phys_addr_t paddr,size_t size,enum dma_data_direction dir) +void xen_dma_sync_for_cpu (dma_addr_t handle,phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {if (pfn_valid (PFN_DOWN (handle))) -arch_sync_dma_for_cpu (dev, paddr, size, dir); +arch_sync_dma_for_cpu (paddr, size, dir);else if (dir !=DMA_TO_DEVICE )dma_cache_maint (handle, size,GNTTAB_CACHE_INVAL ); } -void xen_dma_sync_for_device (struct device *dev,dma_addr_t handle, -phys_addr_t paddr,size_t size,enum dma_data_direction dir) +void xen_dma_sync_for_device (dma_addr_t handle,phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {if (pfn_valid (PFN_DOWN (handle))) -arch_sync_dma_for_device (dev, paddr, size, dir); +arch_sync_dma_for_device (paddr, size, dir);else if (dir ==DMA_FROM_DEVICE )dma_cache_maint (handle, size,GNTTAB_CACHE_INVAL );else
arch/arm64/mm/dma-mapping.c +4 -4
@@ -13,14 +13,14 @@#include <asm/cacheflush.h> -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_map_area (phys_to_virt (paddr), size, dir); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_unmap_area (phys_to_virt (paddr), size, dir); }
arch/c6x/mm/dma-coherent.c +7 -7
@@ -140,7 +140,7 @@ void __init coherent_mem_init(phys_addr_t start, u32 size) sizeof(long)); } -static void c6x_dma_sync (struct device *dev,phys_addr_t paddr,size_t size, +static void c6x_dma_sync (phys_addr_t paddr,size_t size,enum dma_data_direction dir) {BUG_ON (!valid_dma_direction (dir));
@@ -160,14 +160,14 @@ static void c6x_dma_sync(struct device *dev, phys_addr_t paddr, size_t size, } } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { -return c6x_dma_sync (dev, paddr, size, dir); +return c6x_dma_sync (paddr, size, dir); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { -return c6x_dma_sync (dev, paddr, size, dir); +return c6x_dma_sync (paddr, size, dir); }
arch/csky/mm/dma-mapping.c +4 -4
@@ -58,8 +58,8 @@ void arch_dma_prep_coherent(struct page *page, size_t size)cache_op (page_to_phys (page), size, dma_wbinv_set_zero_range); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_TO_DEVICE :
@@ -74,8 +74,8 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, } } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_TO_DEVICE :
arch/hexagon/kernel/dma.c +2 -2
@@ -55,8 +55,8 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,gen_pool_free (coherent_pool, (unsigned long ) vaddr, size); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {void *addr =phys_to_virt (paddr);
arch/ia64/mm/init.c +2 -2
@@ -73,8 +73,8 @@ __ia64_sync_icache_dcache (pte_t pte)* DMA can be marked as "clean" so that lazy_mmu_prot_update() doesn't have to * flush them when they get mapped into an executable vm-area. */ -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {unsigned long pfn =PHYS_PFN (paddr);
arch/m68k/kernel/dma.c +2 -2
@@ -61,8 +61,8 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,#endif /* CONFIG_MMU && !CONFIG_COLDFIRE */ -void arch_sync_dma_for_device (struct device *dev,phys_addr_t handle, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t handle,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_BIDIRECTIONAL :
arch/m68k/kernel/traps.c +3 -1
@@ -30,6 +30,7 @@#include <linux/init.h> #include <linux/ptrace.h> #include <linux/kallsyms.h> +#include <linux/extable.h> #include <asm/setup.h> #include <asm/fpu.h>
@@ -550,7 +551,8 @@ static inline void bus_error030 (struct frame *fp) errorcode |=2 ;if (mmusr & (MMU_I |MMU_WP )) { -if (ssw &4 ) { +/* We might have an exception table for this PC */ +if (ssw &4 && !search_exception_tables (fp->ptregs.pc)) { pr_err("Data %s fault at %#010lx in %s (pc=%#lx)\n", ssw & RW ? "read" : "write", fp->un.fmtb.daddr,
arch/microblaze/kernel/dma.c +7 -7
@@ -15,7 +15,7 @@#include <linux/bug.h> #include <asm/cacheflush.h> -static void __dma_sync (struct device *dev,phys_addr_t paddr,size_t size, +static void __dma_sync (phys_addr_t paddr,size_t size,enum dma_data_direction direction) {switch (direction) {
@@ -31,14 +31,14 @@ static void __dma_sync(struct device *dev, phys_addr_t paddr, size_t size, } } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { -__dma_sync (dev, paddr, size, dir); +__dma_sync (paddr, size, dir); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { -__dma_sync (dev, paddr, size, dir); +__dma_sync (paddr, size, dir); }
arch/mips/bmips/dma.c +6 -1
@@ -64,7 +64,9 @@ phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t dma_addr)return dma_addr; } -void arch_sync_dma_for_cpu_all (struct device *dev) +bool bmips_rac_flush_disable; + +void arch_sync_dma_for_cpu_all (void ) {void __iomem *cbr =BMIPS_GET_CBR ();u32 cfg;
@@ -74,6 +76,9 @@ void arch_sync_dma_for_cpu_all(struct device *dev) boot_cpu_type() != CPU_BMIPS4380)return ; +if (unlikely (bmips_rac_flush_disable)) +return ; +/* Flush stale data out of the readahead cache */ cfg =__raw_readl (cbr +BMIPS_RAC_CONFIG );__raw_writel (cfg |0x100 , cbr +BMIPS_RAC_CONFIG );
arch/mips/bmips/setup.c +8 -0
@@ -34,6 +34,8 @@#define REG_BCM6328_OTP ((void __iomem *)CKSEG1ADDR(0x1000062c))#define BCM6328_TP1_DISABLED BIT(9) +extern bool bmips_rac_flush_disable; +static const unsigned long kbase =VMLINUX_LOAD_ADDRESS &0xfff00000 ;struct bmips_quirk {
@@ -103,6 +105,12 @@ static void bcm6358_quirks(void)* disable SMP for now */ bmips_smp_enabled =0 ; + +/* +* RAC flush causes kernel panics on BCM6358 when booting from TP1 +* because the bootloader is not initializing it properly. +*/ + bmips_rac_flush_disable = !!(read_c0_brcm_cmt_local () & (1 <<31 )); }static void bcm6368_quirks (void )
arch/mips/jazz/jazzdma.c +8 -9
@@ -592,7 +592,7 @@ static dma_addr_t jazz_dma_map_page(struct device *dev, struct page *page,phys_addr_t phys =page_to_phys (page) + offset;if (!(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -arch_sync_dma_for_device (dev, phys, size, dir); +arch_sync_dma_for_device (phys, size, dir);return vdma_alloc (phys, size); }
@@ -600,7 +600,7 @@ static void jazz_dma_unmap_page(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) { if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC)) - arch_sync_dma_for_cpu(dev, vdma_log2phys(dma_addr), size, dir); + arch_sync_dma_for_cpu(vdma_log2phys(dma_addr), size, dir);vdma_free (dma_addr); }
@@ -612,7 +612,7 @@ static int jazz_dma_map_sg(struct device *dev, struct scatterlist *sglist,for_each_sg (sglist, sg, nents, i) {if (!(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -arch_sync_dma_for_device (dev,sg_phys (sg), sg->length, +arch_sync_dma_for_device (sg_phys (sg), sg->length, dir); sg->dma_address =vdma_alloc (sg_phys (sg), sg->length);if (sg->dma_address ==DMA_MAPPING_ERROR )
@@ -631,8 +631,7 @@ static void jazz_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,for_each_sg (sglist, sg, nents, i) {if (!(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -arch_sync_dma_for_cpu (dev,sg_phys (sg), sg->length, - dir); +arch_sync_dma_for_cpu (sg_phys (sg), sg->length, dir);vdma_free (sg->dma_address); } }
@@ -640,13 +639,13 @@ static void jazz_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,static void jazz_dma_sync_single_for_device (struct device *dev,dma_addr_t addr,size_t size,enum dma_data_direction dir) { -arch_sync_dma_for_device (dev,vdma_log2phys (addr), size, dir); +arch_sync_dma_for_device (vdma_log2phys (addr), size, dir); }static void jazz_dma_sync_single_for_cpu (struct device *dev,dma_addr_t addr,size_t size,enum dma_data_direction dir) { -arch_sync_dma_for_cpu (dev,vdma_log2phys (addr), size, dir); +arch_sync_dma_for_cpu (vdma_log2phys (addr), size, dir); } static void jazz_dma_sync_sg_for_device(struct device *dev,
@@ -656,7 +655,7 @@ static void jazz_dma_sync_sg_for_device(struct device *dev,int i;for_each_sg (sgl, sg, nents, i) -arch_sync_dma_for_device (dev,sg_phys (sg), sg->length, dir); +arch_sync_dma_for_device (sg_phys (sg), sg->length, dir); } static void jazz_dma_sync_sg_for_cpu(struct device *dev,
@@ -666,7 +665,7 @@ static void jazz_dma_sync_sg_for_cpu(struct device *dev,int i;for_each_sg (sgl, sg, nents, i) -arch_sync_dma_for_cpu (dev,sg_phys (sg), sg->length, dir); +arch_sync_dma_for_cpu (sg_phys (sg), sg->length, dir); }const struct dma_map_ops jazz_dma_ops = {
arch/mips/mm/dma-noncoherent.c +6 -6
@@ -27,7 +27,7 @@* R10000 and R12000 are used in such systems, the SGI IP28 Indigo² rsp. * SGI IP32 aka O2. */ -static inline bool cpu_needs_post_dma_flush (struct device *dev) +static inline bool cpu_needs_post_dma_flush (void ) {switch (boot_cpu_type ()) {case CPU_R10000 :
@@ -118,17 +118,17 @@ static inline void dma_sync_phys(phys_addr_t paddr, size_t size, }while (left); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {dma_sync_phys (paddr, size, dir); }#ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { -if (cpu_needs_post_dma_flush (dev)) +if (cpu_needs_post_dma_flush ())dma_sync_phys (paddr, size, dir); }#endif
arch/nds32/kernel/dma.c +4 -4
@@ -46,8 +46,8 @@ static inline void cache_op(phys_addr_t paddr, size_t size, }while (left); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_FROM_DEVICE :
@@ -61,8 +61,8 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, } } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_TO_DEVICE :
arch/nios2/mm/dma-mapping.c +4 -4
@@ -18,8 +18,8 @@#include <linux/cache.h> #include <asm/cacheflush.h> -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {void *vaddr =phys_to_virt (paddr);
@@ -42,8 +42,8 @@ void arch_sync_dma_for_device(struct device *dev, phys_addr_t paddr, } } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {void *vaddr =phys_to_virt (paddr);
arch/openrisc/kernel/dma.c +1 -1
@@ -125,7 +125,7 @@ arch_dma_free(struct device *dev, size_t size, void *vaddr,free_pages_exact (vaddr, size); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t addr,size_t size, +void arch_sync_dma_for_device (phys_addr_t addr,size_t size,enum dma_data_direction dir) {unsigned long cl;
arch/parisc/kernel/pci-dma.c +4 -4
@@ -439,14 +439,14 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,free_pages ((unsigned long )__va (dma_handle), order); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {flush_kernel_dcache_range ((unsigned long )phys_to_virt (paddr), size); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {flush_kernel_dcache_range ((unsigned long )phys_to_virt (paddr), size); }
arch/powerpc/mm/dma-noncoherent.c +4 -4
@@ -104,14 +104,14 @@ static void __dma_sync_page(phys_addr_t paddr, size_t size, int dir)#endif } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_sync_page (paddr, size, dir); } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {__dma_sync_page (paddr, size, dir); }
arch/riscv/include/uapi/asm/setup.h new file +8 -0
@@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ + +#ifndef _UAPI_ASM_RISCV_SETUP_H +#define _UAPI_ASM_RISCV_SETUP_H + +#define COMMAND_LINE_SIZE 1024 + +#endif /* _UAPI_ASM_RISCV_SETUP_H */
arch/s390/lib/uaccess.c +1 -1
@@ -339,7 +339,7 @@ static inline unsigned long clear_user_mvcos(void __user *to, unsigned long size"4: slgr %0,%0\n" "5:\n" EX_TABLE(0b,2b) EX_TABLE(3b,5b) - : "+a" (size), "+a" (to), "+a" (tmp1), "=a" (tmp2) + : "+&a" (size), "+&a" (to), "+a" (tmp1), "=&a" (tmp2) : "a" (empty_zero_page), "d" (reg0) : "cc", "memory");return size; }
arch/sh/include/asm/processor_32.h +1 -0
@@ -51,6 +51,7 @@#define SR_FD 0x00008000#define SR_MD 0x40000000 +#define SR_USER_MASK 0x00000303 // M, Q, S, T bits/* * DSP structure and data */
arch/sh/kernel/dma-coherent.c +3 -3
@@ -25,7 +25,7 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,* Pages from the page allocator may have data present in * cache. So flush the cache before using uncached memory. */ -arch_sync_dma_for_device (dev,virt_to_phys (ret), size, +arch_sync_dma_for_device (virt_to_phys (ret), size,DMA_BIDIRECTIONAL ); ret_nocache = (void __force *)ioremap_nocache (virt_to_phys (ret), size);
@@ -59,8 +59,8 @@ void arch_dma_free(struct device *dev, size_t size, void *vaddr,iounmap (vaddr); } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {void *addr =sh_cacheop_vaddr (phys_to_virt (paddr));
arch/sh/kernel/signal_32.c +3 -0
@@ -116,6 +116,7 @@ static int restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p) { unsigned int err = 0; +unsigned int sr = regs->sr & ~SR_USER_MASK ;#define COPY (x) err |= __get_user(regs->x, &sc->sc_##x)COPY (regs[1 ]);
@@ -131,6 +132,8 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_pCOPY (sr);COPY (pc);#undef COPY + regs->sr = (regs->sr &SR_USER_MASK ) | sr; +#ifdef CONFIG_SH_FPU if (boot_cpu_data.flags &CPU_HAS_FPU ) {int owned_fp;
arch/sparc/kernel/ioport.c +2 -2
@@ -368,8 +368,8 @@ void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,/* IIep is write-through, not flushing on cpu to device transfer. */ -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {if (dir !=PCI_DMA_TODEVICE )dma_make_coherent (paddr,PAGE_ALIGN (size));
arch/xtensa/kernel/pci-dma.c +4 -4
@@ -44,8 +44,8 @@ static void do_cache_op(phys_addr_t paddr, size_t size, } } -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_BIDIRECTIONAL :
@@ -62,8 +62,8 @@ void arch_sync_dma_for_cpu(struct device *dev, phys_addr_t paddr, } } -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir) +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) {switch (dir) {case DMA_BIDIRECTIONAL :
drivers/atm/idt77252.c +11 -0
@@ -2914,6 +2914,7 @@ close_card_oam(struct idt77252_dev *card)recycle_rx_pool_skb (card, &vc->rcv.rx_pool); } +kfree (vc); } } }
@@ -2957,6 +2958,15 @@ open_card_ubr0(struct idt77252_dev *card)return 0 ; } +static void +close_card_ubr0 (struct idt77252_dev *card) +{ +struct vc_map *vc = card->vcs[0 ]; + +free_scq (card, vc->scq); +kfree (vc); +} +static int idt77252_dev_open (struct idt77252_dev *card) {
@@ -3006,6 +3016,7 @@ static void idt77252_dev_close(struct atm_dev *dev)struct idt77252_dev *card = dev->dev_data;u32 conf; +close_card_ubr0 (card);close_card_oam (card); conf = SAR_CFG_RXPTH | /* enable receive path */
drivers/bluetooth/btqcomsmd.c +16 -1
@@ -122,6 +122,21 @@ static int btqcomsmd_setup(struct hci_dev *hdev)return 0 ; } +static int btqcomsmd_set_bdaddr (struct hci_dev *hdev,const bdaddr_t *bdaddr) +{ +int ret; + + ret =qca_set_bdaddr_rome (hdev, bdaddr); +if (ret) +return ret; + +/* The firmware stops responding for a while after setting the bdaddr, +* causing timeouts for subsequent commands. Sleep a bit to avoid this. +*/ +usleep_range (1000 ,10000 ); +return 0 ; +} +static int btqcomsmd_probe (struct platform_device *pdev) {struct btqcomsmd *btq;
@@ -162,7 +177,7 @@ static int btqcomsmd_probe(struct platform_device *pdev) hdev->close = btqcomsmd_close; hdev->send = btqcomsmd_send; hdev->setup = btqcomsmd_setup; - hdev->set_bdaddr = qca_set_bdaddr_rome; + hdev->set_bdaddr = btqcomsmd_set_bdaddr; ret =hci_register_dev (hdev);if (ret <0 )
drivers/bluetooth/btsdio.c +1 -0
@@ -343,6 +343,7 @@ static void btsdio_remove(struct sdio_func *func)BT_DBG ("func %p" , func); +cancel_work_sync (&data->work);if (!data)return ;
drivers/bus/imx-weim.c +1 -1
@@ -192,8 +192,8 @@ static int weim_parse_dt(struct platform_device *pdev, void __iomem *base)const struct of_device_id *of_id =of_match_device (weim_id_table, &pdev->dev);const struct imx_weim_devtype *devtype = of_id->data; +int ret =0 , have_child =0 ;struct device_node *child; -int ret, have_child =0 ;struct cs_timing_state ts = {};u32 reg;
drivers/firmware/arm_scmi/driver.c +37 -0
@@ -737,6 +737,39 @@ static int scmi_mailbox_check(struct device_node *np, int idx) idx, NULL); } +static int scmi_mailbox_chan_validate (struct device *cdev) +{ +int num_mb, num_sh, ret =0 ; +struct device_node *np = cdev->of_node; + + num_mb =of_count_phandle_with_args (np,"mboxes" ,"#mbox-cells" ); + num_sh =of_count_phandle_with_args (np,"shmem" ,NULL ); +/* Bail out if mboxes and shmem descriptors are inconsistent */ +if (num_mb <=0 || num_sh >2 || num_mb != num_sh) { +dev_warn (cdev,"Invalid channel descriptor for '%s'\n" , +of_node_full_name (np)); +return -EINVAL ; + } + +if (num_sh >1 ) { +struct device_node *np_tx, *np_rx; + + np_tx =of_parse_phandle (np,"shmem" ,0 ); + np_rx =of_parse_phandle (np,"shmem" ,1 ); +/* SCMI Tx and Rx shared mem areas have to be distinct */ +if (!np_tx || !np_rx || np_tx == np_rx) { +dev_warn (cdev,"Invalid shmem descriptor for '%s'\n" , +of_node_full_name (np)); + ret = -EINVAL ; + } + +of_node_put (np_tx); +of_node_put (np_rx); + } + +return ret; +} +static int scmi_mbox_chan_setup (struct scmi_info *info,struct device *dev,int prot_id,bool tx) {
@@ -760,6 +793,10 @@ static int scmi_mbox_chan_setup(struct scmi_info *info, struct device *dev, goto idr_alloc; } + ret =scmi_mailbox_chan_validate (dev); +if (ret) +return ret; + cinfo =devm_kzalloc (info->dev,sizeof (*cinfo),GFP_KERNEL );if (!cinfo)return -ENOMEM ;
drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c +9 -1
@@ -93,7 +93,15 @@ static void *etnaviv_gem_prime_vmap_impl(struct etnaviv_gem_object *etnaviv_obj)static int etnaviv_gem_prime_mmap_obj (struct etnaviv_gem_object *etnaviv_obj,struct vm_area_struct *vma) { -return dma_buf_mmap (etnaviv_obj->base.dma_buf, vma,0 ); +int ret; + + ret =dma_buf_mmap (etnaviv_obj->base.dma_buf, vma,0 ); +if (!ret) { +/* Drop the reference acquired by drm_gem_mmap_obj(). */ +drm_gem_object_put (&etnaviv_obj->base); + } + +return ret; }static const struct etnaviv_gem_ops etnaviv_gem_prime_ops = {
drivers/hwmon/it87.c +3 -1
@@ -486,6 +486,8 @@ static const struct it87_devices it87_devices[] = {#define has_pwm_freq2 (data) ((data)->features & FEAT_PWM_FREQ2)#define has_six_temp (data) ((data)->features & FEAT_SIX_TEMP)#define has_vin3_5v (data) ((data)->features & FEAT_VIN3_5V) +#define has_scaling (data) ((data)->features & (FEAT_12MV_ADC | \ + FEAT_10_9MV_ADC))struct it87_sio_data {int sioaddr;
@@ -3098,7 +3100,7 @@ static int it87_probe(struct platform_device *pdev) "Detected broken BIOS defaults, disabling PWM interface\n");/* Starting with IT8721F, we handle scaling of internal voltages */ -if (has_12mv_adc (data)) { +if (has_scaling (data)) {if (sio_data->internal &BIT (0 )) data->in_scaled |=BIT (3 );/* in3 is AVCC */ if (sio_data->internal &BIT (1 ))
drivers/i2c/busses/i2c-imx-lpi2c.c +4 -0
@@ -508,10 +508,14 @@ static int lpi2c_imx_xfer(struct i2c_adapter *adapter,static irqreturn_t lpi2c_imx_isr (int irq,void *dev_id) {struct lpi2c_imx_struct *lpi2c_imx = dev_id; +unsigned int enabled;unsigned int temp; + enabled =readl (lpi2c_imx->base +LPI2C_MIER ); +lpi2c_imx_intctrl (lpi2c_imx,0 ); temp =readl (lpi2c_imx->base +LPI2C_MSR ); + temp &= enabled;if (temp &MSR_RDF )lpi2c_imx_read_rxfifo (lpi2c_imx);
drivers/i2c/busses/i2c-xgene-slimpro.c +3 -0
@@ -308,6 +308,9 @@ static int slimpro_i2c_blkwr(struct slimpro_i2c_dev *ctx, u32 chip,u32 msg[3 ];int rc; +if (writelen >I2C_SMBUS_BLOCK_MAX ) +return -EINVAL ; +memcpy (ctx->dma_buffer, data, writelen); paddr =dma_map_single (ctx->dev, ctx->dma_buffer, writelen,DMA_TO_DEVICE );
drivers/input/mouse/alps.c +8 -8
@@ -852,8 +852,8 @@ static void alps_process_packet_v6(struct psmouse *psmouse) x = y = z =0 ;/* Divide 4 since trackpoint's speed is too fast */ -input_report_rel (dev2,REL_X , (char )x /4 ); -input_report_rel (dev2,REL_Y , -((char )y /4 )); +input_report_rel (dev2,REL_X , (s8 )x /4 ); +input_report_rel (dev2,REL_Y , -((s8 )y /4 ));psmouse_report_standard_buttons (dev2, packet[3 ]);
@@ -1104,8 +1104,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse) ((packet[3 ] &0x20 ) <<1 ); z = (packet[5 ] &0x3f ) | ((packet[3 ] &0x80 ) >>1 ); -input_report_rel (dev2,REL_X , (char )x); -input_report_rel (dev2,REL_Y , -((char )y)); +input_report_rel (dev2,REL_X , (s8 )x); +input_report_rel (dev2,REL_Y , -((s8 )y));input_report_abs (dev2,ABS_PRESSURE , z);psmouse_report_standard_buttons (dev2, packet[1 ]);
@@ -2294,20 +2294,20 @@ static int alps_get_v3_v7_resolution(struct psmouse *psmouse, int reg_pitch)if (reg <0 )return reg; - x_pitch = (char )(reg <<4 ) >>4 ;/* sign extend lower 4 bits */ + x_pitch = (s8)(reg <<4 ) >>4 ;/* sign extend lower 4 bits */ x_pitch =50 +2 * x_pitch;/* In 0.1 mm units */ - y_pitch = (char )reg >>4 ;/* sign extend upper 4 bits */ + y_pitch = (s8 )reg >>4 ;/* sign extend upper 4 bits */ y_pitch =36 +2 * y_pitch;/* In 0.1 mm units */ reg =alps_command_mode_read_reg (psmouse, reg_pitch +1 );if (reg <0 )return reg; - x_electrode = (char )(reg <<4 ) >>4 ;/* sign extend lower 4 bits */ + x_electrode = (s8)(reg <<4 ) >>4 ;/* sign extend lower 4 bits */ x_electrode =17 + x_electrode; - y_electrode = (char )reg >>4 ;/* sign extend upper 4 bits */ + y_electrode = (s8 )reg >>4 ;/* sign extend upper 4 bits */ y_electrode =13 + y_electrode; x_phys = x_pitch * (x_electrode -1 );/* In 0.1 mm units */
drivers/input/mouse/focaltech.c +4 -4
@@ -202,8 +202,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse, state->pressed = packet[0 ] >>7 ; finger1 = ((packet[0 ] >>4 ) &0x7 ) -1 ;if (finger1 <FOC_MAX_FINGERS ) { - state->fingers[finger1].x += (char )packet[1 ]; - state->fingers[finger1].y += (char )packet[2 ]; + state->fingers[finger1].x += (s8 )packet[1 ]; + state->fingers[finger1].y += (s8 )packet[2 ]; }else {psmouse_err (psmouse,"First finger in rel packet invalid: %d\n" , finger1);
@@ -218,8 +218,8 @@ static void focaltech_process_rel_packet(struct psmouse *psmouse,*/ finger2 = ((packet[3 ] >>4 ) &0x7 ) -1 ;if (finger2 <FOC_MAX_FINGERS ) { - state->fingers[finger2].x += (char )packet[4 ]; - state->fingers[finger2].y += (char )packet[5 ]; + state->fingers[finger2].x += (s8 )packet[4 ]; + state->fingers[finger2].y += (s8 )packet[5 ]; } }
drivers/input/touchscreen/goodix.c +11 -3
@@ -170,10 +170,18 @@ static const struct dmi_system_id rotated_screen[] = {static const struct dmi_system_id nine_bytes_report[] = { #if defined(CONFIG_DMI) && defined(CONFIG_X86) { - .ident ="Lenovo YogaBook" , -/* YB1-X91L/F and YB1-X90L/F */ +/* Lenovo Yoga Book X90F / X90L */ .matches = { -DMI_MATCH (DMI_PRODUCT_NAME ,"Lenovo YB1-X9" ) +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Intel Corporation" ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"CHERRYVIEW D1 PLATFORM" ), +DMI_EXACT_MATCH (DMI_PRODUCT_VERSION ,"YETI-11" ), + } + }, + { +/* Lenovo Yoga Book X91F / X91L */ + .matches = { +/* Non exact match to match F + L versions */ +DMI_MATCH (DMI_PRODUCT_NAME ,"Lenovo YB1-X91" ), } }, #endif
drivers/iommu/dma-iommu.c +5 -5
@@ -660,7 +660,7 @@ static void iommu_dma_sync_single_for_cpu(struct device *dev,return ; phys =iommu_iova_to_phys (iommu_get_dma_domain (dev), dma_handle); -arch_sync_dma_for_cpu (dev, phys, size, dir); +arch_sync_dma_for_cpu (phys, size, dir); } static void iommu_dma_sync_single_for_device(struct device *dev,
@@ -672,7 +672,7 @@ static void iommu_dma_sync_single_for_device(struct device *dev,return ; phys =iommu_iova_to_phys (iommu_get_dma_domain (dev), dma_handle); -arch_sync_dma_for_device (dev, phys, size, dir); +arch_sync_dma_for_device (phys, size, dir); } static void iommu_dma_sync_sg_for_cpu(struct device *dev,
@@ -686,7 +686,7 @@ static void iommu_dma_sync_sg_for_cpu(struct device *dev,return ;for_each_sg (sgl, sg, nelems, i) -arch_sync_dma_for_cpu (dev,sg_phys (sg), sg->length, dir); +arch_sync_dma_for_cpu (sg_phys (sg), sg->length, dir); } static void iommu_dma_sync_sg_for_device(struct device *dev,
@@ -700,7 +700,7 @@ static void iommu_dma_sync_sg_for_device(struct device *dev,return ;for_each_sg (sgl, sg, nelems, i) -arch_sync_dma_for_device (dev,sg_phys (sg), sg->length, dir); +arch_sync_dma_for_device (sg_phys (sg), sg->length, dir); } static dma_addr_t iommu_dma_map_page(struct device *dev, struct page *page,
@@ -715,7 +715,7 @@ static dma_addr_t iommu_dma_map_page(struct device *dev, struct page *page, dma_handle =__iommu_dma_map (dev, phys, size, prot);if (!coherent && !(attrs &DMA_ATTR_SKIP_CPU_SYNC ) && dma_handle !=DMA_MAPPING_ERROR ) -arch_sync_dma_for_device (dev, phys, size, dir); +arch_sync_dma_for_device (phys, size, dir);return dma_handle; }
drivers/md/dm-crypt.c +1 -0
@@ -1554,6 +1554,7 @@ static int dmcrypt_write(void *data) io =crypt_io_from_node (rb_first (&write_tree));rb_erase (&io->rb_node, &write_tree);kcryptd_io_write (io); +cond_resched (); }while (!RB_EMPTY_ROOT (&write_tree));blk_finish_plug (&plug); }
drivers/md/dm-stats.c +6 -1
@@ -188,7 +188,7 @@ static int dm_stat_in_flight(struct dm_stat_shared *shared)atomic_read (&shared->in_flight[WRITE ]); } -void dm_stats_init (struct dm_stats *stats) +int dm_stats_init (struct dm_stats *stats) {int cpu;struct dm_stats_last_position *last;
@@ -196,11 +196,16 @@ void dm_stats_init(struct dm_stats *stats)mutex_init (&stats->mutex);INIT_LIST_HEAD (&stats->list); stats->last = alloc_percpu(struct dm_stats_last_position); +if (!stats->last) +return -ENOMEM ; +for_each_possible_cpu (cpu) { last =per_cpu_ptr (stats->last, cpu); last->last_sector = (sector_t )ULLONG_MAX ; last->last_rw =UINT_MAX ; } + +return 0 ; }void dm_stats_cleanup (struct dm_stats *stats)
drivers/md/dm-stats.h +1 -1
@@ -22,7 +22,7 @@ struct dm_stats_aux {unsigned long long duration_ns; }; -void dm_stats_init (struct dm_stats *st); +int dm_stats_init (struct dm_stats *st);void dm_stats_cleanup (struct dm_stats *st);struct mapped_device ;
drivers/md/dm-thin.c +2 -0
@@ -3407,6 +3407,7 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv) pt->adjusted_pf = pt->requested_pf = pf;bio_init (&pt->flush_bio,NULL ,0 ); ti->num_flush_bios =1 ; + ti->limit_swap_bios = true;/* * Only need to enable discards if the pool should pass
@@ -4292,6 +4293,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) goto bad; ti->num_flush_bios =1 ; + ti->limit_swap_bios = true; ti->flush_supported = true; ti->per_io_data_size =sizeof (struct dm_thin_endio_hook );
drivers/md/dm.c +3 -1
@@ -1994,7 +1994,9 @@ static struct mapped_device *alloc_dev(int minor)if (!md->bdev) goto bad; -dm_stats_init (&md->stats); + r =dm_stats_init (&md->stats); +if (r <0 ) + goto bad;/* Populate the mapping, nobody knows we exist yet */ spin_lock (&_minor_lock);
drivers/md/md.c +3 -0
@@ -3082,6 +3082,9 @@ slot_store(struct md_rdev *rdev, const char *buf, size_t len) err =kstrtouint (buf,10 , (unsigned int *)&slot);if (err <0 )return err; +if (slot <0 ) +/* overflow */ +return -ENOSPC ; }if (rdev->mddev->pers && slot ==-1 ) {/* Setting 'slot' on an active array requires also
drivers/mtd/nand/raw/meson_nand.c +7 -1
@@ -172,6 +172,7 @@ struct meson_nfc {dma_addr_t daddr;dma_addr_t iaddr; +u32 info_bytes;unsigned long assigned_cs; };
@@ -499,6 +500,7 @@ static int meson_nfc_dma_buffer_setup(struct nand_chip *nand, void *databuf, nfc->daddr, datalen, dir);return ret; } + nfc->info_bytes = infolen; cmd =GENCMDIADDRL (NFC_CMD_AIL , nfc->iaddr);writel (cmd, nfc->reg_base +NFC_REG_CMD );
@@ -516,8 +518,10 @@ static void meson_nfc_dma_buffer_release(struct nand_chip *nand,struct meson_nfc *nfc =nand_get_controller_data (nand);dma_unmap_single (nfc->dev, nfc->daddr, datalen, dir); -if (infolen) +if (infolen) {dma_unmap_single (nfc->dev, nfc->iaddr, infolen, dir); + nfc->info_bytes =0 ; + } }static int meson_nfc_read_buf (struct nand_chip *nand,u8 *buf,int len)
@@ -706,6 +710,8 @@ static void meson_nfc_check_ecc_pages_valid(struct meson_nfc *nfc,usleep_range (10 ,15 );/* info is updated by nfc dma engine*/ smp_rmb (); +dma_sync_single_for_cpu (nfc->dev, nfc->iaddr, nfc->info_bytes, +DMA_FROM_DEVICE ); ret = *info &ECC_COMPLETE ; }while (!ret); }
drivers/net/dsa/mv88e6xxx/chip.c +7 -2
@@ -2433,9 +2433,14 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)* If this is the upstream port for this switch, enable * forwarding of unknown unicasts and multicasts. */ - reg =MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP | -MV88E6185_PORT_CTL0_USE_TAG |MV88E6185_PORT_CTL0_USE_IP | + reg =MV88E6185_PORT_CTL0_USE_TAG |MV88E6185_PORT_CTL0_USE_IP |MV88E6XXX_PORT_CTL0_STATE_FORWARDING ; +/* Forward any IPv4 IGMP or IPv6 MLD frames received +* by a USER port to the CPU port to allow snooping. +*/ +if (dsa_is_user_port (ds, port)) + reg |=MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP ; + err =mv88e6xxx_port_write (chip, port,MV88E6XXX_PORT_CTL0 , reg);if (err)return err;
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -4
@@ -221,12 +221,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = { { PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 }, { PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 }, { PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 }, - { PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR }, { PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR }, { PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR }, - { PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR }, + { PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR }, { PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 }, { PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 }, #ifdef CONFIG_BNXT_SRIOV
drivers/net/ethernet/intel/i40e/i40e_diag.c +6 -5
@@ -44,7 +44,7 @@ static i40e_status i40e_diag_reg_pattern_test(struct i40e_hw *hw,return 0 ; } -struct i40e_diag_reg_test_info i40e_reg_list[] = { +const struct i40e_diag_reg_test_info i40e_reg_list[] = {/* offset mask elements stride */ {I40E_QTX_CTL (0 ),0x0000FFBF ,1 ,I40E_QTX_CTL (1 ) -I40E_QTX_CTL (0 )},
@@ -78,27 +78,28 @@ i40e_status i40e_diag_reg_test(struct i40e_hw *hw) {i40e_status ret_code =0 ;u32 reg, mask; +u32 elements;u32 i, j;for (i =0 ; i40e_reg_list[i].offset !=0 && !ret_code; i++) { + elements = i40e_reg_list[i].elements;/* set actual reg range for dynamically allocated resources */ if (i40e_reg_list[i].offset ==I40E_QTX_CTL (0 ) && hw->func_caps.num_tx_qp !=0 ) - i40e_reg_list[i].elements = hw->func_caps.num_tx_qp; + elements = hw->func_caps.num_tx_qp;if ((i40e_reg_list[i].offset ==I40E_PFINT_ITRN (0 ,0 ) || i40e_reg_list[i].offset ==I40E_PFINT_ITRN (1 ,0 ) || i40e_reg_list[i].offset ==I40E_PFINT_ITRN (2 ,0 ) || i40e_reg_list[i].offset ==I40E_QINT_TQCTL (0 ) || i40e_reg_list[i].offset ==I40E_QINT_RQCTL (0 )) && hw->func_caps.num_msix_vectors !=0 ) - i40e_reg_list[i].elements = - hw->func_caps.num_msix_vectors -1 ; + elements = hw->func_caps.num_msix_vectors -1 ;/* test register access */ mask = i40e_reg_list[i].mask; -for (j =0 ; j < i40e_reg_list[i].elements && !ret_code; j++) { +for (j =0 ; j < elements && !ret_code; j++) { reg = i40e_reg_list[i].offset + (j * i40e_reg_list[i].stride); ret_code =i40e_diag_reg_pattern_test (hw, reg, mask);
drivers/net/ethernet/intel/i40e/i40e_diag.h +1 -1
@@ -20,7 +20,7 @@ struct i40e_diag_reg_test_info {u32 stride;/* bytes between each element */ }; -extern struct i40e_diag_reg_test_info i40e_reg_list[]; +extern const struct i40e_diag_reg_test_info i40e_reg_list[];i40e_status i40e_diag_reg_test (struct i40e_hw *hw);i40e_status i40e_diag_eeprom_test (struct i40e_hw *hw);
drivers/net/ethernet/intel/iavf/iavf_common.c +1 -1
@@ -662,7 +662,7 @@ struct iavf_rx_ptype_decoded iavf_ptype_lookup[] = {/* Non Tunneled IPv6 */ IAVF_PTT (88 ,IP ,IPV6 ,FRG ,NONE ,NONE ,NOF ,NONE ,PAY3 ),IAVF_PTT (89 ,IP ,IPV6 ,NOF ,NONE ,NONE ,NOF ,NONE ,PAY3 ), -IAVF_PTT (90 ,IP ,IPV6 ,NOF ,NONE ,NONE ,NOF ,UDP ,PAY3 ), +IAVF_PTT (90 ,IP ,IPV6 ,NOF ,NONE ,NONE ,NOF ,UDP ,PAY4 ),IAVF_PTT_UNUSED_ENTRY (91 ),IAVF_PTT (92 ,IP ,IPV6 ,NOF ,NONE ,NONE ,NOF ,TCP ,PAY4 ), IAVF_PTT(93, IP, IPV6, NOF, NONE, NONE, NOF, SCTP, PAY4),
drivers/net/ethernet/intel/iavf/iavf_txrx.c +1 -1
@@ -1061,7 +1061,7 @@ static inline void iavf_rx_hash(struct iavf_ring *ring,cpu_to_le64 ((u64 )IAVF_RX_DESC_FLTSTAT_RSS_HASH <<IAVF_RX_DESC_STATUS_FLTSTAT_SHIFT ); -if (ring->netdev->features &NETIF_F_RXHASH ) +if (!(ring->netdev->features &NETIF_F_RXHASH ))return ;if ((rx_desc->wb.qword1.status_error_len & rss_mask) == rss_mask) {
drivers/net/ethernet/intel/igb/igb_main.c +0 -2
@@ -3674,9 +3674,7 @@ static void igb_remove(struct pci_dev *pdev)igb_release_hw_control (adapter);#ifdef CONFIG_PCI_IOV -rtnl_lock ();igb_disable_sriov (pdev); -rtnl_unlock ();#endif unregister_netdev (netdev);
drivers/net/ethernet/intel/igbvf/netdev.c +6 -2
@@ -1070,7 +1070,7 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter) igbvf_intr_msix_rx,0 , adapter->rx_ring->name, netdev);if (err) - goto out; + goto free_irq_tx; adapter->rx_ring->itr_register =E1000_EITR (vector); adapter->rx_ring->itr_val = adapter->current_itr;
@@ -1079,10 +1079,14 @@ static int igbvf_request_msix(struct igbvf_adapter *adapter) err =request_irq (adapter->msix_entries[vector].vector, igbvf_msix_other,0 , netdev->name, netdev);if (err) - goto out; + goto free_irq_rx;igbvf_configure_msix (adapter);return 0 ; +free_irq_rx: +free_irq (adapter->msix_entries[--vector].vector, netdev); +free_irq_tx: +free_irq (adapter->msix_entries[--vector].vector, netdev); out:return err; }
drivers/net/ethernet/intel/igbvf/vf.c +10 -3
@@ -1,6 +1,8 @@// SPDX-License-Identifier: GPL-2.0 /* Copyright(c) 2009 - 2018 Intel Corporation. */ +#include <linux/etherdevice.h> +#include "vf.h" static s32 e1000_check_for_link_vf (struct e1000_hw *hw);
@@ -131,11 +133,16 @@ static s32 e1000_reset_hw_vf(struct e1000_hw *hw)/* set our "perm_addr" based on info provided by PF */ ret_val = mbx->ops.read_posted (hw, msgbuf,3 );if (!ret_val) { -if (msgbuf[0 ] == (E1000_VF_RESET | -E1000_VT_MSGTYPE_ACK )) +switch (msgbuf[0 ]) { +case E1000_VF_RESET |E1000_VT_MSGTYPE_ACK :memcpy (hw->mac.perm_addr, addr,ETH_ALEN ); -else +break ; +case E1000_VF_RESET |E1000_VT_MSGTYPE_NACK : +eth_zero_addr (hw->mac.perm_addr); +break ; +default : ret_val = -E1000_ERR_MAC_INIT ; + } } }
drivers/net/ethernet/marvell/mvneta.c +43 -23
179 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +4 -2
@@ -109,12 +109,14 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,if (!MLX5_CAP_GEN (priv->mdev, ets))return -EOPNOTSUPP ; - ets->ets_cap =mlx5_max_tc (priv->mdev) +1 ; -for (i =0 ; i < ets->ets_cap; i++) { +for (i =0 ; i <IEEE_8021QAZ_MAX_TCS ; i++) { err =mlx5_query_port_prio_tc (mdev, i, &ets->prio_tc[i]);if (err)return err; + } + ets->ets_cap =mlx5_max_tc (priv->mdev) +1 ; +for (i =0 ; i < ets->ets_cap; i++) { err =mlx5_query_port_tc_group (mdev, i, &tc_group[i]);if (err)return err;
drivers/net/ethernet/natsemi/sonic.c +2 -2
@@ -256,7 +256,7 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)*/ laddr =dma_map_single (lp->device, skb->data, length,DMA_TO_DEVICE ); -if (!laddr) { +if (dma_mapping_error (lp->device, laddr)) {pr_err_ratelimited ("%s: failed to map tx DMA buffer.\n" , dev->name);dev_kfree_skb_any (skb);return NETDEV_TX_OK ;
@@ -474,7 +474,7 @@ static bool sonic_alloc_rb(struct net_device *dev, struct sonic_local *lp, *new_addr =dma_map_single (lp->device,skb_put (*new_skb,SONIC_RBSIZE ),SONIC_RBSIZE ,DMA_FROM_DEVICE ); -if (!*new_addr) { +if (dma_mapping_error (lp->device, *new_addr)) {dev_kfree_skb (*new_skb); *new_skb =NULL ;return false;
drivers/net/ethernet/qlogic/qed/qed_sriov.c +4 -1
@@ -4404,6 +4404,9 @@ qed_iov_configure_min_tx_rate(struct qed_dev *cdev, int vfid, u32 rate) } vf =qed_iov_get_vf_info (QED_LEADING_HWFN (cdev), (u16 )vfid, true); +if (!vf) +return -EINVAL ; + vport_id = vf->vport_id;return qed_configure_vport_wfq (cdev, vport_id, rate);
@@ -5150,7 +5153,7 @@ static void qed_iov_handle_trust_change(struct qed_hwfn *hwfn)/* Validate that the VF has a configured vport */ vf =qed_iov_get_vf_info (hwfn, i, true); -if (!vf->vport_instance) +if (!vf || !vf->vport_instance)continue ;memset (¶ms,0 ,sizeof (params));
drivers/net/ethernet/qualcomm/emac/emac.c +6 -0
@@ -738,9 +738,15 @@ static int emac_remove(struct platform_device *pdev)struct net_device *netdev =dev_get_drvdata (&pdev->dev);struct emac_adapter *adpt =netdev_priv (netdev); +netif_carrier_off (netdev); +netif_tx_disable (netdev); +unregister_netdev (netdev);netif_napi_del (&adpt->rx_q.napi); +free_irq (adpt->irq.irq, &adpt->irq); +cancel_work_sync (&adpt->work_thread); +emac_clks_teardown (adpt);put_device (&adpt->phydev->mdio.dev);
drivers/net/ethernet/toshiba/ps3_gelic_net.c +22 -19
90 lines not on this page · raw message
drivers/net/ethernet/toshiba/ps3_gelic_net.h +3 -2
@@ -19,8 +19,9 @@#define GELIC_NET_RX_DESCRIPTORS 128/* num of descriptors */ #define GELIC_NET_TX_DESCRIPTORS 128/* num of descriptors */ -#define GELIC_NET_MAX_MTU VLAN_ETH_FRAME_LEN -#define GELIC_NET_MIN_MTU VLAN_ETH_ZLEN +#define GELIC_NET_MAX_FRAME 2312 +#define GELIC_NET_MAX_MTU 2294 +#define GELIC_NET_MIN_MTU 64#define GELIC_NET_RXBUF_ALIGN 128#define GELIC_CARD_RX_CSUM_DEFAULT 1/* hw chksum */ #define GELIC_NET_WATCHDOG_TIMEOUT 5*HZ
drivers/net/ethernet/xircom/xirc2ps_cs.c +5 -0
@@ -503,6 +503,11 @@ static void xirc2ps_detach(struct pcmcia_device *link) {struct net_device *dev = link->priv; +struct local_info *local =netdev_priv (dev); + +netif_carrier_off (dev); +netif_tx_disable (dev); +cancel_work_sync (&local->tx_timeout_task);dev_dbg (&link->dev,"detach\n" );
drivers/net/ieee802154/ca8210.c +3 -2
@@ -1944,10 +1944,9 @@ static int ca8210_skb_tx(struct ca8210_priv *priv ) { -int status;struct ieee802154_hdr header = { };struct secspec secspec; -unsigned int mac_len; +int mac_len, status;dev_dbg (&priv->spi->dev,"%s called\n" , __func__);
@@ -1955,6 +1954,8 @@ static int ca8210_skb_tx(* packet */ mac_len =ieee802154_hdr_peek_addrs (skb, &header); +if (mac_len <0 ) +return mac_len; secspec.security_level = header.sec.level; secspec.key_id_mode = header.sec.key_id_mode;
drivers/net/net_failover.c +2 -6
@@ -130,14 +130,10 @@ static u16 net_failover_select_queue(struct net_device *dev, txq = ops->ndo_select_queue (primary_dev, skb, sb_dev); else txq =netdev_pick_tx (primary_dev, skb,NULL ); - -qdisc_skb_cb (skb)->slave_dev_queue_mapping = skb->queue_mapping; - -return txq; + }else { + txq =skb_rx_queue_recorded (skb) ?skb_get_rx_queue (skb) :0 ; } - txq =skb_rx_queue_recorded (skb) ?skb_get_rx_queue (skb) :0 ; -/* Save the original txq to restore before passing to the driver */ qdisc_skb_cb (skb)->slave_dev_queue_mapping = skb->queue_mapping;
drivers/net/phy/mdio-thunder.c +1 -0
@@ -104,6 +104,7 @@ static int thunder_mdiobus_pci_probe(struct pci_dev *pdev,if (i >=ARRAY_SIZE (nexus->buses))break ; } +fwnode_handle_put (fwn);return 0 ; err_release_regions:
drivers/net/tun.c +59 -50
166 lines not on this page · raw message
drivers/net/usb/cdc_mbim.c +5 -0
@@ -663,6 +663,11 @@ static const struct usb_device_id mbim_devs[] = { .driver_info = (unsigned long)&cdc_mbim_info_avoid_altsetting_toggle, }, +/* Telit FE990 */ + { USB_DEVICE_AND_INTERFACE_INFO(0x1bc7, 0x1081, USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), + .driver_info = (unsigned long )&cdc_mbim_info_avoid_altsetting_toggle, + }, + /* default entry */ { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_MBIM, USB_CDC_PROTO_NONE), .driver_info = (unsigned long)&cdc_mbim_info_zlp,
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1319,6 +1319,7 @@ static const struct usb_device_id products[] = { {QMI_QUIRK_SET_DTR(0x1bc7, 0x1050, 2)}, /* Telit FN980 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1060, 2)}, /* Telit LN920 */ {QMI_QUIRK_SET_DTR(0x1bc7, 0x1070, 2)}, /* Telit FN990 */ + {QMI_QUIRK_SET_DTR(0x1bc7, 0x1080, 2)}, /* Telit FE990 */ {QMI_FIXED_INTF(0x1bc7, 0x1100, 3)}, /* Telit ME910 */ {QMI_FIXED_INTF(0x1bc7, 0x1101, 3)}, /* Telit ME910 dual modem */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */
drivers/net/usb/smsc95xx.c +6 -0
@@ -1935,6 +1935,12 @@ static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb) size = (u16)((header &RX_STS_FL_ ) >>16 ); align_count = (4 - ((size +NET_IP_ALIGN ) %4 )) %4 ; +if (unlikely (size > skb->len)) { +netif_dbg (dev, rx_err, dev->net, +"size err header=0x%08x\n" , header); +return 0 ; + } +if (unlikely (header &RX_STS_ES_ )) {netif_dbg (dev, rx_err, dev->net,"Error header=0x%08x\n" , header);
drivers/net/xen-netback/common.h +1 -1
@@ -166,7 +166,7 @@ struct xenvif_queue { /* Per-queue data for xenvif */struct pending_tx_info pending_tx_info[MAX_PENDING_REQS ];grant_handle_t grant_tx_handle[MAX_PENDING_REQS ]; -struct gnttab_copy tx_copy_ops[MAX_PENDING_REQS ]; +struct gnttab_copy tx_copy_ops[2 *MAX_PENDING_REQS ];struct gnttab_map_grant_ref tx_map_ops[MAX_PENDING_REQS ];struct gnttab_unmap_grant_ref tx_unmap_ops[MAX_PENDING_REQS ];/* passed to gnttab_[un]map_refs with pages under (un)mapping */
drivers/net/xen-netback/netback.c +23 -2
@@ -327,6 +327,7 @@ static int xenvif_count_requests(struct xenvif_queue *queue,struct xenvif_tx_cb {u16 copy_pending_idx[XEN_NETBK_LEGACY_SLOTS_MAX +1 ];u8 copy_count; +u32 split_mask; };#define XENVIF_TX_CB (skb) ((struct xenvif_tx_cb *)(skb)->cb)
@@ -354,6 +355,8 @@ static inline struct sk_buff *xenvif_alloc_skb(unsigned int size)struct sk_buff *skb =alloc_skb (size +NET_SKB_PAD +NET_IP_ALIGN ,GFP_ATOMIC | __GFP_NOWARN); + +BUILD_BUG_ON (sizeof (*XENVIF_TX_CB (skb)) >sizeof (skb->cb));if (unlikely (skb ==NULL ))return NULL ;
@@ -389,11 +392,13 @@ static void xenvif_get_requests(struct xenvif_queue *queue, nr_slots = shinfo->nr_frags +1 ;copy_count (skb) =0 ; +XENVIF_TX_CB (skb)->split_mask =0 ;/* Create copy ops for exactly data_len bytes into the skb head. */ __skb_put (skb, data_len);while (data_len >0 ) {int amount = data_len > txp->size ? txp->size : data_len; +bool split = false; cop->source.u.ref = txp->gref; cop->source.domid = queue->vif->domid;
@@ -406,6 +411,13 @@ static void xenvif_get_requests(struct xenvif_queue *queue, cop->dest.u.gmfn =virt_to_gfn (skb->data +skb_headlen (skb) - data_len); +/* Don't cross local page boundary! */ +if (cop->dest.offset + amount >XEN_PAGE_SIZE ) { + amount =XEN_PAGE_SIZE - cop->dest.offset; +XENVIF_TX_CB (skb)->split_mask |=1U <<copy_count (skb); + split = true; + } + cop->len = amount; cop->flags = GNTCOPY_source_gref;
@@ -413,7 +425,8 @@ static void xenvif_get_requests(struct xenvif_queue *queue, pending_idx = queue->pending_ring[index];callback_param (queue, pending_idx).ctx =NULL ;copy_pending_idx (skb,copy_count (skb)) = pending_idx; -copy_count (skb)++; +if (!split) +copy_count (skb)++; cop++; data_len -= amount;
@@ -434,7 +447,8 @@ static void xenvif_get_requests(struct xenvif_queue *queue, nr_slots--; }else {/* The copy op partially covered the tx_request. -* The remainder will be mapped. +* The remainder will be mapped or copied in the next +* iteration. */ txp->offset += amount; txp->size -= amount;
@@ -532,6 +546,13 @@ static int xenvif_tx_check_gop(struct xenvif_queue *queue, pending_idx =copy_pending_idx (skb, i); newerr = (*gopp_copy)->status; + +/* Split copies need to be handled together. */ +if (XENVIF_TX_CB (skb)->split_mask & (1U << i)) { + (*gopp_copy)++; +if (!newerr) + newerr = (*gopp_copy)->status; + }if (likely (!newerr)) {/* The first frag might still have this slot mapped */ if (i <copy_count (skb) -1 || !sharedslot)
drivers/pinctrl/pinctrl-at91-pio4.c +0 -1
@@ -1069,7 +1069,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)dev_err (dev,"can't add the irq domain\n" );return -ENODEV ; } - atmel_pioctrl->irq_domain->name ="atmel gpio" ;for (i =0 ; i < atmel_pioctrl->npins; i++) {int irq =irq_create_mapping (atmel_pioctrl->irq_domain, i);
drivers/pinctrl/pinctrl-ocelot.c +1 -1
@@ -420,7 +420,7 @@ static int ocelot_pinmux_set_mux(struct pinctrl_dev *pctldev,regmap_update_bits (info->map,REG_ALT (0 , info, pin->pin),BIT (p), f << p);regmap_update_bits (info->map,REG_ALT (1 , info, pin->pin), -BIT (p), f << (p -1 )); +BIT (p), (f >>1 ) << p);return 0 ; }
drivers/platform/chrome/cros_ec_chardev.c +1 -1
@@ -285,7 +285,7 @@ static long cros_ec_chardev_ioctl_xcmd(struct cros_ec_dev *ec, void __user *arg) u_cmd.insize > EC_MAX_MSG_BYTES)return -EINVAL ; - s_cmd =kmalloc (sizeof (*s_cmd) +max (u_cmd.outsize, u_cmd.insize), + s_cmd =kzalloc (sizeof (*s_cmd) +max (u_cmd.outsize, u_cmd.insize),GFP_KERNEL );if (!s_cmd)return -ENOMEM ;
drivers/power/supply/da9150-charger.c +1 -0
@@ -662,6 +662,7 @@ static int da9150_charger_remove(struct platform_device *pdev)if (!IS_ERR_OR_NULL (charger->usb_phy))usb_unregister_notifier (charger->usb_phy, &charger->otg_nb); +cancel_work_sync (&charger->otg_work);power_supply_unregister (charger->battery);power_supply_unregister (charger->usb);
drivers/ptp/ptp_qoriq.c +1 -1
@@ -604,7 +604,7 @@ static int ptp_qoriq_probe(struct platform_device *dev)return 0 ; no_clock: -iounmap (ptp_qoriq->base); +iounmap (base); no_ioremap:release_resource (ptp_qoriq->rsrc); no_resource:
drivers/regulator/fixed.c +2 -2
@@ -181,8 +181,8 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev) drvdata->enable_clock =devm_clk_get (dev,NULL );if (IS_ERR (drvdata->enable_clock)) { -dev_err (dev,"Cant get enable-clock from devicetree\n" ); -return -ENOENT ; +dev_err (dev,"Can't get enable-clock from devicetree\n" ); +return PTR_ERR (drvdata->enable_clock); } }else { drvdata->desc.ops = &fixed_voltage_ops;
drivers/s390/crypto/vfio_ap_drv.c +2 -1
@@ -82,8 +82,9 @@ static void vfio_ap_queue_dev_remove(struct ap_device *apdev)static void vfio_ap_matrix_dev_release (struct device *dev) { -struct ap_matrix_dev *matrix_dev =dev_get_drvdata (dev); +struct ap_matrix_dev *matrix_dev; + matrix_dev = container_of(dev, struct ap_matrix_dev, device);kfree (matrix_dev); }
drivers/scsi/device_handler/scsi_dh_alua.c +4 -2
@@ -1036,10 +1036,12 @@ static int alua_activate(struct scsi_device *sdev,rcu_read_unlock ();mutex_unlock (&h->init_mutex); -if (alua_rtpg_queue (pg, sdev, qdata, true)) +if (alua_rtpg_queue (pg, sdev, qdata, true)) { fn =NULL ; -else + }else { +kfree (qdata); err =SCSI_DH_DEV_OFFLINED ; + }kref_put (&pg->kref, release_port_group); out:if (fn)
drivers/scsi/lpfc/lpfc_sli.c +4 -4
@@ -20407,20 +20407,20 @@ lpfc_get_io_buf_from_private_pool(struct lpfc_hba *phba,static struct lpfc_io_buf *lpfc_get_io_buf_from_expedite_pool (struct lpfc_hba *phba) { -struct lpfc_io_buf *lpfc_ncmd; +struct lpfc_io_buf *lpfc_ncmd =NULL , *iter;struct lpfc_io_buf *lpfc_ncmd_next;unsigned long iflag;struct lpfc_epd_pool *epd_pool; epd_pool = &phba->epd_pool; - lpfc_ncmd =NULL ;spin_lock_irqsave (&epd_pool->lock, iflag);if (epd_pool->count >0 ) { -list_for_each_entry_safe (lpfc_ncmd, lpfc_ncmd_next, +list_for_each_entry_safe (iter, lpfc_ncmd_next, &epd_pool->list, list) { -list_del (&lpfc_ncmd->list); +list_del (&iter->list); epd_pool->count--; + lpfc_ncmd = iter;break ; } }
drivers/scsi/megaraid/megaraid_sas_fusion.c +2 -2
@@ -4659,7 +4659,7 @@ int megasas_task_abort_fusion(struct scsi_cmnd *scmd) devhandle =megasas_get_tm_devhandle (scmd->device);if (devhandle == (u16 )ULONG_MAX ) { - ret =SUCCESS ; + ret =FAILED ;sdev_printk (KERN_INFO , scmd->device,"task abort issued for invalid devhandle\n" );mutex_unlock (&instance->reset_mutex);
@@ -4729,7 +4729,7 @@ int megasas_reset_target_fusion(struct scsi_cmnd *scmd) devhandle =megasas_get_tm_devhandle (scmd->device);if (devhandle == (u16 )ULONG_MAX ) { - ret =SUCCESS ; + ret =FAILED ;sdev_printk (KERN_INFO , scmd->device,"target reset issued for invalid devhandle\n" );mutex_unlock (&instance->reset_mutex);
drivers/scsi/qla2xxx/qla_os.c +11 -0
@@ -1738,6 +1738,17 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)for (cnt =1 ; cnt < req->num_outstanding_cmds; cnt++) { sp = req->outstanding_cmds[cnt];if (sp) { +/* +* perform lockless completion during driver unload +*/ +if (qla2x00_chip_is_down (vha)) { + req->outstanding_cmds[cnt] =NULL ; +spin_unlock_irqrestore (qp->qp_lock_ptr, flags); + sp->done (sp, res); +spin_lock_irqsave (qp->qp_lock_ptr, flags); +continue ; + } +switch (sp->cmd_type) {case TYPE_SRB :qla2x00_abort_srb (qp, sp, res, &flags);
drivers/scsi/scsi_devinfo.c +1 -0
@@ -232,6 +232,7 @@ static struct { {"SGI", "RAID5", "*", BLIST_SPARSELUN}, {"SGI", "TP9100", "*", BLIST_REPORTLUN2}, {"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, + {"SKhynix", "H28U74301AMR", NULL, BLIST_SKIP_VPD_PAGES}, {"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"SUN", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"DELL", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
drivers/scsi/ufs/ufshcd.c +1 -0
@@ -8530,5 +8530,6 @@ EXPORT_SYMBOL_GPL(ufshcd_init);MODULE_AUTHOR ("Santosh Yaragnavi <[email protected]>" );MODULE_AUTHOR ("Vinayak Holikatti <[email protected]>" );MODULE_DESCRIPTION ("Generic UFS host controller driver Core" ); +MODULE_SOFTDEP ("pre: governor_simpleondemand" );MODULE_LICENSE ("GPL" );MODULE_VERSION (UFSHCD_DRIVER_VERSION );
drivers/target/iscsi/iscsi_target_parameters.c +7 -5
@@ -1262,18 +1262,20 @@ static struct iscsi_param *iscsi_check_key(return param;if (!(param->phase & phase)) { -pr_err ("Key \"%s\" may not be negotiated during " , - param->name); +char *phase_name; +switch (phase) {case PHASE_SECURITY : -pr_debug ("Security phase.\n" ); + phase_name ="Security" ;break ;case PHASE_OPERATIONAL : -pr_debug ("Operational phase.\n" ); + phase_name ="Operational" ;break ;default : -pr_debug ("Unknown phase.\n" ); + phase_name ="Unknown" ; } +pr_err ("Key \"%s\" may not be negotiated during %s phase.\n" , + param->name, phase_name);return NULL ; }
drivers/thunderbolt/nhi.c +1 -1
@@ -40,7 +40,7 @@#define NHI_MAILBOX_TIMEOUT 500/* ms */ -static int ring_interrupt_index (struct tb_ring *ring) +static int ring_interrupt_index (const struct tb_ring *ring) {int bit = ring->hop;if (!ring->is_tx)
drivers/tty/hvc/hvc_xen.c +17 -2
@@ -43,6 +43,7 @@ struct xencons_info {int irq;int vtermno;grant_ref_t gntref; +spinlock_t ring_lock; };static LIST_HEAD (xenconsoles);
@@ -89,12 +90,15 @@ static int __write_console(struct xencons_info *xencons,XENCONS_RING_IDX cons, prod;struct xencons_interface *intf = xencons->intf;int sent =0 ; +unsigned long flags; +spin_lock_irqsave (&xencons->ring_lock, flags); cons = intf->out_cons; prod = intf->out_prod;mb ();/* update queue values before going on */ if ((prod - cons) >sizeof (intf->out)) { +spin_unlock_irqrestore (&xencons->ring_lock, flags);pr_err_once ("xencons: Illegal ring page indices" );return -EINVAL ; }
@@ -104,6 +108,7 @@ static int __write_console(struct xencons_info *xencons,wmb ();/* write ring before updating pointer */ intf->out_prod = prod; +spin_unlock_irqrestore (&xencons->ring_lock, flags);if (sent)notify_daemon (xencons);
@@ -146,16 +151,19 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len)int recv =0 ;struct xencons_info *xencons =vtermno_to_xencons (vtermno);unsigned int eoiflag =0 ; +unsigned long flags;if (xencons ==NULL )return -EINVAL ; intf = xencons->intf; +spin_lock_irqsave (&xencons->ring_lock, flags); cons = intf->in_cons; prod = intf->in_prod;mb ();/* get pointers before reading ring */ if ((prod - cons) >sizeof (intf->in)) { +spin_unlock_irqrestore (&xencons->ring_lock, flags);pr_err_once ("xencons: Illegal ring page indices" );return -EINVAL ; }
@@ -179,10 +187,13 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len) xencons->out_cons = intf->out_cons; xencons->out_cons_same =0 ; } +if (!recv && xencons->out_cons_same++ >1 ) { + eoiflag =XEN_EOI_FLAG_SPURIOUS ; + } +spin_unlock_irqrestore (&xencons->ring_lock, flags); +if (recv) {notify_daemon (xencons); - }else if (xencons->out_cons_same++ >1 ) { - eoiflag =XEN_EOI_FLAG_SPURIOUS ; }xen_irq_lateeoi (xencons->irq, eoiflag);
@@ -239,6 +250,7 @@ static int xen_hvm_console_init(void) info =kzalloc (sizeof (struct xencons_info ),GFP_KERNEL );if (!info)return -ENOMEM ; +spin_lock_init (&info->ring_lock); }else if (info->intf !=NULL ) {/* already configured */ return 0 ;
@@ -275,6 +287,7 @@ static int xen_hvm_console_init(void)static int xencons_info_pv_init (struct xencons_info *info,int vtermno) { +spin_lock_init (&info->ring_lock); info->evtchn = xen_start_info->console.domU.evtchn;/* GFN == MFN for PV guest */ info->intf =gfn_to_virt (xen_start_info->console.domU.mfn);
@@ -325,6 +338,7 @@ static int xen_initial_domain_console_init(void) info =kzalloc (sizeof (struct xencons_info ),GFP_KERNEL );if (!info)return -ENOMEM ; +spin_lock_init (&info->ring_lock); } info->irq =bind_virq_to_irq (VIRQ_CONSOLE ,0 , false);
@@ -482,6 +496,7 @@ static int xencons_probe(struct xenbus_device *dev, info =kzalloc (sizeof (struct xencons_info ),GFP_KERNEL );if (!info)return -ENOMEM ; +spin_lock_init (&info->ring_lock);dev_set_drvdata (&dev->dev, info); info->xbdev = dev; info->vtermno =xenbus_devid_to_vtermno (devid);
drivers/usb/cdns3/cdns3-pci-wrap.c +5 -0
@@ -60,6 +60,11 @@ static struct pci_dev *cdns3_get_second_fun(struct pci_dev *pdev)return NULL ; } +if (func->devfn !=PCI_DEV_FN_HOST_DEVICE && + func->devfn !=PCI_DEV_FN_OTG ) { +return NULL ; + } +return func; }
drivers/usb/chipidea/ci.h +2 -0
@@ -203,6 +203,7 @@ struct hw_bank {* @in_lpm: if the core in low power mode * @wakeup_int: if wakeup interrupt occur * @rev: The revision number for controller +* @mutex: protect code from concorrent running when doing role switch */ struct ci_hdrc {struct device *dev;
@@ -256,6 +257,7 @@ struct ci_hdrc {bool in_lpm;bool wakeup_int;enum ci_revision rev; +struct mutex mutex; };static inline struct ci_role_driver *ci_role (struct ci_hdrc *ci)
drivers/usb/chipidea/core.c +10 -1
@@ -960,9 +960,16 @@ static ssize_t role_store(struct device *dev, strlen(ci->roles[role]->name)))break ; -if (role ==CI_ROLE_END || role == ci->role) +if (role ==CI_ROLE_END )return -EINVAL ; +mutex_lock (&ci->mutex); + +if (role == ci->role) { +mutex_unlock (&ci->mutex); +return n; + } +pm_runtime_get_sync (dev);disable_irq (ci->irq);ci_role_stop (ci);
@@ -971,6 +978,7 @@ static ssize_t role_store(struct device *dev,ci_handle_vbus_change (ci);enable_irq (ci->irq);pm_runtime_put_sync (dev); +mutex_unlock (&ci->mutex);return (ret ==0 ) ? n : ret; }
@@ -1006,6 +1014,7 @@ static int ci_hdrc_probe(struct platform_device *pdev)return -ENOMEM ;spin_lock_init (&ci->lock); +mutex_init (&ci->mutex); ci->dev = dev; ci->platdata =dev_get_platdata (dev); ci->imx28_write_fix = !!(ci->platdata->flags &
drivers/usb/chipidea/otg.c +4 -1
@@ -164,8 +164,10 @@ static int hw_wait_vbus_lower_bsv(struct ci_hdrc *ci)static void ci_handle_id_switch (struct ci_hdrc *ci) { -enum ci_role role =ci_otg_role (ci); +enum ci_role role; +mutex_lock (&ci->mutex); + role =ci_otg_role (ci);if (role != ci->role) {dev_dbg (ci->dev,"switching from %s to %s\n" ,ci_role (ci)->name, ci->roles[role]->name);
@@ -188,6 +190,7 @@ static void ci_handle_id_switch(struct ci_hdrc *ci)if (role ==CI_ROLE_GADGET )ci_handle_vbus_change (ci); } +mutex_unlock (&ci->mutex); }/** * ci_otg_work - perform otg (vbus/id) event handle
drivers/usb/gadget/function/u_audio.c +1 -1
@@ -626,7 +626,7 @@ void g_audio_cleanup(struct g_audio *g_audio) uac = g_audio->uac; card = uac->card;if (card) -snd_card_free (card); +snd_card_free_when_closed (card);kfree (uac->p_prm.ureq);kfree (uac->c_prm.ureq);
drivers/usb/storage/unusual_uas.h +7 -0
@@ -111,6 +111,13 @@ UNUSUAL_DEV(0x152d, 0x0578, 0x0000, 0x9999, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_BROKEN_FUA), +/* Reported by: Yaroslav Furman <[email protected]> */ +UNUSUAL_DEV (0x152d ,0x0583 ,0x0000 ,0x9999 , +"JMicron" , +"JMS583Gen 2" , +USB_SC_DEVICE ,USB_PR_DEVICE ,NULL , +US_FL_NO_REPORT_OPCODES ), +/* Reported-by: Thinh Nguyen <[email protected]> */ UNUSUAL_DEV(0x154b, 0xf00b, 0x0000, 0x9999, "PNY",
drivers/video/fbdev/au1200fb.c +3 -0
@@ -1040,6 +1040,9 @@ static int au1200fb_fb_check_var(struct fb_var_screeninfo *var,u32 pixclock;int screen_size, plane; +if (!var->pixclock) +return -EINVAL ; + plane = fbdev->plane;/* Make sure that the mode respect all LCD controller and
drivers/video/fbdev/geode/lxfb_core.c +3 -0
@@ -234,6 +234,9 @@ static void get_modedb(struct fb_videomode **modedb, unsigned int *size)static int lxfb_check_var (struct fb_var_screeninfo *var,struct fb_info *info) { +if (!var->pixclock) +return -EINVAL ; +if (var->xres >1920 || var->yres >1440 )return -EINVAL ;
drivers/video/fbdev/intelfb/intelfbdrv.c +3 -0
@@ -1214,6 +1214,9 @@ static int intelfb_check_var(struct fb_var_screeninfo *var, dinfo =GET_DINFO (info); +if (!var->pixclock) +return -EINVAL ; +/* update the pitch */ if (intelfbhw_validate_mode (dinfo, var) !=0 )return -EINVAL ;
drivers/video/fbdev/nvidia/nvidia.c +2 -0
@@ -766,6 +766,8 @@ static int nvidiafb_check_var(struct fb_var_screeninfo *var,int pitch, err =0 ;NVTRACE_ENTER (); +if (!var->pixclock) +return -EINVAL ; var->transp.offset =0 ; var->transp.length =0 ;
drivers/video/fbdev/tgafb.c +3 -0
@@ -166,6 +166,9 @@ tgafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) {struct tga_par *par = (struct tga_par *)info->par; +if (!var->pixclock) +return -EINVAL ; +if (par->tga_type ==TGA_TYPE_8PLANE ) {if (var->bits_per_pixel !=8 )return -EINVAL ;
drivers/xen/swiotlb-xen.c +4 -4
@@ -411,7 +411,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, done:if (!dev_is_dma_coherent (dev) && !(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -xen_dma_sync_for_device (dev, dev_addr, phys, size, dir); +xen_dma_sync_for_device (dev_addr, phys, size, dir);return dev_addr; }
@@ -431,7 +431,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr,BUG_ON (dir ==DMA_NONE );if (!dev_is_dma_coherent (hwdev) && !(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -xen_dma_sync_for_cpu (hwdev, dev_addr, paddr, size, dir); +xen_dma_sync_for_cpu (dev_addr, paddr, size, dir);/* NOTE: We use dev_addr here, not paddr! */ if (is_xen_swiotlb_buffer (dev_addr))
@@ -445,7 +445,7 @@ xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr,phys_addr_t paddr =xen_bus_to_phys (dma_addr);if (!dev_is_dma_coherent (dev)) -xen_dma_sync_for_cpu (dev, dma_addr, paddr, size, dir); +xen_dma_sync_for_cpu (dma_addr, paddr, size, dir);if (is_xen_swiotlb_buffer (dma_addr))swiotlb_tbl_sync_single (dev, paddr, size, dir,SYNC_FOR_CPU );
@@ -461,7 +461,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr,swiotlb_tbl_sync_single (dev, paddr, size, dir,SYNC_FOR_DEVICE );if (!dev_is_dma_coherent (dev)) -xen_dma_sync_for_device (dev, dma_addr, paddr, size, dir); +xen_dma_sync_for_device (dma_addr, paddr, size, dir); }/*
fs/btrfs/volumes.c +10 -1
@@ -1579,8 +1579,17 @@ struct btrfs_device *btrfs_scan_one_device(const char *path, fmode_t flags,* later supers, using BTRFS_SUPER_MIRROR_MAX instead */ bytenr =btrfs_sb_offset (0 ); - flags |=FMODE_EXCL ; +/* +* Avoid using flag |= FMODE_EXCL here, as the systemd-udev may +* initiate the device scan which may race with the user's mount +* or mkfs command, resulting in failure. +* Since the device scan is solely for reading purposes, there is +* no need for FMODE_EXCL. Additionally, the devices are read again +* during the mount process. It is ok to get some inconsistent +* values temporarily, as the device paths of the fsid are the only +* required information for assembling the volume. +*/ bdev =blkdev_get_by_path (path, flags, holder);if (IS_ERR (bdev))return ERR_CAST (bdev);
fs/cifs/cifsfs.h +4 -1
@@ -125,7 +125,10 @@ extern const struct dentry_operations cifs_ci_dentry_ops;#ifdef CONFIG_CIFS_DFS_UPCALL extern struct vfsmount *cifs_dfs_d_automount (struct path *path);#else -#define cifs_dfs_d_automount NULL +static inline struct vfsmount *cifs_dfs_d_automount (struct path *path) +{ +return ERR_PTR (-EREMOTE ); +}#endif /* Functions related to symlinks */
fs/cifs/cifssmb.c +7 -2
@@ -4933,8 +4933,13 @@ CIFSGetDFSRefer(const unsigned int xid, struct cifs_ses *ses,return -ENODEV ; getDFSRetry: - rc =smb_init (SMB_COM_TRANSACTION2 ,15 , ses->tcon_ipc, (void **) &pSMB, - (void **) &pSMBr); +/* +* Use smb_init_no_reconnect() instead of smb_init() as +* CIFSGetDFSRefer() may be called from cifs_reconnect_tcon() and thus +* causing an infinite recursion. +*/ + rc =smb_init_no_reconnect (SMB_COM_TRANSACTION2 ,15 , ses->tcon_ipc, + (void **)&pSMB, (void **)&pSMBr);if (rc)return rc;
fs/cifs/smb2ops.c +1 -1
@@ -587,7 +587,7 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon)if (rc == -EOPNOTSUPP ) {cifs_dbg (FYI ,"server does not support query network interfaces\n" ); - goto out; + ret_data_len =0 ; }else if (rc !=0 ) {cifs_tcon_dbg (VFS ,"error %d on ioctl to get interface list\n" , rc); goto out;
fs/ext4/inode.c +2 -1
@@ -1439,7 +1439,8 @@ static int ext4_write_end(struct file *file,bool verity =ext4_verity_in_progress (inode);trace_ext4_write_end (inode, pos, len, copied); -if (inline_data) { +if (inline_data && +ext4_test_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA )) { ret =ext4_write_inline_data_end (inode, pos, len, copied, page);if (ret <0 ) {
fs/gfs2/aops.c +0 -2
@@ -456,8 +456,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
@@ -70,9 +70,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 +3 -0
@@ -411,6 +411,9 @@ static int gfs2_dinode_in(struct gfs2_inode *ip, const void *buf) ip->i_depth = (u8 )depth; ip->i_entries =be32_to_cpu (str->di_entries); +if (gfs2_is_stuffed (ip) && ip->i_inode.i_size >gfs2_max_stuffed_size (ip)) + goto corrupt; +if (S_ISREG (ip->i_inode.i_mode))gfs2_set_aops (&ip->i_inode);
fs/nfs/nfs4proc.c +2 -3
@@ -1934,8 +1934,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)if (!data->rpc_done) {if (data->rpc_status)return ERR_PTR (data->rpc_status); -/* cached opens have already been processed */ - goto update; +return nfs4_try_open_cached (data); } ret =nfs_refresh_inode (inode, &data->f_attr);
@@ -1944,7 +1943,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)if (data->o_res.delegation_type !=0 )nfs4_opendata_check_deleg (data, state); -update: +if (!update_open_stateid (state, &data->o_res.stateid,NULL , data->o_arg.fmode))return ERR_PTR (-EAGAIN );
fs/nilfs2/ioctl.c +1 -1
@@ -70,7 +70,7 @@ static int nilfs_ioctl_wrap_copy(struct the_nilfs *nilfs,if (argv->v_index > ~(__u64 )0 - argv->v_nmembs)return -EINVAL ; - buf = (void *)__get_free_pages (GFP_NOFS ,0 ); + buf = (void *)get_zeroed_page (GFP_NOFS );if (unlikely (!buf))return -ENOMEM ; maxmembs =PAGE_SIZE / argv->v_size;
fs/ocfs2/aops.c +16 -2
@@ -1990,11 +1990,25 @@ int ocfs2_write_end_nolock(struct address_space *mapping, }if (unlikely (copied < len) && wc->w_target_page) { +loff_t new_isize; +if (!PageUptodate (wc->w_target_page)) copied =0 ; -ocfs2_zero_new_buffers (wc->w_target_page, start+copied, - start+len); + new_isize =max_t (loff_t,i_size_read (inode), pos + copied); +if (new_isize >page_offset (wc->w_target_page)) +ocfs2_zero_new_buffers (wc->w_target_page, start+copied, + start+len); +else { +/* +* When page is fully beyond new isize (data copy +* failed), do not bother zeroing the page. Invalidate +* it instead so that writeback does not get confused +* put page & buffer dirty bits into inconsistent +* state. +*/ +block_invalidatepage (wc->w_target_page,0 ,PAGE_SIZE ); + } }if (wc->w_target_page)flush_dcache_page (wc->w_target_page);
fs/verity/enable.c +13 -11
@@ -350,25 +350,27 @@ int fsverity_ioctl_enable(struct file *filp, const void __user *uarg) goto out_drop_write; err =enable_verity (filp, &arg); -if (err) - goto out_allow_write_access;/* -* Some pages of the file may have been evicted from pagecache after -* being used in the Merkle tree construction, then read into pagecache -* again by another process reading from the file concurrently. Since -* these pages didn't undergo verification against the file measurement -* which fs-verity now claims to be enforcing, we have to wipe the -* pagecache to ensure that all future reads are verified. +* We no longer drop the inode's pagecache after enabling verity. This +* used to be done to try to avoid a race condition where pages could be +* evicted after being used in the Merkle tree construction, then +* re-instantiated by a concurrent read. Such pages are unverified, and +* the backing storage could have filled them with different content, so +* they shouldn't be used to fulfill reads once verity is enabled. +* +* But, dropping the pagecache has a big performance impact, and it +* doesn't fully solve the race condition anyway. So for those reasons, +* and also because this race condition isn't very important relatively +* speaking (especially for small-ish files, where the chance of a page +* being used, evicted, *and* re-instantiated all while enabling verity +* is quite small), we no longer drop the inode's pagecache. */ -filemap_write_and_wait (inode->i_mapping); -invalidate_inode_pages2 (inode->i_mapping);/* * allow_write_access() is needed to pair with deny_write_access(). * Regardless, the filesystem won't allow writing to verity files. */ -out_allow_write_access:allow_write_access (filp); out_drop_write:mnt_drop_write_file (filp);
fs/verity/verify.c +6 -6
@@ -259,15 +259,15 @@ EXPORT_SYMBOL_GPL(fsverity_enqueue_verify_work);int __init fsverity_init_workqueue (void ) {/* -* Use an unbound workqueue to allow bios to be verified in parallel -* even when they happen to complete on the same CPU. This sacrifices -* locality, but it's worthwhile since hashing is CPU-intensive. +* Use a high-priority workqueue to prioritize verification work, which +* blocks reads from completing, over regular application tasks. * -* Also use a high-priority workqueue to prioritize verification work, -* which blocks reads from completing, over regular application tasks. +* For performance reasons, don't use an unbound workqueue. Using an +* unbound workqueue for crypto operations causes excessive scheduler +* latency on ARM64. */ fsverity_read_workqueue =alloc_workqueue ("fsverity_read_queue" , -WQ_UNBOUND |WQ_HIGHPRI , +WQ_HIGHPRI ,num_online_cpus ());if (!fsverity_read_workqueue)return -ENOMEM ;
include/linux/dma-noncoherent.h +10 -10
@@ -75,29 +75,29 @@ static inline void arch_dma_cache_sync(struct device *dev, void *vaddr,#endif /* CONFIG_DMA_NONCOHERENT_CACHE_SYNC */ #ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE -void arch_sync_dma_for_device (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir); +void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir);#else -static inline void arch_sync_dma_for_device (struct device *dev, -phys_addr_t paddr,size_t size,enum dma_data_direction dir) +static inline void arch_sync_dma_for_device (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { }#endif /* ARCH_HAS_SYNC_DMA_FOR_DEVICE */ #ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU -void arch_sync_dma_for_cpu (struct device *dev,phys_addr_t paddr, -size_t size,enum dma_data_direction dir); +void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir);#else -static inline void arch_sync_dma_for_cpu (struct device *dev, -phys_addr_t paddr,size_t size,enum dma_data_direction dir) +static inline void arch_sync_dma_for_cpu (phys_addr_t paddr,size_t size, +enum dma_data_direction dir) { }#endif /* ARCH_HAS_SYNC_DMA_FOR_CPU */ #ifdef CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL -void arch_sync_dma_for_cpu_all (struct device *dev); +void arch_sync_dma_for_cpu_all (void );#else -static inline void arch_sync_dma_for_cpu_all (struct device *dev) +static inline void arch_sync_dma_for_cpu_all (void ) { }#endif /* CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU_ALL */
include/linux/netdevice.h +1 -1
@@ -1986,7 +1986,7 @@ struct net_device {struct netdev_queue *_tx____cacheline_aligned_in_smp ;unsigned int num_tx_queues;unsigned int real_num_tx_queues; -struct Qdisc *qdisc; +struct Qdisc __rcu *qdisc;#ifdef CONFIG_NET_SCHED DECLARE_HASHTABLE (qdisc_hash,4 );#endif
include/linux/nvme-tcp.h +3 -2
@@ -114,8 +114,9 @@ struct nvme_tcp_icresp_pdu {struct nvme_tcp_term_pdu {struct nvme_tcp_hdr hdr;__le16 fes; -__le32 fei; -__u8 rsvd[8 ]; +__le16 feil; +__le16 feiu; +__u8 rsvd[10 ]; };/**
include/xen/swiotlb-xen.h +4 -4
@@ -4,10 +4,10 @@#include <linux/swiotlb.h> -void xen_dma_sync_for_cpu (struct device *dev,dma_addr_t handle, -phys_addr_t paddr,size_t size,enum dma_data_direction dir); -void xen_dma_sync_for_device (struct device *dev,dma_addr_t handle, -phys_addr_t paddr,size_t size,enum dma_data_direction dir); +void xen_dma_sync_for_cpu (dma_addr_t handle,phys_addr_t paddr,size_t size, +enum dma_data_direction dir); +void xen_dma_sync_for_device (dma_addr_t handle,phys_addr_t paddr,size_t size, +enum dma_data_direction dir);extern int xen_swiotlb_init (int verbose,bool early);extern const struct dma_map_ops xen_swiotlb_dma_ops;
kernel/bpf/core.c +1 -1
@@ -764,7 +764,7 @@ static int __init bpf_jit_charge_init(void) {/* Only used as heuristic here to derive limit. */ bpf_jit_limit_max =bpf_jit_alloc_exec_limit (); - bpf_jit_limit =min_t (u64,round_up (bpf_jit_limit_max >>2 , + bpf_jit_limit =min_t (u64,round_up (bpf_jit_limit_max >>1 ,PAGE_SIZE ),LONG_MAX );return 0 ; }
kernel/compat.c +1 -1
@@ -240,7 +240,7 @@ COMPAT_SYSCALL_DEFINE3(sched_getaffinity, compat_pid_t, pid, unsigned int, len,if (len & (sizeof (compat_ulong_t)-1 ))return -EINVAL ; -if (!alloc_cpumask_var (&mask,GFP_KERNEL )) +if (!zalloc_cpumask_var (&mask,GFP_KERNEL ))return -ENOMEM ; ret =sched_getaffinity (pid, mask);
kernel/dma/direct.c +7 -7
@@ -232,7 +232,7 @@ void dma_direct_sync_single_for_device(struct device *dev,swiotlb_tbl_sync_single (dev, paddr, size, dir,SYNC_FOR_DEVICE );if (!dev_is_dma_coherent (dev)) -arch_sync_dma_for_device (dev, paddr, size, dir); +arch_sync_dma_for_device (paddr, size, dir); }EXPORT_SYMBOL (dma_direct_sync_single_for_device);
@@ -250,7 +250,7 @@ void dma_direct_sync_sg_for_device(struct device *dev, dir, SYNC_FOR_DEVICE);if (!dev_is_dma_coherent (dev)) -arch_sync_dma_for_device (dev, paddr, sg->length, +arch_sync_dma_for_device (paddr, sg->length, dir); } }
@@ -266,8 +266,8 @@ void dma_direct_sync_single_for_cpu(struct device *dev,phys_addr_t paddr =dma_to_phys (dev, addr);if (!dev_is_dma_coherent (dev)) { -arch_sync_dma_for_cpu (dev, paddr, size, dir); -arch_sync_dma_for_cpu_all (dev); +arch_sync_dma_for_cpu (paddr, size, dir); +arch_sync_dma_for_cpu_all (); }if (unlikely (is_swiotlb_buffer (paddr)))
@@ -285,7 +285,7 @@ void dma_direct_sync_sg_for_cpu(struct device *dev,phys_addr_t paddr =dma_to_phys (dev,sg_dma_address (sg));if (!dev_is_dma_coherent (dev)) -arch_sync_dma_for_cpu (dev, paddr, sg->length, dir); +arch_sync_dma_for_cpu (paddr, sg->length, dir);if (unlikely (is_swiotlb_buffer (paddr))) swiotlb_tbl_sync_single(dev, paddr, sg->length, dir,
@@ -293,7 +293,7 @@ void dma_direct_sync_sg_for_cpu(struct device *dev, }if (!dev_is_dma_coherent (dev)) -arch_sync_dma_for_cpu_all (dev); +arch_sync_dma_for_cpu_all (); }EXPORT_SYMBOL (dma_direct_sync_sg_for_cpu);
@@ -345,7 +345,7 @@ dma_addr_t dma_direct_map_page(struct device *dev, struct page *page, }if (!dev_is_dma_coherent (dev) && !(attrs &DMA_ATTR_SKIP_CPU_SYNC )) -arch_sync_dma_for_device (dev, phys, size, dir); +arch_sync_dma_for_device (phys, size, dir);return dma_addr; }EXPORT_SYMBOL (dma_direct_map_page);
kernel/sched/core.c +5 -2
@@ -1411,6 +1411,9 @@ static inline void dequeue_task(struct rq *rq, struct task_struct *p, int flags)void activate_task (struct rq *rq,struct task_struct *p,int flags) { +if (task_on_rq_migrating (p)) + flags |=ENQUEUE_MIGRATED ; +if (task_contributes_to_load (p)) rq->nr_uninterruptible--;
@@ -5658,14 +5661,14 @@ SYSCALL_DEFINE3(sched_getaffinity, pid_t, pid, unsigned int, len,if (len & (sizeof (unsigned long )-1 ))return -EINVAL ; -if (!alloc_cpumask_var (&mask,GFP_KERNEL )) +if (!zalloc_cpumask_var (&mask,GFP_KERNEL ))return -ENOMEM ; ret =sched_getaffinity (pid, mask);if (ret ==0 ) {unsigned int retlen =min (len,cpumask_size ()); -if (copy_to_user (user_mask_ptr, mask, retlen)) +if (copy_to_user (user_mask_ptr,cpumask_bits (mask), retlen)) ret = -EFAULT ;else ret = retlen;
kernel/sched/fair.c +49 -5
78 lines not on this page · raw message
net/can/bcm.c +10 -6
@@ -938,6 +938,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, cf = op->frames + op->cfsiz * i; err =memcpy_from_msg ((u8 *)cf, msg, op->cfsiz); +if (err <0 ) + goto free_op;if (op->flags &CAN_FD_FRAME ) {if (cf->len >64 )
@@ -947,12 +949,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg, err = -EINVAL ; } -if (err <0 ) { -if (op->frames != &op->sframe) -kfree (op->frames); -kfree (op); -return err; - } +if (err <0 ) + goto free_op;if (msg_head->flags &TX_CP_CAN_ID ) {/* copy can_id into frame */
@@ -1023,6 +1021,12 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,bcm_tx_start_timer (op);return msg_head->nframes * op->cfsiz +MHSIZ ; + +free_op: +if (op->frames != &op->sframe) +kfree (op->frames); +kfree (op); +return err; }/*
net/core/rtnetlink.c +4 -2
@@ -1593,6 +1593,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, {struct ifinfomsg *ifm;struct nlmsghdr *nlh; +struct Qdisc *qdisc;ASSERT_RTNL (); nlh =nlmsg_put (skb, pid, seq, type,sizeof (*ifm), flags);
@@ -1610,6 +1611,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,if (tgt_netnsid >=0 &&nla_put_s32 (skb,IFLA_TARGET_NETNSID , tgt_netnsid)) goto nla_put_failure; + qdisc =rtnl_dereference (dev->qdisc);if (nla_put_string (skb,IFLA_IFNAME , dev->name) ||nla_put_u32 (skb,IFLA_TXQLEN , dev->tx_queue_len) || nla_put_u8(skb, IFLA_OPERSTATE,
@@ -1628,8 +1630,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,#endif put_master_ifindex (skb, dev) ||nla_put_u8 (skb,IFLA_CARRIER ,netif_carrier_ok (dev)) || - (dev->qdisc && -nla_put_string (skb,IFLA_QDISC , dev->qdisc->ops->id)) || + (qdisc && +nla_put_string (skb,IFLA_QDISC , qdisc->ops->id)) ||nla_put_ifalias (skb, dev) || nla_put_u32(skb, IFLA_CARRIER_CHANGES, atomic_read(&dev->carrier_up_count) +
net/ipv4/ip_gre.c +2 -2
@@ -525,7 +525,7 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev) truncate = true; } - nhoff =skb_network_header (skb) -skb_mac_header (skb); + nhoff =skb_network_offset (skb);if (skb->protocol ==htons (ETH_P_IP ) && (ntohs (ip_hdr (skb)->tot_len) > skb->len - nhoff)) truncate = true;
@@ -534,7 +534,7 @@ static void erspan_fb_xmit(struct sk_buff *skb, struct net_device *dev)int thoff;if (skb_transport_header_was_set (skb)) - thoff =skb_transport_header (skb) -skb_mac_header (skb); + thoff =skb_transport_offset (skb);else thoff = nhoff +sizeof (struct ipv6hdr );if (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff)
net/ipv6/ip6_gre.c +2 -2
@@ -942,7 +942,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, truncate = true; } - nhoff =skb_network_header (skb) -skb_mac_header (skb); + nhoff =skb_network_offset (skb);if (skb->protocol ==htons (ETH_P_IP ) && (ntohs (ip_hdr (skb)->tot_len) > skb->len - nhoff)) truncate = true;
@@ -951,7 +951,7 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,int thoff;if (skb_transport_header_was_set (skb)) - thoff =skb_transport_header (skb) -skb_mac_header (skb); + thoff =skb_transport_offset (skb);else thoff = nhoff +sizeof (struct ipv6hdr );if (ntohs (ipv6_hdr (skb)->payload_len) > skb->len - thoff)
net/mac80211/wme.c +4 -2
@@ -141,12 +141,14 @@ u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,u16 __ieee80211_select_queue (struct ieee80211_sub_if_data *sdata,struct sta_info *sta,struct sk_buff *skb) { +const struct ethhdr *eth = (void *)skb->data;struct mac80211_qos_map *qos_map;bool qos;/* all mesh/ocb stations are required to support WME */ -if (sta && (sdata->vif.type ==NL80211_IFTYPE_MESH_POINT || - sdata->vif.type ==NL80211_IFTYPE_OCB )) +if ((sdata->vif.type ==NL80211_IFTYPE_MESH_POINT && + !is_multicast_ether_addr (eth->h_dest)) || + (sdata->vif.type ==NL80211_IFTYPE_OCB && sta)) qos = true;else if (sta) qos = sta->sta.wme;
net/sched/cls_api.c +3 -3
@@ -1079,7 +1079,7 @@ static int __tcf_qdisc_find(struct net *net, struct Qdisc **q,/* Find qdisc */ if (!*parent) { - *q = dev->qdisc; + *q =rcu_dereference (dev->qdisc); *parent = (*q)->handle; }else { *q =qdisc_lookup_rcu (dev,TC_H_MAJ (*parent));
@@ -2552,7 +2552,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) parent = tcm->tcm_parent;if (!parent) - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc);else q =qdisc_lookup (dev,TC_H_MAJ (tcm->tcm_parent));if (!q)
@@ -2938,7 +2938,7 @@ static int tc_dump_chain(struct sk_buff *skb, struct netlink_callback *cb) parent = tcm->tcm_parent;if (!parent) { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); parent = q->handle; }else { q =qdisc_lookup (dev,TC_H_MAJ (tcm->tcm_parent));
net/sched/sch_api.c +14 -11
@@ -298,7 +298,7 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)if (!handle)return NULL ; - q =qdisc_match_from_root (dev->qdisc, handle); + q =qdisc_match_from_root (rtnl_dereference (dev->qdisc), handle);if (q) goto out;
@@ -317,7 +317,7 @@ struct Qdisc *qdisc_lookup_rcu(struct net_device *dev, u32 handle)if (!handle)return NULL ; - q =qdisc_match_from_root (dev->qdisc, handle); + q =qdisc_match_from_root (rcu_dereference (dev->qdisc), handle);if (q) goto out;
@@ -1071,11 +1071,12 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, skip:if (!ingress) { -notify_and_destroy (net, skb, n, classid, - dev->qdisc, new); + old =rtnl_dereference (dev->qdisc);if (new && !new->ops->attach)qdisc_refcount_inc (new); - dev->qdisc = new ? : &noop_qdisc; +rcu_assign_pointer (dev->qdisc, new ? : &noop_qdisc); + +notify_and_destroy (net, skb, n, classid, old, new);if (new && new->ops->attach) new->ops->attach (new);
@@ -1455,7 +1456,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, q =dev_ingress_queue (dev)->qdisc_sleeping; } }else { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); }if (!q) {NL_SET_ERR_MSG (extack,"Cannot find specified qdisc on specified device" );
@@ -1544,7 +1545,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, q =dev_ingress_queue (dev)->qdisc_sleeping; } }else { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); }/* It may be default qdisc, ignore it */
@@ -1766,7 +1767,8 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) s_q_idx =0 ; q_idx =0 ; -if (tc_dump_qdisc_root (dev->qdisc, skb, cb, &q_idx, s_q_idx, +if (tc_dump_qdisc_root (rtnl_dereference (dev->qdisc), + skb, cb, &q_idx, s_q_idx, true, tca[TCA_DUMP_INVISIBLE ]) <0 ) goto done;
@@ -2042,7 +2044,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, }else if (qid1) { qid = qid1; }else if (qid ==0 ) - qid = dev->qdisc->handle; + qid =rtnl_dereference (dev->qdisc)->handle;/* Now qid is genuine qdisc handle consistent * both with parent and child.
@@ -2053,7 +2055,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, portid =TC_H_MAKE (qid, portid); }else {if (qid ==0 ) - qid = dev->qdisc->handle; + qid =rtnl_dereference (dev->qdisc)->handle; }/* OK. Locate qdisc */
@@ -2214,7 +2216,8 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) s_t = cb->args[0 ]; t =0 ; -if (tc_dump_tclass_root (dev->qdisc, skb, tcm, cb, &t, s_t, true) <0 ) +if (tc_dump_tclass_root (rtnl_dereference (dev->qdisc), + skb, tcm, cb, &t, s_t, true) <0 ) goto done; dev_queue =dev_ingress_queue (dev);
net/sched/sch_generic.c +12 -10
@@ -1106,18 +1106,20 @@ static void attach_default_qdiscs(struct net_device *dev)if (!netif_is_multiqueue (dev) || dev->priv_flags &IFF_NO_QUEUE ) {netdev_for_each_tx_queue (dev, attach_one_default_qdisc,NULL ); - dev->qdisc = txq->qdisc_sleeping; -qdisc_refcount_inc (dev->qdisc); + qdisc = txq->qdisc_sleeping; +rcu_assign_pointer (dev->qdisc, qdisc); +qdisc_refcount_inc (qdisc); }else { qdisc =qdisc_create_dflt (txq, &mq_qdisc_ops,TC_H_ROOT ,NULL );if (qdisc) { - dev->qdisc = qdisc; +rcu_assign_pointer (dev->qdisc, qdisc); qdisc->ops->attach (qdisc); } } +#ifdef CONFIG_NET_SCHED -if (dev->qdisc != &noop_qdisc) -qdisc_hash_add (dev->qdisc, false); +if (qdisc != &noop_qdisc) +qdisc_hash_add (qdisc, false);#endif }
@@ -1147,7 +1149,7 @@ void dev_activate(struct net_device *dev)* and noqueue_qdisc for virtual interfaces */ -if (dev->qdisc == &noop_qdisc) +if (rtnl_dereference (dev->qdisc) == &noop_qdisc)attach_default_qdiscs (dev);if (!netif_carrier_ok (dev))
@@ -1316,7 +1318,7 @@ static int qdisc_change_tx_queue_len(struct net_device *dev,void dev_qdisc_change_real_num_tx (struct net_device *dev,unsigned int new_real_tx) { -struct Qdisc *qdisc = dev->qdisc; +struct Qdisc *qdisc =rtnl_dereference (dev->qdisc);if (qdisc->ops->change_real_num_tx) qdisc->ops->change_real_num_tx (qdisc, new_real_tx);
@@ -1356,7 +1358,7 @@ static void dev_init_scheduler_queue(struct net_device *dev,void dev_init_scheduler (struct net_device *dev) { - dev->qdisc = &noop_qdisc; +rcu_assign_pointer (dev->qdisc, &noop_qdisc);netdev_for_each_tx_queue (dev, dev_init_scheduler_queue, &noop_qdisc);if (dev_ingress_queue (dev))dev_init_scheduler_queue (dev,dev_ingress_queue (dev), &noop_qdisc);
@@ -1384,8 +1386,8 @@ void dev_shutdown(struct net_device *dev)netdev_for_each_tx_queue (dev, shutdown_scheduler_queue, &noop_qdisc);if (dev_ingress_queue (dev))shutdown_scheduler_queue (dev,dev_ingress_queue (dev), &noop_qdisc); -qdisc_put (dev->qdisc); - dev->qdisc = &noop_qdisc; +qdisc_put (rtnl_dereference (dev->qdisc)); +rcu_assign_pointer (dev->qdisc, &noop_qdisc);WARN_ON (timer_pending (&dev->watchdog_timer)); }
net/tls/tls_main.c +5 -4
@@ -371,13 +371,11 @@ static int do_tls_getsockopt_tx(struct sock *sk, char __user *optval, rc = -EINVAL ; goto out; } -lock_sock (sk);memcpy (crypto_info_aes_gcm_128->iv, ctx->tx.iv +TLS_CIPHER_AES_GCM_128_SALT_SIZE ,TLS_CIPHER_AES_GCM_128_IV_SIZE );memcpy (crypto_info_aes_gcm_128->rec_seq, ctx->tx.rec_seq,TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE ); -release_sock (sk);if (copy_to_user (optval, crypto_info_aes_gcm_128,sizeof (*crypto_info_aes_gcm_128)))
@@ -395,13 +393,11 @@ static int do_tls_getsockopt_tx(struct sock *sk, char __user *optval, rc = -EINVAL ; goto out; } -lock_sock (sk);memcpy (crypto_info_aes_gcm_256->iv, ctx->tx.iv +TLS_CIPHER_AES_GCM_256_SALT_SIZE ,TLS_CIPHER_AES_GCM_256_IV_SIZE );memcpy (crypto_info_aes_gcm_256->rec_seq, ctx->tx.rec_seq,TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE ); -release_sock (sk);if (copy_to_user (optval, crypto_info_aes_gcm_256,sizeof (*crypto_info_aes_gcm_256)))
@@ -421,6 +417,8 @@ static int do_tls_getsockopt(struct sock *sk, int optname, {int rc =0 ; +lock_sock (sk); +switch (optname) {case TLS_TX : rc =do_tls_getsockopt_tx (sk, optval, optlen);
@@ -429,6 +427,9 @@ static int do_tls_getsockopt(struct sock *sk, int optname, rc = -ENOPROTOOPT ;break ; } + +release_sock (sk); +return rc; }
security/keys/request_key.c +6 -3
@@ -38,9 +38,12 @@ static void cache_requested_key(struct key *key)#ifdef CONFIG_KEYS_REQUEST_CACHE struct task_struct *t = current; -key_put (t->cached_requested_key); - t->cached_requested_key =key_get (key); -set_tsk_thread_flag (t,TIF_NOTIFY_RESUME ); +/* Do not cache key if it is a kernel thread */ +if (!(t->flags &PF_KTHREAD )) { +key_put (t->cached_requested_key); + t->cached_requested_key =key_get (key); +set_tsk_thread_flag (t,TIF_NOTIFY_RESUME ); + }#endif }
sound/pci/asihpi/hpi6205.c +1 -1
@@ -430,7 +430,7 @@ void HPI_6205(struct hpi_message *phm, struct hpi_response *phr) pao =hpi_find_adapter (phm->adapter_index); }else {/* subsys messages don't address an adapter */ -_HPI_6205 (NULL , phm, phr); + phr->error =HPI_ERROR_INVALID_OBJ_INDEX ;return ; }
sound/pci/hda/patch_ca0132.c +3 -1
@@ -3843,8 +3843,10 @@ static int tuning_ctl_set(struct hda_codec *codec, hda_nid_t nid,for (i =0 ; i <TUNING_CTLS_COUNT ; i++)if (nid == ca0132_tuning_ctls[i].nid) -break ; + goto found; +return -EINVAL ; +found:snd_hda_power_up (codec); dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20, ca0132_tuning_ctls[i].req,
sound/pci/hda/patch_conexant.c +5 -1
@@ -939,7 +939,10 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x17aa ,0x3905 ,"Lenovo G50-30" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x390b ,"Lenovo G50-80" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x3975 ,"Lenovo U300s" ,CXT_FIXUP_STEREO_DMIC ), -SND_PCI_QUIRK (0x17aa ,0x3977 ,"Lenovo IdeaPad U310" ,CXT_PINCFG_LENOVO_NOTEBOOK ), +/* NOTE: we'd need to extend the quirk for 17aa:3977 as the same +* PCI SSID is used on multiple Lenovo models +*/ +SND_PCI_QUIRK (0x17aa ,0x3977 ,"Lenovo IdeaPad U310" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x3978 ,"Lenovo G50-70" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x397b ,"Lenovo S205" ,CXT_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
@@ -961,6 +964,7 @@ static const struct hda_model_fixup cxt5066_fixup_models[] = { { .id = CXT_FIXUP_HP_DOCK, .name = "hp-dock" }, { .id = CXT_FIXUP_MUTE_LED_GPIO, .name = "mute-led-gpio" }, { .id = CXT_FIXUP_HP_MIC_NO_PRESENCE, .name = "hp-mic-fix" }, + { .id = CXT_PINCFG_LENOVO_NOTEBOOK, .name = "lenovo-20149" }, {} };
sound/usb/format.c +6 -2
@@ -40,8 +40,12 @@ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,case UAC_VERSION_1 :default : {struct uac_format_type_i_discrete_descriptor *fmt = _fmt; -if (format >=64 ) -return 0 ;/* invalid format */ +if (format >=64 ) { + usb_audio_info(chip,
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_btf.c +28 -0
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.