Linux 4.14.185
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.185 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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/display/mediatek/mediatek,dpi.txt | 6 Documentation/virtual/kvm/api.txt | 2 Makefile | 15 arch/alpha/include/asm/uaccess.h | 8 arch/arm/kernel/ptrace.c | 4 arch/arm/mach-tegra/tegra.c | 4 arch/arm/mm/proc-macros.S | 3 arch/arm64/include/asm/kvm_host.h | 6 arch/m68k/include/asm/mac_via.h | 1 arch/m68k/mac/config.c | 21 arch/m68k/mac/via.c | 6 arch/mips/Makefile | 13 arch/mips/boot/compressed/Makefile | 2 arch/mips/configs/loongson3_defconfig | 2 arch/mips/include/asm/kvm_host.h | 6 arch/mips/include/asm/mipsregs.h | 2 arch/mips/kernel/genex.S | 6 arch/mips/kernel/mips-cm.c | 6 arch/mips/kernel/setup.c | 10 arch/mips/kernel/time.c | 70 +++ arch/mips/kernel/vmlinux.lds.S | 2 arch/openrisc/include/asm/uaccess.h | 8 arch/powerpc/kernel/dt_cpu_ftrs.c | 8 arch/powerpc/kernel/prom.c | 19 arch/powerpc/platforms/cell/spufs/file.c | 113 +++- arch/powerpc/sysdev/xive/common.c | 5 arch/sh/include/asm/uaccess.h | 7 arch/sparc/kernel/ptrace_32.c | 228 ++++------ arch/sparc/kernel/ptrace_64.c | 17 arch/x86/boot/compressed/head_32.S | 5 arch/x86/boot/compressed/head_64.S | 1 arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/nospec-branch.h | 1 arch/x86/include/asm/uaccess.h | 12 arch/x86/kernel/cpu/bugs.c | 94 ++-- arch/x86/kernel/process.c | 28 - arch/x86/kernel/process.h | 2 arch/x86/kernel/reboot.c | 8 arch/x86/kernel/time.c | 4 arch/x86/kernel/vmlinux.lds.S | 4 arch/x86/kvm/mmu.c | 37 + arch/x86/kvm/svm.c | 6 arch/x86/kvm/vmx.c | 2 arch/x86/mm/init.c | 2 arch/x86/pci/fixup.c | 4 block/blk-mq.c | 8 drivers/acpi/cppc_acpi.c | 1 drivers/acpi/device_pm.c | 2 drivers/acpi/evged.c | 22 drivers/acpi/scan.c | 28 - drivers/acpi/sysfs.c | 4 drivers/char/agp/intel-gtt.c | 4 drivers/clocksource/dw_apb_timer.c | 5 drivers/clocksource/dw_apb_timer_of.c | 6 drivers/cpuidle/sysfs.c | 6 drivers/crypto/cavium/nitrox/nitrox_main.c | 4 drivers/crypto/ccp/Kconfig | 3 drivers/crypto/chelsio/chcr_algo.c | 2 drivers/crypto/talitos.c | 2 drivers/crypto/virtio/virtio_crypto_algs.c | 21 drivers/firmware/efi/efivars.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 12 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 17 drivers/gpu/drm/nouveau/nouveau_drm.c | 2 drivers/gpu/drm/radeon/radeon_drv.c | 2 drivers/gpu/vga/vga_switcheroo.c | 142 +----- drivers/input/mouse/synaptics.c | 1 drivers/macintosh/windfarm_pm112.c | 21 drivers/md/dm-crypt.c | 2 drivers/md/md.c | 3 drivers/media/cec/cec-adap.c | 8 drivers/media/i2c/ov5640.c | 4 drivers/media/platform/rcar-fcp.c | 5 drivers/media/tuners/si2157.c | 15 drivers/media/usb/dvb-usb/dibusb-mb.c | 2 drivers/media/usb/go7007/snd-go7007.c | 35 - drivers/mmc/core/sdio.c | 3 drivers/mmc/host/sdhci-esdhc-imx.c | 2 drivers/mmc/host/sdhci-msm.c | 10 drivers/mmc/host/via-sdmmc.c | 7 drivers/mtd/nand/brcmnand/brcmnand.c | 11 drivers/mtd/nand/pasemi_nand.c | 4 drivers/net/can/usb/kvaser_usb.c | 6 drivers/net/ethernet/allwinner/sun4i-emac.c | 4 drivers/net/ethernet/amazon/ena/ena_com.c | 6 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 drivers/net/ethernet/ibm/ibmvnic.c | 8 drivers/net/ethernet/intel/e1000/e1000_main.c | 4 drivers/net/ethernet/intel/e1000e/e1000.h | 1 drivers/net/ethernet/intel/e1000e/netdev.c | 16 drivers/net/ethernet/intel/igb/igb_ethtool.c | 3 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 drivers/net/ethernet/nxp/lpc_eth.c | 3 drivers/net/ethernet/qlogic/qede/qede.h | 2 drivers/net/ethernet/qlogic/qede/qede_main.c | 11 drivers/net/macvlan.c | 4 drivers/net/vmxnet3/vmxnet3_ethtool.c | 2 drivers/net/vxlan.c | 4 drivers/net/wireless/ath/ath9k/hif_usb.c | 58 +- drivers/net/wireless/ath/ath9k/hif_usb.h | 6 drivers/net/wireless/ath/ath9k/htc_drv_init.c | 10 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 6 drivers/net/wireless/ath/ath9k/htc_hst.c | 3 drivers/net/wireless/ath/ath9k/wmi.c | 5 drivers/net/wireless/ath/ath9k/wmi.h | 3 drivers/net/wireless/ath/carl9170/fw.c | 4 drivers/net/wireless/ath/carl9170/main.c | 21 drivers/net/wireless/ath/wcn36xx/main.c | 6 drivers/net/wireless/broadcom/b43/main.c | 2 drivers/net/wireless/broadcom/b43legacy/main.c | 1 drivers/net/wireless/broadcom/b43legacy/xmit.c | 1 drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 3 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 14 drivers/net/wireless/realtek/rtlwifi/usb.c | 8 drivers/nvme/host/core.c | 16 drivers/pci/probe.c | 24 - drivers/pci/quirks.c | 207 +++++++-- drivers/pinctrl/samsung/pinctrl-exynos.c | 9 drivers/platform/x86/hp-wmi.c | 10 drivers/power/reset/vexpress-poweroff.c | 1 drivers/spi/spi-bcm-qspi.c | 8 drivers/spi/spi-bcm2835.c | 4 drivers/spi/spi-bcm2835aux.c | 4 drivers/spi/spi-dw-mid.c | 16 drivers/spi/spi-dw.c | 15 drivers/spi/spi-pxa2xx.c | 5 drivers/spi/spi.c | 4 drivers/staging/android/ion/ion_heap.c | 4 drivers/staging/greybus/sdio.c | 10 drivers/tty/serial/imx.c | 22 drivers/video/fbdev/w100fb.c | 2 drivers/w1/masters/omap_hdq.c | 10 drivers/xen/pvcalls-back.c | 3 fs/btrfs/file-item.c | 6 fs/btrfs/inode.c | 10 fs/btrfs/send.c | 67 ++ fs/ext4/ext4_extents.h | 9 fs/ext4/fsync.c | 28 - fs/ext4/xattr.c | 7 fs/fat/inode.c | 6 fs/fs-writeback.c | 1 fs/nilfs2/segment.c | 2 fs/overlayfs/copy_up.c | 2 fs/proc/inode.c | 2 fs/proc/self.c | 2 fs/proc/thread_self.c | 2 include/linux/kgdb.h | 2 include/linux/mm.h | 1 include/linux/pci_ids.h | 2 include/linux/string.h | 60 ++ include/linux/sunrpc/gss_api.h | 1 include/linux/sunrpc/svcauth_gss.h | 3 include/linux/uaccess.h | 2 include/linux/vga_switcheroo.h | 6 include/sound/hdaudio.h | 3 include/uapi/linux/kvm.h | 2 kernel/audit.c | 52 +- kernel/audit.h | 2 kernel/auditfilter.c | 16 kernel/compat.c | 6 kernel/cpu_pm.c | 4 kernel/debug/debug_core.c | 1 kernel/events/core.c | 23 - kernel/exit.c | 31 - kernel/sched/fair.c | 2 lib/mpi/longlong.h | 2 lib/strncpy_from_user.c | 23 - lib/strnlen_user.c | 23 - mm/huge_memory.c | 31 + mm/slub.c | 4 mm/util.c | 18 net/bluetooth/hci_event.c | 1 net/ipv6/ipv6_sockglue.c | 13 net/netfilter/nft_nat.c | 4 net/sunrpc/auth_gss/gss_mech_switch.c | 12 net/sunrpc/auth_gss/svcauth_gss.c | 18 security/integrity/evm/evm_crypto.c | 2 security/integrity/ima/ima.h | 7 security/integrity/ima/ima_policy.c | 3 security/keys/internal.h | 11 security/keys/keyctl.c | 16 security/smack/smackfs.c | 10 sound/core/pcm_native.c | 5 sound/isa/es1688/es1688.c | 4 sound/pci/hda/hda_intel.c | 35 + sound/pci/hda/hda_intel.h | 3 sound/pci/hda/patch_realtek.c | 6 sound/usb/card.c | 20 sound/usb/usbaudio.h | 2 tools/lib/api/fs/fs.c | 17 tools/lib/api/fs/fs.h | 12 tools/objtool/check.c | 6 tools/perf/builtin-probe.c | 3 tools/perf/util/dso.c | 16 tools/perf/util/dso.h | 1 tools/perf/util/probe-event.c | 24 - tools/perf/util/probe-finder.c | 1 tools/perf/util/symbol.c | 2 tools/testing/selftests/networking/timestamping/rxtimestamp.c | 1 201 files changed, 1647 insertions(+), 923 deletions(-)
Abhinav Ratna (1):
PCI: Add ACS quirk for iProc PAXB
Abhishek Sahu (1):
PCI: Generalize multi-function power dependency device links
Adrian Hunter (1):
perf symbols: Fix debuginfo search for Ubuntu
Al Viro (2):
sparc32: fix register window handling in genregs32_[gs]et()
sparc64: fix misuses of access_process_vm() in genregs32_[sg]et()
Alexander Sverdlin (1):
macvlan: Skip loopback packets in RX handler
Anders Roxell (1):
power: vexpress: add suppress_bind_attrs to true
Andrea Arcangeli (1):
mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()
Andy Shevchenko (3):
spi: No need to assign dummy value in spi_unregister_controller()
spi: dw: Zero DMA Tx and Rx configurations on stack platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32()
Anthony Steinhauser (3):
x86/speculation: Prevent rogue cross-process SSBD shutdown x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS. x86/speculation: PR_SPEC_FORCE_DISABLE enforcement for indirect branches.
Ard Biesheuvel (3):
efi/efivars: Add missing kobject_put() in sysfs entry creation error path
ACPI: GED: add support for _Exx / _Lxx handler methods
ACPI: GED: use correct trigger type field in _Exx / _Lxx handling
Arnd Bergmann (1):
crypto: ccp -- don't "select" CONFIG_DMADEVICES
Arthur Kiyanovski (1):
net: ena: fix error returning in ena_com_get_hash_function()
Arvind Sankar (2):
x86/boot: Correct relocation destination on old linkers x86/mm: Stop printing BRK addresses
Ashok Raj (2):
PCI: Add ACS quirk for Intel Root Complex Integrated Endpoints
PCI: Program MPS for RCiEP devices
Barret Rhoden (1):
perf: Add cond_resched() to task_function_call()
Bhupesh Sharma (1):
net: qed*: Reduce RX and TX default ring count when running inside kdump kernel
Bjorn Helgaas (2):
PCI: Make ACS quirk implementations more uniform
PCI: Unify ACS quirk desired vs provided checking
Bob Haarman (1):
x86_64: Fix jiffies ODR violation
Bogdan Togorean (1):
drm: bridge: adv7511: Extend list of audio sample rates
Brad Love (1):
media: si2157: Better check for running tuner in init
Casey Schaufler (1):
Smack: slab-out-of-bounds in vsscanf
Chris Wilson (1):
agp/intel: Reinforce the barrier after GTT updates
Christian Lamparter (1):
carl9170: remove P2P_GO support
Christoph Hellwig (2):
staging: android: ion: use vmap instead of vm_map_ram
nvme: refine the Qemu Identify CNS quirk
Christophe JAILLET (3):
crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated
video: fbdev: w100fb: Fix a potential double free.
wcn36xx: Fix error handling path in 'wcn36xx_probe()'
Christophe Leroy (1):
lib: Reduce user_access_begin() boundaries in strncpy_from_user() and strnlen_user()
Chuhong Yuan (2):
ALSA: es1688: Add the missed snd_card_free()
media: go7007: fix a miss of snd_card_free
Colin Ian King (1):
media: dvb: return -EREMOTEIO on i2c transfer failure.
Cédric Le Goater (1):
powerpc/xive: Clear the page tables for the ESB IO mapping
Dan Carpenter (2):
media: cec: silence shift wrapping warning in __cec_s_log_addrs()
rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()
Daniel Axtens (1):
string.h: fix incompatibility between FORTIFY_SOURCE and KASAN
Daniel Thompson (1):
kgdb: Fix spurious true from in_dbg_master()
Dennis Kadioglu (1):
Input: synaptics - add a second working PNP_ID for Lenovo T470s
Devulapally Shiva Krishna (1):
Crypto/chcr: fix for ccm(aes) failed test
Dmitry Osipenko (1):
ARM: tegra: Correct PL310 Auxiliary Control Register initialization
Doug Berger (1):
net: bcmgenet: set Rx mode before starting netif
Douglas Anderson (2):
kgdb: Prevent infinite recursive entries to the debugger kernel/cpu_pm: Fix uninitted local in cpu_pm
Eric Biggers (2):
ext4: fix race between ext4_sync_parent() and rename() dm crypt: avoid truncating the logical block size
Eric W. Biederman (1):
proc: Use new_inode not new_inode_pseudo
Evan Green (1):
spi: pxa2xx: Apply CS clk quirk to BXT
Feng Kan (1):
PCI: Add ACS quirk for Ampere root ports
Filipe Manana (2):
btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums
btrfs: fix wrong file range cleanup after an error filling dealloc range
Finn Thain (1):
m68k: mac: Don't call via_flush_cache() on Mac IIfx
Fredrik Strupe (1):
ARM: 8977/1: ptrace: Fix mask for thumb breakpoint hook
Giuliano Procida (1):
blk-mq: move _blk_mq_update_nr_hw_queues synchronize_rcu call
Greg Kroah-Hartman (1):
Linux 4.14.185
Guoqing Jiang (1):
md: don't flush workqueue unconditionally in md_open
H. Nikolaus Schaller (1):
w1: omap-hdq: cleanup to add missing newline for some dev_dbg
Haibo Chen (1):
mmc: sdhci-esdhc-imx: fix the mask for tuning start point
Hangbin Liu (1):
ipv6: fix IPV6_ADDRFORM operation logic
Harshad Shirwadkar (1):
ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max
Hill Ma (1):
x86/reboot/quirks: Add MacBook6,1 reboot quirk
Hou Zhiqiang (1):
PCI: Disable MSI for Freescale Layerscape PCIe RC mode
Hsin-Yu Chao (1):
Bluetooth: Add SCO fallback for invalid LMP parameters error
Hui Wang (1):
ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines
Ido Schimmel (1):
vxlan: Avoid infinite loop when suppressing NS messages with invalid options
Jaehoon Chung (1):
brcmfmac: fix wrong location to get firmware feature
Jann Horn (1):
exit: Move preemption fixup up, move blocking operations down
Jeffle Xu (1):
ext4: fix error pointer dereference
Jens Axboe (1):
sched/fair: Don't NUMA balance for kthreads
Jeremy Kerr (1):
powerpc/spufs: fix copy_to_user while atomic
Jesper Dangaard Brouer (1):
ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K
Jia-Ju Bai (1):
net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss()
Jiaxun Yang (2):
MIPS: Truncate link address into 32bit for 32bit kernel
PCI: Don't disable decoding when mmio_always_on is set
Jitao Shi (1):
dt-bindings: display: mediatek: control dpi pins mode to avoid leakage
Jon Doron (1):
x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit
Jonathan Bakker (1):
pinctrl: samsung: Save/restore eint_mask over suspend for EINT_TYPE GPIOs
Juergen Gross (1):
xen/pvcalls-back: test for errors when calling backend_connect()
Julien Thierry (1):
objtool: Ignore empty alternatives
Justin Chen (1):
spi: bcm-qspi: when tx/rx buffer is NULL set to 0
Kai Huang (1):
kvm: x86: Fix L1TF mitigation for shadow MMU
Kai-Heng Feng (2):
e1000e: Disable TSO for buffer overrun workaround
igb: Report speed and duplex as unknown when device is runtime suspended
Kees Cook (1):
e1000: Distribute switch variables for initialization
Kevin Buettner (1):
PCI: Avoid FLR for AMD Starship USB 3.0
Kieran Bingham (1):
media: platform: fcp: Set appropriate DMA parameters
Krzysztof Struczynski (1):
ima: Fix ima digest hash table key calculation
Larry Finger (3):
b43legacy: Fix case where channel status is corrupted
b43: Fix connection problem with WPA3
b43_legacy: Fix connection problem with WPA3
Linus Torvalds (2):
make 'user_access_begin()' do 'access_ok()'
Fix 'acccess_ok()' on alpha and SH
Linus Walleij (1):
ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE
Longpeng(Mike) (3):
crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
Lukas Wunner (7):
spi: bcm2835aux: Fix controller unregister order
spi: dw: Fix controller unregister order
spi: Fix controller unregister order
spi: pxa2xx: Fix controller unregister order
spi: bcm2835: Fix controller unregister order
vga_switcheroo: Deduplicate power state tracking
vga_switcheroo: Use device link for HDA controller
Marc Zyngier (1):
KVM: arm64: Make vcpu_cp1x() work on Big Endian hosts
Marcos Paulo de Souza (1):
btrfs: send: emit file capabilities after chown
Marcos Scriven (1):
PCI: Avoid FLR for AMD Matisse HD Audio & USB 3.0
Masahiro Yamada (1):
kbuild: force to build vmlinux if CONFIG_MODVERSION=y
Masami Hiramatsu (3):
perf probe: Accept the instance number of kretprobe event perf probe: Do not show the skipped events
perf probe: Fix to check blacklist address correctly
Masashi Honma (1):
ath9k_htc: Silence undersized packet warnings
Michael Ellerman (3):
drivers/macintosh: Fix memleak in windfarm_pm112 driver powerpc/64s: Don't let DT CPU features set FSCR_DSCR powerpc/64s: Save FSCR to init_task.thread.fscr after feature init
Michał Mirosław (1):
ALSA: pcm: disallow linking stream to itself
Miquel Raynal (1):
mtd: rawnand: pasemi: Fix the probe error path
Nathan Chancellor (1):
lib/mpi: Fix 64-bit MIPS build with Clang
NeilBrown (2):
sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.
sunrpc: clean up properly in gss_mech_unregister()
OGAWA Hirofumi (1):
fat: don't allow to mount if the FAT length == 0
Omar Sandoval (1):
btrfs: fix error handling when submitting direct I/O bio
Pablo Neira Ayuso (1):
netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported
Pali Rohár (1):
mwifiex: Fix memory corruption in dump_station
Paolo Bonzini (3):
KVM: x86: only do L1TF workaround on affected processors
KVM: nSVM: fix condition for filtering async PF
KVM: nSVM: leave ASID aside in copy_vmcb_control_area
Paul Moore (2):
audit: fix a net reference leak in audit_send_reply()
audit: fix a net reference leak in audit_list_rules_send()
Punit Agrawal (1):
e1000e: Relax condition to trigger reset for ME workaround
Qiujun Huang (4):
ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
Qiushi Wu (3):
ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()
ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()
cpuidle: Fix three reference count leaks
Rafael J. Wysocki (1):
ACPI: PM: Avoid using power resources if there are none for D0
Roberto Sassu (2):
ima: Directly assign the ima_default_policy pointer to ima_rules
evm: Fix possible memory leak in evm_calc_hmac_or_hash()
Ryusuke Konishi (1):
nilfs2: fix null pointer dereference at nilfs_segctor_do_construct()
Sasha Levin (1):
spi: dw: fix possible race condition
Sean Christopherson (2):
KVM: x86/mmu: Consolidate "is MMIO SPTE" code
KVM: nVMX: Consult only the "basic" exit reason when routing nested exit
Serge Semin (8):
spi: dw: Enable interrupts in accordance with DMA xfer mode
clocksource: dw_apb_timer: Make CPU-affiliation being optional
clocksource: dw_apb_timer_of: Fix missing clockevent timers
spi: dw: Fix Rx-only DMA transfers
mips: cm: Fix an invalid error code of INTVN_*_ERR
mips: MAAR: Use more precise address mask
mips: Add udelay lpj numbers adjustment
spi: dw: Return any value retrieved from the dma_transfer callback
Stafford Horne (1):
arch/openrisc: Fix issues with access_ok()
Stephane Eranian (1):
tools api fs: Make xxx__mountpoint() more scalable
Su Kang Yin (1):
crypto: talitos - fix ECB and CBC algs ivsize
Takashi Iwai (1):
ALSA: usb-audio: Fix inconsistent card PM state after resume
Tejun Heo (1):
cgroup, blkcg: Prepare some symbols for module and !CONFIG_CGROUP usages
Thomas Falcon (1):
drivers/net/ibmvnic: Update VNIC protocol version reporting
Thomas Lendacky (1):
x86/speculation: Add support for STIBP always-on preferred mode
Tiezhu Yang (2):
MIPS: Loongson: Build ATI Radeon GPU driver as module
MIPS: Make sparse_init() using top-down allocation
Tomi Valkeinen (1):
media: ov5640: fix use of destroyed mutex
Ulf Hansson (3):
mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card()
staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc core
mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc coreUwe Kleine-König (1):
serial: imx: Fix handling of TC irq in combination with DMA
Veerabhadrarao Badiganti (2):
mmc: sdhci-msm: Clear tuning done flag while hs400 tuning
mmc: sdhci-msm: Set SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 quirk
Waiman Long (2):
mm: add kvfree_sensitive() for freeing sensitive data objects x86/speculation: Change misspelled STIPB to STIBP
Wang Hai (1):
mm/slub: fix a memory leak in sysfs_slab_add()
Wei Yongjun (1):
net: lpc-enet: fix error return code in lpc_mii_init()
Will Deacon (1):
x86: uaccess: Inhibit speculation past access_ok() in user_access_begin()
Xiaochun Lee (1):
x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs
Xiaolong Huang (1):
can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices
Xie XiuQi (1):
ixgbe: fix signed-integer-overflow warning
Xing Li (2):
KVM: MIPS: Define KVM_ENTRYHI_ASID to cpu_asid_mask(&boot_cpu_data)
KVM: MIPS: Fix VPN2_MASK definition for variable cpu_vmbits
YuanJunQing (1):
MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe()
Yunjian Wang (1):
net: allwinner: Fix use correct return type for ndo_start_xmit()
Yuxuan Shui (1):
ovl: initialize error in ovl_copy_xattr
tannerlove (1):
selftests/net: in rxtimestamp getopt_long needs terminating null entry
Álvaro Fernández Rojas (1):
mtd: rawnand: brcmnand: fix hamming oob layout
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt +6 -0
@@ -16,6 +16,9 @@ Required properties: Documentation/devicetree/bindings/graph.txt. This port should be connected to the input port of an attached HDMI or LVDS encoder chip. +Optional properties: +- pinctrl-names: Contain "default" and "sleep". + Example: dpi0: dpi@1401d000 {
@@ -26,6 +29,9 @@ dpi0: dpi@1401d000 { <&mmsys CLK_MM_DPI_ENGINE>, <&apmixedsys CLK_APMIXED_TVDPLL>; clock-names = "pixel", "engine", "pll"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&dpi_pin_func>; + pinctrl-1 = <&dpi_pin_idle>; port { dpi0_out: endpoint {
Documentation/virtual/kvm/api.txt +2 -0
@@ -3737,9 +3737,11 @@ EOI was received. #define KVM_EXIT_HYPERV_SYNIC 1 #define KVM_EXIT_HYPERV_HCALL 2 __u32 type; + __u32 pad1; union { struct { __u32 msr; + __u32 pad2; __u64 control; __u64 evt_page; __u64 msg_page;
Makefile +9 -6
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 184 +SUBLEVEL = 185 EXTRAVERSION = NAME = Petit Gorille
@@ -542,12 +542,8 @@ KBUILD_MODULES := KBUILD_BUILTIN := 1 # If we have only "make modules", don't compile built-in objects. -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are up to date before we record them. - ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) + KBUILD_BUILTIN := endif # If we have "make <whatever> modules", compile modules
@@ -1249,6 +1245,13 @@ ifdef CONFIG_MODULES all: modules +# When we're building modules with modversions, we need to consider +# the built-in objects during the descend as well, in order to +# make sure the checksums are up to date before we record them. +ifdef CONFIG_MODVERSIONS + KBUILD_BUILTIN := 1 +endif + # Build modules # # A module can be listed more than once in obj-m resulting in
arch/alpha/include/asm/uaccess.h +5 -3
@@ -30,11 +30,13 @@* Address valid if: * - "addr" doesn't have any high-bits set * - AND "size" doesn't have any high-bits set -* - AND "addr+size" doesn't have any high-bits set +* - AND "addr+size-(size != 0)" doesn't have any high-bits set * - OR we are in kernel mode. */ -#define __access_ok (addr, size) \ - ((get_fs().seg & (addr | size | (addr+size))) == 0) +#define __access_ok (addr, size) ({ \ + unsigned long __ao_a = (addr), __ao_b = (size); \ + unsigned long __ao_end = __ao_a + __ao_b - !!__ao_b; \ + (get_fs().seg & (__ao_a | __ao_b | __ao_end)) == 0; })#define access_ok (type, addr, size) \ ({ \
arch/arm/kernel/ptrace.c +2 -2
@@ -228,8 +228,8 @@ static struct undef_hook arm_break_hook = { };static struct undef_hook thumb_break_hook = { - .instr_mask =0xffff , - .instr_val =0xde01 , + .instr_mask =0xffffffff , + .instr_val =0x0000de01 , .cpsr_mask =PSR_T_BIT , .cpsr_val =PSR_T_BIT , .fn = break_trap,
arch/arm/mach-tegra/tegra.c +2 -2
@@ -108,8 +108,8 @@ static const char * const tegra_dt_board_compat[] = { };DT_MACHINE_START (TEGRA_DT ,"NVIDIA Tegra SoC (Flattened Device Tree)" ) - .l2c_aux_val = 0x3c400001, - .l2c_aux_mask = 0xc20fc3fe, + .l2c_aux_val = 0x3c400000, + .l2c_aux_mask = 0xc20fc3ff, .smp = smp_ops(tegra_smp_ops), .map_io = tegra_map_common_io, .init_early = tegra_init_early,
arch/arm/mm/proc-macros.S +2 -1
@@ -5,6 +5,7 @@ * VMA_VM_FLAGS * VM_EXEC */ +#include <linux/const.h> #include <asm/asm-offsets.h> #include <asm/thread_info.h>
@@ -30,7 +31,7 @@ * act_mm - get current->active_mm */ .macro act_mm, rd - bic \rd, sp, #8128 + bic \rd, sp, #(THREAD_SIZE - 1) & ~63 bic \rd, \rd, #63 ldr \rd, [\rd, #TI_TASK] .if (TSK_ACTIVE_MM > IMM12_MASK)
arch/arm64/include/asm/kvm_host.h +4 -2
@@ -292,8 +292,10 @@ struct kvm_vcpu_arch {* CP14 and CP15 live in the same array, as they are backed by the * same system registers. */ -#define vcpu_cp14 (v,r) ((v)->arch.ctxt.copro[(r)]) -#define vcpu_cp15 (v,r) ((v)->arch.ctxt.copro[(r)]) +#define CPx_BIAS IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) + +#define vcpu_cp14 (v,r) ((v)->arch.ctxt.copro[(r) ^ CPx_BIAS]) +#define vcpu_cp15 (v,r) ((v)->arch.ctxt.copro[(r) ^ CPx_BIAS])#ifdef CONFIG_CPU_BIG_ENDIAN #define vcpu_cp15_64_high (v,r) vcpu_cp15((v),(r))
arch/m68k/include/asm/mac_via.h +1 -0
@@ -257,6 +257,7 @@ extern int rbv_present,via_alt_mapping;struct irq_desc ; +extern void via_l2_flush (int writeback);extern void via_register_interrupts (void );extern void via_irq_enable (int );extern void via_irq_disable (int );
arch/m68k/mac/config.c +2 -19
@@ -61,7 +61,6 @@ extern void iop_preinit(void);extern void iop_init (void );extern void via_init (void );extern void via_init_clock (irq_handler_t func); -extern void via_flush_cache (void );extern void oss_init (void );extern void psc_init (void );extern void baboon_init (void );
@@ -132,21 +131,6 @@ int __init mac_parse_bootinfo(const struct bi_record *record)return unknown; } -/* -* Flip into 24bit mode for an instant - flushes the L2 cache card. We -* have to disable interrupts for this. Our IRQ handlers will crap -* themselves if they take an IRQ in 24bit mode! -*/ - -static void mac_cache_card_flush (int writeback) -{ -unsigned long flags; - -local_irq_save (flags); -via_flush_cache (); -local_irq_restore (flags); -} -void __init config_mac (void ) {if (!MACH_IS_MAC )
@@ -179,9 +163,8 @@ void __init config_mac(void)* not. */ -if (macintosh_config->ident ==MAC_MODEL_IICI - || macintosh_config->ident ==MAC_MODEL_IIFX ) - mach_l2_flush = mac_cache_card_flush; +if (macintosh_config->ident ==MAC_MODEL_IICI ) + mach_l2_flush = via_l2_flush; }
arch/m68k/mac/via.c +5 -1
@@ -300,10 +300,14 @@ void via_debug_dump(void)* the system into 24-bit mode for an instant. */ -void via_flush_cache (void ) +void via_l2_flush (int writeback) { +unsigned long flags; + +local_irq_save (flags); via2[gBufB] &= ~VIA2B_vMode32; via2[gBufB] |= VIA2B_vMode32; +local_irq_restore (flags); }/*
arch/mips/Makefile +12 -1
@@ -279,12 +279,23 @@ ifdef CONFIG_64BIT endif endif +# When linking a 32-bit executable the LLVM linker cannot cope with a +# 32-bit load address that has been sign-extended to 64 bits. Simply +# remove the upper 32 bits then, as it is safe to do so with other +# linkers. +ifdef CONFIG_64BIT + load-ld = $(load-y) +else + load-ld = $(subst 0xffffffff,0x,$(load-y)) +endif + KBUILD_AFLAGS += $(cflags-y) KBUILD_CFLAGS += $(cflags-y) -KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) +KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) -DLINKER_LOAD_ADDRESS=$(load-ld) KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0) bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \ + LINKER_LOAD_ADDRESS=$(load-ld) \ VMLINUX_ENTRY_ADDRESS=$(entry-y) \ PLATFORM="$(platform-y)" \ ITS_INPUTS="$(its-y)"
arch/mips/boot/compressed/Makefile +1 -1
@@ -87,7 +87,7 @@ ifneq ($(zload-y),) VMLINUZ_LOAD_ADDRESS := $(zload-y) else VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ - $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) + $(obj)/vmlinux.bin $(LINKER_LOAD_ADDRESS)) endif UIMAGE_LOADADDR = $(VMLINUZ_LOAD_ADDRESS)
arch/mips/configs/loongson3_defconfig +1 -1
@@ -250,7 +250,7 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y CONFIG_MEDIA_USB_SUPPORT=y CONFIG_USB_VIDEO_CLASS=m CONFIG_DRM=y -CONFIG_DRM_RADEON=y +CONFIG_DRM_RADEON=m CONFIG_FB_RADEON=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_PLATFORM=m
arch/mips/include/asm/kvm_host.h +5 -1
@@ -274,8 +274,12 @@ enum emulation_result {#define MIPS3_PG_SHIFT 6#define MIPS3_PG_FRAME 0x3fffffc0 +#if defined(CONFIG_64BIT ) +#define VPN2_MASK GENMASK(cpu_vmbits - 1, 13) +#else #define VPN2_MASK 0xffffe000 -#define KVM_ENTRYHI_ASID MIPS_ENTRYHI_ASID +#endif +#define KVM_ENTRYHI_ASID cpu_asid_mask(&boot_cpu_data)#define TLB_IS_GLOBAL (x) ((x).tlb_lo[0] & (x).tlb_lo[1] & ENTRYLO_G)#define TLB_VPN2 (x) ((x).tlb_hi & VPN2_MASK)#define TLB_ASID (x) ((x).tlb_hi & KVM_ENTRYHI_ASID)
arch/mips/include/asm/mipsregs.h +1 -1
@@ -737,7 +737,7 @@/* MAAR bit definitions */ #define MIPS_MAAR_VH (_U64CAST_(1) << 63) -#define MIPS_MAAR_ADDR ((BIT_ULL(BITS_PER_LONG - 12) - 1) << 12) +#define MIPS_MAAR_ADDR GENMASK_ULL(55, 12)#define MIPS_MAAR_ADDR_SHIFT 12#define MIPS_MAAR_S (_ULCAST_(1) << 1)#define MIPS_MAAR_VL (_ULCAST_(1) << 0)
arch/mips/kernel/genex.S +3 -3
@@ -431,20 +431,20 @@ NESTED(nmi_handler, PT_SIZE, sp) .endm .macro __build_clear_fpe + CLI + TRACE_IRQS_OFF .set push /* gas fails to assemble cfc1 for some archs (octeon).*/ \ .set mips1 SET_HARDFLOAT cfc1 a1, fcr31 .set pop - CLI - TRACE_IRQS_OFF .endm .macro __build_clear_msa_fpe - _cfcmsa a1, MSA_CSR CLI TRACE_IRQS_OFF + _cfcmsa a1, MSA_CSR .endm .macro __build_clear_ade
arch/mips/kernel/mips-cm.c +3 -3
@@ -123,9 +123,9 @@ static char *cm2_causes[32] = {"COH_RD_ERR" ,"MMIO_WR_ERR" ,"MMIO_RD_ERR" ,"0x07" ,"0x08" ,"0x09" ,"0x0a" ,"0x0b" ,"0x0c" ,"0x0d" ,"0x0e" ,"0x0f" , -"0x10" ,"0x11" ,"0x12" ,"0x13" , -"0x14" ,"0x15" ,"0x16" ,"INTVN_WR_ERR" , -"INTVN_RD_ERR" ,"0x19" ,"0x1a" ,"0x1b" , +"0x10" ,"INTVN_WR_ERR" ,"INTVN_RD_ERR" ,"0x13" , +"0x14" ,"0x15" ,"0x16" ,"0x17" , +"0x18" ,"0x19" ,"0x1a" ,"0x1b" ,"0x1c" ,"0x1d" ,"0x1e" ,"0x1f" };
arch/mips/kernel/setup.c +10 -0
@@ -911,7 +911,17 @@ static void __init arch_mem_init(char **cmdline_p) BOOTMEM_DEFAULT);#endif device_tree_init (); + +/* +* In order to reduce the possibility of kernel panic when failed to +* get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate +* low memory as small as possible before plat_swiotlb_setup(), so +* make sparse_init() using top-down allocation. +*/ +memblock_set_bottom_up (false);sparse_init (); +memblock_set_bottom_up (true); +plat_swiotlb_setup ();dma_contiguous_reserve (PFN_PHYS (max_low_pfn));
arch/mips/kernel/time.c +70 -0
82 lines not on this page · raw message
arch/mips/kernel/vmlinux.lds.S +1 -1
@@ -50,7 +50,7 @@ SECTIONS /* . = 0xa800000000300000; */ . = 0xffffffff80300000; #endif - . = VMLINUX_LOAD_ADDRESS; + . = LINKER_LOAD_ADDRESS; /* read-only */ _text = .; /* Text and read-only data */ .text : {
arch/openrisc/include/asm/uaccess.h +6 -2
@@ -58,8 +58,12 @@/* Ensure that addr is below task's addr_limit */ #define __addr_ok (addr) ((unsigned long) addr < get_fs()) -#define access_ok (type, addr, size) \ - __range_ok((unsigned long)addr, (unsigned long)size) +#define access_ok (type, addr, size) \ +({ \ + unsigned long __ao_addr = (unsigned long)(addr); \ + unsigned long __ao_size = (unsigned long)(size); \ + __range_ok(__ao_addr, __ao_size); \ +})/* * These are the main single-value transfer routines. They automatically
arch/powerpc/kernel/dt_cpu_ftrs.c +8 -0
@@ -385,6 +385,14 @@ static int __init feat_enable_dscr(struct dt_cpu_feature *f) {u64 lpcr; +/* +* Linux relies on FSCR[DSCR] being clear, so that we can take the +* facility unavailable interrupt and track the task's usage of DSCR. +* See facility_unavailable_exception(). +* Clear the bit here so that feat_enable() doesn't set it. +*/ + f->fscr_bit_nr =-1 ; +feat_enable (f); lpcr =mfspr (SPRN_LPCR );
arch/powerpc/kernel/prom.c +19 -0
@@ -658,6 +658,23 @@ static void __init early_reserve_mem(void)#endif } +#ifdef CONFIG_PPC64 +static void __init save_fscr_to_task (void ) +{ +/* +* Ensure the init_task (pid 0, aka swapper) uses the value of FSCR we +* have configured via the device tree features or via __init_FSCR(). +* That value will then be propagated to pid 1 (init) and all future +* processes. +*/ +if (early_cpu_has_feature (CPU_FTR_ARCH_207S )) + init_task.thread.fscr =mfspr (SPRN_FSCR ); +} +#else +static inline void save_fscr_to_task (void ) {}; +#endif + +void __init early_init_devtree (void *params) {phys_addr_t limit;
@@ -743,6 +760,8 @@ void __init early_init_devtree(void *params)BUG (); } +save_fscr_to_task (); +#if defined(CONFIG_SMP ) && defined(CONFIG_PPC64 )/* We'll later wait for secondaries to check in; there are * NCPUS-1 non-boot CPUs :-)
arch/powerpc/platforms/cell/spufs/file.c +75 -38
234 lines not on this page · raw message
arch/powerpc/sysdev/xive/common.c +5 -0
@@ -23,6 +23,7 @@#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/msi.h> +#include <linux/vmalloc.h> #include <asm/prom.h> #include <asm/io.h>
@@ -932,12 +933,16 @@ EXPORT_SYMBOL_GPL(is_xive_irq);void xive_cleanup_irq_data (struct xive_irq_data *xd) {if (xd->eoi_mmio) { +unmap_kernel_range ((unsigned long )xd->eoi_mmio, +1u << xd->esb_shift);iounmap (xd->eoi_mmio);if (xd->eoi_mmio == xd->trig_mmio) xd->trig_mmio =NULL ; xd->eoi_mmio =NULL ; }if (xd->trig_mmio) { +unmap_kernel_range ((unsigned long )xd->trig_mmio, +1u << xd->esb_shift);iounmap (xd->trig_mmio); xd->trig_mmio =NULL ; }
arch/sh/include/asm/uaccess.h +5 -2
@@ -16,8 +16,11 @@* sum := addr + size; carry? --> flag = true; * if (sum >= addr_limit) flag = true; */ -#define __access_ok (addr, size) \ - (__addr_ok((addr) + (size))) +#define __access_ok (addr, size) ({ \ + unsigned long __ao_a = (addr), __ao_b = (size); \ + unsigned long __ao_end = __ao_a + __ao_b - !!__ao_b; \ + __ao_end >= __ao_a && __addr_ok(__ao_end); }) +#define access_ok (type, addr, size) \ (__chk_user_ptr(addr), \ __access_ok((unsigned long __force)(addr), (size)))
arch/sparc/kernel/ptrace_32.c +98 -130
262 lines not on this page · raw message
arch/sparc/kernel/ptrace_64.c +3 -14
@@ -571,19 +571,13 @@ static int genregs32_get(struct task_struct *target,for (; count >0 && pos <32 ; count--) {if (access_process_vm (target, (unsigned long ) - ®_window[pos], + ®_window[pos++], ®,sizeof (reg),FOLL_FORCE ) !=sizeof (reg))return -EFAULT ; -if (access_process_vm (target, - (unsigned long ) u, - ®,sizeof (reg), -FOLL_FORCE |FOLL_WRITE ) - !=sizeof (reg)) +if (put_user (reg, u++))return -EFAULT ; - pos++; - u++; } } }
@@ -683,12 +677,7 @@ static int genregs32_set(struct task_struct *target, } }else {for (; count >0 && pos <32 ; count--) { -if (access_process_vm (target, - (unsigned long ) - u, - ®,sizeof (reg), -FOLL_FORCE ) - !=sizeof (reg)) +if (get_user (reg, u++))return -EFAULT ; if (access_process_vm(target, (unsigned long)
arch/x86/boot/compressed/head_32.S +3 -2
@@ -49,16 +49,17 @@ * Position Independent Executable (PIE) so that linker won't optimize * R_386_GOT32X relocation to its fixed symbol address. Older * linkers generate R_386_32 relocations against locally defined symbols, - * _bss, _ebss, _got and _egot, in PIE. It isn't wrong, just less + * _bss, _ebss, _got, _egot and _end, in PIE. It isn't wrong, just less * optimal than R_386_RELATIVE. But the x86 kernel fails to properly handle * R_386_32 relocations when relocating the kernel. To generate - * R_386_RELATIVE relocations, we mark _bss, _ebss, _got and _egot as + * R_386_RELATIVE relocations, we mark _bss, _ebss, _got, _egot and _end as * hidden: */ .hidden _bss .hidden _ebss .hidden _got .hidden _egot + .hidden _end __HEAD ENTRY(startup_32)
arch/x86/boot/compressed/head_64.S +1 -0
@@ -41,6 +41,7 @@ .hidden _ebss .hidden _got .hidden _egot + .hidden _end __HEAD .code32
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -291,6 +291,7 @@#define X86_FEATURE_AMD_IBPB (13*32+12)/* "" Indirect Branch Prediction Barrier */ #define X86_FEATURE_AMD_IBRS (13*32+14)/* "" Indirect Branch Restricted Speculation */ #define X86_FEATURE_AMD_STIBP (13*32+15)/* "" Single Thread Indirect Branch Predictors */ +#define X86_FEATURE_AMD_STIBP_ALWAYS_ON (13*32+17)/* "" Single Thread Indirect Branch Predictors always-on preferred */ #define X86_FEATURE_AMD_SSBD (13*32+24)/* "" Speculative Store Bypass Disable */ #define X86_FEATURE_VIRT_SSBD (13*32+25)/* Virtualized Speculative Store Bypass Disable */ #define X86_FEATURE_AMD_SSB_NO (13*32+26)/* "" Speculative Store Bypass is fixed in hardware. */
arch/x86/include/asm/nospec-branch.h +1 -0
@@ -232,6 +232,7 @@ enum spectre_v2_mitigation {enum spectre_v2_user_mitigation {SPECTRE_V2_USER_NONE ,SPECTRE_V2_USER_STRICT , +SPECTRE_V2_USER_STRICT_PREFERRED ,SPECTRE_V2_USER_PRCTL ,SPECTRE_V2_USER_SECCOMP , };
arch/x86/include/asm/uaccess.h +11 -1
@@ -711,7 +711,17 @@ extern struct movsl_mask {* checking before using them, but you have to surround them with the * user_access_begin/end() pair. */ -#define user_access_begin () __uaccess_begin() +static __must_check inline bool user_access_begin (int type, +const void __user *ptr, +size_t len) +{ +if (unlikely (!access_ok (type, ptr, len))) +return 0 ; +__uaccess_begin_nospec (); +return 1 ; +} + +#define user_access_begin (a, b, c) user_access_begin(a, b, c)#define user_access_end () __uaccess_end()#define unsafe_put_user (x, ptr, err_label) \
arch/x86/kernel/cpu/bugs.c +63 -31
181 lines not on this page · raw message
arch/x86/kernel/process.c +10 -18
@@ -414,28 +414,20 @@ static __always_inline void __speculation_ctrl_update(unsigned long tifp,u64 msr = x86_spec_ctrl_base;bool updmsr = false; -/* -* If TIF_SSBD is different, select the proper mitigation -* method. Note that if SSBD mitigation is disabled or permanentely -* enabled this branch can't be taken because nothing can set -* TIF_SSBD. -*/ -if (tif_diff & _TIF_SSBD) { -if (static_cpu_has (X86_FEATURE_VIRT_SSBD )) { +/* Handle change of TIF_SSBD depending on the mitigation method. */ +if (static_cpu_has (X86_FEATURE_VIRT_SSBD )) { +if (tif_diff & _TIF_SSBD)amd_set_ssb_virt_state (tifn); - }else if (static_cpu_has (X86_FEATURE_LS_CFG_SSBD )) { + }else if (static_cpu_has (X86_FEATURE_LS_CFG_SSBD )) { +if (tif_diff & _TIF_SSBD)amd_set_core_ssb_state (tifn); - }else if (static_cpu_has (X86_FEATURE_SPEC_CTRL_SSBD ) || -static_cpu_has (X86_FEATURE_AMD_SSBD )) { - msr |=ssbd_tif_to_spec_ctrl (tifn); - updmsr = true; - } + }else if (static_cpu_has (X86_FEATURE_SPEC_CTRL_SSBD ) || +static_cpu_has (X86_FEATURE_AMD_SSBD )) { + updmsr |= !!(tif_diff & _TIF_SSBD); + msr |=ssbd_tif_to_spec_ctrl (tifn); } -/* -* Only evaluate TIF_SPEC_IB if conditional STIBP is enabled, -* otherwise avoid the MSR write. -*/ +/* Only evaluate TIF_SPEC_IB if conditional STIBP is enabled. */ if (IS_ENABLED (CONFIG_SMP ) &&static_branch_unlikely (&switch_to_cond_stibp)) { updmsr |= !!(tif_diff & _TIF_SPEC_IB);
arch/x86/kernel/process.h +1 -1
@@ -19,7 +19,7 @@ static inline void switch_to_extra(struct task_struct *prev,if (IS_ENABLED (CONFIG_SMP )) {/* * Avoid __switch_to_xtra() invocation when conditional -* STIPB is disabled and the only different bit is +* STIBP is disabled and the only different bit is * TIF_SPEC_IB. For CONFIG_SMP=n TIF_SPEC_IB is not * in the TIF_WORK_CTXSW masks. */
arch/x86/kernel/reboot.c +8 -0
@@ -197,6 +197,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"), }, }, + { /* Handle problems with rebooting on Apple MacBook6,1 */ + .callback = set_pci_reboot, + .ident = "Apple MacBook6,1", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Apple Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBook6,1"), + }, + }, { /* Handle problems with rebooting on Apple MacBookPro5 */ .callback = set_pci_reboot, .ident = "Apple MacBookPro5",
arch/x86/kernel/time.c +0 -4
@@ -24,10 +24,6 @@#include <asm/hpet.h> #include <asm/time.h> -#ifdef CONFIG_X86_64 -__visible volatile unsigned long jiffies __cacheline_aligned_in_smp = INITIAL_JIFFIES; -#endif -unsigned long profile_pc (struct pt_regs *regs) {unsigned long pc =instruction_pointer (regs);
arch/x86/kernel/vmlinux.lds.S +2 -2
@@ -36,13 +36,13 @@ OUTPUT_FORMAT(CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT, CONFIG_OUTPUT_FORMAT) #ifdef CONFIG_X86_32 OUTPUT_ARCH(i386) ENTRY(phys_startup_32) -jiffies = jiffies_64; #else OUTPUT_ARCH(i386:x86-64) ENTRY(phys_startup_64) -jiffies_64 = jiffies; #endif +jiffies = jiffies_64; + #if defined(CONFIG_X86_64) /* * On 64-bit, align RODATA to 2MB so we retain large page mappings for
arch/x86/kvm/mmu.c +23 -14
@@ -275,11 +275,18 @@ static bool is_executable_pte(u64 spte);void kvm_mmu_set_mmio_spte_mask (u64 mmio_mask,u64 mmio_value) {BUG_ON ((mmio_mask & mmio_value) != mmio_value); +WARN_ON (mmio_value & (shadow_nonpresent_or_rsvd_mask << shadow_nonpresent_or_rsvd_mask_len)); +WARN_ON (mmio_value & shadow_nonpresent_or_rsvd_lower_gfn_mask); shadow_mmio_value = mmio_value |SPTE_SPECIAL_MASK ; shadow_mmio_mask = mmio_mask |SPTE_SPECIAL_MASK ; }EXPORT_SYMBOL_GPL (kvm_mmu_set_mmio_spte_mask); +static bool is_mmio_spte (u64 spte) +{ +return (spte & shadow_mmio_mask) == shadow_mmio_value; +} +static inline bool sp_ad_disabled (struct kvm_mmu_page *sp) {return sp->role.ad_disabled;
@@ -287,7 +294,7 @@ static inline bool sp_ad_disabled(struct kvm_mmu_page *sp)static inline bool spte_ad_enabled (u64 spte) { -MMU_WARN_ON ((spte & shadow_mmio_mask) == shadow_mmio_value); +MMU_WARN_ON (is_mmio_spte (spte));return !(spte & shadow_acc_track_value); }
@@ -298,13 +305,13 @@ static bool is_nx_huge_page_enabled(void)static inline u64 spte_shadow_accessed_mask (u64 spte) { -MMU_WARN_ON ((spte & shadow_mmio_mask) == shadow_mmio_value); +MMU_WARN_ON (is_mmio_spte (spte));return spte_ad_enabled (spte) ? shadow_accessed_mask :0 ; }static inline u64 spte_shadow_dirty_mask (u64 spte) { -MMU_WARN_ON ((spte & shadow_mmio_mask) == shadow_mmio_value); +MMU_WARN_ON (is_mmio_spte (spte));return spte_ad_enabled (spte) ? shadow_dirty_mask :0 ; }
@@ -374,11 +381,6 @@ static void mark_mmio_spte(struct kvm_vcpu *vcpu, u64 *sptep, u64 gfn,mmu_spte_set (sptep, mask); } -static bool is_mmio_spte (u64 spte) -{ -return (spte & shadow_mmio_mask) == shadow_mmio_value; -} -static gfn_t get_mmio_spte_gfn (u64 spte) {u64 gpa = spte & shadow_nonpresent_or_rsvd_lower_gfn_mask;
@@ -460,16 +462,23 @@ static void kvm_mmu_reset_all_pte_masks(void)* If the CPU has 46 or less physical address bits, then set an * appropriate mask to guard against L1TF attacks. Otherwise, it is * assumed that the CPU is not vulnerable to L1TF. +* +* Some Intel CPUs address the L1 cache using more PA bits than are +* reported by CPUID. Use the PA width of the L1 cache when possible +* to achieve more effective mitigation, e.g. if system RAM overlaps +* the most significant bits of legal physical address space. */ + shadow_nonpresent_or_rsvd_mask =0 ; low_phys_bits = boot_cpu_data.x86_phys_bits; -if (boot_cpu_data.x86_phys_bits < -52 - shadow_nonpresent_or_rsvd_mask_len) { +if (boot_cpu_has_bug (X86_BUG_L1TF ) && + !WARN_ON_ONCE (boot_cpu_data.x86_cache_bits >= +52 - shadow_nonpresent_or_rsvd_mask_len)) { + low_phys_bits = boot_cpu_data.x86_cache_bits + - shadow_nonpresent_or_rsvd_mask_len; shadow_nonpresent_or_rsvd_mask = -rsvd_bits (boot_cpu_data.x86_phys_bits - - shadow_nonpresent_or_rsvd_mask_len, - boot_cpu_data.x86_phys_bits -1 ); - low_phys_bits -= shadow_nonpresent_or_rsvd_mask_len; +rsvd_bits (low_phys_bits, boot_cpu_data.x86_cache_bits -1 ); } + shadow_nonpresent_or_rsvd_lower_gfn_mask =GENMASK_ULL (low_phys_bits -1 ,PAGE_SHIFT ); }
arch/x86/kvm/svm.c +3 -3
@@ -2757,8 +2757,8 @@ static int nested_svm_exit_special(struct vcpu_svm *svm)return NESTED_EXIT_HOST ;break ;case SVM_EXIT_EXCP_BASE +PF_VECTOR : -/* When we're shadowing, trap PFs, but not async PF */ -if (!npt_enabled && svm->vcpu.arch.apf.host_apf_reason ==0 ) +/* Trap async PF even if not shadowing */ +if (!npt_enabled || svm->vcpu.arch.apf.host_apf_reason)return NESTED_EXIT_HOST ;break ;default :
@@ -2847,7 +2847,7 @@ static inline void copy_vmcb_control_area(struct vmcb *dst_vmcb, struct vmcb *fr dst->iopm_base_pa = from->iopm_base_pa; dst->msrpm_base_pa = from->msrpm_base_pa; dst->tsc_offset = from->tsc_offset; - dst->asid = from->asid; +/* asid not copied, it is handled manually for svm->vmcb. */ dst->tlb_ctl = from->tlb_ctl; dst->int_ctl = from->int_ctl; dst->int_vector = from->int_vector;
arch/x86/kvm/vmx.c +1 -1
@@ -8711,7 +8711,7 @@ static bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason)vmcs_read32 (VM_EXIT_INTR_ERROR_CODE ), KVM_ISA_VMX); -switch (exit_reason) { +switch ((u16 )exit_reason) {case EXIT_REASON_EXCEPTION_NMI :if (is_nmi (intr_info))return false;
arch/x86/mm/init.c +0 -2
@@ -112,8 +112,6 @@ __ref void *alloc_low_pages(unsigned int num) }else { pfn = pgt_buf_end; pgt_buf_end += num; -printk (KERN_DEBUG "BRK [%#010lx, %#010lx] PGTABLE\n" , - pfn <<PAGE_SHIFT , (pgt_buf_end <<PAGE_SHIFT ) -1 ); }for (i =0 ; i < num; i++) {
arch/x86/pci/fixup.c +4 -0
@@ -572,6 +572,10 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x2fc0, pci_invalid_bar);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6f60 , pci_invalid_bar);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6fa0 , pci_invalid_bar);DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0x6fc0 , pci_invalid_bar); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0xa1ec , pci_invalid_bar); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0xa1ed , pci_invalid_bar); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0xa26c , pci_invalid_bar); +DECLARE_PCI_FIXUP_EARLY (PCI_VENDOR_ID_INTEL ,0xa26d , pci_invalid_bar);/* * Device [1022:7808]
block/blk-mq.c +4 -4
@@ -2738,6 +2738,10 @@ static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,list_for_each_entry (q, &set->tag_list, tag_set_list)blk_mq_freeze_queue (q); +/* +* Sync with blk_mq_queue_tag_busy_iter. +*/ +synchronize_rcu (); set->nr_hw_queues = nr_hw_queues;blk_mq_update_queue_map (set);
@@ -2748,10 +2752,6 @@ static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,list_for_each_entry (q, &set->tag_list, tag_set_list)blk_mq_unfreeze_queue (q); -/* -* Sync with blk_mq_queue_tag_busy_iter. -*/ -synchronize_rcu (); }void blk_mq_update_nr_hw_queues (struct blk_mq_tag_set *set,int nr_hw_queues)
drivers/acpi/cppc_acpi.c +1 -0
@@ -800,6 +800,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) "acpi_cppc");if (ret) {per_cpu (cpc_desc_ptr, pr->id) =NULL ; +kobject_put (&cpc_ptr->kobj); goto out_free; }
drivers/acpi/device_pm.c +1 -1
@@ -172,7 +172,7 @@ int acpi_device_set_power(struct acpi_device *device, int state)* possibly drop references to the power resources in use. */ state =ACPI_STATE_D3_HOT ; -/* If _PR3 is not available, use D3hot as the target state. */ +/* If D3cold is not supported, use D3hot as the target state. */ if (!device->power.states[ACPI_STATE_D3_COLD ].flags.valid) target_state = state; }else if (!device->power.states[state].flags.valid) {
drivers/acpi/evged.c +19 -3
@@ -82,6 +82,8 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,struct resource r;struct acpi_resource_irq *p = &ares->data.irq;struct acpi_resource_extended_irq *pext = &ares->data.extended_irq; +char ev_name[5 ]; +u8 trigger;if (ares->type ==ACPI_RESOURCE_TYPE_END_TAG )return AE_OK ;
@@ -90,14 +92,28 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares,dev_err (dev,"unable to parse IRQ resource\n" );return AE_ERROR ; } -if (ares->type ==ACPI_RESOURCE_TYPE_IRQ ) +if (ares->type ==ACPI_RESOURCE_TYPE_IRQ ) { gsi = p->interrupts[0 ]; -else + trigger = p->triggering; + }else { gsi = pext->interrupts[0 ]; + trigger = pext->triggering; + } irq = r.start; -if (ACPI_FAILURE (acpi_get_handle (handle,"_EVT" , &evt_handle))) { +switch (gsi) { + case 0 ... 255: +sprintf (ev_name,"_%c%02hhX" , + trigger ==ACPI_EDGE_SENSITIVE ?'E' :'L' , gsi); + +if (ACPI_SUCCESS (acpi_get_handle (handle, ev_name, &evt_handle))) +break ; +/* fall through */ +default : +if (ACPI_SUCCESS (acpi_get_handle (handle,"_EVT" , &evt_handle))) +break ; +dev_err (dev,"cannot locate _EVT method\n" );return AE_ERROR ; }
drivers/acpi/scan.c +19 -9
@@ -920,12 +920,9 @@ static void acpi_bus_init_power_state(struct acpi_device *device, int state)if (buffer.length && package && package->type ==ACPI_TYPE_PACKAGE - && package->package.count) { -int err =acpi_extract_power_resources (package,0 , - &ps->resources); -if (!err) - device->power.flags.power_resources =1 ; - } + && package->package.count) +acpi_extract_power_resources (package,0 , &ps->resources); +ACPI_FREE (buffer.pointer); }
@@ -972,14 +969,27 @@ static void acpi_bus_get_power_flags(struct acpi_device *device)acpi_bus_init_power_state (device, i);INIT_LIST_HEAD (&device->power.states[ACPI_STATE_D3_COLD ].resources); -if (!list_empty (&device->power.states[ACPI_STATE_D3_HOT ].resources)) - device->power.states[ACPI_STATE_D3_COLD ].flags.valid =1 ; -/* Set defaults for D0 and D3hot states (always valid) */ +/* Set the defaults for D0 and D3hot (always supported). */ device->power.states[ACPI_STATE_D0 ].flags.valid =1 ; device->power.states[ACPI_STATE_D0 ].power =100 ; device->power.states[ACPI_STATE_D3_HOT ].flags.valid =1 ; +/* +* Use power resources only if the D0 list of them is populated, because +* some platforms may provide _PR3 only to indicate D3cold support and +* in those cases the power resources list returned by it may be bogus. +*/ +if (!list_empty (&device->power.states[ACPI_STATE_D0 ].resources)) { + device->power.flags.power_resources =1 ; +/* +* D3cold is supported if the D3hot list of power resources is +* not empty. +*/ +if (!list_empty (&device->power.states[ACPI_STATE_D3_HOT ].resources)) + device->power.states[ACPI_STATE_D3_COLD ].flags.valid =1 ; + } +if (acpi_bus_init_power (device)) device->flags.power_manageable =0 ; }
drivers/acpi/sysfs.c +3 -1
@@ -997,8 +997,10 @@ void acpi_sysfs_add_hotplug_profile(struct acpi_hotplug_profile *hotplug, error =kobject_init_and_add (&hotplug->kobj, &acpi_hotplug_profile_ktype, hotplug_kobj,"%s" , name); -if (error) +if (error) { +kobject_put (&hotplug->kobj); goto err_out; + }kobject_uevent (&hotplug->kobj,KOBJ_ADD );return ;
drivers/char/agp/intel-gtt.c +3 -1
@@ -846,6 +846,7 @@ void intel_gtt_insert_page(dma_addr_t addr, unsigned int flags) { intel_private.driver->write_entry (addr, pg, flags); +readl (intel_private.gtt + pg);if (intel_private.driver->chipset_flush) intel_private.driver->chipset_flush (); }
@@ -871,7 +872,7 @@ void intel_gtt_insert_sg_entries(struct sg_table *st, j++; } } -wmb (); +readl (intel_private.gtt + j -1 );if (intel_private.driver->chipset_flush) intel_private.driver->chipset_flush (); }
@@ -1105,6 +1106,7 @@ static void i9xx_cleanup(void)static void i9xx_chipset_flush (void ) { +wmb ();if (intel_private.i9xx_flush_page)writel (1 , intel_private.i9xx_flush_page); }
drivers/clocksource/dw_apb_timer.c +3 -2
@@ -225,7 +225,8 @@ static int apbt_next_event(unsigned long delta,/** * dw_apb_clockevent_init() - use an APB timer as a clock_event_device * -* @cpu: The CPU the events will be targeted at. +* @cpu: The CPU the events will be targeted at or -1 if CPU affiliation +* isn't required. * @name: The name used for the timer and the IRQ for it. * @rating: The rating to give the timer. * @base: I/O base for the timer registers.
@@ -260,7 +261,7 @@ dw_apb_clockevent_init(int cpu, const char *name, unsigned rating, dw_ced->ced.max_delta_ticks =0x7fffffff ; dw_ced->ced.min_delta_ns =clockevent_delta2ns (5000 , &dw_ced->ced); dw_ced->ced.min_delta_ticks =5000 ; - dw_ced->ced.cpumask =cpumask_of (cpu); + dw_ced->ced.cpumask = cpu <0 ? cpu_possible_mask :cpumask_of (cpu); dw_ced->ced.features =CLOCK_EVT_FEAT_PERIODIC |CLOCK_EVT_FEAT_ONESHOT |CLOCK_EVT_FEAT_DYNIRQ ; dw_ced->ced.set_state_shutdown = apbt_shutdown;
drivers/clocksource/dw_apb_timer_of.c +2 -4
@@ -146,10 +146,6 @@ static int num_called;static int __init dw_apb_timer_init (struct device_node *timer) {switch (num_called) { -case 0 : -pr_debug ("%s: found clockevent timer\n" , __func__); -add_clockevent (timer); -break ;case 1 :pr_debug ("%s: found clocksource timer\n" , __func__);add_clocksource (timer);
@@ -160,6 +156,8 @@ static int __init dw_apb_timer_init(struct device_node *timer)#endif break ;default : +pr_debug ("%s: found clockevent timer\n" , __func__); +add_clockevent (timer);break ; }
drivers/cpuidle/sysfs.c +3 -3
@@ -414,7 +414,7 @@ static int cpuidle_add_state_sysfs(struct cpuidle_device *device) ret =kobject_init_and_add (&kobj->kobj, &ktype_state_cpuidle, &kdev->kobj,"state%d" , i);if (ret) { -kfree (kobj); +kobject_put (&kobj->kobj); goto error_state; }kobject_uevent (&kobj->kobj,KOBJ_ADD );
@@ -544,7 +544,7 @@ static int cpuidle_add_driver_sysfs(struct cpuidle_device *dev) ret =kobject_init_and_add (&kdrv->kobj, &ktype_driver_cpuidle, &kdev->kobj,"driver" );if (ret) { -kfree (kdrv); +kobject_put (&kdrv->kobj);return ret; }
@@ -638,7 +638,7 @@ int cpuidle_add_sysfs(struct cpuidle_device *dev) error =kobject_init_and_add (&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj,"cpuidle" );if (error) { -kfree (kdev); +kobject_put (&kdev->kobj);return error; }
drivers/crypto/cavium/nitrox/nitrox_main.c +2 -2
@@ -183,7 +183,7 @@ static void nitrox_remove_from_devlist(struct nitrox_device *ndev)struct nitrox_device *nitrox_get_first_device (void ) { -struct nitrox_device *ndev =NULL ; +struct nitrox_device *ndev;mutex_lock (&devlist_lock);list_for_each_entry (ndev, &ndevlist, list) {
@@ -191,7 +191,7 @@ struct nitrox_device *nitrox_get_first_device(void)break ; }mutex_unlock (&devlist_lock); -if (!ndev) +if (&ndev->list == &ndevlist)return NULL ;refcount_inc (&ndev->refcnt);
drivers/crypto/ccp/Kconfig +1 -2
@@ -8,10 +8,9 @@ config CRYPTO_DEV_CCP_DD config CRYPTO_DEV_SP_CCP bool "Cryptographic Coprocessor device" default y - depends on CRYPTO_DEV_CCP_DD + depends on CRYPTO_DEV_CCP_DD && DMADEVICES select HW_RANDOM select DMA_ENGINE - select DMADEVICES select CRYPTO_SHA1 select CRYPTO_SHA256 help
drivers/crypto/chelsio/chcr_algo.c +1 -1
@@ -2201,7 +2201,7 @@ static void fill_sec_cpl_for_aead(struct cpl_tx_sec_pdu *sec_cpl,unsigned int mac_mode =CHCR_SCMD_AUTH_MODE_CBCMAC ;unsigned int c_id = chcrctx->dev->rx_channel_id;unsigned int ccm_xtra; -unsigned char tag_offset =0 , auth_offset =0 ; +unsigned int tag_offset =0 , auth_offset =0 ;unsigned int assoclen;if (get_aead_subtype (tfm) ==CRYPTO_ALG_SUB_TYPE_AEAD_RFC4309 )
drivers/crypto/talitos.c +1 -1
@@ -2636,7 +2636,6 @@ static struct talitos_alg_template driver_algs[] = { .cra_ablkcipher = { .min_keysize = AES_MIN_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE, - .ivsize = AES_BLOCK_SIZE, } }, .desc_hdr_template = DESC_HDR_TYPE_COMMON_NONSNOOP_NO_AFEU |
@@ -2670,6 +2669,7 @@ static struct talitos_alg_template driver_algs[] = { .cra_ablkcipher = { .min_keysize = AES_MIN_KEY_SIZE, .max_keysize = AES_MAX_KEY_SIZE, + .ivsize = AES_BLOCK_SIZE, .setkey = ablkcipher_aes_setkey, } },
drivers/crypto/virtio/virtio_crypto_algs.c +14 -7
@@ -354,13 +354,18 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req,int err;unsigned long flags;struct scatterlist outhdr, iv_sg, status_sg, **sgs; -int i;u64 dst_len;unsigned int num_out =0 , num_in =0 ;int sg_total;uint8_t *iv; +struct scatterlist *sg; src_nents =sg_nents_for_len (req->src, req->nbytes); +if (src_nents <0 ) { +pr_err ("Invalid number of src SG.\n" ); +return src_nents; + } + dst_nents =sg_nents (req->dst); pr_debug("virtio_crypto: Number of sgs (src_nents: %d, dst_nents: %d)\n",
@@ -406,6 +411,7 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, goto free; } + dst_len = min_t(unsigned int, req->nbytes, dst_len);pr_debug ("virtio_crypto: src_len: %u, dst_len: %llu\n" , req->nbytes, dst_len);
@@ -441,12 +447,12 @@ __virtio_crypto_ablkcipher_do_req(struct virtio_crypto_sym_request *vc_sym_req, vc_sym_req->iv = iv;/* Source data */ -for (i =0 ; i < src_nents; i++) - sgs[num_out++] = &req->src[i]; +for (sg = req->src; src_nents; sg =sg_next (sg), src_nents--) + sgs[num_out++] = sg;/* Destination data */ -for (i =0 ; i < dst_nents; i++) - sgs[num_out + num_in++] = &req->dst[i]; +for (sg = req->dst; sg; sg =sg_next (sg)) + sgs[num_out + num_in++] = sg;/* Status */ sg_init_one (&status_sg, &vc_req->status,sizeof (vc_req->status));
@@ -569,10 +575,11 @@ static void virtio_crypto_ablkcipher_finalize_req(struct ablkcipher_request *req, int err) { - crypto_finalize_cipher_request(vc_sym_req->base.dataq->engine, -req ,err ); kzfree(vc_sym_req->iv);virtcrypto_clear_request (&vc_sym_req->base); + +crypto_finalize_cipher_request (vc_sym_req->base.dataq->engine, + req, err); } static struct crypto_alg virtio_crypto_algs[] = { {
drivers/firmware/efi/efivars.c +3 -1
@@ -586,8 +586,10 @@ efivar_create_sysfs_entry(struct efivar_entry *new_var) ret =kobject_init_and_add (&new_var->kobj, &efivar_ktype,NULL ,"%s" , short_name);kfree (short_name); -if (ret) +if (ret) { +kobject_put (&new_var->kobj);return ret; + }kobject_uevent (&new_var->kobj,KOBJ_ADD );if (efivar_entry_add (new_var, &efivar_sysfs_list)) {
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0 -2
@@ -728,7 +728,6 @@ static int amdgpu_pmops_runtime_suspend(struct device *dev) drm_dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ;drm_kms_helper_poll_disable (drm_dev); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_OFF ); ret =amdgpu_device_suspend (drm_dev, false, false);pci_save_state (pdev);
@@ -765,7 +764,6 @@ static int amdgpu_pmops_runtime_resume(struct device *dev) ret =amdgpu_device_resume (drm_dev, false, false);drm_kms_helper_poll_enable (drm_dev); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_ON ); drm_dev->switch_power_state =DRM_SWITCH_POWER_ON ;return 0 ; }
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c +7 -5
@@ -20,13 +20,15 @@ static void adv7511_calc_cts_n(unsigned int f_tmds, unsigned int fs, {switch (fs) {case 32000 : - *n =4096 ; +case 48000 : +case 96000 : +case 192000 : + *n = fs *128 /1000 ;break ;case 44100 : - *n =6272 ; -break ; -case 48000 : - *n =6144 ; +case 88200 : +case 176400 : + *n = fs *128 /900 ;break ; }
drivers/gpu/drm/i915/i915_gem_execbuffer.c +15 -2
@@ -1566,7 +1566,9 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb)* happened we would make the mistake of assuming that the * relocations were valid. */ -user_access_begin (); +if (!user_access_begin (VERIFY_WRITE , urelocs, size)) + goto end_user; +for (copied =0 ; copied < nreloc; copied++) unsafe_put_user(-1, &urelocs[copied].presumed_offset,
@@ -2601,6 +2603,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,struct drm_i915_gem_execbuffer2 *args = data;struct drm_i915_gem_exec_object2 *exec2_list;struct drm_syncobj **fences =NULL ; +const size_t count = args->buffer_count;int err;if (args->buffer_count <1 || args->buffer_count >SIZE_MAX / sz -1 ) {
@@ -2649,7 +2652,17 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,unsigned int i;/* Copy the new buffer offsets back to the user's exec list. */ -user_access_begin (); +/* +* Note: count * sizeof(*user_exec_list) does not overflow, +* because we checked 'count' in check_buffer_count(). +* +* And this range already got effectively checked earlier +* when we did the "copy_from_user()" above. +*/ +if (!user_access_begin (VERIFY_WRITE , user_exec_list, + count *sizeof (*user_exec_list))) + goto end_user; +for (i =0 ; i < args->buffer_count; i++) {if (!(exec2_list[i].offset &UPDATE ))continue ;
drivers/gpu/drm/nouveau/nouveau_drm.c +0 -2
@@ -754,7 +754,6 @@ nouveau_pmops_runtime_suspend(struct device *dev) }drm_kms_helper_poll_disable (drm_dev); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_OFF );nouveau_switcheroo_optimus_dsm (); ret =nouveau_do_suspend (drm_dev, true);pci_save_state (pdev);
@@ -789,7 +788,6 @@ nouveau_pmops_runtime_resume(struct device *dev)/* do magic */ nvif_mask (&device->object,0x088488 , (1 <<25 ), (1 <<25 )); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_ON ); drm_dev->switch_power_state =DRM_SWITCH_POWER_ON ;/* Monitors may have been connected / disconnected during suspend */
drivers/gpu/drm/radeon/radeon_drv.c +0 -2
@@ -424,7 +424,6 @@ static int radeon_pmops_runtime_suspend(struct device *dev) drm_dev->switch_power_state =DRM_SWITCH_POWER_CHANGING ;drm_kms_helper_poll_disable (drm_dev); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_OFF ); ret =radeon_suspend_kms (drm_dev, false, false, false);pci_save_state (pdev);
@@ -461,7 +460,6 @@ static int radeon_pmops_runtime_resume(struct device *dev) ret =radeon_resume_kms (drm_dev, false, false);drm_kms_helper_poll_enable (drm_dev); -vga_switcheroo_set_dynamic_switch (pdev,VGA_SWITCHEROO_ON ); drm_dev->switch_power_state =DRM_SWITCH_POWER_ON ;return 0 ; }
drivers/gpu/vga/vga_switcheroo.c +27 -115
224 lines not on this page · raw message
drivers/input/mouse/synaptics.c +1 -0
@@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = {"LEN005b" ,/* P50 */ "LEN005e" ,/* T560 */ "LEN006c" ,/* T470s */ +"LEN007a" ,/* T470s */ "LEN0071" ,/* T480 */ "LEN0072" ,/* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ "LEN0073", /* X1 Carbon G5 (Elantech) */
drivers/macintosh/windfarm_pm112.c +13 -8
@@ -133,14 +133,6 @@ static int create_cpu_loop(int cpu)s32 tmax;int fmin; -/* Get PID params from the appropriate SAT */ - hdr =smu_sat_get_sdb_partition (chip,0xC8 + core,NULL ); -if (hdr ==NULL ) { -printk (KERN_WARNING "windfarm: can't get CPU PID fan config\n" ); -return -EINVAL ; - } - piddata = (struct smu_sdbp_cpupiddata *)&hdr[1 ]; -/* Get FVT params to get Tmax; if not found, assume default */ hdr =smu_sat_get_sdb_partition (chip,0xC4 + core,NULL );if (hdr) {
@@ -153,6 +145,16 @@ static int create_cpu_loop(int cpu)if (tmax < cpu_all_tmax) cpu_all_tmax = tmax; +kfree (hdr); + +/* Get PID params from the appropriate SAT */ + hdr =smu_sat_get_sdb_partition (chip,0xC8 + core,NULL ); +if (hdr ==NULL ) { +printk (KERN_WARNING "windfarm: can't get CPU PID fan config\n" ); +return -EINVAL ; + } + piddata = (struct smu_sdbp_cpupiddata *)&hdr[1 ]; +/* * Darwin has a minimum fan speed of 1000 rpm for the 4-way and * 515 for the 2-way. That appears to be overkill, so for now,
@@ -175,6 +177,9 @@ static int create_cpu_loop(int cpu) pid.min = fmin;wf_cpu_pid_init (&cpu_pid[cpu], &pid); + +kfree (hdr); +return 0 ; }
drivers/md/dm-crypt.c +1 -1
@@ -3088,7 +3088,7 @@ static void crypt_io_hints(struct dm_target *ti, struct queue_limits *limits) limits->max_segment_size =PAGE_SIZE ; limits->logical_block_size = - max_t(unsigned short, limits->logical_block_size, cc->sector_size); +max_t (unsigned, limits->logical_block_size, cc->sector_size); limits->physical_block_size =max_t (unsigned, limits->physical_block_size, cc->sector_size); limits->io_min =max_t (unsigned, limits->io_min, cc->sector_size);
drivers/md/md.c +2 -1
@@ -7411,7 +7411,8 @@ static int md_open(struct block_device *bdev, fmode_t mode)*/ mddev_put (mddev);/* Wait until bdev->bd_disk is definitely gone */ -flush_workqueue (md_misc_wq); +if (work_pending (&mddev->del_work)) +flush_workqueue (md_misc_wq);/* Then retry the open from the top */ return -ERESTARTSYS ; }
drivers/media/cec/cec-adap.c +4 -4
@@ -1624,6 +1624,10 @@ int __cec_s_log_addrs(struct cec_adapter *adap,unsigned j; log_addrs->log_addr[i] =CEC_LOG_ADDR_INVALID ; +if (log_addrs->log_addr_type[i] >CEC_LOG_ADDR_TYPE_UNREGISTERED ) { +dprintk (1 ,"unknown logical address type\n" ); +return -EINVAL ; + }if (type_mask & (1 << log_addrs->log_addr_type[i])) {dprintk (1 ,"duplicate logical address type\n" );return -EINVAL ;
@@ -1644,10 +1648,6 @@ int __cec_s_log_addrs(struct cec_adapter *adap,dprintk (1 ,"invalid primary device type\n" );return -EINVAL ; } -if (log_addrs->log_addr_type[i] >CEC_LOG_ADDR_TYPE_UNREGISTERED ) { -dprintk (1 ,"unknown logical address type\n" ); -return -EINVAL ; - }for (j =0 ; j < feature_sz; j++) {if ((features[j] &0x80 ) ==0 ) {if (op_is_dev_features)
drivers/media/i2c/ov5640.c +2 -2
@@ -2298,8 +2298,8 @@ static int ov5640_probe(struct i2c_client *client, free_ctrls:v4l2_ctrl_handler_free (&sensor->ctrls.handler); entity_cleanup: -mutex_destroy (&sensor->lock);media_entity_cleanup (&sensor->sd.entity); +mutex_destroy (&sensor->lock);return ret; }
@@ -2309,9 +2309,9 @@ static int ov5640_remove(struct i2c_client *client)struct ov5640_dev *sensor =to_ov5640_dev (sd);v4l2_async_unregister_subdev (&sensor->sd); -mutex_destroy (&sensor->lock);media_entity_cleanup (&sensor->sd.entity);v4l2_ctrl_handler_free (&sensor->ctrls.handler); +mutex_destroy (&sensor->lock);return 0 ; }
drivers/media/platform/rcar-fcp.c +5 -0
@@ -12,6 +12,7 @@*/ #include <linux/device.h> +#include <linux/dma-mapping.h> #include <linux/list.h> #include <linux/module.h> #include <linux/mutex.h>
@@ -24,6 +25,7 @@struct rcar_fcp_device {struct list_head list;struct device *dev; +struct device_dma_parameters dma_parms; };static LIST_HEAD (fcp_devices);
@@ -139,6 +141,9 @@ static int rcar_fcp_probe(struct platform_device *pdev) fcp->dev = &pdev->dev; + fcp->dev->dma_parms = &fcp->dma_parms; +dma_set_max_seg_size (fcp->dev,DMA_BIT_MASK (32 )); +pm_runtime_enable (&pdev->dev);mutex_lock (&fcp_lock);
drivers/media/tuners/si2157.c +7 -8
@@ -84,24 +84,23 @@ static int si2157_init(struct dvb_frontend *fe)struct si2157_cmd cmd;const struct firmware *fw;const char *fw_name; -unsigned int uitmp, chip_id; +unsigned int chip_id, xtal_trim;dev_dbg (&client->dev,"\n" ); -/* Returned IF frequency is garbage when firmware is not running */ -memcpy (cmd.args,"\x15\x00\x06\x07" ,4 ); +/* Try to get Xtal trim property, to verify tuner still running */ +memcpy (cmd.args,"\x15\x00\x04\x02" ,4 ); cmd.wlen =4 ; cmd.rlen =4 ; ret =si2157_cmd_execute (client, &cmd); -if (ret) - goto err; - uitmp = cmd.args[2 ] <<0 | cmd.args[3 ] <<8 ; -dev_dbg (&client->dev,"if_frequency kHz=%u\n" , uitmp); + xtal_trim = cmd.args[2 ] | (cmd.args[3 ] <<8 ); -if (uitmp == dev->if_frequency /1000 ) +if (ret ==0 && xtal_trim <16 ) goto warm; + dev->if_frequency =0 ;/* we no longer know current tuner state */ +/* power up */ if (dev->chiptype ==SI2157_CHIPTYPE_SI2146 ) {memcpy (cmd.args,"\xc0\x05\x01\x00\x00\x0b\x00\x00\x01" ,9 );
drivers/media/usb/dvb-usb/dibusb-mb.c +1 -1
@@ -84,7 +84,7 @@ static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap)if (i2c_transfer (&adap->dev->i2c_adap, msg,2 ) !=2 ) {err ("tuner i2c write failed." ); - ret = -EREMOTEIO ; +return -EREMOTEIO ; }if (adap->fe_adap[0 ].fe->ops.i2c_gate_ctrl)
drivers/media/usb/go7007/snd-go7007.c +17 -18
@@ -243,22 +243,18 @@ int go7007_snd_init(struct go7007 *go) gosnd->capturing =0 ; ret =snd_card_new (go->dev, index[dev], id[dev],THIS_MODULE ,0 , &gosnd->card); -if (ret <0 ) { -kfree (gosnd); -return ret; - } +if (ret <0 ) + goto free_snd; + ret =snd_device_new (gosnd->card,SNDRV_DEV_LOWLEVEL , go, &go7007_snd_device_ops); -if (ret <0 ) { -kfree (gosnd); -return ret; - } +if (ret <0 ) + goto free_card; + ret =snd_pcm_new (gosnd->card,"go7007" ,0 ,0 ,1 , &gosnd->pcm); -if (ret <0 ) { -snd_card_free (gosnd->card); -kfree (gosnd); -return ret; - } +if (ret <0 ) + goto free_card; +strlcpy (gosnd->card->driver,"go7007" ,sizeof (gosnd->card->driver));strlcpy (gosnd->card->shortname, go->name,sizeof (gosnd->card->driver)); strlcpy(gosnd->card->longname, gosnd->card->shortname,
@@ -269,11 +265,8 @@ int go7007_snd_init(struct go7007 *go) &go7007_snd_capture_ops); ret =snd_card_register (gosnd->card); -if (ret <0 ) { -snd_card_free (gosnd->card); -kfree (gosnd); -return ret; - } +if (ret <0 ) + goto free_card; gosnd->substream =NULL ; go->snd_context = gosnd;
@@ -281,6 +274,12 @@ int go7007_snd_init(struct go7007 *go) ++dev;return 0 ; + +free_card: +snd_card_free (gosnd->card); +free_snd: +kfree (gosnd); +return ret; }EXPORT_SYMBOL (go7007_snd_init);
drivers/mmc/core/sdio.c +1 -2
@@ -717,9 +717,8 @@ static int mmc_sdio_init_card(struct mmc_host *host, u32 ocr,/* Retry init sequence, but without R4_18V_PRESENT. */ retries =0 ; goto try_again; - }else { - goto remove; } +return err; }/*
drivers/mmc/host/sdhci-esdhc-imx.c +1 -1
@@ -79,7 +79,7 @@#define ESDHC_STD_TUNING_EN (1 << 24)/* NOTE: the minimum valid tuning start tap for mx6sl is 1 */ #define ESDHC_TUNING_START_TAP_DEFAULT 0x1 -#define ESDHC_TUNING_START_TAP_MASK 0xff +#define ESDHC_TUNING_START_TAP_MASK 0x7f#define ESDHC_TUNING_STEP_MASK 0x00070000#define ESDHC_TUNING_STEP_SHIFT 16
drivers/mmc/host/sdhci-msm.c +9 -1
@@ -860,6 +860,12 @@ static int sdhci_msm_execute_tuning(struct mmc_host *mmc, u32 opcode)/* Clock-Data-Recovery used to dynamically adjust RX sampling point */ msm_host->use_cdr = true; +/* +* Clear tuning_done flag before tuning to ensure proper +* HS400 settings. +*/ + msm_host->tuning_done =0 ; +/* * For HS400 tuning in HS200 timing requires: * - select MCLK/2 in VENDOR_SPEC
@@ -1162,7 +1168,9 @@ static const struct sdhci_pltfm_data sdhci_msm_pdata = { .quirks = SDHCI_QUIRK_BROKEN_CARD_DETECTION |SDHCI_QUIRK_NO_CARD_NO_RESET |SDHCI_QUIRK_SINGLE_POWER_WRITE | - SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, +SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | + SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, .ops = &sdhci_msm_ops, };
drivers/mmc/host/via-sdmmc.c +6 -1
@@ -323,6 +323,8 @@ struct via_crdr_mmc_host {/* some devices need a very long delay for power to stabilize */ #define VIA_CRDR_QUIRK_300MS_PWRDELAY 0x0001 +#define VIA_CMD_TIMEOUT_MS 1000 +static const struct pci_device_id via_ids[] = { {PCI_VENDOR_ID_VIA ,PCI_DEVICE_ID_VIA_9530 ,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 ,0 ,},
@@ -555,14 +557,17 @@ static void via_sdc_send_command(struct via_crdr_mmc_host *host, {void __iomem *addrbase;struct mmc_data *data; +unsigned int timeout_ms;u32 cmdctrl =0 ;WARN_ON (host->cmd); data = cmd->data; -mod_timer (&host->timer, jiffies +HZ ); host->cmd = cmd; + timeout_ms = cmd->busy_timeout ? cmd->busy_timeout :VIA_CMD_TIMEOUT_MS ; +mod_timer (&host->timer, jiffies +msecs_to_jiffies (timeout_ms)); +/*Command index*/ cmdctrl = cmd->opcode <<8 ;
drivers/mtd/nand/brcmnand/brcmnand.c +7 -4
@@ -911,11 +911,14 @@ static int brcmnand_hamming_ooblayout_free(struct mtd_info *mtd, int section,if (!section) {/* * Small-page NAND use byte 6 for BBI while large-page -* NAND use byte 0. +* NAND use bytes 0 and 1. */ -if (cfg->page_size >512 ) - oobregion->offset++; - oobregion->length--; +if (cfg->page_size >512 ) { + oobregion->offset +=2 ; + oobregion->length -=2 ; + }else { + oobregion->length--; + } } }
drivers/mtd/nand/pasemi_nand.c +3 -1
@@ -163,7 +163,7 @@ static int pasemi_nand_probe(struct platform_device *ofdev)if (mtd_device_register (pasemi_nand_mtd,NULL ,0 )) {dev_err (dev,"Unable to register MTD device\n" ); err = -ENODEV ; - goto out_lpc; + goto out_cleanup_nand; } dev_info(dev, "PA Semi NAND flash at %pR, control at I/O %x\n", &res,
@@ -171,6 +171,8 @@ static int pasemi_nand_probe(struct platform_device *ofdev)return 0 ; + out_cleanup_nand: +nand_cleanup (chip); out_lpc:release_region (lpcctl,4 ); out_ior:
drivers/net/can/usb/kvaser_usb.c +3 -3
@@ -791,7 +791,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,if (!urb)return -ENOMEM ; - buf =kmalloc (sizeof (struct kvaser_msg ),GFP_ATOMIC ); + buf =kzalloc (sizeof (struct kvaser_msg ),GFP_ATOMIC );if (!buf) {usb_free_urb (urb);return -ENOMEM ;
@@ -1459,7 +1459,7 @@ static int kvaser_usb_set_opt_mode(const struct kvaser_usb_net_priv *priv)struct kvaser_msg *msg;int rc; - msg =kmalloc (sizeof (*msg),GFP_KERNEL ); + msg =kzalloc (sizeof (*msg),GFP_KERNEL );if (!msg)return -ENOMEM ;
@@ -1592,7 +1592,7 @@ static int kvaser_usb_flush_queue(struct kvaser_usb_net_priv *priv)struct kvaser_msg *msg;int rc; - msg =kmalloc (sizeof (*msg),GFP_KERNEL ); + msg =kzalloc (sizeof (*msg),GFP_KERNEL );if (!msg)return -ENOMEM ;
drivers/net/ethernet/allwinner/sun4i-emac.c +2 -2
@@ -433,7 +433,7 @@ static void emac_timeout(struct net_device *dev)/* Hardware start transmission. * Send a packet to media from the upper layer. */ -static int emac_start_xmit (struct sk_buff *skb,struct net_device *dev) +static netdev_tx_t emac_start_xmit (struct sk_buff *skb,struct net_device *dev) {struct emac_board_info *db =netdev_priv (dev);unsigned long channel;
@@ -441,7 +441,7 @@ static int emac_start_xmit(struct sk_buff *skb, struct net_device *dev) channel = db->tx_fifo_stat &3 ;if (channel ==3 ) -return 1 ; +return NETDEV_TX_BUSY ; channel = (channel ==1 ?1 :0 );
drivers/net/ethernet/amazon/ena/ena_com.c +4 -2
@@ -2131,6 +2131,9 @@ int ena_com_get_hash_function(struct ena_com_dev *ena_dev, rss->hash_key;int rc; +if (unlikely (!func)) +return -EINVAL ; + rc = ena_com_get_feature_ex(ena_dev, &get_resp, ENA_ADMIN_RSS_HASH_FUNCTION, rss->hash_key_dma_addr,
@@ -2143,8 +2146,7 @@ int ena_com_get_hash_function(struct ena_com_dev *ena_dev,if (rss->hash_func) rss->hash_func--; -if (func) - *func = rss->hash_func; + *func = rss->hash_func;if (key)memcpy (key, hash_key->key, (size_t )(hash_key->keys_num) <<2 );
drivers/net/ethernet/broadcom/genet/bcmgenet.c +4 -0
@@ -72,6 +72,9 @@#define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \ TOTAL_DESC * DMA_DESC_SIZE) +/* Forward declarations */ +static void bcmgenet_set_rx_mode (struct net_device *dev); +static inline void bcmgenet_writel (u32 value,void __iomem *offset) {/* MIPS chips strapped for BE will automagically configure the
@@ -2858,6 +2861,7 @@ static void bcmgenet_netif_start(struct net_device *dev)struct bcmgenet_priv *priv =netdev_priv (dev);/* Start the network engine */ +bcmgenet_set_rx_mode (dev);bcmgenet_enable_rx_napi (priv);bcmgenet_enable_tx_napi (priv);
drivers/net/ethernet/ibm/ibmvnic.c +3 -5
@@ -3560,12 +3560,10 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,dev_err (dev,"Error %ld in VERSION_EXCHG_RSP\n" , rc);break ; } -dev_info (dev,"Partner protocol version is %d\n" , - crq->version_exchange_rsp.version); -if (be16_to_cpu (crq->version_exchange_rsp.version) < - ibmvnic_version) - ibmvnic_version = + ibmvnic_version =be16_to_cpu (crq->version_exchange_rsp.version); +dev_info (dev,"Partner protocol version is %d\n" , + ibmvnic_version);send_cap_queries (adapter);break ;case QUERY_CAPABILITY_RSP :
drivers/net/ethernet/intel/e1000/e1000_main.c +3 -1
@@ -3169,8 +3169,9 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, hdr_len =skb_transport_offset (skb) +tcp_hdrlen (skb);if (skb->data_len && hdr_len == len) {switch (hw->mac_type) { +case e1000_82544: {unsigned int pull_size; -case e1000_82544: +/* Make sure we have room to chop off 4 bytes, * and that the end alignment will work out to * this hardware's requirements
@@ -3191,6 +3192,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, } len =skb_headlen (skb);break ; + }default :/* do nothing */ break ;
drivers/net/ethernet/intel/e1000e/e1000.h +0 -1
@@ -596,7 +596,6 @@ static inline u32 __er32(struct e1000_hw *hw, unsigned long reg)#define er32 (reg) __er32(hw, E1000_##reg) -s32 __ew32_prepare (struct e1000_hw *hw);void __ew32 (struct e1000_hw *hw,unsigned long reg,u32 val);#define ew32 (reg, val) __ew32(hw, E1000_##reg, (val))
drivers/net/ethernet/intel/e1000e/netdev.c +9 -7
@@ -137,14 +137,12 @@ static const struct e1000_reg_info e1000_reg_info_tbl[] = {* has bit 24 set while ME is accessing MAC CSR registers, wait if it is set * and try again a number of times. **/ -s32 __ew32_prepare (struct e1000_hw *hw) +static void __ew32_prepare (struct e1000_hw *hw) {s32 i =E1000_ICH_FWSM_PCIM2PCI_COUNT ;while ((er32 (FWSM ) &E1000_ICH_FWSM_PCIM2PCI ) && --i)udelay (50 ); - -return i; }void __ew32 (struct e1000_hw *hw,unsigned long reg,u32 val)
@@ -625,11 +623,11 @@ static void e1000e_update_rdt_wa(struct e1000_ring *rx_ring, unsigned int i) {struct e1000_adapter *adapter = rx_ring->adapter;struct e1000_hw *hw = &adapter->hw; -s32 ret_val =__ew32_prepare (hw); +__ew32_prepare (hw);writel (i, rx_ring->tail); -if (unlikely (!ret_val && (i !=readl (rx_ring->tail)))) { +if (unlikely (i !=readl (rx_ring->tail))) {u32 rctl =er32 (RCTL );ew32 (RCTL , rctl & ~E1000_RCTL_EN );
@@ -642,11 +640,11 @@ static void e1000e_update_tdt_wa(struct e1000_ring *tx_ring, unsigned int i) {struct e1000_adapter *adapter = tx_ring->adapter;struct e1000_hw *hw = &adapter->hw; -s32 ret_val =__ew32_prepare (hw); +__ew32_prepare (hw);writel (i, tx_ring->tail); -if (unlikely (!ret_val && (i !=readl (tx_ring->tail)))) { +if (unlikely (i !=readl (tx_ring->tail))) {u32 tctl =er32 (TCTL );ew32 (TCTL , tctl & ~E1000_TCTL_EN );
@@ -5271,6 +5269,10 @@ static void e1000_watchdog_task(struct work_struct *work)/* oops */ break ; } +if (hw->mac.type == e1000_pch_spt) { + netdev->features &= ~NETIF_F_TSO ; + netdev->features &= ~NETIF_F_TSO6 ; + } }/* enable transmits in the hardware, need to do this
drivers/net/ethernet/intel/igb/igb_ethtool.c +2 -1
@@ -163,7 +163,8 @@ static int igb_get_link_ksettings(struct net_device *netdev,u32 speed;u32 supported, advertising; - status =rd32 (E1000_STATUS ); + status =pm_runtime_suspended (&adapter->pdev->dev) ? +0 :rd32 (E1000_STATUS );if (hw->phy.media_type == e1000_media_type_copper) { supported = (SUPPORTED_10baseT_Half |
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +1 -1
@@ -2267,7 +2267,7 @@ s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw) }/* Configure pause time (2 TCs per register) */ - reg = hw->fc.pause_time *0x00010001 ; + reg = hw->fc.pause_time *0x00010001U ;for (i =0 ; i < (MAX_TRAFFIC_CLASS /2 ); i++)IXGBE_WRITE_REG (hw,IXGBE_FCTTV (i), reg);
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
@@ -2274,7 +2274,8 @@ static void ixgbe_rx_buffer_flip(struct ixgbe_ring *rx_ring, rx_buffer->page_offset ^= truesize;#else unsigned int truesize =ring_uses_build_skb (rx_ring) ? -SKB_DATA_ALIGN (IXGBE_SKB_PAD + size) : +SKB_DATA_ALIGN (IXGBE_SKB_PAD + size) + +SKB_DATA_ALIGN (sizeof (struct skb_shared_info )) :SKB_DATA_ALIGN (size); rx_buffer->page_offset += truesize;
drivers/net/ethernet/nxp/lpc_eth.c +2 -1
@@ -845,7 +845,8 @@ static int lpc_mii_init(struct netdata_local *pldat)if (mdiobus_register (pldat->mii_bus)) goto err_out_unregister_bus; -if (lpc_mii_probe (pldat->ndev) !=0 ) + err =lpc_mii_probe (pldat->ndev); +if (err) goto err_out_unregister_bus;return 0 ;
drivers/net/ethernet/qlogic/qede/qede.h +2 -0
@@ -528,12 +528,14 @@ void qede_update_rx_prod(struct qede_dev *edev, struct qede_rx_queue *rxq);#define RX_RING_SIZE ((u16)BIT(RX_RING_SIZE_POW))#define NUM_RX_BDS_MAX (RX_RING_SIZE - 1)#define NUM_RX_BDS_MIN 128 +#define NUM_RX_BDS_KDUMP_MIN 63#define NUM_RX_BDS_DEF ((u16)BIT(10) - 1)#define TX_RING_SIZE_POW 13#define TX_RING_SIZE ((u16)BIT(TX_RING_SIZE_POW))#define NUM_TX_BDS_MAX (TX_RING_SIZE - 1)#define NUM_TX_BDS_MIN 128 +#define NUM_TX_BDS_KDUMP_MIN 63#define NUM_TX_BDS_DEF NUM_TX_BDS_MAX#define QEDE_MIN_PKT_LEN 64
drivers/net/ethernet/qlogic/qede/qede_main.c +9 -2
@@ -29,6 +29,7 @@* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ +#include <linux/crash_dump.h> #include <linux/module.h> #include <linux/pci.h> #include <linux/version.h>
@@ -624,8 +625,14 @@ static struct qede_dev *qede_alloc_etherdev(struct qed_dev *cdev, edev->dp_module = dp_module; edev->dp_level = dp_level; edev->ops = qed_ops; - edev->q_num_rx_buffers =NUM_RX_BDS_DEF ; - edev->q_num_tx_buffers =NUM_TX_BDS_DEF ; + +if (is_kdump_kernel ()) { + edev->q_num_rx_buffers =NUM_RX_BDS_KDUMP_MIN ; + edev->q_num_tx_buffers =NUM_TX_BDS_KDUMP_MIN ; + }else { + edev->q_num_rx_buffers =NUM_RX_BDS_DEF ; + edev->q_num_tx_buffers =NUM_TX_BDS_DEF ; + }DP_INFO (edev,"Allocated netdev with %d tx queues and %d rx queues\n" , info->num_queues, info->num_queues);
drivers/net/macvlan.c +4 -0
@@ -449,6 +449,10 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb)int ret;rx_handler_result_t handle_res; +/* Packets from dev_loopback_xmit() do not have L2 header, bail out */ +if (unlikely (skb->pkt_type ==PACKET_LOOPBACK )) +return RX_HANDLER_PASS ; + port =macvlan_port_get_rcu (skb->dev);if (is_multicast_ether_addr (eth->h_dest)) {unsigned int hash;
drivers/net/vmxnet3/vmxnet3_ethtool.c +2 -0
@@ -692,6 +692,8 @@ vmxnet3_get_rss(struct net_device *netdev, u32 *p, u8 *key, u8 *hfunc) *hfunc =ETH_RSS_HASH_TOP ;if (!p)return 0 ; +if (n >UPT1_RSS_MAX_IND_TABLE_SIZE ) +return 0 ;while (n--) p[n] = rssConf->indTable[n];return 0 ;
drivers/net/vxlan.c +4 -0
@@ -1610,6 +1610,10 @@ static struct sk_buff *vxlan_na_create(struct sk_buff *request, ns_olen = request->len -skb_network_offset (request) -sizeof (struct ipv6hdr ) -sizeof (*ns);for (i =0 ; i < ns_olen-1 ; i += (ns->opt[i+1 ]<<3 )) { +if (!ns->opt[i +1 ]) { +kfree_skb (reply); +return NULL ; + }if (ns->opt[i] ==ND_OPT_SOURCE_LL_ADDR ) { daddr = ns->opt + i +sizeof (struct nd_opt_hdr );break ;
drivers/net/wireless/ath/ath9k/hif_usb.c +45 -13
164 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.h +6 -0
@@ -86,6 +86,11 @@ struct tx_buf {struct list_head list; }; +struct rx_buf { +struct sk_buff *skb; +struct hif_device_usb *hif_dev; +}; +#define HIF_USB_TX_STOP BIT(0)#define HIF_USB_TX_FLUSH BIT(1)
@@ -133,5 +138,6 @@ struct hif_device_usb {int ath9k_hif_usb_init (void );void ath9k_hif_usb_exit (void ); +void ath9k_hif_usb_dealloc_urbs (struct hif_device_usb *hif_dev);#endif /* HTC_USB_H */
drivers/net/wireless/ath/ath9k/htc_drv_init.c +7 -3
@@ -933,8 +933,9 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv,int ath9k_htc_probe_device (struct htc_target *htc_handle,struct device *dev,u16 devid,char *product,u32 drv_info) { -struct ieee80211_hw *hw; +struct hif_device_usb *hif_dev;struct ath9k_htc_priv *priv; +struct ieee80211_hw *hw;int ret; hw =ieee80211_alloc_hw (sizeof (struct ath9k_htc_priv ), &ath9k_htc_ops);
@@ -969,7 +970,10 @@ int ath9k_htc_probe_device(struct htc_target *htc_handle, struct device *dev,return 0 ; err_init: -ath9k_deinit_wmi (priv); +ath9k_stop_wmi (priv); + hif_dev = (struct hif_device_usb *)htc_handle->hif_dev; +ath9k_hif_usb_dealloc_urbs (hif_dev); +ath9k_destoy_wmi (priv); err_free:ieee80211_free_hw (hw);return ret;
@@ -984,7 +988,7 @@ void ath9k_htc_disconnect_device(struct htc_target *htc_handle, bool hotunplug) htc_handle->drv_priv->ah->ah_flags |=AH_UNPLUGGED ;ath9k_deinit_device (htc_handle->drv_priv); -ath9k_deinit_wmi (htc_handle->drv_priv); +ath9k_stop_wmi (htc_handle->drv_priv);ieee80211_free_hw (htc_handle->drv_priv->hw); } }
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +3 -3
@@ -999,9 +999,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,* which are not PHY_ERROR (short radar pulses have a length of 3) */ if (unlikely (!rs_datalen || (rs_datalen <10 && !is_phyerr))) { -ath_warn (common, -"Short RX data len, dropping (dlen: %d)\n" , - rs_datalen); +ath_dbg (common,ANY , +"Short RX data len, dropping (dlen: %d)\n" , + rs_datalen); goto rx_next; }
drivers/net/wireless/ath/ath9k/htc_hst.c +3 -0
@@ -113,6 +113,9 @@ static void htc_process_conn_rsp(struct htc_target *target,if (svc_rspmsg->status ==HTC_SERVICE_SUCCESS ) { epid = svc_rspmsg->endpoint_id; +if (epid <0 || epid >=ENDPOINT_MAX ) +return ; + service_id =be16_to_cpu (svc_rspmsg->service_id); max_msglen =be16_to_cpu (svc_rspmsg->max_msg_len); endpoint = &target->endpoint[epid];
drivers/net/wireless/ath/ath9k/wmi.c +4 -1
@@ -112,14 +112,17 @@ struct wmi *ath9k_init_wmi(struct ath9k_htc_priv *priv)return wmi; } -void ath9k_deinit_wmi (struct ath9k_htc_priv *priv) +void ath9k_stop_wmi (struct ath9k_htc_priv *priv) {struct wmi *wmi = priv->wmi;mutex_lock (&wmi->op_mutex); wmi->stopped = true;mutex_unlock (&wmi->op_mutex); +} +void ath9k_destoy_wmi (struct ath9k_htc_priv *priv) +{kfree (priv->wmi); }
drivers/net/wireless/ath/ath9k/wmi.h +2 -1
@@ -179,7 +179,6 @@ struct wmi { };struct wmi *ath9k_init_wmi (struct ath9k_htc_priv *priv); -void ath9k_deinit_wmi (struct ath9k_htc_priv *priv);int ath9k_wmi_connect (struct htc_target *htc,struct wmi *wmi,enum htc_endpoint_id *wmi_ctrl_epid); int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
@@ -189,6 +188,8 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,void ath9k_wmi_event_tasklet (unsigned long data);void ath9k_fatal_work (struct work_struct *work);void ath9k_wmi_event_drain (struct ath9k_htc_priv *priv); +void ath9k_stop_wmi (struct ath9k_htc_priv *priv); +void ath9k_destoy_wmi (struct ath9k_htc_priv *priv);#define WMI_CMD (_wmi_cmd) \ do { \
drivers/net/wireless/ath/carl9170/fw.c +1 -3
@@ -351,9 +351,7 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) ar->hw->wiphy->interface_modes |=BIT (NL80211_IFTYPE_ADHOC );if (SUPP (CARL9170FW_WLANTX_CAB )) { - if_comb_types |= -BIT (NL80211_IFTYPE_AP ) | -BIT (NL80211_IFTYPE_P2P_GO ); + if_comb_types |=BIT (NL80211_IFTYPE_AP );#ifdef CONFIG_MAC80211_MESH if_comb_types |=
drivers/net/wireless/ath/carl9170/main.c +4 -17
@@ -582,11 +582,10 @@ static int carl9170_init_interface(struct ar9170 *ar, ar->disable_offload |= ((vif->type !=NL80211_IFTYPE_STATION ) && (vif->type !=NL80211_IFTYPE_AP )); -/* While the driver supports HW offload in a single -* P2P client configuration, it doesn't support HW -* offload in the favourit, concurrent P2P GO+CLIENT -* configuration. Hence, HW offload will always be -* disabled for P2P. +/* The driver used to have P2P GO+CLIENT support, +* but since this was dropped and we don't know if +* there are any gremlins lurking in the shadows, +* so best we keep HW offload disabled for P2P. */ ar->disable_offload |= vif->p2p;
@@ -639,18 +638,6 @@ static int carl9170_op_add_interface(struct ieee80211_hw *hw,if (vif->type ==NL80211_IFTYPE_STATION )break ; -/* P2P GO [master] use-case -* Because the P2P GO station is selected dynamically -* by all participating peers of a WIFI Direct network, -* the driver has be able to change the main interface -* operating mode on the fly. -*/ -if (main_vif->p2p && vif->p2p && - vif->type ==NL80211_IFTYPE_AP ) { - old_main = main_vif; -break ; - } - err = -EBUSY ;
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/wcn36xx/main.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43/main.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43legacy/main.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/b43legacy/xmit.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c +2 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/marvell/mwifiex/cfg80211.c +6 -8
Lines of this file are not shown. View the raw message.
drivers/net/wireless/realtek/rtlwifi/usb.c +2 -6
Lines of this file are not shown. View the raw message.
drivers/pci/quirks.c +169 -38
207 lines not on this page · raw message
drivers/pinctrl/samsung/pinctrl-exynos.c +9 -0
Lines of this file are not shown. View the raw message.
drivers/power/reset/vexpress-poweroff.c +1 -0
Lines of this file are not shown. View the raw message.
fs/btrfs/send.c +67 -0
67 lines not on this page · raw message
include/linux/string.h +48 -12
60 lines not on this page · raw message
kernel/audit.c +30 -22
52 lines not on this page · raw message
tools/testing/selftests/networking/timestamping/rxtimestamp.c +1 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.