Skip to contentSkip to conversation

Linux 5.1.18

DISCUSSION Greg KH 1 participant 2 messages Jul 14, 2019 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 5.1.18 kernel.

All users of the 5.1 kernel series must upgrade.

The updated 5.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.1.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/ABI/testing/sysfs-class-net-qmi                      |    4 
 Documentation/admin-guide/hw-vuln/index.rst                        |    1 
 Documentation/admin-guide/hw-vuln/spectre.rst                      |  697 ++++++++++
 Documentation/admin-guide/kernel-parameters.txt                    |    6 
 Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt    |    1 
 Documentation/userspace-api/spec_ctrl.rst                          |    2 
 Makefile                                                           |    2 
 arch/arm/boot/dts/am335x-pcm-953.dtsi                              |    2 
 arch/arm/boot/dts/am335x-wega.dtsi                                 |    2 
 arch/arm/boot/dts/dra7-l4.dtsi                                     |    2 
 arch/arm/mach-davinci/board-da850-evm.c                            |    2 
 arch/arm/mach-davinci/devices-da8xx.c                              |    3 
 arch/powerpc/include/asm/page.h                                    |    7 
 arch/powerpc/mm/mem.c                                              |    3 
 arch/powerpc/platforms/powermac/Kconfig                            |    1 
 arch/riscv/configs/defconfig                                       |    4 
 arch/riscv/lib/delay.c                                             |    2 
 arch/riscv/net/bpf_jit_comp.c                                      |   24 
 arch/s390/Makefile                                                 |    1 
 arch/x86/kernel/ptrace.c                                           |    5 
 arch/x86/kernel/tls.c                                              |    9 
 arch/x86/kvm/vmx/nested.c                                          |    4 
 arch/x86/net/bpf_jit_comp.c                                        |   74 -
 block/bfq-iosched.c                                                |    1 
 crypto/lrw.c                                                       |    2 
 drivers/android/binder.c                                           |  157 +-
 drivers/android/binder_alloc.c                                     |   44 
 drivers/android/binder_alloc.h                                     |   22 
 drivers/char/tpm/tpm-chip.c                                        |    6 
 drivers/char/tpm/tpm1-cmd.c                                        |    7 
 drivers/char/tpm/tpm2-cmd.c                                        |    7 
 drivers/crypto/talitos.c                                           |   16 
 drivers/gpu/drm/drm_bufs.c                                         |    5 
 drivers/gpu/drm/drm_ioc32.c                                        |    5 
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                                |    3 
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c                         |   10 
 drivers/gpu/ipu-v3/ipu-image-convert.c                             |   40 
 drivers/hid/hid-ids.h                                              |    1 
 drivers/hid/hid-quirks.c                                           |    1 
 drivers/iio/adc/stm32-adc-core.c                                   |   21 
 drivers/infiniband/hw/hfi1/hfi.h                                   |   31 
 drivers/infiniband/hw/hfi1/pio.c                                   |   21 
 drivers/infiniband/hw/hfi1/rc.c                                    |   53 
 drivers/infiniband/hw/hfi1/sdma.c                                  |   17 
 drivers/infiniband/hw/hfi1/ud.c                                    |    4 
 drivers/infiniband/hw/hfi1/verbs.c                                 |   14 
 drivers/infiniband/hw/hfi1/verbs.h                                 |    1 
 drivers/input/keyboard/imx_keypad.c                                |   18 
 drivers/input/mouse/elantech.c                                     |    2 
 drivers/md/md.c                                                    |   36 
 drivers/media/dvb-frontends/stv0297.c                              |    2 
 drivers/misc/lkdtm/Makefile                                        |    3 
 drivers/misc/vmw_vmci/vmci_context.c                               |   80 -
 drivers/misc/vmw_vmci/vmci_handle_array.c                          |   38 
 drivers/misc/vmw_vmci/vmci_handle_array.h                          |   29 
 drivers/mmc/core/mmc.c                                             |    6 
 drivers/net/can/flexcan.c                                          |    3 
 drivers/net/can/m_can/m_can.c                                      |   21 
 drivers/net/can/spi/Kconfig                                        |    5 
 drivers/net/can/spi/mcp251x.c                                      |   25 
 drivers/net/dsa/mv88e6xxx/global1_vtu.c                            |    2 
 drivers/net/ethernet/8390/Kconfig                                  |    2 
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c                |    3 
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h                   |    1 
 drivers/net/ethernet/cavium/liquidio/lio_core.c                    |    2 
 drivers/net/ethernet/ibm/ibmvnic.c                                 |   19 
 drivers/net/ethernet/mellanox/mlxsw/reg.h                          |    2 
 drivers/net/phy/Kconfig                                            |    2 
 drivers/net/phy/Makefile                                           |    2 
 drivers/net/phy/asix.c                                             |   57 
 drivers/net/phy/ax88796b.c                                         |   57 
 drivers/net/usb/qmi_wwan.c                                         |   27 
 drivers/net/wireless/ath/carl9170/usb.c                            |   39 
 drivers/net/wireless/intel/iwlwifi/iwl-drv.c                       |    1 
 drivers/net/wireless/intel/iwlwifi/iwl-prph.h                      |    7 
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c                        |   23 
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c                  |    2 
 drivers/net/wireless/intel/iwlwifi/mvm/mvm.h                       |    2 
 drivers/net/wireless/intel/iwlwifi/mvm/ops.c                       |   17 
 drivers/net/wireless/intel/iwlwifi/pcie/internal.h                 |    2 
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c                    |   50 
 drivers/net/wireless/intersil/p54/p54usb.c                         |   43 
 drivers/net/wireless/intersil/p54/txrx.c                           |    5 
 drivers/net/wireless/marvell/mwifiex/fw.h                          |   12 
 drivers/net/wireless/marvell/mwifiex/ie.c                          |   47 
 drivers/net/wireless/marvell/mwifiex/scan.c                        |   31 
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c                   |    4 
 drivers/net/wireless/marvell/mwifiex/wmm.c                         |    2 
 drivers/scsi/qedi/qedi_main.c                                      |    3 
 drivers/soc/bcm/brcmstb/biuctrl.c                                  |    6 
 drivers/soundwire/intel.c                                          |    4 
 drivers/soundwire/stream.c                                         |    7 
 drivers/staging/comedi/drivers/amplc_pci230.c                      |    3 
 drivers/staging/comedi/drivers/dt282x.c                            |    3 
 drivers/staging/fsl-dpaa2/ethsw/ethsw.c                            |    1 
 drivers/staging/iio/cdc/ad7150.c                                   |   19 
 drivers/staging/mt7621-pci/pci-mt7621.c                            |    2 
 drivers/staging/rtl8712/rtl871x_ioctl_linux.c                      |  157 +-
 drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c      |   43 
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c          |   32 
 drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h          |    3 
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c |    2 
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c      |   21 
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c     |   31 
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c     |    6 
 drivers/staging/wilc1000/wilc_netdev.c                             |   12 
 drivers/tty/serial/8250/8250_port.c                                |    3 
 drivers/usb/dwc2/core.c                                            |    2 
 drivers/usb/gadget/function/f_fs.c                                 |    3 
 drivers/usb/gadget/function/u_ether.c                              |    6 
 drivers/usb/renesas_usbhs/fifo.c                                   |   34 
 drivers/usb/serial/ftdi_sio.c                                      |    1 
 drivers/usb/serial/ftdi_sio_ids.h                                  |    6 
 drivers/usb/serial/option.c                                        |    1 
 drivers/usb/typec/tps6598x.c                                       |    6 
 fs/crypto/policy.c                                                 |    2 
 fs/nfs/nfs4proc.c                                                  |   20 
 fs/quota/dquot.c                                                   |    4 
 fs/udf/inode.c                                                     |   93 -
 include/linux/skmsg.h                                              |    2 
 include/linux/vmw_vmci_defs.h                                      |   11 
 include/net/ip6_tunnel.h                                           |    9 
 include/uapi/linux/usb/audio.h                                     |   37 
 kernel/bpf/devmap.c                                                |    9 
 net/can/af_can.c                                                   |   24 
 net/core/skbuff.c                                                  |    1 
 net/ipv6/netfilter/nf_conntrack_reasm.c                            |   22 
 net/mac80211/ieee80211_i.h                                         |    9 
 net/mac80211/mesh.c                                                |    6 
 net/mac80211/util.c                                                |    4 
 net/wireless/pmsr.c                                                |    4 
 net/wireless/util.c                                                |    4 
 net/xdp/xdp_umem.c                                                 |   11 
 samples/bpf/bpf_load.c                                             |    2 
 samples/bpf/task_fd_query_user.c                                   |    2 
 sound/pci/hda/patch_realtek.c                                      |    2 
 sound/usb/mixer.c                                                  |   16 
 tools/bpf/bpftool/map.c                                            |    2 
 tools/perf/Documentation/intel-pt.txt                              |   10 
 tools/perf/util/auxtrace.c                                         |    3 
 tools/perf/util/header.c                                           |    1 
 tools/perf/util/intel-pt.c                                         |    3 
 tools/perf/util/pmu.c                                              |   28 
 tools/perf/util/thread-stack.c                                     |   30 
 tools/testing/selftests/bpf/verifier/div_overflow.c                |   14 
 virt/kvm/arm/arch_timer.c                                          |    5 
 virt/kvm/arm/vgic/vgic-its.c                                       |    1 
 147 files changed, 2085 insertions(+), 801 deletions(-)

Aaron Ma (1):
Input: elantech - enable middle button support on 2 ThinkPads

Adrian Hunter (4):
perf intel-pt: Fix itrace defaults for perf script
perf auxtrace: Fix itrace defaults for perf script
perf intel-pt: Fix itrace defaults for perf script intel-pt documentation perf thread-stack: Fix thread stack return from kernel for kernel-only case

Ajay Singh (1):
staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()

Alan Stern (1):
p54usb: Fix race between disconnect and firmware loading

Alexei Starovoitov (1):
bpf, x64: fix stack layout of JITed bpf code

Andreas Fritiofson (1):
USB: serial: ftdi_sio: add ID for isodebug v1

Andrew Jones (1):
KVM: arm/arm64: Fix emulated ptimer irq injection

Andy Lutomirski (1):
Documentation/admin: Remove the vsyscall=native documentation

Anson Huang (1):
Input: imx_keypad - make sure keyboard can always wake up system

Arnd Bergmann (1):
staging: rtl8712: reduce stack usage, again

Avraham Stern (1):
cfg80211: report measurement start TSF correctly

Bartosz Golaszewski (2):
ARM: davinci: da850-evm: call regulator_has_full_constraints()
ARM: davinci: da8xx: specify dma_coherent_mask for lcdc

Benjamin Coddington (1):
NFS4: Only set creation opendata if O_CREAT

Björn Töpel (1):
bpf, riscv: clear target register high 32-bits for and/or/xor on ALU32

Brian Norris (1):
mwifiex: Don't abort on small, spec-compliant vendor IEs

Chang-Hsien Tsai (1):
samples, bpf: fix to change the buffer size for read()

Christian Lamparter (2):
p54: fix crash during initialization
carl9170: fix misuse of device driver API

Christoph Hellwig (1):
powerpc: enable a 30-bit ZONE_DMA for 32-bit pmac

Christophe Leroy (1):
crypto: talitos - rename alternative AEAD algos.

Colin Ian King (2):
net: lio_core: fix potential sign-extension overflow on large shift
staging: fsl-dpaa2/ethsw: fix memory leak of switchdev_work

Dan Carpenter (1):
drm: return -EFAULT if copy_to_user() fails

Dave Martin (1):
KVM: arm/arm64: vgic: Fix kvm_device leak in vgic_its_destroy

Dave Stevenson (4):
staging: bcm2835-camera: Replace spinlock protecting context_map with mutex
staging: bcm2835-camera: Ensure all buffers are returned on disable
staging: bcm2835-camera: Remove check of the number of buffers supplied
staging: bcm2835-camera: Handle empty EOS buffers whilst streaming

Dianzhang Chen (2):
x86/ptrace: Fix possible spectre-v1 in ptrace_get_debugreg() x86/tls: Fix possible spectre-v1 in do_get_thread_area()

Douglas Anderson (1):
block, bfq: NULL out the bic when it's no longer valid

Emmanuel Grumbach (1):
iwlwifi: fix load in rfkill flow for unified firmware

Eric Biggers (1):
crypto: lrw - use correct alignmask

Eugen Hristev (1):
can: m_can: implement errata "Needless activation of MRAF irq"

Fabio Estevam (1):
can: flexcan: Remove unneeded registration message

Fabrice Gasnier (1):
iio: adc: stm32-adc: add missing vdda-supply

Fei Yang (1):
usb: gadget: f_fs: data_len used before properly set

Florian Fainelli (2):
soc: brcmstb: Fix error path for unsupported CPUs
soc: bcm: brcmstb: biuctrl: Register writes require a barrier

Greg Kroah-Hartman (1):

      Linux 5.1.18

Guillaume Nault (2):
netfilter: ipv6: nf_defrag: fix leakage of unqueued fragments
netfilter: ipv6: nf_defrag: accept duplicate fragments again

Heiko Carstens (1):
s390/boot: disable address-of-packed-member warning

Hongjie Fang (1):
fscrypt: don't set policy for a dead directory

Ian Abbott (2):
staging: comedi: dt282x: fix a null pointer deref on interrupt
staging: comedi: amplc_pci230: fix null pointer deref on interrupt

Ido Schimmel (1):
mlxsw: spectrum: Disallow prio-tagged packets when PVID is removed

Ilya Maximets (1):
xdp: check device pointer before clearing

Jakub Sitnicki (1):
bpf: sockmap, restore sk_write_space when psock gets dropped

Jia-Ju Bai (1):
iwlwifi: Fix double-free problems in iwl_req_fw_callback()

John Crispin (1):
mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()

John Fastabend (1):
bpf: sockmap, fix use after free from sleep in psock backlog workqueue

John Garry (1):
perf pmu: Fix uncore PMU alias list for ARM64

Jörgen Storvist (1):
USB: serial: option: add support for GosunCn ME3630 RNDIS mode

Kailang Yang (1):
ALSA: hda/realtek - Headphone Mic can't record after S3

Kees Cook (1):
tpm: Actually fail on TPM errors during "get random"

Kevin Hilman (1):
RISC-V: defconfig: enable clocks, serial console

Kiruthika Varadarajan (1):
usb: gadget: ether: Fix race between gether_disconnect and rx_submit

Krzesimir Nowak (1):
tools: bpftool: Fix JSON output when lookup fails

Luke Nelson (1):
bpf, riscv: clear high 32 bits for ALU32 add/sub/neg/lsh/rsh/arsh

Mariusz Tkaczyk (1):
md: fix for divide error in status_resync

Martin Blumenstingl (1):
usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()

Matt Chen (1):
iwlwifi: fix AX201 killer sku loading firmware issue

Matteo Croce (1):
samples, bpf: suppress compiler warning

Mauro Carvalho Chehab (1):
media: stv0297: fix frequency range limit

Mauro S. M. Rodrigues (1):
bnx2x: Check if transceiver implements DDM before access

Melissa Wen (1):
staging:iio:ad7150: fix threshold mode config bit

Michael Schmitz (1):
net: phy: rename Asix Electronics PHY driver

Mike Marciniszyn (5):
IB/hfi1: Create inline to get extended headers IB/hfi1: Use aborts to trigger RC throttling IB/hfi1: Wakeup QPs orphaned on wait list after flush IB/hfi1: Handle wakeup of orphaned QPs for pio IB/hfi1: Handle port down properly in pio

Mordechay Goodstein (1):
cfg80211: util: fix bit count off by one

Naftali Goldstein (1):
mac80211: do not start any work during reconfigure flow

Naveen N. Rao (1):
bpf: fix div64 overflow tests to properly detect errors

Nick Desaulniers (1):
lkdtm: support llvm-objcopy

Nick Hu (1):
riscv: Fix udelay in RV32.

Nicolas Saenz Julienne (3):
staging: vchiq_2835_arm: revert "quit using custom down_interruptible()"
staging: vchiq: revert "switch to wait_for_completion_killable"
staging: vchiq: make wait events interruptible

Nikolaus Voss (2):
drivers/usb/typec/tps6598x.c: fix portinfo width drivers/usb/typec/tps6598x.c: fix 4CC cmd write

Nilesh Javali (1):
scsi: qedi: Check targetname while finding boot target information

Oliver Barta (1):
Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled"

Pradeep Kumar Chitrapu (1):
mac80211: free peer keys before vif down in mesh

Qian Cai (1):
drm/vmwgfx: fix a warning due to missing dma_parms

Rasmus Villemoes (1):
net: dsa: mv88e6xxx: fix shift of FID bits in mv88e6185_g1_vtu_loadpurge()

Reinhard Speyerer (3):
qmi_wwan: add support for QMAP padding in the RX path
qmi_wwan: avoid RCU stalls on device disconnect when in QMAP mode
qmi_wwan: extend permitted QMAP mux_id value range

Sean Nyekjaer (2):

      dt-bindings: can: mcp251x: add mcp25625 support
      can: mcp251x: add support for mcp25625

Sebastian Parschauer (1):
HID: Add another Primax PIXART OEM mouse quirk

Sergio Paracuellos (1):
staging: mt7621-pci: fix PCIE_FTS_NUM_LO macro

Shahar S Matityahu (1):
iwlwifi: clear persistence bit according to device family

Song Liu (1):

      perf header: Assign proper ff->ph in perf_event__synthesize_features()

Srinivas Kandagatla (3):
soundwire: stream: fix out of boundary access on port properties
soundwire: stream: fix bad unlock balance
soundwire: intel: set dai min and max channels correctly

Steve Longerbeam (3):
gpu: ipu-v3: image-convert: Fix input bytesperline width/height align
gpu: ipu-v3: image-convert: Fix input bytesperline for packed formats
gpu: ipu-v3: image-convert: Fix image downsize coefficients

Steven J. Magnani (1):
udf: Fix incorrect final NOT_ALLOCATED (hole) extent length

Takashi Iwai (4):
mwifiex: Fix possible buffer overflows at parsing bss descriptor
mwifiex: Fix heap overflow in mwifiex_uap_parse_tail_ies()
ALSA: usb-audio: Fix parse of UAC2 Extension Units
mwifiex: Abort at too short BSS descriptor element

Teresa Remmet (1):
ARM: dts: am335x phytec boards: Fix cd-gpios active level

Thomas Falcon (3):
ibmvnic: Do not close unopened driver during reset
ibmvnic: Refresh device multicast list after reset
ibmvnic: Fix unchecked return codes of memory allocations

Thomas Hellstrom (1):
drm/vmwgfx: Honor the sg list segment size limitation

Thomas Pedersen (1):
mac80211: mesh: fix RCU warning

Tim Chen (1):
Documentation: Add section about CPU vulnerabilities for Spectre

Todd Kjos (2):
binder: fix memory leak in error path
binder: return errors from buffer copy functions

Tony Lindgren (1):
ARM: dts: Drop bogus CLKSEL for timer12 on dra7

Toshiaki Makita (3):
bpf, devmap: Fix premature entry free on destroying map bpf, devmap: Add missing bulk queue free
bpf, devmap: Add missing RCU read lock on flush

Vadim Sukhomlinov (1):
tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations

Vishnu DASA (1):
VMCI: Fix integer overflow in VMCI handle arrays

Vitaly Kuznetsov (1):
KVM: nVMX: use correct clean fields when copying from eVMCS

Wolfram Sang (1):
mmc: core: complete HS400 before checking status

Xin Long (1):
ip6_tunnel: allow not to count pkts on tstats by passing dev as NULL

Yibo Zhao (1):
mac80211: only warn once on chanctx_conf being NULL

Yoshihiro Shimoda (1):
usb: renesas_usbhs: add a workaround for a race condition of workqueue

YueHaibing (1):
can: af_can: Fix error path of can_init()

yangerkun (1):
quota: fix a problem about transfer quota

author maintainer
#1 lore raw
Documentation/ABI/testing/sysfs-class-net-qmi +2 -2
index 7122d6264c49..c310db4ccbc2 100644
@@ -29,7 +29,7 @@ Contact:	Bjørn Mork <[email protected]>
 Description:
 		Unsigned integer.
 
-		Write a number ranging from 1 to 127 to add a qmap mux
+		Write a number ranging from 1 to 254 to add a qmap mux
 		based network device, supported by recent Qualcomm based
 		modems.
 
@@ -46,5 +46,5 @@ Contact:	Bjørn Mork <[email protected]>
 Description:
 		Unsigned integer.
 
-		Write a number ranging from 1 to 127 to delete a previously
+		Write a number ranging from 1 to 254 to delete a previously
 		created qmap mux based network device.
Documentation/admin-guide/hw-vuln/index.rst +1 -0
index ffc064c1ec68..49311f3da6f2 100644
@@ -9,5 +9,6 @@ are configurable at compile, boot or run time.
 .. toctree::
    :maxdepth: 1
 
+   spectre
    l1tf
    mds
Documentation/admin-guide/hw-vuln/spectre.rst new file +697 -0

697 lines not on this page · raw message

Documentation/admin-guide/kernel-parameters.txt +0 -6
index c7937f379d22..135438b0fd42 100644
@@ -5074,12 +5074,6 @@
 			emulate     [default] Vsyscalls turn into traps and are
 			            emulated reasonably safely.
 
-			native      Vsyscalls are native syscall instructions.
-			            This is a little bit faster than trapping
-			            and makes a few dynamic recompilers work
-			            better than they would in emulation mode.
-			            It also makes exploits much easier to write.
-
 			none        Vsyscalls don't work at all.  This makes
 			            them quite hard to use for exploits but
 			            might break your system.
Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt +1 -0
index 188c8bd4eb67..5a0111d4de58 100644
@@ -4,6 +4,7 @@ Required properties:
  - compatible: Should be one of the following:
    - "microchip,mcp2510" for MCP2510.
    - "microchip,mcp2515" for MCP2515.
+   - "microchip,mcp25625" for MCP25625.
  - reg: SPI chip select.
  - clocks: The clock feeding the CAN controller.
  - interrupts: Should contain IRQ line for the CAN controller.
Documentation/userspace-api/spec_ctrl.rst +2 -0
index 1129c7550a48..7ddd8f667459 100644
@@ -49,6 +49,8 @@ If PR_SPEC_PRCTL is set, then the per-task control of the mitigation is
 available. If not set, prctl(PR_SET_SPECULATION_CTRL) for the speculation
 misfeature will fail.
 
+.. _set_spec_ctrl:
+
 PR_SET_SPECULATION_CTRL
 -----------------------
 
Makefile +1 -1
index 14c91d46583f..01a0a61f86e7 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 1
-SUBLEVEL = 17
+SUBLEVEL = 18
 EXTRAVERSION =
 NAME = Shy Crocodile
 
arch/arm/boot/dts/am335x-pcm-953.dtsi +1 -1
index 1ec8e0d80191..572fbd254690 100644
@@ -197,7 +197,7 @@
 	bus-width = <4>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins>;
-	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
arch/arm/boot/dts/am335x-wega.dtsi +1 -1
index 8ce541739b24..83e4fe595e37 100644
@@ -157,7 +157,7 @@
 	bus-width = <4>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&mmc1_pins>;
-	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
 	status = "okay";
 };
 
arch/arm/boot/dts/dra7-l4.dtsi +0 -2
index 414f1cd68733..03282d9edf7d 100644
@@ -4450,8 +4450,6 @@
 			timer12: timer@0 {
 				compatible = "ti,omap5430-timer";
 				reg = <0x0 0x80>;
-				clocks = <&wkupaon_clkctrl DRA7_WKUPAON_TIMER12_CLKCTRL 24>;
-				clock-names = "fck";
 				interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
 				ti,timer-alwon;
 				ti,timer-secure;
arch/arm/mach-davinci/board-da850-evm.c +2 -0
index 1fdc9283a8c5..2450936b91d0 100644
@@ -1479,6 +1479,8 @@ static __init void da850_evm_init(void)
 	if (ret)
 		pr_warn("%s: dsp/rproc registration failed: %d\n",
 			__func__, ret);
+
+	regulator_has_full_constraints();
 }
 
 #ifdef CONFIG_SERIAL_8250_CONSOLE
arch/arm/mach-davinci/devices-da8xx.c +3 -0
index b8dc674e06bc..261240913b45 100644
@@ -686,6 +686,9 @@ static struct platform_device da8xx_lcdc_device = {
 	.id		= 0,
 	.num_resources	= ARRAY_SIZE(da8xx_lcdc_resources),
 	.resource	= da8xx_lcdc_resources,
+	.dev		= {
+		.coherent_dma_mask	= DMA_BIT_MASK(32),
+	}
 };
 
 int __init da8xx_register_lcdc(struct da8xx_lcdc_platform_data *pdata)
arch/powerpc/include/asm/page.h +7 -0
index ed870468ef6f..d408711d09fb 100644
@@ -330,6 +330,13 @@ struct vm_area_struct;
 #endif /* __ASSEMBLY__ */
 #include <asm/slice.h>
 
+/*
+ * Allow 30-bit DMA for very limited Broadcom wifi chips on many powerbooks.
+ */
+#ifdef CONFIG_PPC32
+#define ARCH_ZONE_DMA_BITS 30
+#else
 #define ARCH_ZONE_DMA_BITS 31
+#endif
 
 #endif /* _ASM_POWERPC_PAGE_H */
arch/powerpc/mm/mem.c +2 -1
index f6787f90e158..b98ce400a889 100644
@@ -255,7 +255,8 @@ void __init paging_init(void)
 	       (long int)((top_of_ram - total_ram) >> 20));
 
 #ifdef CONFIG_ZONE_DMA
-	max_zone_pfns[ZONE_DMA]	= min(max_low_pfn, 0x7fffffffUL >> PAGE_SHIFT);
+	max_zone_pfns[ZONE_DMA]	= min(max_low_pfn,
+			((1UL << ARCH_ZONE_DMA_BITS) - 1) >> PAGE_SHIFT);
 #endif
 	max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
 #ifdef CONFIG_HIGHMEM
arch/powerpc/platforms/powermac/Kconfig +1 -0
index f834a19ed772..c02d8c503b29 100644
@@ -7,6 +7,7 @@ config PPC_PMAC
 	select PPC_INDIRECT_PCI if PPC32
 	select PPC_MPC106 if PPC32
 	select PPC_NATIVE
+	select ZONE_DMA if PPC32
 	default y
 
 config PPC_PMAC64
arch/riscv/configs/defconfig +4 -0
index 2fd3461e50ab..4f02967e55de 100644
@@ -49,6 +49,8 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
+CONFIG_SERIAL_SIFIVE=y
+CONFIG_SERIAL_SIFIVE_CONSOLE=y
 CONFIG_HVC_RISCV_SBI=y
 # CONFIG_PTP_1588_CLOCK is not set
 CONFIG_DRM=y
@@ -64,6 +66,8 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_UAS=y
 CONFIG_VIRTIO_MMIO=y
+CONFIG_CLK_SIFIVE=y
+CONFIG_CLK_SIFIVE_FU540_PRCI=y
 CONFIG_SIFIVE_PLIC=y
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
arch/riscv/lib/delay.c +1 -1
index dce8ae24c6d3..ee6853c1e341 100644
@@ -88,7 +88,7 @@ EXPORT_SYMBOL(__delay);
 
 void udelay(unsigned long usecs)
 {
-	unsigned long ucycles = usecs * lpj_fine * UDELAY_MULT;
+	u64 ucycles = (u64)usecs * lpj_fine * UDELAY_MULT;
 
 	if (unlikely(usecs > MAX_UDELAY_US)) {
 		__delay((u64)usecs * riscv_timebase / 1000000ULL);
arch/riscv/net/bpf_jit_comp.c +24 -0
index 80b12aa5e10d..426d5c33ea90 100644
@@ -751,22 +751,32 @@ static int emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
 	case BPF_ALU | BPF_ADD | BPF_X:
 	case BPF_ALU64 | BPF_ADD | BPF_X:
 		emit(is64 ? rv_add(rd, rd, rs) : rv_addw(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_SUB | BPF_X:
 	case BPF_ALU64 | BPF_SUB | BPF_X:
 		emit(is64 ? rv_sub(rd, rd, rs) : rv_subw(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_AND | BPF_X:
 	case BPF_ALU64 | BPF_AND | BPF_X:
 		emit(rv_and(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_OR | BPF_X:
 	case BPF_ALU64 | BPF_OR | BPF_X:
 		emit(rv_or(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_XOR | BPF_X:
 	case BPF_ALU64 | BPF_XOR | BPF_X:
 		emit(rv_xor(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_MUL | BPF_X:
 	case BPF_ALU64 | BPF_MUL | BPF_X:
@@ -789,14 +799,20 @@ static int emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
 	case BPF_ALU | BPF_LSH | BPF_X:
 	case BPF_ALU64 | BPF_LSH | BPF_X:
 		emit(is64 ? rv_sll(rd, rd, rs) : rv_sllw(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_RSH | BPF_X:
 	case BPF_ALU64 | BPF_RSH | BPF_X:
 		emit(is64 ? rv_srl(rd, rd, rs) : rv_srlw(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_ARSH | BPF_X:
 	case BPF_ALU64 | BPF_ARSH | BPF_X:
 		emit(is64 ? rv_sra(rd, rd, rs) : rv_sraw(rd, rd, rs), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 
 	/* dst = -dst */
@@ -804,6 +820,8 @@ static int emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
 	case BPF_ALU64 | BPF_NEG:
 		emit(is64 ? rv_sub(rd, RV_REG_ZERO, rd) :
 		     rv_subw(rd, RV_REG_ZERO, rd), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 
 	/* dst = BSWAP##imm(dst) */
@@ -958,14 +976,20 @@ static int emit_insn(const struct bpf_insn *insn, struct rv_jit_context *ctx,
 	case BPF_ALU | BPF_LSH | BPF_K:
 	case BPF_ALU64 | BPF_LSH | BPF_K:
 		emit(is64 ? rv_slli(rd, rd, imm) : rv_slliw(rd, rd, imm), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_RSH | BPF_K:
 	case BPF_ALU64 | BPF_RSH | BPF_K:
 		emit(is64 ? rv_srli(rd, rd, imm) : rv_srliw(rd, rd, imm), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 	case BPF_ALU | BPF_ARSH | BPF_K:
 	case BPF_ALU64 | BPF_ARSH | BPF_K:
 		emit(is64 ? rv_srai(rd, rd, imm) : rv_sraiw(rd, rd, imm), ctx);
+		if (!is64)
+			emit_zext_32(rd, ctx);
 		break;
 
 	/* JUMP off */
arch/s390/Makefile +1 -0
index e21053e5e0da..bbd2dab6730e 100644
@@ -24,6 +24,7 @@ KBUILD_CFLAGS_DECOMPRESSOR += -DDISABLE_BRANCH_PROFILING -D__NO_FORTIFY
 KBUILD_CFLAGS_DECOMPRESSOR += -fno-delete-null-pointer-checks -msoft-float
 KBUILD_CFLAGS_DECOMPRESSOR += -fno-asynchronous-unwind-tables
 KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding)
+KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
 KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
 UTS_MACHINE	:= s390x
arch/x86/kernel/ptrace.c +4 -1
index 4b8ee05dd6ad..6d8f108dd563 100644
@@ -24,6 +24,7 @@
 #include <linux/rcupdate.h>
 #include <linux/export.h>
 #include <linux/context_tracking.h>
+#include <linux/nospec.h>
 
 #include <linux/uaccess.h>
 #include <asm/pgtable.h>
@@ -642,9 +643,11 @@ static unsigned long ptrace_get_debugreg(struct task_struct *tsk, int n)
 {
 	struct thread_struct *thread = &tsk->thread;
 	unsigned long val = 0;
+	int index = n;
 
 	if (n < HBP_NUM) {
-		struct perf_event *bp = thread->ptrace_bps[n];
+		struct perf_event *bp = thread->ptrace_bps[index];
+		index = array_index_nospec(index, HBP_NUM);
 
 		if (bp)
 			val = bp->hw.info.address;
arch/x86/kernel/tls.c +7 -2
index a5b802a12212..71d3fef1edc9 100644
@@ -5,6 +5,7 @@
 #include <linux/user.h>
 #include <linux/regset.h>
 #include <linux/syscalls.h>
+#include <linux/nospec.h>
 
 #include <linux/uaccess.h>
 #include <asm/desc.h>
@@ -220,6 +221,7 @@ int do_get_thread_area(struct task_struct *p, int idx,
 		       struct user_desc __user *u_info)
 {
 	struct user_desc info;
+	int index;
 
 	if (idx == -1 && get_user(idx, &u_info->entry_number))
 		return -EFAULT;
@@ -227,8 +229,11 @@ int do_get_thread_area(struct task_struct *p, int idx,
 	if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
 		return -EINVAL;
 
-	fill_user_desc(&info, idx,
-		       &p->thread.tls_array[idx - GDT_ENTRY_TLS_MIN]);
+	index = idx - GDT_ENTRY_TLS_MIN;
+	index = array_index_nospec(index,
+			GDT_ENTRY_TLS_MAX - GDT_ENTRY_TLS_MIN + 1);
+
+	fill_user_desc(&info, idx, &p->thread.tls_array[index]);
 
 	if (copy_to_user(u_info, &info, sizeof(info)))
 		return -EFAULT;
arch/x86/kvm/vmx/nested.c +2 -2
index 5fa0c17d0b41..4ca834d22169 100644
@@ -1404,7 +1404,7 @@ static int copy_enlightened_to_vmcs12(struct vcpu_vmx *vmx)
 	}
 
 	if (unlikely(!(evmcs->hv_clean_fields &
-		       HV_VMX_ENLIGHTENED_CLEAN_FIELD_CONTROL_PROC))) {
+		       HV_VMX_ENLIGHTENED_CLEAN_FIELD_CONTROL_EXCPN))) {
 		vmcs12->exception_bitmap = evmcs->exception_bitmap;
 	}
 
@@ -1444,7 +1444,7 @@ static int copy_enlightened_to_vmcs12(struct vcpu_vmx *vmx)
 	}
 
 	if (unlikely(!(evmcs->hv_clean_fields &
-		       HV_VMX_ENLIGHTENED_CLEAN_FIELD_HOST_GRP1))) {
+		       HV_VMX_ENLIGHTENED_CLEAN_FIELD_CONTROL_GRP1))) {
 		vmcs12->pin_based_vm_exec_control =
 			evmcs->pin_based_vm_exec_control;
 		vmcs12->vm_exit_controls = evmcs->vm_exit_controls;
arch/x86/net/bpf_jit_comp.c +21 -53

106 lines not on this page · raw message

block/bfq-iosched.c +1 -0
index 679d608347ea..7d4d47177940 100644
@@ -4265,6 +4265,7 @@ static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync)
 		unsigned long flags;
 
 		spin_lock_irqsave(&bfqd->lock, flags);
+		bfqq->bic = NULL;
 		bfq_exit_bfqq(bfqd, bfqq);
 		bic_set_bfqq(bic, NULL, is_sync);
 		spin_unlock_irqrestore(&bfqd->lock, flags);
crypto/lrw.c +1 -1
index cc5c89246193..ac2a09ede90f 100644
@@ -388,7 +388,7 @@ static int create(struct crypto_template *tmpl, struct rtattr **tb)
 	inst->alg.base.cra_priority = alg->base.cra_priority;
 	inst->alg.base.cra_blocksize = LRW_BLOCK_SIZE;
 	inst->alg.base.cra_alignmask = alg->base.cra_alignmask |
-				       (__alignof__(__be32) - 1);
+				       (__alignof__(be128) - 1);
 
 	inst->alg.ivsize = LRW_BLOCK_SIZE;
 	inst->alg.min_keysize = crypto_skcipher_alg_min_keysize(alg) +
drivers/android/binder.c +94 -63

292 lines not on this page · raw message

drivers/android/binder_alloc.c +23 -21

63 lines not on this page · raw message

drivers/android/binder_alloc.h +11 -11
index b60d161b7a7a..9a51b72624ae 100644
@@ -168,17 +168,17 @@ binder_alloc_copy_user_to_buffer(struct binder_alloc *alloc,
 				 const void __user *from,
 				 size_t bytes);
 
-void binder_alloc_copy_to_buffer(struct binder_alloc *alloc,
-				 struct binder_buffer *buffer,
-				 binder_size_t buffer_offset,
-				 void *src,
-				 size_t bytes);
-
-void binder_alloc_copy_from_buffer(struct binder_alloc *alloc,
-				   void *dest,
-				   struct binder_buffer *buffer,
-				   binder_size_t buffer_offset,
-				   size_t bytes);
+int binder_alloc_copy_to_buffer(struct binder_alloc *alloc,
+				struct binder_buffer *buffer,
+				binder_size_t buffer_offset,
+				void *src,
+				size_t bytes);
+
+int binder_alloc_copy_from_buffer(struct binder_alloc *alloc,
+				  void *dest,
+				  struct binder_buffer *buffer,
+				  binder_size_t buffer_offset,
+				  size_t bytes);
 
 #endif /* _LINUX_BINDER_ALLOC_H */
 
drivers/char/tpm/tpm-chip.c +3 -3
index 8804c9e916fd..f566fa8bf704 100644
@@ -294,15 +294,15 @@ static int tpm_class_shutdown(struct device *dev)
 {
 	struct tpm_chip *chip = container_of(dev, struct tpm_chip, dev);
 
+	down_write(&chip->ops_sem);
 	if (chip->flags & TPM_CHIP_FLAG_TPM2) {
-		down_write(&chip->ops_sem);
 		if (!tpm_chip_start(chip)) {
 			tpm2_shutdown(chip, TPM2_SU_CLEAR);
 			tpm_chip_stop(chip);
 		}
-		chip->ops = NULL;
-		up_write(&chip->ops_sem);
 	}
+	chip->ops = NULL;
+	up_write(&chip->ops_sem);
 
 	return 0;
 }
drivers/char/tpm/tpm1-cmd.c +5 -2
index 85dcf2654d11..faacbe1ffa1a 100644
@@ -510,7 +510,7 @@ struct tpm1_get_random_out {
  *
  * Return:
  * *  number of bytes read
- * * -errno or a TPM return code otherwise
+ * * -errno (positive TPM return codes are masked to -EIO)
  */
 int tpm1_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
 {
@@ -531,8 +531,11 @@ int tpm1_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
 
 		rc = tpm_transmit_cmd(chip, &buf, sizeof(out->rng_data_len),
 				      "attempting get random");
-		if (rc)
+		if (rc) {
+			if (rc > 0)
+				rc = -EIO;
 			goto out;
+		}
 
 		out = (struct tpm1_get_random_out *)&buf.data[TPM_HEADER_SIZE];
 
drivers/char/tpm/tpm2-cmd.c +5 -2
index e74c5b7b64bf..f57e25ab8f39 100644
@@ -301,7 +301,7 @@ struct tpm2_get_random_out {
  *
  * Return:
  *   size of the buffer on success,
- *   -errno otherwise
+ *   -errno otherwise (positive TPM return codes are masked to -EIO)
  */
 int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
 {
@@ -328,8 +328,11 @@ int tpm2_get_random(struct tpm_chip *chip, u8 *dest, size_t max)
 				       offsetof(struct tpm2_get_random_out,
 						buffer),
 				       "attempting get random");
-		if (err)
+		if (err) {
+			if (err > 0)
+				err = -EIO;
 			goto out;
+		}
 
 		out = (struct tpm2_get_random_out *)
 			&buf.data[TPM_HEADER_SIZE];
drivers/crypto/talitos.c +8 -8
index de78b54bcfb1..0fee83b2eb91 100644
@@ -2286,7 +2286,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.base = {
 				.cra_name = "authenc(hmac(sha1),cbc(aes))",
 				.cra_driver_name = "authenc-hmac-sha1-"
-						   "cbc-aes-talitos",
+						   "cbc-aes-talitos-hsna",
 				.cra_blocksize = AES_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2330,7 +2330,7 @@ static struct talitos_alg_template driver_algs[] = {
 				.cra_name = "authenc(hmac(sha1),"
 					    "cbc(des3_ede))",
 				.cra_driver_name = "authenc-hmac-sha1-"
-						   "cbc-3des-talitos",
+						   "cbc-3des-talitos-hsna",
 				.cra_blocksize = DES3_EDE_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2372,7 +2372,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.base = {
 				.cra_name = "authenc(hmac(sha224),cbc(aes))",
 				.cra_driver_name = "authenc-hmac-sha224-"
-						   "cbc-aes-talitos",
+						   "cbc-aes-talitos-hsna",
 				.cra_blocksize = AES_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2416,7 +2416,7 @@ static struct talitos_alg_template driver_algs[] = {
 				.cra_name = "authenc(hmac(sha224),"
 					    "cbc(des3_ede))",
 				.cra_driver_name = "authenc-hmac-sha224-"
-						   "cbc-3des-talitos",
+						   "cbc-3des-talitos-hsna",
 				.cra_blocksize = DES3_EDE_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2458,7 +2458,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.base = {
 				.cra_name = "authenc(hmac(sha256),cbc(aes))",
 				.cra_driver_name = "authenc-hmac-sha256-"
-						   "cbc-aes-talitos",
+						   "cbc-aes-talitos-hsna",
 				.cra_blocksize = AES_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2502,7 +2502,7 @@ static struct talitos_alg_template driver_algs[] = {
 				.cra_name = "authenc(hmac(sha256),"
 					    "cbc(des3_ede))",
 				.cra_driver_name = "authenc-hmac-sha256-"
-						   "cbc-3des-talitos",
+						   "cbc-3des-talitos-hsna",
 				.cra_blocksize = DES3_EDE_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2628,7 +2628,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.base = {
 				.cra_name = "authenc(hmac(md5),cbc(aes))",
 				.cra_driver_name = "authenc-hmac-md5-"
-						   "cbc-aes-talitos",
+						   "cbc-aes-talitos-hsna",
 				.cra_blocksize = AES_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
@@ -2670,7 +2670,7 @@ static struct talitos_alg_template driver_algs[] = {
 			.base = {
 				.cra_name = "authenc(hmac(md5),cbc(des3_ede))",
 				.cra_driver_name = "authenc-hmac-md5-"
-						   "cbc-3des-talitos",
+						   "cbc-3des-talitos-hsna",
 				.cra_blocksize = DES3_EDE_BLOCK_SIZE,
 				.cra_flags = CRYPTO_ALG_ASYNC,
 			},
drivers/gpu/drm/drm_bufs.c +4 -1
index e407adb033e7..4fbc34425570 100644
@@ -1332,7 +1332,10 @@ static int copy_one_buf(void *data, int count, struct drm_buf_entry *from)
 				 .size = from->buf_size,
 				 .low_mark = from->low_mark,
 				 .high_mark = from->high_mark};
-	return copy_to_user(to, &v, offsetof(struct drm_buf_desc, flags));
+
+	if (copy_to_user(to, &v, offsetof(struct drm_buf_desc, flags)))
+		return -EFAULT;
+	return 0;
 }
 
 int drm_legacy_infobufs(struct drm_device *dev, void *data,
drivers/gpu/drm/drm_ioc32.c +4 -1
index 0e3043e08c69..f8672238d444 100644
@@ -372,7 +372,10 @@ static int copy_one_buf32(void *data, int count, struct drm_buf_entry *from)
 			      .size = from->buf_size,
 			      .low_mark = from->low_mark,
 			      .high_mark = from->high_mark};
-	return copy_to_user(to + count, &v, offsetof(drm_buf_desc32_t, flags));
+
+	if (copy_to_user(to + count, &v, offsetof(drm_buf_desc32_t, flags)))
+		return -EFAULT;
+	return 0;
 }
 
 static int drm_legacy_infobufs32(struct drm_device *dev, void *data,
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +3 -0
index 9d2e1ce5c0a6..b77374ea3825 100644
@@ -747,6 +747,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 	if (unlikely(ret != 0))
 		goto out_err0;
 
+	dma_set_max_seg_size(dev->dev, min_t(unsigned int, U32_MAX & PAGE_MASK,
+					     SCATTERLIST_MAX_SEGMENT));
+
 	if (dev_priv->capabilities & SVGA_CAP_GMR2) {
 		DRM_INFO("Max GMR ids is %u\n",
 			 (unsigned)dev_priv->max_gmr_ids);
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +5 -5
index a3357ff7540d..97adee1f0575 100644
@@ -454,11 +454,11 @@ static int vmw_ttm_map_dma(struct vmw_ttm_tt *vmw_tt)
 		if (unlikely(ret != 0))
 			return ret;
 
-		ret = sg_alloc_table_from_pages(&vmw_tt->sgt, vsgt->pages,
-						vsgt->num_pages, 0,
-						(unsigned long)
-						vsgt->num_pages << PAGE_SHIFT,
-						GFP_KERNEL);
+		ret = __sg_alloc_table_from_pages
+			(&vmw_tt->sgt, vsgt->pages, vsgt->num_pages, 0,
+			 (unsigned long) vsgt->num_pages << PAGE_SHIFT,
+			 dma_get_max_seg_size(dev_priv->dev->dev),
+			 GFP_KERNEL);
 		if (unlikely(ret != 0))
 			goto out_sg_alloc_fail;
 
drivers/gpu/ipu-v3/ipu-image-convert.c +27 -13
index 13103ab86050..e9803e2151f9 100644
@@ -409,12 +409,14 @@ static int calc_image_resize_coefficients(struct ipu_image_convert_ctx *ctx,
 	if (WARN_ON(resized_width == 0 || resized_height == 0))
 		return -EINVAL;
 
-	while (downsized_width >= resized_width * 2) {
+	while (downsized_width > 1024 ||
+	       downsized_width >= resized_width * 2) {
 		downsized_width >>= 1;
 		downsize_coeff_h++;
 	}
 
-	while (downsized_height >= resized_height * 2) {
+	while (downsized_height > 1024 ||
+	       downsized_height >= resized_height * 2) {
 		downsized_height >>= 1;
 		downsize_coeff_v++;
 	}
@@ -1885,7 +1887,8 @@ void ipu_image_convert_adjust(struct ipu_image *in, struct ipu_image *out,
 			      enum ipu_rotate_mode rot_mode)
 {
 	const struct ipu_image_pixfmt *infmt, *outfmt;
-	u32 w_align, h_align;
+	u32 w_align_out, h_align_out;
+	u32 w_align_in, h_align_in;
 
 	infmt = get_format(in->pix.pixelformat);
 	outfmt = get_format(out->pix.pixelformat);
@@ -1917,22 +1920,33 @@ void ipu_image_convert_adjust(struct ipu_image *in, struct ipu_image *out,
 	}
 
 	/* align input width/height */
-	w_align = ilog2(tile_width_align(IMAGE_CONVERT_IN, infmt, rot_mode));
-	h_align = ilog2(tile_height_align(IMAGE_CONVERT_IN, infmt, rot_mode));
-	in->pix.width = clamp_align(in->pix.width, MIN_W, MAX_W, w_align);
-	in->pix.height = clamp_align(in->pix.height, MIN_H, MAX_H, h_align);
+	w_align_in = ilog2(tile_width_align(IMAGE_CONVERT_IN, infmt,
+					    rot_mode));
+	h_align_in = ilog2(tile_height_align(IMAGE_CONVERT_IN, infmt,
+					     rot_mode));
+	in->pix.width = clamp_align(in->pix.width, MIN_W, MAX_W,
+				    w_align_in);
+	in->pix.height = clamp_align(in->pix.height, MIN_H, MAX_H,
+				     h_align_in);
 
 	/* align output width/height */
-	w_align = ilog2(tile_width_align(IMAGE_CONVERT_OUT, outfmt, rot_mode));
-	h_align = ilog2(tile_height_align(IMAGE_CONVERT_OUT, outfmt, rot_mode));
-	out->pix.width = clamp_align(out->pix.width, MIN_W, MAX_W, w_align);
-	out->pix.height = clamp_align(out->pix.height, MIN_H, MAX_H, h_align);
+	w_align_out = ilog2(tile_width_align(IMAGE_CONVERT_OUT, outfmt,
+					     rot_mode));
+	h_align_out = ilog2(tile_height_align(IMAGE_CONVERT_OUT, outfmt,
+					      rot_mode));
+	out->pix.width = clamp_align(out->pix.width, MIN_W, MAX_W,
+				     w_align_out);
+	out->pix.height = clamp_align(out->pix.height, MIN_H, MAX_H,
+				      h_align_out);
 
 	/* set input/output strides and image sizes */
 	in->pix.bytesperline = infmt->planar ?
-		clamp_align(in->pix.width, 2 << w_align, MAX_W, w_align) :
+		clamp_align(in->pix.width, 2 << w_align_in, MAX_W,
+			    w_align_in) :
 		clamp_align((in->pix.width * infmt->bpp) >> 3,
-			    2 << w_align, MAX_W, w_align);
+			    ((2 << w_align_in) * infmt->bpp) >> 3,
+			    (MAX_W * infmt->bpp) >> 3,
+			    w_align_in);
 	in->pix.sizeimage = infmt->planar ?
 		(in->pix.height * in->pix.bytesperline * infmt->bpp) >> 3 :
 		in->pix.height * in->pix.bytesperline;
drivers/hid/hid-ids.h +1 -0
index adce58f24f76..6537086fb145 100644
@@ -1235,6 +1235,7 @@
 #define USB_DEVICE_ID_PRIMAX_KEYBOARD	0x4e05
 #define USB_DEVICE_ID_PRIMAX_REZEL	0x4e72
 #define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D0F	0x4d0f
+#define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D65	0x4d65
 #define USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4E22	0x4e22
 
 
drivers/hid/hid-quirks.c +1 -0
index 77ffba48cc73..189bf68eb35c 100644
@@ -132,6 +132,7 @@ static const struct hid_device_id hid_quirks[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PIXART, USB_DEVICE_ID_PIXART_USB_OPTICAL_MOUSE), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_MOUSE_4D22), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D0F), HID_QUIRK_ALWAYS_POLL },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4D65), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_PIXART_MOUSE_4E22), HID_QUIRK_ALWAYS_POLL },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_PRODIGE, USB_DEVICE_ID_PRODIGE_CORDLESS), HID_QUIRK_NOGET },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001), HID_QUIRK_NOGET },
drivers/iio/adc/stm32-adc-core.c +20 -1
index 2327ec18b40c..1f7ce5186dfc 100644
@@ -87,6 +87,7 @@ struct stm32_adc_priv_cfg {
  * @domain:		irq domain reference
  * @aclk:		clock reference for the analog circuitry
  * @bclk:		bus clock common for all ADCs, depends on part used
+ * @vdda:		vdda analog supply reference
  * @vref:		regulator reference
  * @cfg:		compatible configuration data
  * @common:		common data for all ADC instances
@@ -97,6 +98,7 @@ struct stm32_adc_priv {
 	struct irq_domain		*domain;
 	struct clk			*aclk;
 	struct clk			*bclk;
+	struct regulator		*vdda;
 	struct regulator		*vref;
 	const struct stm32_adc_priv_cfg	*cfg;
 	struct stm32_adc_common		common;
@@ -394,10 +396,16 @@ static int stm32_adc_core_hw_start(struct device *dev)
 	struct stm32_adc_priv *priv = to_stm32_adc_priv(common);
 	int ret;
 
+	ret = regulator_enable(priv->vdda);
+	if (ret < 0) {
+		dev_err(dev, "vdda enable failed %d\n", ret);
+		return ret;
+	}
+
 	ret = regulator_enable(priv->vref);
 	if (ret < 0) {
 		dev_err(dev, "vref enable failed\n");
-		return ret;
+		goto err_vdda_disable;
 	}
 
 	if (priv->bclk) {
@@ -425,6 +433,8 @@ static int stm32_adc_core_hw_start(struct device *dev)
 		clk_disable_unprepare(priv->bclk);
 err_regulator_disable:
 	regulator_disable(priv->vref);
+err_vdda_disable:
+	regulator_disable(priv->vdda);
 
 	return ret;
 }
@@ -441,6 +451,7 @@ static void stm32_adc_core_hw_stop(struct device *dev)
 	if (priv->bclk)
 		clk_disable_unprepare(priv->bclk);
 	regulator_disable(priv->vref);
+	regulator_disable(priv->vdda);
 }
 
 static int stm32_adc_probe(struct platform_device *pdev)
@@ -468,6 +479,14 @@ static int stm32_adc_probe(struct platform_device *pdev)
 		return PTR_ERR(priv->common.base);
 	priv->common.phys_base = res->start;
 
+	priv->vdda = devm_regulator_get(&pdev->dev, "vdda");
+	if (IS_ERR(priv->vdda)) {
+		ret = PTR_ERR(priv->vdda);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "vdda get failed, %d\n", ret);
+		return ret;
+	}
+
 	priv->vref = devm_regulator_get(&pdev->dev, "vref");
 	if (IS_ERR(priv->vref)) {
 		ret = PTR_ERR(priv->vref);
drivers/infiniband/hw/hfi1/hfi.h +31 -0
index 048b5d73ba39..d85b16a3aaaf 100644
@@ -539,6 +539,37 @@ static inline void hfi1_16B_set_qpn(struct opa_16b_mgmt *mgmt,
 	mgmt->src_qpn = cpu_to_be32(src_qp & OPA_16B_MGMT_QPN_MASK);
 }
 
+/**
+ * hfi1_get_rc_ohdr - get extended header
+ * @opah - the opaheader
+ */
+static inline struct ib_other_headers *
+hfi1_get_rc_ohdr(struct hfi1_opa_header *opah)
+{
+	struct ib_other_headers *ohdr;
+	struct ib_header *hdr = NULL;
+	struct hfi1_16b_header *hdr_16b = NULL;
+
+	/* Find out where the BTH is */
+	if (opah->hdr_type == HFI1_PKT_TYPE_9B) {
+		hdr = &opah->ibh;
+		if (ib_get_lnh(hdr) == HFI1_LRH_BTH)
+			ohdr = &hdr->u.oth;
+		else
+			ohdr = &hdr->u.l.oth;
+	} else {
+		u8 l4;
+
+		hdr_16b = &opah->opah;
+		l4  = hfi1_16B_get_l4(hdr_16b);
+		if (l4 == OPA_16B_L4_IB_LOCAL)
+			ohdr = &hdr_16b->u.oth;
+		else
+			ohdr = &hdr_16b->u.l.oth;
+	}
+	return ohdr;
+}
+
 struct rvt_sge_state;
 
 /*
drivers/infiniband/hw/hfi1/pio.c +19 -2
index a1de566fe95e..17ea224fbecb 100644
@@ -952,6 +952,22 @@ void sc_disable(struct send_context *sc)
 		}
 	}
 	spin_unlock(&sc->release_lock);
+
+	write_seqlock(&sc->waitlock);
+	while (!list_empty(&sc->piowait)) {
+		struct iowait *wait;
+		struct rvt_qp *qp;
+		struct hfi1_qp_priv *priv;
+
+		wait = list_first_entry(&sc->piowait, struct iowait, list);
+		qp = iowait_to_qp(wait);
+		priv = qp->priv;
+		list_del_init(&priv->s_iowait.list);
+		priv->s_iowait.lock = NULL;
+		hfi1_qp_wakeup(qp, RVT_S_WAIT_PIO | HFI1_S_WAIT_PIO_DRAIN);
+	}
+	write_sequnlock(&sc->waitlock);
+
 	spin_unlock_irq(&sc->alloc_lock);
 }
 
@@ -1427,7 +1443,8 @@ void sc_stop(struct send_context *sc, int flag)
  * @cb: optional callback to call when the buffer is finished sending
  * @arg: argument for cb
  *
- * Return a pointer to a PIO buffer if successful, NULL if not enough room.
+ * Return a pointer to a PIO buffer, NULL if not enough room, -ECOMM
+ * when link is down.
  */
 struct pio_buf *sc_buffer_alloc(struct send_context *sc, u32 dw_len,
 				pio_release_cb cb, void *arg)
@@ -1443,7 +1460,7 @@ struct pio_buf *sc_buffer_alloc(struct send_context *sc, u32 dw_len,
 	spin_lock_irqsave(&sc->alloc_lock, flags);
 	if (!(sc->flags & SCF_ENABLED)) {
 		spin_unlock_irqrestore(&sc->alloc_lock, flags);
-		goto done;
+		return ERR_PTR(-ECOMM);
 	}
 
 retry:
drivers/infiniband/hw/hfi1/rc.c +32 -21

77 lines not on this page · raw message

drivers/infiniband/hw/hfi1/sdma.c +17 -0
index 70828de7436b..28b66bd70b74 100644
@@ -405,6 +405,7 @@ static void sdma_flush(struct sdma_engine *sde)
 	struct sdma_txreq *txp, *txp_next;
 	LIST_HEAD(flushlist);
 	unsigned long flags;
+	uint seq;
 
 	/* flush from head to tail */
 	sdma_flush_descq(sde);
@@ -415,6 +416,22 @@ static void sdma_flush(struct sdma_engine *sde)
 	/* flush from flush list */
 	list_for_each_entry_safe(txp, txp_next, &flushlist, list)
 		complete_tx(sde, txp, SDMA_TXREQ_S_ABORTED);
+	/* wakeup QPs orphaned on the dmawait list */
+	do {
+		struct iowait *w, *nw;
+
+		seq = read_seqbegin(&sde->waitlock);
+		if (!list_empty(&sde->dmawait)) {
+			write_seqlock(&sde->waitlock);
+			list_for_each_entry_safe(w, nw, &sde->dmawait, list) {
+				if (w->wakeup) {
+					w->wakeup(w, SDMA_AVAIL_REASON);
+					list_del_init(&w->list);
+				}
+			}
+			write_sequnlock(&sde->waitlock);
+		}
+	} while (read_seqretry(&sde->waitlock, seq));
 }
 
 /*
drivers/infiniband/hw/hfi1/ud.c +2 -2
index f88ad425664a..4cb0fce5c096 100644
@@ -683,7 +683,7 @@ void return_cnp_16B(struct hfi1_ibport *ibp, struct rvt_qp *qp,
 	pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen);
 	if (ctxt) {
 		pbuf = sc_buffer_alloc(ctxt, plen, NULL, NULL);
-		if (pbuf) {
+		if (!IS_ERR_OR_NULL(pbuf)) {
 			trace_pio_output_ibhdr(ppd->dd, &hdr, sc5);
 			ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc,
 						 &hdr, hwords);
@@ -738,7 +738,7 @@ void return_cnp(struct hfi1_ibport *ibp, struct rvt_qp *qp, u32 remote_qpn,
 	pbc = create_pbc(ppd, pbc_flags, qp->srate_mbps, vl, plen);
 	if (ctxt) {
 		pbuf = sc_buffer_alloc(ctxt, plen, NULL, NULL);
-		if (pbuf) {
+		if (!IS_ERR_OR_NULL(pbuf)) {
 			trace_pio_output_ibhdr(ppd->dd, &hdr, sc5);
 			ppd->dd->pio_inline_send(ppd->dd, pbuf, pbc,
 						 &hdr, hwords);
drivers/infiniband/hw/hfi1/verbs.c +8 -6
index ea68eeba3f22..117e73cd69d7 100644
@@ -638,6 +638,8 @@ static void verbs_sdma_complete(
 		struct hfi1_opa_header *hdr;
 
 		hdr = &tx->phdr.hdr;
+		if (unlikely(status == SDMA_TXREQ_S_ABORTED))
+			hfi1_rc_verbs_aborted(qp, hdr);
 		hfi1_rc_send_complete(qp, hdr);
 	}
 	spin_unlock(&qp->s_lock);
@@ -1037,10 +1039,10 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
 	if (cb)
 		iowait_pio_inc(&priv->s_iowait);
 	pbuf = sc_buffer_alloc(sc, plen, cb, qp);
-	if (unlikely(!pbuf)) {
+	if (unlikely(IS_ERR_OR_NULL(pbuf))) {
 		if (cb)
 			verbs_pio_complete(qp, 0);
-		if (ppd->host_link_state != HLS_UP_ACTIVE) {
+		if (IS_ERR(pbuf)) {
 			/*
 			 * If we have filled the PIO buffers to capacity and are
 			 * not in an active state this request is not going to
@@ -1095,15 +1097,15 @@ int hfi1_verbs_send_pio(struct rvt_qp *qp, struct hfi1_pkt_state *ps,
 			       &ps->s_txreq->phdr.hdr, ib_is_sc5(sc5));
 
 pio_bail:
+	spin_lock_irqsave(&qp->s_lock, flags);
 	if (qp->s_wqe) {
-		spin_lock_irqsave(&qp->s_lock, flags);
 		rvt_send_complete(qp, qp->s_wqe, wc_status);
-		spin_unlock_irqrestore(&qp->s_lock, flags);
 	} else if (qp->ibqp.qp_type == IB_QPT_RC) {
-		spin_lock_irqsave(&qp->s_lock, flags);
+		if (unlikely(wc_status == IB_WC_GENERAL_ERR))
+			hfi1_rc_verbs_aborted(qp, &ps->s_txreq->phdr.hdr);
 		hfi1_rc_send_complete(qp, &ps->s_txreq->phdr.hdr);
-		spin_unlock_irqrestore(&qp->s_lock, flags);
 	}
+	spin_unlock_irqrestore(&qp->s_lock, flags);
 
 	ret = 0;
 
drivers/infiniband/hw/hfi1/verbs.h +1 -0
index 62ace0b2d17a..1714c0f6475d 100644
@@ -415,6 +415,7 @@ void hfi1_rc_hdrerr(
 
 u8 ah_to_sc(struct ib_device *ibdev, struct rdma_ah_attr *ah_attr);
 
+void hfi1_rc_verbs_aborted(struct rvt_qp *qp, struct hfi1_opa_header *opah);
 void hfi1_rc_send_complete(struct rvt_qp *qp, struct hfi1_opa_header *opah);
 
 void hfi1_ud_rcv(struct hfi1_packet *packet);
drivers/input/keyboard/imx_keypad.c +14 -4
index 539cb670de41..ae9c51cc85f9 100644
@@ -526,11 +526,12 @@ static int imx_keypad_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static int __maybe_unused imx_kbd_suspend(struct device *dev)
+static int __maybe_unused imx_kbd_noirq_suspend(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx_keypad *kbd = platform_get_drvdata(pdev);
 	struct input_dev *input_dev = kbd->input_dev;
+	unsigned short reg_val = readw(kbd->mmio_base + KPSR);
 
 	/* imx kbd can wake up system even clock is disabled */
 	mutex_lock(&input_dev->mutex);
@@ -540,13 +541,20 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev)
 
 	mutex_unlock(&input_dev->mutex);
 
-	if (device_may_wakeup(&pdev->dev))
+	if (device_may_wakeup(&pdev->dev)) {
+		if (reg_val & KBD_STAT_KPKD)
+			reg_val |= KBD_STAT_KRIE;
+		if (reg_val & KBD_STAT_KPKR)
+			reg_val |= KBD_STAT_KDIE;
+		writew(reg_val, kbd->mmio_base + KPSR);
+
 		enable_irq_wake(kbd->irq);
+	}
 
 	return 0;
 }
 
-static int __maybe_unused imx_kbd_resume(struct device *dev)
+static int __maybe_unused imx_kbd_noirq_resume(struct device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev);
 	struct imx_keypad *kbd = platform_get_drvdata(pdev);
@@ -570,7 +578,9 @@ static int __maybe_unused imx_kbd_resume(struct device *dev)
 	return ret;
 }
 
-static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume);
+static const struct dev_pm_ops imx_kbd_pm_ops = {
+	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(imx_kbd_noirq_suspend, imx_kbd_noirq_resume)
+};
 
 static struct platform_driver imx_keypad_driver = {
 	.driver		= {
drivers/input/mouse/elantech.c +2 -0
index a7f8b1614559..530142b5a115 100644
@@ -1189,6 +1189,8 @@ static const char * const middle_button_pnp_ids[] = {
 	"LEN2132", /* ThinkPad P52 */
 	"LEN2133", /* ThinkPad P72 w/ NFC */
 	"LEN2134", /* ThinkPad P72 */
+	"LEN0407",
+	"LEN0408",
 	NULL
 };
 
drivers/md/md.c +22 -14
index 295ff09cff4c..84aec3647994 100644
@@ -7617,9 +7617,9 @@ static void status_unused(struct seq_file *seq)
 static int status_resync(struct seq_file *seq, struct mddev *mddev)
 {
 	sector_t max_sectors, resync, res;
-	unsigned long dt, db;
-	sector_t rt;
-	int scale;
+	unsigned long dt, db = 0;
+	sector_t rt, curr_mark_cnt, resync_mark_cnt;
+	int scale, recovery_active;
 	unsigned int per_milli;
 
 	if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery) ||
@@ -7708,22 +7708,30 @@ static int status_resync(struct seq_file *seq, struct mddev *mddev)
 	 * db: blocks written from mark until now
 	 * rt: remaining time
 	 *
-	 * rt is a sector_t, so could be 32bit or 64bit.
-	 * So we divide before multiply in case it is 32bit and close
-	 * to the limit.
-	 * We scale the divisor (db) by 32 to avoid losing precision
-	 * near the end of resync when the number of remaining sectors
-	 * is close to 'db'.
-	 * We then divide rt by 32 after multiplying by db to compensate.
-	 * The '+1' avoids division by zero if db is very small.
+	 * rt is a sector_t, which is always 64bit now. We are keeping
+	 * the original algorithm, but it is not really necessary.
+	 *
+	 * Original algorithm:
+	 *   So we divide before multiply in case it is 32bit and close
+	 *   to the limit.
+	 *   We scale the divisor (db) by 32 to avoid losing precision
+	 *   near the end of resync when the number of remaining sectors
+	 *   is close to 'db'.
+	 *   We then divide rt by 32 after multiplying by db to compensate.
+	 *   The '+1' avoids division by zero if db is very small.
 	 */
 	dt = ((jiffies - mddev->resync_mark) / HZ);
 	if (!dt) dt++;
-	db = (mddev->curr_mark_cnt - atomic_read(&mddev->recovery_active))
-		- mddev->resync_mark_cnt;
+
+	curr_mark_cnt = mddev->curr_mark_cnt;
+	recovery_active = atomic_read(&mddev->recovery_active);
+	resync_mark_cnt = mddev->resync_mark_cnt;
+
+	if (curr_mark_cnt >= (recovery_active + resync_mark_cnt))
+		db = curr_mark_cnt - (recovery_active + resync_mark_cnt);
 
 	rt = max_sectors - resync;    /* number of remaining sectors */
-	sector_div(rt, db/32+1);
+	rt = div64_u64(rt, db/32+1);
 	rt *= dt;
 	rt >>= 5;
 
drivers/media/dvb-frontends/stv0297.c +1 -1
index 9a9915f71483..3ef31a3a27ff 100644
@@ -694,7 +694,7 @@ static const struct dvb_frontend_ops stv0297_ops = {
 	.delsys = { SYS_DVBC_ANNEX_A },
 	.info = {
 		 .name = "ST STV0297 DVB-C",
-		 .frequency_min_hz = 470 * MHz,
+		 .frequency_min_hz = 47 * MHz,
 		 .frequency_max_hz = 862 * MHz,
 		 .frequency_stepsize_hz = 62500,
 		 .symbol_rate_min = 870000,
drivers/misc/lkdtm/Makefile +1 -2
index 951c984de61a..fb10eafe9bde 100644
@@ -15,8 +15,7 @@ KCOV_INSTRUMENT_rodata.o	:= n
 
 OBJCOPYFLAGS :=
 OBJCOPYFLAGS_rodata_objcopy.o	:= \
-			--set-section-flags .text=alloc,readonly \
-			--rename-section .text=.rodata
+			--rename-section .text=.rodata,alloc,readonly,load
 targets += rodata.o rodata_objcopy.o
 $(obj)/rodata_objcopy.o: $(obj)/rodata.o FORCE
 	$(call if_changed,objcopy)
drivers/misc/vmw_vmci/vmci_context.c +45 -35

152 lines not on this page · raw message

drivers/misc/vmw_vmci/vmci_handle_array.c +25 -13
index 344973a0fb0a..917e18a8af95 100644
@@ -16,24 +16,29 @@
 #include <linux/slab.h>
 #include "vmci_handle_array.h"
 
-static size_t handle_arr_calc_size(size_t capacity)
+static size_t handle_arr_calc_size(u32 capacity)
 {
-	return sizeof(struct vmci_handle_arr) +
+	return VMCI_HANDLE_ARRAY_HEADER_SIZE +
 	    capacity * sizeof(struct vmci_handle);
 }
 
-struct vmci_handle_arr *vmci_handle_arr_create(size_t capacity)
+struct vmci_handle_arr *vmci_handle_arr_create(u32 capacity, u32 max_capacity)
 {
 	struct vmci_handle_arr *array;
 
+	if (max_capacity == 0 || capacity > max_capacity)
+		return NULL;
+
 	if (capacity == 0)
-		capacity = VMCI_HANDLE_ARRAY_DEFAULT_SIZE;
+		capacity = min((u32)VMCI_HANDLE_ARRAY_DEFAULT_CAPACITY,
+			       max_capacity);
 
 	array = kmalloc(handle_arr_calc_size(capacity), GFP_ATOMIC);
 	if (!array)
 		return NULL;
 
 	array->capacity = capacity;
+	array->max_capacity = max_capacity;
 	array->size = 0;
 
 	return array;
@@ -44,27 +49,34 @@ void vmci_handle_arr_destroy(struct vmci_handle_arr *array)
 	kfree(array);
 }
 
-void vmci_handle_arr_append_entry(struct vmci_handle_arr **array_ptr,
-				  struct vmci_handle handle)
+int vmci_handle_arr_append_entry(struct vmci_handle_arr **array_ptr,
+				 struct vmci_handle handle)
 {
 	struct vmci_handle_arr *array = *array_ptr;
 
 	if (unlikely(array->size >= array->capacity)) {
 		/* reallocate. */
 		struct vmci_handle_arr *new_array;
-		size_t new_capacity = array->capacity * VMCI_ARR_CAP_MULT;
-		size_t new_size = handle_arr_calc_size(new_capacity);
+		u32 capacity_bump = min(array->max_capacity - array->capacity,
+					array->capacity);
+		size_t new_size = handle_arr_calc_size(array->capacity +
+						       capacity_bump);
+
+		if (array->size >= array->max_capacity)
+			return VMCI_ERROR_NO_MEM;
 
 		new_array = krealloc(array, new_size, GFP_ATOMIC);
 		if (!new_array)
-			return;
+			return VMCI_ERROR_NO_MEM;
 
-		new_array->capacity = new_capacity;
+		new_array->capacity += capacity_bump;
 		*array_ptr = array = new_array;
 	}
 
 	array->entries[array->size] = handle;
 	array->size++;
+
+	return VMCI_SUCCESS;
 }
 
 /*
@@ -74,7 +86,7 @@ struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array,
 						struct vmci_handle entry_handle)
 {
 	struct vmci_handle handle = VMCI_INVALID_HANDLE;
-	size_t i;
+	u32 i;
 
 	for (i = 0; i < array->size; i++) {
 		if (vmci_handle_is_equal(array->entries[i], entry_handle)) {
@@ -109,7 +121,7 @@ struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array)
  * Handle at given index, VMCI_INVALID_HANDLE if invalid index.
  */
 struct vmci_handle
-vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, size_t index)
+vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index)
 {
 	if (unlikely(index >= array->size))
 		return VMCI_INVALID_HANDLE;
@@ -120,7 +132,7 @@ vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, size_t index)
 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array,
 			       struct vmci_handle entry_handle)
 {
-	size_t i;
+	u32 i;
 
 	for (i = 0; i < array->size; i++)
 		if (vmci_handle_is_equal(array->entries[i], entry_handle))
drivers/misc/vmw_vmci/vmci_handle_array.h +19 -10
index b5f3a7f98cf1..0fc58597820e 100644
@@ -17,32 +17,41 @@
 #define _VMCI_HANDLE_ARRAY_H_
 
 #include <linux/vmw_vmci_defs.h>
+#include <linux/limits.h>
 #include <linux/types.h>
 
-#define VMCI_HANDLE_ARRAY_DEFAULT_SIZE 4
-#define VMCI_ARR_CAP_MULT 2	/* Array capacity multiplier */
-
 struct vmci_handle_arr {
-	size_t capacity;
-	size_t size;
+	u32 capacity;
+	u32 max_capacity;
+	u32 size;
+	u32 pad;
 	struct vmci_handle entries[];
 };
 
-struct vmci_handle_arr *vmci_handle_arr_create(size_t capacity);
+#define VMCI_HANDLE_ARRAY_HEADER_SIZE				\
+	offsetof(struct vmci_handle_arr, entries)
+/* Select a default capacity that results in a 64 byte sized array */
+#define VMCI_HANDLE_ARRAY_DEFAULT_CAPACITY			6
+/* Make sure that the max array size can be expressed by a u32 */
+#define VMCI_HANDLE_ARRAY_MAX_CAPACITY				\
+	((U32_MAX - VMCI_HANDLE_ARRAY_HEADER_SIZE - 1) /	\
+	sizeof(struct vmci_handle))
+
+struct vmci_handle_arr *vmci_handle_arr_create(u32 capacity, u32 max_capacity);
 void vmci_handle_arr_destroy(struct vmci_handle_arr *array);
-void vmci_handle_arr_append_entry(struct vmci_handle_arr **array_ptr,
-				  struct vmci_handle handle);
+int vmci_handle_arr_append_entry(struct vmci_handle_arr **array_ptr,
+				 struct vmci_handle handle);
 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array,
 						struct vmci_handle
 						entry_handle);
 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array);
 struct vmci_handle
-vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, size_t index);
+vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index);
 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array,
 			       struct vmci_handle entry_handle);
 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array);
 
-static inline size_t vmci_handle_arr_get_size(
+static inline u32 vmci_handle_arr_get_size(
 	const struct vmci_handle_arr *array)
 {
 	return array->size;
drivers/mmc/core/mmc.c +3 -3
index 3e786ba204c3..671bfcceea6a 100644
@@ -1212,13 +1212,13 @@ static int mmc_select_hs400(struct mmc_card *card)
 	mmc_set_timing(host, MMC_TIMING_MMC_HS400);
 	mmc_set_bus_speed(card);
 
+	if (host->ops->hs400_complete)
+		host->ops->hs400_complete(host);
+
 	err = mmc_switch_status(card);
 	if (err)
 		goto out_err;
 
-	if (host->ops->hs400_complete)
-		host->ops->hs400_complete(host);
-
 	return 0;
 
 out_err:
drivers/net/can/flexcan.c +0 -3
index f97c628eb2ad..f2fe344593d5 100644
@@ -1583,9 +1583,6 @@ static int flexcan_probe(struct platform_device *pdev)
 			dev_dbg(&pdev->dev, "failed to setup stop-mode\n");
 	}
 
-	dev_info(&pdev->dev, "device registered (reg_base=%p, irq=%d)\n",
-		 priv->regs, dev->irq);
-
 	return 0;
 
  failed_register:
drivers/net/can/m_can/m_can.c +21 -0
index 9b449400376b..deb274a19ba0 100644
@@ -822,6 +822,27 @@ static int m_can_poll(struct napi_struct *napi, int quota)
 	if (!irqstatus)
 		goto end;
 
+	/* Errata workaround for issue "Needless activation of MRAF irq"
+	 * During frame reception while the MCAN is in Error Passive state
+	 * and the Receive Error Counter has the value MCAN_ECR.REC = 127,
+	 * it may happen that MCAN_IR.MRAF is set although there was no
+	 * Message RAM access failure.
+	 * If MCAN_IR.MRAF is enabled, an interrupt to the Host CPU is generated
+	 * The Message RAM Access Failure interrupt routine needs to check
+	 * whether MCAN_ECR.RP = ’1’ and MCAN_ECR.REC = 127.
+	 * In this case, reset MCAN_IR.MRAF. No further action is required.
+	 */
+	if ((priv->version <= 31) && (irqstatus & IR_MRAF) &&
+	    (m_can_read(priv, M_CAN_ECR) & ECR_RP)) {
+		struct can_berr_counter bec;
+
+		__m_can_get_berr_counter(dev, &bec);
+		if (bec.rxerr == 127) {
+			m_can_write(priv, M_CAN_IR, IR_MRAF);
+			irqstatus &= ~IR_MRAF;
+		}
+	}
+
 	psr = m_can_read(priv, M_CAN_PSR);
 	if (irqstatus & IR_ERR_STATE)
 		work_done += m_can_handle_state_errors(dev, psr);
drivers/net/can/spi/Kconfig +3 -2
index 8f2e0dd7b756..792e9c6c4a2f 100644
@@ -8,9 +8,10 @@ config CAN_HI311X
 	  Driver for the Holt HI311x SPI CAN controllers.
 
 config CAN_MCP251X
-	tristate "Microchip MCP251x SPI CAN controllers"
+	tristate "Microchip MCP251x and MCP25625 SPI CAN controllers"
 	depends on HAS_DMA
 	---help---
-	  Driver for the Microchip MCP251x SPI CAN controllers.
+	  Driver for the Microchip MCP251x and MCP25625 SPI CAN
+	  controllers.
 
 endmenu
drivers/net/can/spi/mcp251x.c +16 -9
index e90817608645..da64e71a62ee 100644
@@ -1,5 +1,5 @@
 /*
- * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
+ * CAN bus driver for Microchip 251x/25625 CAN Controller with SPI Interface
  *
  * MCP2510 support and bug fixes by Christian Pellegrin
  * <[email protected]>
@@ -41,7 +41,7 @@
  * static struct spi_board_info spi_board_info[] = {
  *         {
  *                 .modalias = "mcp2510",
- *			// or "mcp2515" depending on your controller
+ *			// "mcp2515" or "mcp25625" depending on your controller
  *                 .platform_data = &mcp251x_info,
  *                 .irq = IRQ_EINT13,
  *                 .max_speed_hz = 2*1000*1000,
@@ -238,6 +238,7 @@ static const struct can_bittiming_const mcp251x_bittiming_const = {
 enum mcp251x_model {
 	CAN_MCP251X_MCP2510	= 0x2510,
 	CAN_MCP251X_MCP2515	= 0x2515,
+	CAN_MCP251X_MCP25625	= 0x25625,
 };
 
 struct mcp251x_priv {
@@ -280,7 +281,6 @@ static inline int mcp251x_is_##_model(struct spi_device *spi) \
 }
 
 MCP251X_IS(2510);
-MCP251X_IS(2515);
 
 static void mcp251x_clean(struct net_device *net)
 {
@@ -639,7 +639,7 @@ static int mcp251x_hw_reset(struct spi_device *spi)
 
 	/* Wait for oscillator startup timer after reset */
 	mdelay(MCP251X_OST_DELAY_MS);
-	
+
 	reg = mcp251x_read_reg(spi, CANSTAT);
 	if ((reg & CANCTRL_REQOP_MASK) != CANCTRL_REQOP_CONF)
 		return -ENODEV;
@@ -820,9 +820,8 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
 		/* receive buffer 0 */
 		if (intf & CANINTF_RX0IF) {
 			mcp251x_hw_rx(spi, 0);
-			/*
-			 * Free one buffer ASAP
-			 * (The MCP2515 does this automatically.)
+			/* Free one buffer ASAP
+			 * (The MCP2515/25625 does this automatically.)
 			 */
 			if (mcp251x_is_2510(spi))
 				mcp251x_write_bits(spi, CANINTF, CANINTF_RX0IF, 0x00);
@@ -831,7 +830,7 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
 		/* receive buffer 1 */
 		if (intf & CANINTF_RX1IF) {
 			mcp251x_hw_rx(spi, 1);
-			/* the MCP2515 does this automatically */
+			/* The MCP2515/25625 does this automatically. */
 			if (mcp251x_is_2510(spi))
 				clear_intf |= CANINTF_RX1IF;
 		}
@@ -1006,6 +1005,10 @@ static const struct of_device_id mcp251x_of_match[] = {
 		.compatible	= "microchip,mcp2515",
 		.data		= (void *)CAN_MCP251X_MCP2515,
 	},
+	{
+		.compatible	= "microchip,mcp25625",
+		.data		= (void *)CAN_MCP251X_MCP25625,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, mcp251x_of_match);
@@ -1019,6 +1022,10 @@ static const struct spi_device_id mcp251x_id_table[] = {
 		.name		= "mcp2515",
 		.driver_data	= (kernel_ulong_t)CAN_MCP251X_MCP2515,
 	},
+	{
+		.name		= "mcp25625",
+		.driver_data	= (kernel_ulong_t)CAN_MCP251X_MCP25625,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(spi, mcp251x_id_table);
@@ -1259,5 +1266,5 @@ module_spi_driver(mcp251x_can_driver);
 
 MODULE_AUTHOR("Chris Elston <[email protected]>, "
 	      "Christian Pellegrin <[email protected]>");
-MODULE_DESCRIPTION("Microchip 251x CAN driver");
+MODULE_DESCRIPTION("Microchip 251x/25625 CAN driver");
 MODULE_LICENSE("GPL v2");
drivers/net/dsa/mv88e6xxx/global1_vtu.c +1 -1
index 058326924f3e..7a6667e0b9f9 100644
@@ -419,7 +419,7 @@ int mv88e6185_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip,
 		 * VTU DBNum[7:4] are located in VTU Operation 11:8
 		 */
 		op |= entry->fid & 0x000f;
-		op |= (entry->fid & 0x00f0) << 8;
+		op |= (entry->fid & 0x00f0) << 4;
 	}
 
 	return mv88e6xxx_g1_vtu_op(chip, op);
drivers/net/ethernet/8390/Kconfig +1 -1
index f2f0264c58ba..443b34e2725f 100644
@@ -49,7 +49,7 @@ config XSURF100
 	tristate "Amiga XSurf 100 AX88796/NE2000 clone support"
 	depends on ZORRO
 	select AX88796
-	select ASIX_PHY
+	select AX88796B_PHY
 	help
 	  This driver is for the Individual Computers X-Surf 100 Ethernet
 	  card (based on the Asix AX88796 chip). If you have such a card,
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +2 -1
index 749d0ef44371..59f227fcc68b 100644
@@ -1609,7 +1609,8 @@ static int bnx2x_get_module_info(struct net_device *dev,
 	}
 
 	if (!sff8472_comp ||
-	    (diag_type & SFP_EEPROM_DIAG_ADDR_CHANGE_REQ)) {
+	    (diag_type & SFP_EEPROM_DIAG_ADDR_CHANGE_REQ) ||
+	    !(diag_type & SFP_EEPROM_DDM_IMPLEMENTED)) {
 		modinfo->type = ETH_MODULE_SFF_8079;
 		modinfo->eeprom_len = ETH_MODULE_SFF_8079_LEN;
 	} else {
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h +1 -0
index b7d251108c19..7115f5025664 100644
@@ -62,6 +62,7 @@
 #define SFP_EEPROM_DIAG_TYPE_ADDR		0x5c
 #define SFP_EEPROM_DIAG_TYPE_SIZE		1
 #define SFP_EEPROM_DIAG_ADDR_CHANGE_REQ		(1<<2)
+#define SFP_EEPROM_DDM_IMPLEMENTED		(1<<6)
 #define SFP_EEPROM_SFF_8472_COMP_ADDR		0x5e
 #define SFP_EEPROM_SFF_8472_COMP_SIZE		1
 
drivers/net/ethernet/cavium/liquidio/lio_core.c +1 -1
index 1c50c10b5a16..d7e805749a5b 100644
@@ -964,7 +964,7 @@ static void liquidio_schedule_droq_pkt_handlers(struct octeon_device *oct)
 
 			if (droq->ops.poll_mode) {
 				droq->ops.napi_fn(droq);
-				oct_priv->napi_mask |= (1 << oq_no);
+				oct_priv->napi_mask |= BIT_ULL(oq_no);
 			} else {
 				tasklet_schedule(&oct_priv->droq_tasklet);
 			}
drivers/net/ethernet/ibm/ibmvnic.c +12 -7
index 3dfb2d131eb7..0e4029c54241 100644
@@ -438,9 +438,10 @@ static int reset_rx_pools(struct ibmvnic_adapter *adapter)
 		if (rx_pool->buff_size != be64_to_cpu(size_array[i])) {
 			free_long_term_buff(adapter, &rx_pool->long_term_buff);
 			rx_pool->buff_size = be64_to_cpu(size_array[i]);
-			alloc_long_term_buff(adapter, &rx_pool->long_term_buff,
-					     rx_pool->size *
-					     rx_pool->buff_size);
+			rc = alloc_long_term_buff(adapter,
+						  &rx_pool->long_term_buff,
+						  rx_pool->size *
+						  rx_pool->buff_size);
 		} else {
 			rc = reset_long_term_buff(adapter,
 						  &rx_pool->long_term_buff);
@@ -706,9 +707,9 @@ static int init_tx_pools(struct net_device *netdev)
 			return rc;
 		}
 
-		init_one_tx_pool(netdev, &adapter->tso_pool[i],
-				 IBMVNIC_TSO_BUFS,
-				 IBMVNIC_TSO_BUF_SZ);
+		rc = init_one_tx_pool(netdev, &adapter->tso_pool[i],
+				      IBMVNIC_TSO_BUFS,
+				      IBMVNIC_TSO_BUF_SZ);
 		if (rc) {
 			release_tx_pools(adapter);
 			return rc;
@@ -1751,7 +1752,8 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 
 	ibmvnic_cleanup(netdev);
 
-	if (adapter->reset_reason != VNIC_RESET_MOBILITY &&
+	if (reset_state == VNIC_OPEN &&
+	    adapter->reset_reason != VNIC_RESET_MOBILITY &&
 	    adapter->reset_reason != VNIC_RESET_FAILOVER) {
 		rc = __ibmvnic_close(netdev);
 		if (rc)
@@ -1850,6 +1852,9 @@ static int do_reset(struct ibmvnic_adapter *adapter,
 		return 0;
 	}
 
+	/* refresh device's multicast list */
+	ibmvnic_set_multi(netdev);
+
 	/* kick napi */
 	for (i = 0; i < adapter->req_rx_queues; i++)
 		napi_schedule(&adapter->napi[i]);
drivers/net/ethernet/mellanox/mlxsw/reg.h +1 -1
index eb4c5e8964cd..5865597577d6 100644
@@ -997,7 +997,7 @@ static inline void mlxsw_reg_spaft_pack(char *payload, u8 local_port,
 	MLXSW_REG_ZERO(spaft, payload);
 	mlxsw_reg_spaft_local_port_set(payload, local_port);
 	mlxsw_reg_spaft_allow_untagged_set(payload, allow_untagged);
-	mlxsw_reg_spaft_allow_prio_tagged_set(payload, true);
+	mlxsw_reg_spaft_allow_prio_tagged_set(payload, allow_untagged);
 	mlxsw_reg_spaft_allow_tagged_set(payload, true);
 }
 
drivers/net/phy/Kconfig +1 -1
index 520657945b82..b0c13f8c2b62 100644
@@ -242,7 +242,7 @@ config AQUANTIA_PHY
 	---help---
 	  Currently supports the Aquantia AQ1202, AQ2104, AQR105, AQR405
 
-config ASIX_PHY
+config AX88796B_PHY
 	tristate "Asix PHYs"
 	help
 	  Currently supports the Asix Electronics PHY found in the X-Surf 100
drivers/net/phy/Makefile +1 -1
index ece5dae67174..6d44ab91fbf6 100644
@@ -51,7 +51,7 @@ ifdef CONFIG_HWMON
 aquantia-objs			+= aquantia_hwmon.o
 endif
 obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia.o
-obj-$(CONFIG_ASIX_PHY)		+= asix.o
+obj-$(CONFIG_AX88796B_PHY)	+= ax88796b.o
 obj-$(CONFIG_AT803X_PHY)	+= at803x.o
 obj-$(CONFIG_BCM63XX_PHY)	+= bcm63xx.o
 obj-$(CONFIG_BCM7XXX_PHY)	+= bcm7xxx.o
drivers/net/phy/asix.c deleted +0 -57

57 lines not on this page · raw message

drivers/net/phy/ax88796b.c new file +57 -0

57 lines not on this page · raw message

drivers/net/usb/qmi_wwan.c +18 -9
index e657d8947125..128c8a327d8e 100644
@@ -153,7 +153,7 @@ static bool qmimux_has_slaves(struct usbnet *dev)
 
 static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 {
-	unsigned int len, offset = 0;
+	unsigned int len, offset = 0, pad_len, pkt_len;
 	struct qmimux_hdr *hdr;
 	struct net_device *net;
 	struct sk_buff *skbn;
@@ -171,10 +171,16 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 		if (hdr->pad & 0x80)
 			goto skip;
 
+		/* extract padding length and check for valid length info */
+		pad_len = hdr->pad & 0x3f;
+		if (len == 0 || pad_len >= len)
+			goto skip;
+		pkt_len = len - pad_len;
+
 		net = qmimux_find_dev(dev, hdr->mux_id);
 		if (!net)
 			goto skip;
-		skbn = netdev_alloc_skb(net, len);
+		skbn = netdev_alloc_skb(net, pkt_len);
 		if (!skbn)
 			return 0;
 		skbn->dev = net;
@@ -191,7 +197,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 			goto skip;
 		}
 
-		skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, len);
+		skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, pkt_len);
 		if (netif_rx(skbn) != NET_RX_SUCCESS)
 			return 0;
 
@@ -241,13 +247,14 @@ static int qmimux_register_device(struct net_device *real_dev, u8 mux_id)
 	return err;
 }
 
-static void qmimux_unregister_device(struct net_device *dev)
+static void qmimux_unregister_device(struct net_device *dev,
+				     struct list_head *head)
 {
 	struct qmimux_priv *priv = netdev_priv(dev);
 	struct net_device *real_dev = priv->real_dev;
 
 	netdev_upper_dev_unlink(real_dev, dev);
-	unregister_netdevice(dev);
+	unregister_netdevice_queue(dev, head);
 
 	/* Get rid of the reference to real_dev */
 	dev_put(real_dev);
@@ -356,8 +363,8 @@ static ssize_t add_mux_store(struct device *d,  struct device_attribute *attr, c
 	if (kstrtou8(buf, 0, &mux_id))
 		return -EINVAL;
 
-	/* mux_id [1 - 0x7f] range empirically found */
-	if (mux_id < 1 || mux_id > 0x7f)
+	/* mux_id [1 - 254] for compatibility with ip(8) and the rmnet driver */
+	if (mux_id < 1 || mux_id > 254)
 		return -EINVAL;
 
 	if (!rtnl_trylock())
@@ -418,7 +425,7 @@ static ssize_t del_mux_store(struct device *d,  struct device_attribute *attr, c
 		ret = -EINVAL;
 		goto err;
 	}
-	qmimux_unregister_device(del_dev);
+	qmimux_unregister_device(del_dev, NULL);
 
 	if (!qmimux_has_slaves(dev))
 		info->flags &= ~QMI_WWAN_FLAG_MUX;
@@ -1428,6 +1435,7 @@ static void qmi_wwan_disconnect(struct usb_interface *intf)
 	struct qmi_wwan_state *info;
 	struct list_head *iter;
 	struct net_device *ldev;
+	LIST_HEAD(list);
 
 	/* called twice if separate control and data intf */
 	if (!dev)
@@ -1440,8 +1448,9 @@ static void qmi_wwan_disconnect(struct usb_interface *intf)
 		}
 		rcu_read_lock();
 		netdev_for_each_upper_dev_rcu(dev->net, ldev, iter)
-			qmimux_unregister_device(ldev);
+			qmimux_unregister_device(ldev, &list);
 		rcu_read_unlock();
+		unregister_netdevice_many(&list);
 		rtnl_unlock();
 		info->flags &= ~QMI_WWAN_FLAG_MUX;
 	}
drivers/net/wireless/ath/carl9170/usb.c +17 -22
index e7c3f3b8457d..99f1897a775d 100644
@@ -128,6 +128,8 @@ static const struct usb_device_id carl9170_usb_ids[] = {
 };
 MODULE_DEVICE_TABLE(usb, carl9170_usb_ids);
 
+static struct usb_driver carl9170_driver;
+
 static void carl9170_usb_submit_data_urb(struct ar9170 *ar)
 {
 	struct urb *urb;
@@ -966,32 +968,28 @@ static int carl9170_usb_init_device(struct ar9170 *ar)
 
 static void carl9170_usb_firmware_failed(struct ar9170 *ar)
 {
-	struct device *parent = ar->udev->dev.parent;
-	struct usb_device *udev;
-
-	/*
-	 * Store a copy of the usb_device pointer locally.
-	 * This is because device_release_driver initiates
-	 * carl9170_usb_disconnect, which in turn frees our
-	 * driver context (ar).
+	/* Store a copies of the usb_interface and usb_device pointer locally.
+	 * This is because release_driver initiates carl9170_usb_disconnect,
+	 * which in turn frees our driver context (ar).
 	 */
-	udev = ar->udev;
+	struct usb_interface *intf = ar->intf;
+	struct usb_device *udev = ar->udev;
 
 	complete(&ar->fw_load_wait);
+	/* at this point 'ar' could be already freed. Don't use it anymore */
+	ar = NULL;
 
 	/* unbind anything failed */
-	if (parent)
-		device_lock(parent);
-
-	device_release_driver(&udev->dev);
-	if (parent)
-		device_unlock(parent);
+	usb_lock_device(udev);
+	usb_driver_release_interface(&carl9170_driver, intf);
+	usb_unlock_device(udev);
 
-	usb_put_dev(udev);
+	usb_put_intf(intf);
 }
 
 static void carl9170_usb_firmware_finish(struct ar9170 *ar)
 {
+	struct usb_interface *intf = ar->intf;
 	int err;
 
 	err = carl9170_parse_firmware(ar);
@@ -1009,7 +1007,7 @@ static void carl9170_usb_firmware_finish(struct ar9170 *ar)
 		goto err_unrx;
 
 	complete(&ar->fw_load_wait);
-	usb_put_dev(ar->udev);
+	usb_put_intf(intf);
 	return;
 
 err_unrx:
@@ -1052,7 +1050,6 @@ static int carl9170_usb_probe(struct usb_interface *intf,
 		return PTR_ERR(ar);
 
 	udev = interface_to_usbdev(intf);
-	usb_get_dev(udev);
 	ar->udev = udev;
 	ar->intf = intf;
 	ar->features = id->driver_info;
@@ -1094,15 +1091,14 @@ static int carl9170_usb_probe(struct usb_interface *intf,
 	atomic_set(&ar->rx_anch_urbs, 0);
 	atomic_set(&ar->rx_pool_urbs, 0);
 
-	usb_get_dev(ar->udev);
+	usb_get_intf(intf);
 
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/iwl-drv.c +0 -1
index 689a65b11cc3..4fd1737d768b 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/iwl-prph.h +6 -1
index 1af9f9e1ecd4..0c0799d13e15 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/fw.c +17 -6
index ab68b5d53ec9..153717587aeb 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +1 -1
index 6a3b11dd2edf..4ddf620c267d 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +1 -1
index a50dc53df086..b698d55ace1b 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/mvm/ops.c +13 -4
index 13681b03c10e..20115770e75a 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/pcie/internal.h +1 -1
index 59213164f35e..2afce5c41322 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/intel/iwlwifi/pcie/trans.c +36 -14

50 lines not on this page · raw message

drivers/net/wireless/intersil/p54/p54usb.c +18 -25

43 lines not on this page · raw message

drivers/net/wireless/intersil/p54/txrx.c +4 -1
index 790784568ad2..5bf1c19ecced 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/fw.h +9 -3
index b73f99dc5a72..1fb76d2f5d3f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/ie.c +31 -16

47 lines not on this page · raw message

drivers/net/wireless/marvell/mwifiex/scan.c +27 -4
index 935778ec9a1b..e2786ab612ca 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +2 -2
index ebc0e41e5d3b..74e50566db1f 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/wmm.c +1 -1
index 407b9932ca4d..64916ba15df5 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/qedi/qedi_main.c +3 -0
index e5db9a9954dc..a6ff7be0210a 100644

Lines of this file are not shown. View the raw message.

drivers/soc/bcm/brcmstb/biuctrl.c +4 -2
index 6d89ebf13b8a..20b63bee5b09 100644

Lines of this file are not shown. View the raw message.

drivers/soundwire/intel.c +2 -2
index fd8d034cfec1..5ba641858e21 100644

Lines of this file are not shown. View the raw message.

drivers/soundwire/stream.c +3 -4
index bd879b1a76c8..794ced434cf2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/amplc_pci230.c +2 -1
index 08ffe26c5d43..0f16e85911f2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/comedi/drivers/dt282x.c +2 -1
index 3be927f1d3a9..e15e33ed94ae 100644

Lines of this file are not shown. View the raw message.

drivers/staging/fsl-dpaa2/ethsw/ethsw.c +1 -0
index ad577beeb052..3a562179468c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/iio/cdc/ad7150.c +11 -8
index 24f74ce60f80..14596aa7eaf1 100644

Lines of this file are not shown. View the raw message.

drivers/staging/mt7621-pci/pci-mt7621.c +1 -1
index 379ae780c691..c1909ff5dee9 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8712/rtl871x_ioctl_linux.c +88 -69

157 lines not on this page · raw message

drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +28 -15

43 lines not on this page · raw message

drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +14 -18
index 16af735af5c3..29761f6c3b55 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.h +3 -0
index 22b839ecd5f0..b0ee1716525b 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +1 -1
index a9cc01e8e6c5..833b28e9ba4b 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +11 -10
index 064d0db4c51e..ccfb8218b83c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +20 -11
index 819813e742d8..0958d86aebe6 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_util.c +3 -3
index 55c5fd82b911..30deea1b57f7 100644

Lines of this file are not shown. View the raw message.

drivers/staging/wilc1000/wilc_netdev.c +6 -6
index ba78c08a17f1..5338d7d2b248 100644

Lines of this file are not shown. View the raw message.

drivers/tty/serial/8250/8250_port.c +1 -2
index d2f3310abe54..682300713be4 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc2/core.c +1 -1
index 55d5ae2a7ec7..51d83f77dc04 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/f_fs.c +2 -1
index 47be961f1bf3..c7ed90084d1a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/gadget/function/u_ether.c +4 -2
index 737bd77a575d..2929bb47a618 100644

Lines of this file are not shown. View the raw message.

drivers/usb/renesas_usbhs/fifo.c +22 -12
index 39fa2fc1b8b7..6036cbae8c78 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/ftdi_sio.c +1 -0
index 1d8461ae2c34..23669a584bae 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/ftdi_sio_ids.h +6 -0
index 5755f0df0025..f12d806220b4 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/option.c +1 -0
index a0aaf0635359..c1582fbd1150 100644

Lines of this file are not shown. View the raw message.

drivers/usb/typec/tps6598x.c +3 -3
index c674abe3cf99..a38d1409f15b 100644

Lines of this file are not shown. View the raw message.

fs/crypto/policy.c +2 -0
index d536889ac31b..4941fe8471ce 100644

Lines of this file are not shown. View the raw message.

fs/nfs/nfs4proc.c +11 -9
index eeee100785a5..fd2c19eea647 100644

Lines of this file are not shown. View the raw message.

fs/quota/dquot.c +2 -2
index fc20e06c56ba..dd1783ea7003 100644

Lines of this file are not shown. View the raw message.

fs/udf/inode.c +60 -33

93 lines not on this page · raw message

include/linux/skmsg.h +2 -0
index 178a3933a71b..50ced8aba9db 100644

Lines of this file are not shown. View the raw message.

include/linux/vmw_vmci_defs.h +10 -1
index eaa1e762bf06..6124b4cebb42 100644

Lines of this file are not shown. View the raw message.

include/net/ip6_tunnel.h +6 -3
index 69b4bcf880c9..028eaea1c854 100644

Lines of this file are not shown. View the raw message.

include/uapi/linux/usb/audio.h +37 -0
index ddc5396800aa..76b7c3f6cd0d 100644

Lines of this file are not shown. View the raw message.

kernel/bpf/devmap.c +7 -2
index 1e525d70f833..1defea4b2755 100644

Lines of this file are not shown. View the raw message.

net/can/af_can.c +21 -3
index e386d654116d..04132b0b5d36 100644

Lines of this file are not shown. View the raw message.

net/core/skbuff.c +1 -0
index e5bfd42fd083..4ea96fbf3b49 100644

Lines of this file are not shown. View the raw message.

net/ipv6/netfilter/nf_conntrack_reasm.c +12 -10
index 3de0e9b0a482..8951de8b568f 100644

Lines of this file are not shown. View the raw message.

net/mac80211/ieee80211_i.h +8 -1
index c875d45f1e1d..6708c1640207 100644

Lines of this file are not shown. View the raw message.

net/mac80211/mesh.c +5 -1
index 766e5e5bab8a..fe44f0d98de0 100644

Lines of this file are not shown. View the raw message.

net/mac80211/util.c +4 -0
index 447a55ae9df1..3400e2da7297 100644

Lines of this file are not shown. View the raw message.

net/wireless/pmsr.c +2 -2
index 5e2ab01d325c..d06d514f0bba 100644

Lines of this file are not shown. View the raw message.

net/wireless/util.c +2 -2
index 75899b62bdc9..5ac66a571e33 100644

Lines of this file are not shown. View the raw message.

net/xdp/xdp_umem.c +6 -5
index 989e52386c35..2f7e2c33a812 100644

Lines of this file are not shown. View the raw message.

samples/bpf/bpf_load.c +1 -1
index eae7b635343d..6e87cc831e84 100644

Lines of this file are not shown. View the raw message.

samples/bpf/task_fd_query_user.c +1 -1
index aff2b4ae914e..e39938058223 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +1 -1
index ee620f39dbe3..dde9a49ded78 100644

Lines of this file are not shown. View the raw message.

sound/usb/mixer.c +10 -6
index 53dccbfe392b..34fbecab2210 100644

Lines of this file are not shown. View the raw message.

tools/bpf/bpftool/map.c +2 -0
index 994a7e0d16fb..14f581b562bd 100644

Lines of this file are not shown. View the raw message.

tools/perf/Documentation/intel-pt.txt +5 -5
index 115eaacc455f..60d99e5e7921 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/auxtrace.c +2 -1
index fb76b6b232d4..5dd9d1893b89 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/header.c +1 -0
index 2d2af2ac2b1e..682e3d524d3c 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/intel-pt.c +2 -1
index 6d288237887b..03b1da6d1da4 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/pmu.c +12 -16
index e0429f4ef335..faa8eb231e1b 100644

Lines of this file are not shown. View the raw message.

tools/perf/util/thread-stack.c +29 -1
index 41942c2aaa18..402d099eddaf 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/bpf/verifier/div_overflow.c +10 -4
index bd3f38dbe796..acab4f00819f 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/arch_timer.c +3 -2
index 7fc272ecae16..1b1c449ceaf4 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/vgic/vgic-its.c +1 -0
index 44ceaccb18cf..8c9fe831bce4 100644

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.