Linux 5.4.163
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.163 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
------------
Documentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt | 8 Documentation/networking/ipvs-sysctl.txt | 3 Makefile | 2 arch/arm/boot/dts/bcm5301x.dtsi | 4 arch/arm/mach-socfpga/core.h | 2 arch/arm/mach-socfpga/platsmp.c | 8 arch/arm64/boot/dts/marvell/armada-3720-db.dts | 3 arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 1 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 4 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 2 arch/mips/Kconfig | 2 arch/parisc/kernel/vmlinux.lds.S | 3 arch/powerpc/kvm/book3s_hv_builtin.c | 5 arch/s390/mm/pgtable.c | 13 drivers/android/binder.c | 2 drivers/block/xen-blkfront.c | 126 +- drivers/firmware/arm_scmi/scmi_pm_domain.c | 4 drivers/gpu/drm/vc4/vc4_bo.c | 2 drivers/hid/wacom_wac.c | 8 drivers/hid/wacom_wac.h | 1 drivers/media/cec/cec-adap.c | 1 drivers/mmc/host/sdhci.c | 21 drivers/mmc/host/sdhci.h | 4 drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c | 4 drivers/net/ethernet/intel/iavf/iavf_ethtool.c | 30 drivers/net/ethernet/intel/igb/igb_main.c | 2 drivers/net/ethernet/mscc/ocelot.c | 11 drivers/net/ethernet/netronome/nfp/nfp_net.h | 3 drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 drivers/net/phy/mdio-aspeed.c | 7 drivers/net/xen-netfront.c | 255 ++-- drivers/nvme/target/io-cmd-file.c | 4 drivers/nvme/target/tcp.c | 7 drivers/pci/controller/pci-aardvark.c | 576 ++++++++-- drivers/pci/pci-bridge-emul.c | 11 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 17 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 drivers/scsi/scsi_sysfs.c | 2 drivers/staging/fbtft/fb_ssd1351.c | 4 drivers/staging/fbtft/fbtft-core.c | 9 drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 drivers/tty/hvc/hvc_xen.c | 17 drivers/usb/core/hub.c | 23 drivers/usb/dwc2/gadget.c | 17 drivers/usb/dwc2/hcd_queue.c | 2 drivers/usb/serial/option.c | 5 drivers/usb/typec/tcpm/fusb302.c | 6 drivers/vhost/vsock.c | 2 drivers/xen/xenbus/xenbus_probe.c | 27 fs/cifs/file.c | 35 fs/f2fs/node.c | 1 fs/fuse/dev.c | 10 fs/nfs/nfs42xdr.c | 3 fs/proc/vmcore.c | 16 include/linux/ipc_namespace.h | 15 include/linux/sched/task.h | 2 include/net/ip6_fib.h | 1 include/net/ipv6_stubs.h | 1 include/net/nfc/nci_core.h | 1 include/net/nl802154.h | 7 include/xen/interface/io/ring.h | 293 ++--- ipc/shm.c | 189 ++- kernel/power/hibernate.c | 6 kernel/trace/trace.h | 24 kernel/trace/trace_events.c | 7 kernel/trace/trace_uprobe.c | 1 net/8021q/vlan.c | 3 net/8021q/vlan_dev.c | 3 net/ipv4/nexthop.c | 35 net/ipv4/tcp_cubic.c | 5 net/ipv6/af_inet6.c | 1 net/ipv6/ip6_output.c | 2 net/ipv6/route.c | 19 net/ncsi/ncsi-cmd.c | 24 net/netfilter/ipvs/ip_vs_core.c | 8 net/nfc/nci/core.c | 19 net/smc/af_smc.c | 8 net/smc/smc_close.c | 6 sound/pci/ctxfi/ctamixer.c | 14 sound/pci/ctxfi/ctdaio.c | 16 sound/pci/ctxfi/ctresource.c | 7 sound/pci/ctxfi/ctresource.h | 4 sound/pci/ctxfi/ctsrc.c | 7 sound/soc/qcom/qdsp6/q6routing.c | 6 sound/soc/soc-topology.c | 3 85 files changed, 1463 insertions(+), 616 deletions(-)
Adrian Hunter (1):
mmc: sdhci: Fix ADMA for PAGE_SIZE >= 64KiB
Alexander Aring (1):
net: ieee802154: handle iftypes as u32
Alexander Mikhalitsyn (1):
shm: extend forced shm destroy to support objects from several IPC nses
Dan Carpenter (2):
staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect() drm/vc4: fix error code in vc4_create_object()
Daniele Palmas (1):
USB: serial: option: add Telit LE910S1 0x9200 composition
David Hildenbrand (2):
proc/vmcore: fix clearing user buffer by properly using clear_user() s390/mm: validate VMA in PGSTE manipulation functions
Diana Wang (1):
nfp: checking parameter process for rx-usecs/tx-usecs is invalid
Dylan Hung (1):
mdio: aspeed: Fix "Link is Down" issue
Eric Dumazet (2):
ipv6: fix typos in __ip6_finish_output()
tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows
Florian Fainelli (2):
ARM: dts: BCM5301X: Fix I2C controller interrupt
ARM: dts: BCM5301X: Add interrupt properties to GPIO node
Greg Kroah-Hartman (1):
Linux 5.4.163
Grzegorz Jaszczyk (1):
PCI: aardvark: Fix big endian support
Guangbin Huang (1):
net: hns3: fix VF RSS failed problem after PF enable multi-TCs
Hans Verkuil (1):
media: cec: copy sequence field for the reply
Helge Deller (1):
Revert "parisc: Fix backtrace to always include init funtion names"
Huang Pei (1):
MIPS: use 3-level pgtable for 64KB page size on MIPS_VA_BITS_48
Jason Gerecke (1):
HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts
Jesse Brandeburg (1):
igb: fix netpoll exit with traffic
Jiri Olsa (1):
tracing/uprobe: Fix uprobe_perf_open probes iteration
Juergen Gross (9):
xen: sync include/xen/interface/io/ring.h with Xen's newest version xen/blkfront: read response from backend only once xen/blkfront: don't take local copy of a request from the ring page xen/blkfront: don't trust the backend response data blindly xen/netfront: read response from backend only once xen/netfront: don't read data from request on the ring page xen/netfront: disentangle tx_skb_freelist
xen/netfront: don't trust the backend response data blindly
tty: hvc: replace BUG_ON() with negative return value
Kumar Thangavel (1):
net/ncsi : Add payload to be 32-bit aligned to fix dropped packets
Lin Ma (1):
NFC: add NCI_UNREG flag to eliminate the race
Marek Behún (4):
PCI: aardvark: Deduplicate code in advk_pcie_rd_conf()
PCI: aardvark: Improve link training
pinctrl: armada-37xx: Correct PWM pins definitions
arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio function
Mathias Nyman (2):
usb: hub: Fix usb enumeration issue due to address0 race
usb: hub: Fix locking issues with address0_mutex
Maurizio Lombardi (1):
nvmet: use IOCB_NOWAIT only if the filesystem supports it
Mike Christie (1):
scsi: core: sysfs: Fix setting device state to SDEV_RUNNING
Miklos Szeredi (1):
fuse: release pipe buf after last use
Minas Harutyunyan (1):
usb: dwc2: gadget: Fix ISOC flow for elapsed frames
Mingjie Zhang (1):
USB: serial: option: add Fibocom FM101-GL variants
Nathan Chancellor (1):
usb: dwc2: hcd_queue: Fix use of floating point literal
Nicholas Piggin (1):
KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB
Nikolay Aleksandrov (3):
net: nexthop: fix null pointer dereference when IPv6 is not enabled
net: ipv6: add fib6_nh_release_dsts stub
net: nexthop: release IPv6 per-cpu dsts when replacing a nexthop group
Nitesh B Venkatesh (1):
iavf: Prevent changing static ITR values if adaptive moderation is on
Noralf Trønnes (1):
staging/fbtft: Fix backlight
Ondrej Jirman (1):
usb: typec: fusb302: Fix masking of comparator and bc_lvl interrupts
Pali Rohár (15):
PCI: aardvark: Train link immediately after enabling training
PCI: aardvark: Issue PERST via GPIO
PCI: aardvark: Replace custom macros by standard linux/pci_regs.h macros
PCI: aardvark: Don't touch PCIe registers if no card connected
PCI: aardvark: Fix compilation on s390
PCI: aardvark: Move PCIe reset card code to advk_pcie_train_link()
PCI: aardvark: Update comment about disabling link training
PCI: aardvark: Configure PCIe resources from 'ranges' DT property
PCI: aardvark: Fix PCIe Max Payload Size setting
PCI: aardvark: Implement re-issuing config requests on CRS response
PCI: aardvark: Simplify initialization of rootcap on virtual bridge
PCI: aardvark: Fix link training
PCI: aardvark: Fix support for bus mastering and PCI_COMMAND on emulated bridge
PCI: aardvark: Set PCI Bridge Class Code to PCI Bridge
PCI: aardvark: Fix support for PCI_BRIDGE_CTL_BUS_RESET on emulated bridge
Peng Fan (1):
firmware: arm_scmi: pm: Propagate return value to caller
Remi Pommarel (1):
PCI: aardvark: Wait for endpoint to be ready before training link
Russell King (1):
PCI: pci-bridge-emul: Fix array overruns, improve safety
Sreekanth Reddy (1):
scsi: mpt3sas: Fix kernel panic during drive powercycle test
Srinivas Kandagatla (1):
ASoC: qdsp6: q6routing: Conditionally reset FrontEnd Mixer
Stefano Garzarella (1):
vhost/vsock: fix incorrect used length reported to the guest
Stefano Stabellini (2):
xen: don't continue xenstore initialization in case of errors
xen: detect uninitialized xenbus in xenbus_init
Steve French (1):
smb3: do not error on fsync when readonly
Steven Rostedt (VMware) (2):
tracing: Fix pid filtering when triggers are attached
tracing: Check pid filtering when creating events
Takashi Iwai (3):
ALSA: ctxfi: Fix out-of-range access
ASoC: topology: Add missing rwsem around snd_ctl_remove() calls
ARM: socfpga: Fix crash with CONFIG_FORTIRY_SOURCE
Thomas Zeitlhofer (1):
PM: hibernate: use correct mode for swsusp_close()
Todd Kjos (1):
binder: fix test regression due to sender_euid change
Tony Lu (2):
net/smc: Ensure the active closing peer first closes clcsock net/smc: Don't call clcsock shutdown twice when smc shutdown
Trond Myklebust (1):
NFSv42: Don't fail clone() unless the OP_CLONE operation failed
Varun Prakash (1):
nvmet-tcp: fix incomplete data digest send
Vladimir Oltean (2):
net: mscc: ocelot: don't downgrade timestamping RX filters in SIOCSHWTSTAMP
net: mscc: ocelot: correctly report the timestamping RX filters in ethtool
Weichao Guo (1):
f2fs: set SBI_NEED_FSCK flag when inconsistent node block found
Ziyang Xuan (1):
net: vlan: fix underflow for the real_dev refcnt
yangxingwu (1):
netfilter: ipvs: Fix reuse connection if RS weight is 0
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/pinctrl/marvell,armada-37xx-pinctrl.txt +4 -4
@@ -43,19 +43,19 @@ group emmc_nb group pwm0 - pin 11 (GPIO1-11) - - functions pwm, gpio + - functions pwm, led, gpio group pwm1 - pin 12 - - functions pwm, gpio + - functions pwm, led, gpio group pwm2 - pin 13 - - functions pwm, gpio + - functions pwm, led, gpio group pwm3 - pin 14 - - functions pwm, gpio + - functions pwm, led, gpio group pmic1 - pin 7
Documentation/networking/ipvs-sysctl.txt +1 -2
@@ -30,8 +30,7 @@ conn_reuse_mode - INTEGER 0: disable any special handling on port reuse. The new connection will be delivered to the same real server that was - servicing the previous connection. This will effectively - disable expire_nodest_conn. + servicing the previous connection. bit 1: enable rescheduling of new connections when it is safe. That is, whenever expire_nodest_conn and for TCP sockets, when
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 162 +SUBLEVEL = 163 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm/boot/dts/bcm5301x.dtsi +3 -1
@@ -242,6 +242,8 @@ gpio-controller; #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; }; pcie0: pcie@12000 {
@@ -387,7 +389,7 @@ i2c0: i2c@18009000 { compatible = "brcm,iproc-i2c"; reg = <0x18009000 0x50>; - interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>; #address-cells = <1>; #size-cells = <0>; clock-frequency = <100000>;
arch/arm/mach-socfpga/core.h +1 -1
@@ -33,7 +33,7 @@ extern void __iomem *sdr_ctl_base_addr;u32 socfpga_sdram_self_refresh (u32 sdr_base);extern unsigned int socfpga_sdram_self_refresh_sz; -extern char secondary_trampoline, secondary_trampoline_end; +extern char secondary_trampoline[], secondary_trampoline_end[];extern unsigned long socfpga_cpu1start_addr;
arch/arm/mach-socfpga/platsmp.c +4 -4
@@ -20,14 +20,14 @@static int socfpga_boot_secondary (unsigned int cpu,struct task_struct *idle) { -int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; +int trampoline_size = secondary_trampoline_end - secondary_trampoline;if (socfpga_cpu1start_addr) {/* This will put CPU #1 into reset. */ writel (RSTMGR_MPUMODRST_CPU1 , rst_manager_base_addr +SOCFPGA_RSTMGR_MODMPURST ); -memcpy (phys_to_virt (0 ), &secondary_trampoline, trampoline_size); +memcpy (phys_to_virt (0 ), secondary_trampoline, trampoline_size);writel (__pa_symbol (secondary_startup), sys_manager_base_addr + (socfpga_cpu1start_addr &0x000000ff ));
@@ -45,12 +45,12 @@ static int socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)static int socfpga_a10_boot_secondary (unsigned int cpu,struct task_struct *idle) { -int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; +int trampoline_size = secondary_trampoline_end - secondary_trampoline;if (socfpga_cpu1start_addr) {writel (RSTMGR_MPUMODRST_CPU1 , rst_manager_base_addr +SOCFPGA_A10_RSTMGR_MODMPURST ); -memcpy (phys_to_virt (0 ), &secondary_trampoline, trampoline_size); +memcpy (phys_to_virt (0 ), secondary_trampoline, trampoline_size);writel (__pa_symbol (secondary_startup), sys_manager_base_addr + (socfpga_cpu1start_addr &0x00000fff ));
arch/arm64/boot/dts/marvell/armada-3720-db.dts +3 -0
@@ -128,6 +128,9 @@ /* CON15(V2.0)/CON17(V1.4) : PCIe / CON15(V2.0)/CON12(V1.4) :mini-PCIe */ &pcie0 { + pinctrl-names = "default"; + pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +1 -0
@@ -59,6 +59,7 @@ phys = <&comphy1 0>; pinctrl-names = "default"; pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>; + reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; }; /* J6 */
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +0 -4
@@ -127,10 +127,6 @@ }; }; -&pcie_reset_pins { - function = "gpio"; -}; - &pcie0 { pinctrl-names = "default"; pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +1 -1
@@ -318,7 +318,7 @@ pcie_reset_pins: pcie-reset-pins { groups = "pcie1"; - function = "pcie"; + function = "gpio"; }; pcie_clkreq_pins: pcie-clkreq-pins {
arch/mips/Kconfig +1 -1
@@ -3059,7 +3059,7 @@ config STACKTRACE_SUPPORT config PGTABLE_LEVELS int default 4 if PAGE_SIZE_4KB && MIPS_VA_BITS_48 - default 3 if 64BIT && !PAGE_SIZE_64KB + default 3 if 64BIT && (!PAGE_SIZE_64KB || MIPS_VA_BITS_48) default 2 config MIPS_AUTO_PFN_OFFSET
arch/parisc/kernel/vmlinux.lds.S +1 -2
@@ -56,8 +56,6 @@ SECTIONS { . = KERNEL_BINARY_TEXT_START; - _stext = .; /* start of kernel text, includes init code & data */ - __init_begin = .; HEAD_TEXT_SECTION MLONGCALL_DISCARD(INIT_TEXT_SECTION(8))
@@ -81,6 +79,7 @@ SECTIONS /* freed after init ends here */ _text = .; /* Text and read-only data */ + _stext = .; MLONGCALL_KEEP(INIT_TEXT_SECTION(8)) .text ALIGN(PAGE_SIZE) : { TEXT_TEXT
arch/powerpc/kvm/book3s_hv_builtin.c +4 -1
@@ -821,6 +821,7 @@ static void flush_guest_tlb(struct kvm *kvm) "r" (0) : "memory"); } asmvolatile ("ptesync" : : :"memory" ); +// POWER9 congruence-class TLBIEL leaves ERAT. Flush it now. asm volatile(PPC_RADIX_INVALIDATE_ERAT_GUEST : : :"memory"); }else {for (set =0 ; set < kvm->arch.tlb_sets; ++set) {
@@ -831,7 +832,9 @@ static void flush_guest_tlb(struct kvm *kvm) rb +=PPC_BIT (51 );/* increment set number */ } asmvolatile ("ptesync" : : :"memory" ); - asm volatile(PPC_ISA_3_0_INVALIDATE_ERAT : : :"memory"); +// POWER9 congruence-class TLBIEL leaves ERAT. Flush it now. +if (cpu_has_feature (CPU_FTR_ARCH_300 )) + asm volatile(PPC_ISA_3_0_INVALIDATE_ERAT : : :"memory"); } }
arch/s390/mm/pgtable.c +13 -0
@@ -970,6 +970,7 @@ EXPORT_SYMBOL(get_guest_storage_key);int pgste_perform_essa (struct mm_struct *mm,unsigned long hva,int orc,unsigned long *oldpte,unsigned long *oldpgste) { +struct vm_area_struct *vma;unsigned long pgstev;spinlock_t *ptl;pgste_t pgste;
@@ -979,6 +980,10 @@ int pgste_perform_essa(struct mm_struct *mm, unsigned long hva, int orc,WARN_ON_ONCE (orc >ESSA_MAX );if (unlikely (orc >ESSA_MAX ))return -EINVAL ; + + vma =find_vma (mm, hva); +if (!vma || hva < vma->vm_start ||is_vm_hugetlb_page (vma)) +return -EFAULT ; ptep =get_locked_pte (mm, hva, &ptl);if (unlikely (!ptep))return -EFAULT ;
@@ -1071,10 +1076,14 @@ EXPORT_SYMBOL(pgste_perform_essa);int set_pgste_bits (struct mm_struct *mm,unsigned long hva,unsigned long bits,unsigned long value) { +struct vm_area_struct *vma;spinlock_t *ptl;pgste_t new;pte_t *ptep; + vma =find_vma (mm, hva); +if (!vma || hva < vma->vm_start ||is_vm_hugetlb_page (vma)) +return -EFAULT ; ptep =get_locked_pte (mm, hva, &ptl);if (unlikely (!ptep))return -EFAULT ;
@@ -1099,9 +1108,13 @@ EXPORT_SYMBOL(set_pgste_bits);*/ int get_pgste (struct mm_struct *mm,unsigned long hva,unsigned long *pgstep) { +struct vm_area_struct *vma;spinlock_t *ptl;pte_t *ptep; + vma =find_vma (mm, hva); +if (!vma || hva < vma->vm_start ||is_vm_hugetlb_page (vma)) +return -EFAULT ; ptep =get_locked_pte (mm, hva, &ptl);if (unlikely (!ptep))return -EFAULT ;
drivers/android/binder.c +1 -1
@@ -3095,7 +3095,7 @@ static void binder_transaction(struct binder_proc *proc, t->from = thread; else t->from = NULL; - t->sender_euid = proc->cred->euid; + t->sender_euid =task_euid (proc->tsk); t->to_proc = target_proc; t->to_thread = target_thread; t->code = tr->code;
drivers/block/xen-blkfront.c +84 -42
261 lines not on this page · raw message
drivers/firmware/arm_scmi/scmi_pm_domain.c +1 -3
@@ -106,9 +106,7 @@ static int scmi_pm_domain_probe(struct scmi_device *sdev) scmi_pd_data->domains = domains; scmi_pd_data->num_domains = num_domains; -of_genpd_add_provider_onecell (np, scmi_pd_data); - -return 0 ; +return of_genpd_add_provider_onecell (np, scmi_pd_data); }static const struct scmi_device_id scmi_id_table[] = {
drivers/gpu/drm/vc4/vc4_bo.c +1 -1
@@ -389,7 +389,7 @@ struct drm_gem_object *vc4_create_object(struct drm_device *dev, size_t size) bo =kzalloc (sizeof (*bo),GFP_KERNEL );if (!bo) -return ERR_PTR (-ENOMEM ); +return NULL ; bo->madv =VC4_MADV_WILLNEED ;refcount_set (&bo->usecnt,0 );
drivers/hid/wacom_wac.c +7 -1
@@ -2578,6 +2578,9 @@ static void wacom_wac_finger_event(struct hid_device *hdev,return ;switch (equivalent_usage) { +case HID_DG_CONFIDENCE : + wacom_wac->hid_data.confidence = value; +break ;case HID_GD_X : wacom_wac->hid_data.x = value;break ;
@@ -2610,7 +2613,8 @@ static void wacom_wac_finger_event(struct hid_device *hdev, }if (usage->usage_index +1 == field->report_count) { -if (equivalent_usage == wacom_wac->hid_data.last_slot_field) +if (equivalent_usage == wacom_wac->hid_data.last_slot_field && + wacom_wac->hid_data.confidence)wacom_wac_finger_slot (wacom_wac, wacom_wac->touch_input); } }
@@ -2625,6 +2629,8 @@ static void wacom_wac_finger_pre_report(struct hid_device *hdev, wacom_wac->is_invalid_bt_frame = false; + hid_data->confidence = true; +for (i =0 ; i < report->maxfield; i++) {struct hid_field *field = report->field[i];int j;
drivers/hid/wacom_wac.h +1 -0
@@ -300,6 +300,7 @@ struct hid_data {bool tipswitch;bool barrelswitch;bool barrelswitch2; +bool confidence;int x;int y;int pressure;
drivers/media/cec/cec-adap.c +1 -0
@@ -1191,6 +1191,7 @@ void cec_received_msg_ts(struct cec_adapter *adap,if (abort) dst->rx_status |=CEC_RX_STATUS_FEATURE_ABORT ; msg->flags = dst->flags; + msg->sequence = dst->sequence;/* Remove it from the wait_queue */ list_del_init (&data->list);
drivers/mmc/host/sdhci.c +18 -3
@@ -749,7 +749,19 @@ static void sdhci_adma_table_pre(struct sdhci_host *host, len -= offset; } -BUG_ON (len >65536 ); +/* +* The block layer forces a minimum segment size of PAGE_SIZE, +* so 'len' can be too big here if PAGE_SIZE >= 64KiB. Write +* multiple descriptors, noting that the ADMA table is sized +* for 4KiB chunks anyway, so it will be big enough. +*/ +while (len > host->max_adma) { +int n =32 *1024 ;/* 32KiB*/ + +__sdhci_adma_write_desc (host, &desc, addr, n,ADMA2_TRAN_VALID ); + addr += n; + len -= n; + }/* tran, valid */ if (len)
@@ -3568,6 +3580,7 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev,* descriptor for each segment, plus 1 for a nop end descriptor. */ host->adma_table_cnt =SDHCI_MAX_SEGS *2 +1 ; + host->max_adma =65536 ;return host; }
@@ -4221,10 +4234,12 @@ int sdhci_setup_host(struct sdhci_host *host)* be larger than 64 KiB though. */ if (host->flags &SDHCI_USE_ADMA ) { -if (host->quirks &SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC ) +if (host->quirks &SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC ) { + host->max_adma =65532 ;/* 32-bit alignment */ mmc->max_seg_size =65535 ; -else + }else { mmc->max_seg_size =65536 ; + } }else { mmc->max_seg_size = mmc->max_req_size; }
drivers/mmc/host/sdhci.h +3 -1
@@ -349,7 +349,8 @@ struct sdhci_adma2_64_desc {/* * Maximum segments assuming a 512KiB maximum requisition size and a minimum -* 4KiB page size. +* 4KiB page size. Note this also allows enough for multiple descriptors in +* case of PAGE_SIZE >= 64KiB. */ #define SDHCI_MAX_SEGS 128
@@ -547,6 +548,7 @@ struct sdhci_host {unsigned int blocks;/* remaining PIO blocks */ int sg_count;/* Mapped sg entries */ +int max_adma;/* Max. length in ADMA descriptor */ void *adma_table;/* ADMA descriptor table */ void *align_buffer;/* Bounce buffer */
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c +2 -2
@@ -644,9 +644,9 @@ static int hclgevf_set_rss_tc_mode(struct hclgevf_dev *hdev, u16 rss_size) roundup_size =ilog2 (roundup_size);for (i =0 ; i <HCLGEVF_MAX_TC_NUM ; i++) { - tc_valid[i] = !!(hdev->hw_tc_map &BIT (i)); + tc_valid[i] =1 ; tc_size[i] = roundup_size; - tc_offset[i] = rss_size * i; + tc_offset[i] = (hdev->hw_tc_map &BIT (i)) ? rss_size * i :0 ; }hclgevf_cmd_setup_basic_desc (&desc,HCLGEVF_OPC_RSS_TC_MODE , false);
drivers/net/ethernet/intel/iavf/iavf_ethtool.c +26 -4
@@ -719,12 +719,31 @@ static int iavf_get_per_queue_coalesce(struct net_device *netdev, u32 queue,* * Change the ITR settings for a specific queue. **/ -static void iavf_set_itr_per_queue (struct iavf_adapter *adapter, -struct ethtool_coalesce *ec,int queue) +static int iavf_set_itr_per_queue (struct iavf_adapter *adapter, +struct ethtool_coalesce *ec,int queue) {struct iavf_ring *rx_ring = &adapter->rx_rings[queue];struct iavf_ring *tx_ring = &adapter->tx_rings[queue];struct iavf_q_vector *q_vector; +u16 itr_setting; + + itr_setting = rx_ring->itr_setting & ~IAVF_ITR_DYNAMIC ; + +if (ec->rx_coalesce_usecs != itr_setting && + ec->use_adaptive_rx_coalesce) { +netif_info (adapter, drv, adapter->netdev, +"Rx interrupt throttling cannot be changed if adaptive-rx is enabled\n" ); +return -EINVAL ; + } + + itr_setting = tx_ring->itr_setting & ~IAVF_ITR_DYNAMIC ; + +if (ec->tx_coalesce_usecs != itr_setting && + ec->use_adaptive_tx_coalesce) { +netif_info (adapter, drv, adapter->netdev, +"Tx interrupt throttling cannot be changed if adaptive-tx is enabled\n" ); +return -EINVAL ; + } rx_ring->itr_setting =ITR_REG_ALIGN (ec->rx_coalesce_usecs); tx_ring->itr_setting =ITR_REG_ALIGN (ec->tx_coalesce_usecs);
@@ -747,6 +766,7 @@ static void iavf_set_itr_per_queue(struct iavf_adapter *adapter,* the Tx and Rx ITR values based on the values we have entered * into the q_vector, no need to write the values now. */ +return 0 ; }/**
@@ -788,9 +808,11 @@ static int __iavf_set_coalesce(struct net_device *netdev,*/ if (queue <0 ) {for (i =0 ; i < adapter->num_active_queues; i++) -iavf_set_itr_per_queue (adapter, ec, i); +if (iavf_set_itr_per_queue (adapter, ec, i)) +return -EINVAL ; }else if (queue < adapter->num_active_queues) { -iavf_set_itr_per_queue (adapter, ec, queue); +if (iavf_set_itr_per_queue (adapter, ec, queue)) +return -EINVAL ; }else {netif_info (adapter, drv, netdev,"Invalid queue value, queue range is 0 - %d\n" , adapter->num_active_queues -1 );
drivers/net/ethernet/intel/igb/igb_main.c +1 -1
@@ -7752,7 +7752,7 @@ static int igb_poll(struct napi_struct *napi, int budget)if (likely (napi_complete_done (napi, work_done)))igb_ring_irq_enable (q_vector); -return min (work_done, budget -1 ); +return work_done; }/**
drivers/net/ethernet/mscc/ocelot.c +4 -7
@@ -1024,12 +1024,6 @@ static int ocelot_hwstamp_set(struct ocelot_port *port, struct ifreq *ifr)switch (cfg.rx_filter) {case HWTSTAMP_FILTER_NONE :break ; -case HWTSTAMP_FILTER_ALL : -case HWTSTAMP_FILTER_SOME : -case HWTSTAMP_FILTER_PTP_V1_L4_EVENT : -case HWTSTAMP_FILTER_PTP_V1_L4_SYNC : -case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ : -case HWTSTAMP_FILTER_NTP_ALL :case HWTSTAMP_FILTER_PTP_V2_L4_EVENT :case HWTSTAMP_FILTER_PTP_V2_L4_SYNC :case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ :
@@ -1189,7 +1183,10 @@ static int ocelot_get_ts_info(struct net_device *dev,SOF_TIMESTAMPING_RAW_HARDWARE ; info->tx_types =BIT (HWTSTAMP_TX_OFF ) |BIT (HWTSTAMP_TX_ON ) |BIT (HWTSTAMP_TX_ONESTEP_SYNC ); - info->rx_filters =BIT (HWTSTAMP_FILTER_NONE ) |BIT (HWTSTAMP_FILTER_ALL ); + info->rx_filters =BIT (HWTSTAMP_FILTER_NONE ) | +BIT (HWTSTAMP_FILTER_PTP_V2_EVENT ) | +BIT (HWTSTAMP_FILTER_PTP_V2_L2_EVENT ) | +BIT (HWTSTAMP_FILTER_PTP_V2_L4_EVENT );return 0 ; }
drivers/net/ethernet/netronome/nfp/nfp_net.h +0 -3
@@ -557,7 +557,6 @@ struct nfp_net_dp {* @exn_name: Name for Exception interrupt * @shared_handler: Handler for shared interrupts * @shared_name: Name for shared interrupt -* @me_freq_mhz: ME clock_freq (MHz) * @reconfig_lock: Protects @reconfig_posted, @reconfig_timer_active, * @reconfig_sync_present and HW reconfiguration request * regs/machinery from async requests (sync must take
@@ -639,8 +638,6 @@ struct nfp_net {irq_handler_t shared_handler;char shared_name[IFNAMSIZ +8 ]; -u32 me_freq_mhz; -bool link_up;spinlock_t link_status_lock;
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +1 -1
@@ -1269,7 +1269,7 @@ static int nfp_net_set_coalesce(struct net_device *netdev,* ME timestamp ticks. There are 16 ME clock cycles for each timestamp * count. */ - factor = nn->me_freq_mhz /16 ; + factor = nn->tlv_caps.me_freq_mhz /16 ;/* Each pair of (usecs, max_frames) fields specifies that interrupts * should be coalesced until
drivers/net/phy/mdio-aspeed.c +7 -0
@@ -61,6 +61,13 @@ static int aspeed_mdio_read(struct mii_bus *bus, int addr, int regnum)iowrite32 (ctrl, ctx->base +ASPEED_MDIO_CTRL ); + rc =readl_poll_timeout (ctx->base +ASPEED_MDIO_CTRL , ctrl, + !(ctrl &ASPEED_MDIO_CTRL_FIRE ), +ASPEED_MDIO_INTERVAL_US , +ASPEED_MDIO_TIMEOUT_US ); +if (rc <0 ) +return rc; + rc = readl_poll_timeout(ctx->base + ASPEED_MDIO_DATA, data, data & ASPEED_MDIO_DATA_IDLE, ASPEED_MDIO_INTERVAL_US,
drivers/net/xen-netfront.c +154 -101
543 lines not on this page · raw message
drivers/nvme/target/io-cmd-file.c +3 -1
@@ -8,6 +8,7 @@#include <linux/uio.h> #include <linux/falloc.h> #include <linux/file.h> +#include <linux/fs.h> #include "nvmet.h" #define NVMET_MAX_MPOOL_BVEC 16
@@ -254,7 +255,8 @@ static void nvmet_file_execute_rw(struct nvmet_req *req)if (req->ns->buffered_io) {if (likely (!req->f.mpool_alloc) && -nvmet_file_execute_io (req,IOCB_NOWAIT )) + (req->ns->file->f_mode &FMODE_NOWAIT ) && +nvmet_file_execute_io (req,IOCB_NOWAIT ))return ;nvmet_file_submit_buffered_io (req); }else
drivers/nvme/target/tcp.c +6 -1
@@ -631,10 +631,11 @@ static int nvmet_try_send_r2t(struct nvmet_tcp_cmd *cmd, bool last_in_batch)static int nvmet_try_send_ddgst (struct nvmet_tcp_cmd *cmd) {struct nvmet_tcp_queue *queue = cmd->queue; +int left =NVME_TCP_DIGEST_LENGTH - cmd->offset;struct msghdr msg = { .msg_flags =MSG_DONTWAIT };struct kvec iov = { .iov_base = (u8 *)&cmd->exp_ddgst + cmd->offset, - .iov_len =NVME_TCP_DIGEST_LENGTH - cmd->offset + .iov_len = left };int ret;
@@ -643,6 +644,10 @@ static int nvmet_try_send_ddgst(struct nvmet_tcp_cmd *cmd)return ret; cmd->offset += ret; + left -= ret; + +if (left) +return -EAGAIN ;if (queue->nvme_sq.sqhd_disabled) { cmd->queue->snd_cmd =NULL ;
drivers/pci/controller/pci-aardvark.c +464 -112
834 lines not on this page · raw message
drivers/pci/pci-bridge-emul.c +8 -3
@@ -21,8 +21,9 @@#include "pci-bridge-emul.h" #define PCI_BRIDGE_CONF_END PCI_STD_HEADER_SIZEOF +#define PCI_CAP_PCIE_SIZEOF (PCI_EXP_SLTSTA2 + 2)#define PCI_CAP_PCIE_START PCI_BRIDGE_CONF_END -#define PCI_CAP_PCIE_END (PCI_CAP_PCIE_START + PCI_EXP_SLTSTA2 + 2) +#define PCI_CAP_PCIE_END (PCI_CAP_PCIE_START + PCI_CAP_PCIE_SIZEOF)struct pci_bridge_reg_behavior {/* Read-only bits */
@@ -38,7 +39,8 @@ struct pci_bridge_reg_behavior {u32 rsvd; }; -static const struct pci_bridge_reg_behavior pci_regs_behavior[] = { +static const +struct pci_bridge_reg_behavior pci_regs_behavior[PCI_STD_HEADER_SIZEOF /4 ] = { [PCI_VENDOR_ID /4 ] = { .ro = ~0 }, [PCI_COMMAND /4 ] = { .rw = (PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
@@ -173,7 +175,8 @@ static const struct pci_bridge_reg_behavior pci_regs_behavior[] = { }, }; -static const struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = { +static const +struct pci_bridge_reg_behavior pcie_cap_regs_behavior[PCI_CAP_PCIE_SIZEOF /4 ] = { [PCI_CAP_LIST_ID /4 ] = {/* * Capability ID, Next Capability Pointer and
@@ -270,6 +273,8 @@ static const struct pci_bridge_reg_behavior pcie_cap_regs_behavior[] = {int pci_bridge_emul_init (struct pci_bridge_emul *bridge,unsigned int flags) { +BUILD_BUG_ON (sizeof (bridge->conf) !=PCI_BRIDGE_CONF_END ); + bridge->conf.class_revision |=cpu_to_le32 (PCI_CLASS_BRIDGE_PCI <<16 ); bridge->conf.header_type =PCI_HEADER_TYPE_BRIDGE ; bridge->conf.cache_line_size =0x10 ;
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +8 -9
@@ -166,10 +166,14 @@ static struct armada_37xx_pin_group armada_37xx_nb_groups[] = {PIN_GRP_GPIO ("jtag" ,20 ,5 ,BIT (0 ),"jtag" ),PIN_GRP_GPIO ("sdio0" ,8 ,3 ,BIT (1 ),"sdio" ),PIN_GRP_GPIO ("emmc_nb" ,27 ,9 ,BIT (2 ),"emmc" ), -PIN_GRP_GPIO ("pwm0" ,11 ,1 ,BIT (3 ),"pwm" ), -PIN_GRP_GPIO ("pwm1" ,12 ,1 ,BIT (4 ),"pwm" ), -PIN_GRP_GPIO ("pwm2" ,13 ,1 ,BIT (5 ),"pwm" ), -PIN_GRP_GPIO ("pwm3" ,14 ,1 ,BIT (6 ),"pwm" ), +PIN_GRP_GPIO_3 ("pwm0" ,11 ,1 ,BIT (3 ) |BIT (20 ),0 ,BIT (20 ),BIT (3 ), +"pwm" ,"led" ), +PIN_GRP_GPIO_3 ("pwm1" ,12 ,1 ,BIT (4 ) |BIT (21 ),0 ,BIT (21 ),BIT (4 ), +"pwm" ,"led" ), +PIN_GRP_GPIO_3 ("pwm2" ,13 ,1 ,BIT (5 ) |BIT (22 ),0 ,BIT (22 ),BIT (5 ), +"pwm" ,"led" ), +PIN_GRP_GPIO_3 ("pwm3" ,14 ,1 ,BIT (6 ) |BIT (23 ),0 ,BIT (23 ),BIT (6 ), +"pwm" ,"led" ),PIN_GRP_GPIO ("pmic1" ,7 ,1 ,BIT (7 ),"pmic" ),PIN_GRP_GPIO ("pmic0" ,6 ,1 ,BIT (8 ),"pmic" ), PIN_GRP_GPIO("i2c2", 2, 2, BIT(9), "i2c"),
@@ -183,11 +187,6 @@ static struct armada_37xx_pin_group armada_37xx_nb_groups[] = {PIN_GRP_EXTRA ("uart2" ,9 ,2 ,BIT (1 ) |BIT (13 ) |BIT (14 ) |BIT (19 ),BIT (1 ) |BIT (13 ) |BIT (14 ),BIT (1 ) |BIT (19 ), 18, 2, "gpio", "uart"), -PIN_GRP_GPIO_2 ("led0_od" ,11 ,1 ,BIT (20 ),BIT (20 ),0 ,"led" ), -PIN_GRP_GPIO_2 ("led1_od" ,12 ,1 ,BIT (21 ),BIT (21 ),0 ,"led" ), -PIN_GRP_GPIO_2 ("led2_od" ,13 ,1 ,BIT (22 ),BIT (22 ),0 ,"led" ), - PIN_GRP_GPIO_2("led3_od", 14, 1, BIT(23), BIT(23), 0, "led"), - };static struct armada_37xx_pin_group armada_37xx_sb_groups[] = {
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -1
@@ -3387,7 +3387,7 @@ _scsih_ublock_io_device(struct MPT3SAS_ADAPTER *ioc, u64 sas_address)shost_for_each_device (sdev, ioc->shost) { sas_device_priv_data = sdev->hostdata; -if (!sas_device_priv_data) +if (!sas_device_priv_data || !sas_device_priv_data->sas_target)continue ;if (sas_device_priv_data->sas_target->sas_address != sas_address)
drivers/scsi/scsi_sysfs.c +1 -1
@@ -796,7 +796,7 @@ store_state_field(struct device *dev, struct device_attribute *attr,mutex_lock (&sdev->state_mutex);if (sdev->sdev_state ==SDEV_RUNNING && state ==SDEV_RUNNING ) { - ret = count; + ret =0 ; }else { ret =scsi_device_set_state (sdev, state);if (ret ==0 && state ==SDEV_RUNNING )
drivers/staging/fbtft/fb_ssd1351.c +0 -4
@@ -187,7 +187,6 @@ static struct fbtft_display display = { }, }; -#ifdef CONFIG_FB_BACKLIGHT static int update_onboard_backlight (struct backlight_device *bd) {struct fbtft_par *par =bl_get_data (bd);
@@ -231,9 +230,6 @@ static void register_onboard_backlight(struct fbtft_par *par)if (!par->fbtftops.unregister_backlight) par->fbtftops.unregister_backlight = fbtft_unregister_backlight; } -#else -static void register_onboard_backlight (struct fbtft_par *par) { }; -#endif FBTFT_REGISTER_DRIVER (DRVNAME ,"solomon,ssd1351" , &display);
drivers/staging/fbtft/fbtft-core.c +1 -8
@@ -136,7 +136,6 @@ static int fbtft_request_gpios_dt(struct fbtft_par *par) }#endif -#ifdef CONFIG_FB_BACKLIGHT static int fbtft_backlight_update_status (struct backlight_device *bd) {struct fbtft_par *par =bl_get_data (bd);
@@ -169,6 +168,7 @@ void fbtft_unregister_backlight(struct fbtft_par *par) par->info->bl_dev =NULL ; } } +EXPORT_SYMBOL (fbtft_unregister_backlight);static const struct backlight_ops fbtft_bl_ops = { .get_brightness = fbtft_backlight_get_brightness,
@@ -206,12 +206,7 @@ void fbtft_register_backlight(struct fbtft_par *par)if (!par->fbtftops.unregister_backlight) par->fbtftops.unregister_backlight = fbtft_unregister_backlight; } -#else -void fbtft_register_backlight (struct fbtft_par *par) { }; -void fbtft_unregister_backlight (struct fbtft_par *par) { }; -#endif EXPORT_SYMBOL (fbtft_register_backlight); -EXPORT_SYMBOL (fbtft_unregister_backlight);static void fbtft_set_addr_win (struct fbtft_par *par,int xs,int ys,int xe,int ye)
@@ -860,13 +855,11 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) fb_info->fix.smem_len >>10 , text1, HZ / fb_info->fbdefio->delay, text2); -#ifdef CONFIG_FB_BACKLIGHT /* Turn on backlight if available */ if (fb_info->bl_dev) { fb_info->bl_dev->props.power =FB_BLANK_UNBLANK ; fb_info->bl_dev->ops->update_status (fb_info->bl_dev); } -#endif return 0 ;
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +2 -1
@@ -2559,13 +2559,14 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)free_irq (dev->irq, dev); priv->irq =0 ; } -free_rtllib (dev);if (dev->mem_start !=0 ) {iounmap ((void __iomem *)dev->mem_start);release_mem_region (pci_resource_start (pdev,1 ),pci_resource_len (pdev,1 )); } + +free_rtllib (dev); }else { priv =rtllib_priv (dev); }
drivers/tty/hvc/hvc_xen.c +14 -3
@@ -86,7 +86,11 @@ static int __write_console(struct xencons_info *xencons, cons = intf->out_cons; prod = intf->out_prod;mb ();/* update queue values before going on */ -BUG_ON ((prod - cons) >sizeof (intf->out)); + +if ((prod - cons) >sizeof (intf->out)) { +pr_err_once ("xencons: Illegal ring page indices" ); +return -EINVAL ; + }while ((sent < len) && ((prod - cons) <sizeof (intf->out))) intf->out[MASK_XENCONS_IDX (prod++, intf->out)] = data[sent++];
@@ -114,7 +118,10 @@ static int domU_write_console(uint32_t vtermno, const char *data, int len)*/ while (len) {int sent =__write_console (cons, data, len); - + +if (sent <0 ) +return sent; + data += sent; len -= sent;
@@ -138,7 +145,11 @@ static int domU_read_console(uint32_t vtermno, char *buf, int len) cons = intf->in_cons; prod = intf->in_prod;mb ();/* get pointers before reading ring */ -BUG_ON ((prod - cons) >sizeof (intf->in)); + +if ((prod - cons) >sizeof (intf->in)) { +pr_err_once ("xencons: Illegal ring page indices" ); +return -EINVAL ; + }while (cons != prod && recv < len) buf[recv++] = intf->in[MASK_XENCONS_IDX (cons++, intf->in)];
drivers/usb/core/hub.c +18 -5
@@ -4609,8 +4609,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,if (oldspeed ==USB_SPEED_LOW ) delay =HUB_LONG_RESET_TIME ; -mutex_lock (hcd->address0_mutex); -/* Reset the device; full speed may morph to high speed */ /* FIXME a USB 2.0 device may morph into SuperSpeed on reset. */ retval =hub_port_reset (hub, port1, udev, delay, false);
@@ -4925,7 +4923,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,hub_port_disable (hub, port1,0 );update_devnum (udev, devnum);/* for disconnect processing */ } -mutex_unlock (hcd->address0_mutex);return retval; }
@@ -5015,6 +5012,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,struct usb_port *port_dev = hub->ports[port1 -1 ];struct usb_device *udev = port_dev->child;static int unreliable_port =-1 ; +bool retry_locked;/* Disconnect any existing devices under this port */ if (udev) {
@@ -5070,7 +5068,11 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, unit_load =100 ; status =0 ; +for (i =0 ; i <SET_CONFIG_TRIES ; i++) { +usb_lock_port (port_dev); +mutex_lock (hcd->address0_mutex); + retry_locked = true;/* reallocate for each attempt, since references * to the previous one can escape in various ways
@@ -5079,6 +5081,8 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,if (!udev) {dev_err (&port_dev->dev,"couldn't allocate usb_device\n" ); +mutex_unlock (hcd->address0_mutex); +usb_unlock_port (port_dev); goto done; }
@@ -5100,12 +5104,14 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, }/* reset (non-USB 3.0 devices) and get descriptor */ -usb_lock_port (port_dev); status =hub_port_init (hub, udev, port1, i); -usb_unlock_port (port_dev);if (status <0 ) goto loop; +mutex_unlock (hcd->address0_mutex); +usb_unlock_port (port_dev); + retry_locked = false; +if (udev->quirks &USB_QUIRK_DELAY_INIT )msleep (2000 );
@@ -5198,6 +5204,10 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,usb_ep0_reinit (udev);release_devnum (udev);hub_free_dev (udev); +if (retry_locked) { +mutex_unlock (hcd->address0_mutex); +usb_unlock_port (port_dev); + }usb_put_dev (udev);if ((status == -ENOTCONN ) || (status == -ENOTSUPP ))break ;
@@ -5794,6 +5804,8 @@ static int usb_reset_and_verify_device(struct usb_device *udev) bos = udev->bos; udev->bos =NULL ; +mutex_lock (hcd->address0_mutex); +for (i =0 ; i <SET_CONFIG_TRIES ; ++i) {/* ep0 maxpacket size may change; let the HCD know about it.
@@ -5803,6 +5815,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev)if (ret >=0 || ret == -ENOTCONN || ret == -ENODEV )break ; } +mutex_unlock (hcd->address0_mutex);if (ret <0 ) goto re_enumerate;
drivers/usb/dwc2/gadget.c +14 -3
@@ -1198,6 +1198,8 @@ static void dwc2_hsotg_start_req(struct dwc2_hsotg *hsotg, } ctrl |=DXEPCTL_CNAK ; }else { + hs_req->req.frame_number = hs_ep->target_frame; + hs_req->req.actual =0 ;dwc2_hsotg_complete_request (hsotg, hs_ep, hs_req, -ENODATA );return ; }
@@ -2855,9 +2857,12 @@ static void dwc2_gadget_handle_ep_disabled(struct dwc2_hsotg_ep *hs_ep) do { hs_req = get_ep_head(hs_ep); - if (hs_req) + if (hs_req) { + hs_req->req.frame_number = hs_ep->target_frame; + hs_req->req.actual = 0; dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, -ENODATA); + } dwc2_gadget_incr_frame_num(hs_ep); /* Update current frame number value. */ hsotg->frame_number = dwc2_hsotg_read_frameno(hsotg);
@@ -2910,8 +2915,11 @@ static void dwc2_gadget_handle_out_token_ep_disabled(struct dwc2_hsotg_ep *ep)while (dwc2_gadget_target_frame_elapsed (ep)) { hs_req =get_ep_head (ep); -if (hs_req) +if (hs_req) { + hs_req->req.frame_number = ep->target_frame; + hs_req->req.actual =0 ;dwc2_hsotg_complete_request (hsotg, ep, hs_req, -ENODATA ); + }dwc2_gadget_incr_frame_num (ep);/* Update current frame number value. */
@@ -3000,8 +3008,11 @@ static void dwc2_gadget_handle_nak(struct dwc2_hsotg_ep *hs_ep)while (dwc2_gadget_target_frame_elapsed (hs_ep)) { hs_req =get_ep_head (hs_ep); -if (hs_req) +if (hs_req) { + hs_req->req.frame_number = hs_ep->target_frame; + hs_req->req.actual =0 ;dwc2_hsotg_complete_request (hsotg, hs_ep, hs_req, -ENODATA ); + }dwc2_gadget_incr_frame_num (hs_ep);/* Update current frame number value. */
drivers/usb/dwc2/hcd_queue.c +1 -1
@@ -59,7 +59,7 @@#define DWC2_UNRESERVE_DELAY (msecs_to_jiffies(5))/* If we get a NAK, wait this long before retrying */ -#define DWC2_RETRY_WAIT_DELAY 1*1E6L +#define DWC2_RETRY_WAIT_DELAY (1 * NSEC_PER_MSEC)/** * dwc2_periodic_channel_available() - Checks that a channel is available for a
drivers/usb/serial/option.c +5 -0
@@ -1267,6 +1267,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) }, { USB_DEVICE(TELIT_VENDOR_ID, 0x9010), /* Telit SBL FN980 flashing device */ .driver_info = NCTRL(0) | ZLP }, + { USB_DEVICE(TELIT_VENDOR_ID, 0x9200), /* Telit LE910S1 flashing device */ + .driver_info = NCTRL(0) | ZLP }, { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), .driver_info = RSVD(1) },
@@ -2094,6 +2096,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */ + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a4, 0xff), /* Fibocom FM101-GL (laptop MBIM) */ + .driver_info = RSVD(4) }, { USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */
drivers/usb/typec/tcpm/fusb302.c +4 -2
@@ -669,25 +669,27 @@ static int tcpm_set_cc(struct tcpc_dev *dev, enum typec_cc_status cc) ret =fusb302_i2c_mask_write (chip,FUSB_REG_MASK ,FUSB_REG_MASK_BC_LVL |FUSB_REG_MASK_COMP_CHNG , -FUSB_REG_MASK_COMP_CHNG ); +FUSB_REG_MASK_BC_LVL );if (ret <0 ) {fusb302_log (chip,"cannot set SRC interrupt, ret=%d" , ret); goto done; } chip->intr_comp_chng = true; + chip->intr_bc_lvl = false;break ;case TYPEC_CC_RD : ret =fusb302_i2c_mask_write (chip,FUSB_REG_MASK ,FUSB_REG_MASK_BC_LVL |FUSB_REG_MASK_COMP_CHNG , -FUSB_REG_MASK_BC_LVL ); +FUSB_REG_MASK_COMP_CHNG );if (ret <0 ) {fusb302_log (chip,"cannot set SRC interrupt, ret=%d" , ret); goto done; } chip->intr_bc_lvl = true; + chip->intr_comp_chng = false;break ;default :break ;
drivers/vhost/vsock.c +1 -1
@@ -491,7 +491,7 @@ static void vhost_vsock_handle_tx_kick(struct vhost_work *work)virtio_transport_free_pkt (pkt); len +=sizeof (pkt->hdr); -vhost_add_used (vq, head, len); +vhost_add_used (vq, head,0 ); total_len += len; added = true; }while (likely (!vhost_exceeds_weight (vq, ++pkts, total_len)));
drivers/xen/xenbus/xenbus_probe.c +26 -1
@@ -846,7 +846,7 @@ static struct notifier_block xenbus_resume_nb = {static int __init xenbus_init (void ) { -int err =0 ; +int err;uint64_t v =0 ; xen_store_domain_type =XS_UNKNOWN ;
@@ -886,6 +886,29 @@ static int __init xenbus_init(void) err =hvm_get_parameter (HVM_PARAM_STORE_PFN , &v);if (err) goto out_error; +/* +* Uninitialized hvm_params are zero and return no error. +* Although it is theoretically possible to have +* HVM_PARAM_STORE_PFN set to zero on purpose, in reality it is +* not zero when valid. If zero, it means that Xenstore hasn't +* been properly initialized. Instead of attempting to map a +* wrong guest physical address return error. +* +* Also recognize all bits set as an invalid value. +*/ +if (!v || !~v) { + err = -ENOENT ; + goto out_error; + } +/* Avoid truncation on 32-bit. */ +#if BITS_PER_LONG ==32 +if (v >ULONG_MAX ) { +pr_err ("%s: cannot handle HVM_PARAM_STORE_PFN=%llx > ULONG_MAX\n" , + __func__, v); + err = -EINVAL ; + goto out_error; + } +#endif xen_store_gfn = (unsigned long )v; xen_store_interface = xen_remap(xen_store_gfn << XEN_PAGE_SHIFT,
@@ -920,8 +943,10 @@ static int __init xenbus_init(void)*/ proc_create_mount_point ("xen" );#endif +return 0 ; out_error: + xen_store_domain_type =XS_UNKNOWN ;return err; }
fs/cifs/file.c +29 -6
@@ -2577,12 +2577,23 @@ int cifs_strict_fsync(struct file *file, loff_t start, loff_t end, tcon =tlink_tcon (smbfile->tlink);if (!(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_NOSSYNC )) { server = tcon->ses->server; -if (server->ops->flush) - rc = server->ops->flush (xid, tcon, &smbfile->fid); -else +if (server->ops->flush ==NULL ) { rc = -ENOSYS ; + goto strict_fsync_exit; + } + +if ((OPEN_FMODE (smbfile->f_flags) &FMODE_WRITE ) ==0 ) { + smbfile =find_writable_file (CIFS_I (inode),FIND_WR_ANY ); +if (smbfile) { + rc = server->ops->flush (xid, tcon, &smbfile->fid); +cifsFileInfo_put (smbfile); + }else +cifs_dbg (FYI ,"ignore fsync for file not open for write\n" ); + }else + rc = server->ops->flush (xid, tcon, &smbfile->fid); } +strict_fsync_exit:free_xid (xid);return rc; }
@@ -2594,6 +2605,7 @@ int cifs_fsync(struct file *file, loff_t start, loff_t end, int datasync)struct cifs_tcon *tcon;struct TCP_Server_Info *server;struct cifsFileInfo *smbfile = file->private_data; +struct inode *inode =file_inode (file);struct cifs_sb_info *cifs_sb =CIFS_FILE_SB (file); rc =file_write_and_wait_range (file, start, end);
@@ -2608,12 +2620,23 @@ int cifs_fsync(struct file *file, loff_t start, loff_t end, int datasync) tcon =tlink_tcon (smbfile->tlink);if (!(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_NOSSYNC )) { server = tcon->ses->server; -if (server->ops->flush) - rc = server->ops->flush (xid, tcon, &smbfile->fid); -else +if (server->ops->flush ==NULL ) { rc = -ENOSYS ; + goto fsync_exit; + } + +if ((OPEN_FMODE (smbfile->f_flags) &FMODE_WRITE ) ==0 ) { + smbfile =find_writable_file (CIFS_I (inode),FIND_WR_ANY ); +if (smbfile) { + rc = server->ops->flush (xid, tcon, &smbfile->fid); +cifsFileInfo_put (smbfile); + }else +cifs_dbg (FYI ,"ignore fsync for file not open for write\n" ); + }else + rc = server->ops->flush (xid, tcon, &smbfile->fid); } +fsync_exit:free_xid (xid);return rc; }
fs/f2fs/node.c +1 -0
@@ -1385,6 +1385,7 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid, nid,nid_of_node (page),ino_of_node (page),ofs_of_node (page),cpver_of_node (page), next_blkaddr_of_node(page)); +set_sbi_flag (sbi,SBI_NEED_FSCK ); err = -EINVAL ; out_err:ClearPageUptodate (page);
fs/fuse/dev.c +5 -5
@@ -839,17 +839,17 @@ static int fuse_try_move_page(struct fuse_copy_state *cs, struct page **pagep) goto out_put_old; } +get_page (newpage); + +if (!(buf->flags &PIPE_BUF_FLAG_LRU )) +lru_cache_add_file (newpage); +/* * Release while we have extra ref on stolen page. Otherwise * anon_pipe_buf_release() might think the page can be reused. */ pipe_buf_release (cs->pipe, buf); -get_page (newpage); - -if (!(buf->flags &PIPE_BUF_FLAG_LRU )) -lru_cache_add_file (newpage); - err =0 ;spin_lock (&cs->req->waitq.lock);if (test_bit (FR_ABORTED , &cs->req->flags))
fs/nfs/nfs42xdr.c +1 -2
@@ -769,8 +769,7 @@ static int nfs4_xdr_dec_clone(struct rpc_rqst *rqstp, status =decode_clone (xdr);if (status) goto out; - status =decode_getfattr (xdr, res->dst_fattr, res->server); - +decode_getfattr (xdr, res->dst_fattr, res->server); out: res->rpc_status = status;return status;
fs/proc/vmcore.c +10 -6
@@ -125,9 +125,13 @@ ssize_t read_from_oldmem(char *buf, size_t count, nr_bytes = count;/* If pfn is not ram, return zeros for sparse dump files */ -if (pfn_is_ram (pfn) ==0 ) -memset (buf,0 , nr_bytes); -else { +if (pfn_is_ram (pfn) ==0 ) { + tmp =0 ; +if (!userbuf) +memset (buf,0 , nr_bytes); +else if (clear_user (buf, nr_bytes)) + tmp = -EFAULT ; + }else {if (encrypted) tmp = copy_oldmem_page_encrypted(pfn, buf, nr_bytes,
@@ -136,10 +140,10 @@ ssize_t read_from_oldmem(char *buf, size_t count,else tmp =copy_oldmem_page (pfn, buf, nr_bytes, offset, userbuf); - -if (tmp <0 ) -return tmp; } +if (tmp <0 ) +return tmp; + *ppos += nr_bytes; count -= nr_bytes; buf += nr_bytes;
include/linux/ipc_namespace.h +15 -0
@@ -130,6 +130,16 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)return ns; } +static inline struct ipc_namespace *get_ipc_ns_not_zero (struct ipc_namespace *ns) +{ +if (ns) { +if (refcount_inc_not_zero (&ns->count)) +return ns; + } + +return NULL ; +} +extern void put_ipc_ns (struct ipc_namespace *ns);#else static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
@@ -146,6 +156,11 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)return ns; } +static inline struct ipc_namespace *get_ipc_ns_not_zero (struct ipc_namespace *ns) +{ +return ns; +} +static inline void put_ipc_ns (struct ipc_namespace *ns) { }
include/linux/sched/task.h +1 -1
@@ -157,7 +157,7 @@ static inline struct vm_struct *task_stack_vm_area(const struct task_struct *t)* Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring * subscriptions and synchronises with wait4(). Also used in procfs. Also * pins the final release of task.io_context. Also protects ->cpuset and -* ->cgroup.subsys[]. And ->vfork_done. +* ->cgroup.subsys[]. And ->vfork_done. And ->sysvshm.shm_clist. * * Nests both inside and outside of read_lock(&tasklist_lock). * It must not be nested with write_lock_irq(&tasklist_lock),
include/net/ip6_fib.h +1 -0
@@ -451,6 +451,7 @@ int fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack);void fib6_nh_release (struct fib6_nh *fib6_nh); +void fib6_nh_release_dsts (struct fib6_nh *fib6_nh); int call_fib6_entry_notifiers(struct net *net, enum fib_event_type event_type,
include/net/ipv6_stubs.h +1 -0
@@ -47,6 +47,7 @@ struct ipv6_stub { struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack);void (*fib6_nh_release)(struct fib6_nh *fib6_nh); +void (*fib6_nh_release_dsts)(struct fib6_nh *fib6_nh);void (*fib6_update_sernum)(struct net *net,struct fib6_info *rt);int (*ip6_del_rt)(struct net *net,struct fib6_info *rt); void (*fib6_rt_update)(struct net *net, struct fib6_info *rt,
include/net/nfc/nci_core.h +1 -0
@@ -30,6 +30,7 @@ enum nci_flag {NCI_UP ,NCI_DATA_EXCHANGE ,NCI_DATA_EXCHANGE_TO , + NCI_UNREG, };/* NCI device states */
include/net/nl802154.h +4 -3
@@ -19,6 +19,8 @@* */ +#include <linux/types.h> +#define NL802154_GENL_NAME "nl802154"enum nl802154_commands {
@@ -150,10 +152,9 @@ enum nl802154_attrs { };enum nl802154_iftype { -/* for backwards compatibility TODO */ -NL802154_IFTYPE_UNSPEC =-1 , +NL802154_IFTYPE_UNSPEC = (~(__u32 )0 ), -NL802154_IFTYPE_NODE , +NL802154_IFTYPE_NODE =0 ,NL802154_IFTYPE_MONITOR ,NL802154_IFTYPE_COORD ,
include/xen/interface/io/ring.h +158 -135
234 lines not on this page · raw message
ipc/shm.c +143 -46
189 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.