Linux 5.10.111
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.111 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/include/asm/cputype.h | 2 arch/arm64/include/asm/module.lds.h | 6 arch/arm64/kernel/insn.c | 4 arch/arm64/kernel/proton-pack.c | 1 arch/mips/boot/dts/ingenic/jz4780.dtsi | 2 arch/mips/include/asm/setup.h | 2 arch/mips/kernel/traps.c | 22 - arch/mips/ralink/ill_acc.c | 1 arch/parisc/kernel/patch.c | 25 - arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 4 arch/powerpc/include/asm/page.h | 6 arch/powerpc/kernel/rtas.c | 6 arch/powerpc/kernel/secvar-sysfs.c | 9 arch/powerpc/kexec/core.c | 15 arch/x86/Kconfig | 5 arch/x86/kvm/emulate.c | 4 arch/x86/kvm/kvm_emulate.h | 1 arch/x86/kvm/svm/pmu.c | 8 arch/x86/kvm/x86.c | 6 arch/x86/power/cpu.c | 21 + arch/x86/xen/smp_hvm.c | 6 arch/x86/xen/time.c | 24 + arch/xtensa/boot/dts/xtfpga-flash-128m.dtsi | 8 arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi | 8 arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi | 4 drivers/ata/sata_dwc_460ex.c | 6 drivers/block/drbd/drbd_int.h | 8 drivers/block/drbd/drbd_nl.c | 41 +- drivers/block/drbd/drbd_state.c | 18 - drivers/block/drbd/drbd_state_change.h | 8 drivers/char/virtio_console.c | 8 drivers/clk/clk-si5341.c | 16 drivers/clk/clk.c | 24 + drivers/clk/ti/clk.c | 13 drivers/dma/sh/shdma-base.c | 4 drivers/gpio/gpiolib.c | 19 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 2 drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 24 - drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 3 drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 8 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 drivers/gpu/drm/imx/imx-ldb.c | 2 drivers/gpu/drm/imx/parallel-display.c | 4 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 1 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c | 1 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 1 drivers/hv/Kconfig | 1 drivers/hv/channel_mgmt.c | 6 drivers/hv/vmbus_drv.c | 9 drivers/infiniband/hw/hfi1/mmu_rb.c | 6 drivers/infiniband/hw/mlx5/mr.c | 4 drivers/infiniband/sw/rdmavt/qp.c | 6 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 1 drivers/iommu/omap-iommu.c | 2 drivers/irqchip/irq-gic-v3.c | 14 drivers/irqchip/irq-gic.c | 6 drivers/md/dm-ioctl.c | 2 drivers/md/dm-rq.c | 7 drivers/md/dm.c | 11 drivers/mmc/host/mmci_stm32_sdmmc.c | 6 drivers/mmc/host/renesas_sdhi_core.c | 4 drivers/mmc/host/sdhci-xenon.c | 10 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 3 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c | 4 drivers/net/ethernet/intel/ice/ice.h | 2 drivers/net/ethernet/intel/ice/ice_lib.c | 3 drivers/net/ethernet/intel/ice/ice_main.c | 4 drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 4 drivers/net/ethernet/intel/ice/ice_xsk.c | 4 drivers/net/ethernet/qlogic/qede/qede_fp.c | 3 drivers/net/ethernet/sfc/rx_common.c | 3 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 drivers/net/macvtap.c | 6 drivers/net/mdio/mdio-mscc-miim.c | 6 drivers/net/phy/sfp-bus.c | 6 drivers/net/tap.c | 3 drivers/net/tun.c | 3 drivers/net/wireless/ath/ath11k/ahb.c | 2 drivers/net/wireless/ath/ath11k/mhi.c | 2 drivers/net/wireless/ath/ath5k/eeprom.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 5 drivers/net/wireless/mediatek/mt76/dma.c | 1 drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 drivers/parisc/dino.c | 41 ++ drivers/parisc/gsc.c | 31 + drivers/parisc/gsc.h | 1 drivers/parisc/lasi.c | 7 drivers/parisc/wax.c | 7 drivers/pci/controller/pci-aardvark.c | 16 drivers/pci/endpoint/functions/pci-epf-test.c | 14 drivers/pci/hotplug/pciehp_hpc.c | 2 drivers/perf/qcom_l2_pmu.c | 6 drivers/phy/amlogic/phy-meson8b-usb2.c | 5 drivers/power/supply/axp20x_battery.c | 13 drivers/power/supply/axp288_charger.c | 14 drivers/ptp/ptp_sysfs.c | 4 drivers/rtc/rtc-wm8350.c | 11 drivers/scsi/aha152x.c | 6 drivers/scsi/bfa/bfad_attr.c | 26 - drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 16 drivers/scsi/libfc/fc_exch.c | 1 drivers/scsi/mvsas/mv_init.c | 4 drivers/scsi/pm8001/pm8001_hwi.c | 27 + drivers/scsi/pm8001/pm8001_sas.c | 2 drivers/scsi/pm8001/pm80xx_hwi.c | 17 - drivers/scsi/zorro7xx.c | 2 drivers/spi/spi-bcm-qspi.c | 4 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 6 drivers/staging/wfx/main.c | 7 drivers/tty/serial/samsung_tty.c | 5 drivers/usb/dwc3/dwc3-omap.c | 2 drivers/usb/gadget/udc/tegra-xudc.c | 20 - drivers/usb/host/ehci-pci.c | 9 drivers/vhost/net.c | 1 drivers/w1/slaves/w1_therm.c | 8 fs/btrfs/extent_io.h | 2 fs/btrfs/inode.c | 22 + fs/ceph/dir.c | 11 fs/gfs2/bmap.c | 2 fs/gfs2/file.c | 3 fs/gfs2/inode.c | 2 fs/gfs2/rgrp.c | 7 fs/gfs2/rgrp.h | 2 fs/gfs2/super.c | 2 fs/io_uring.c | 23 - fs/jfs/inode.c | 3 fs/minix/inode.c | 3 fs/nfs/dir.c | 10 fs/nfs/direct.c | 48 +- fs/nfs/file.c | 4 fs/nfs/inode.c | 1 fs/nfs/internal.h | 17 + fs/nfs/nfs42proc.c | 9 fs/nfs/nfs4file.c | 6 fs/nfs/nfs4state.c | 12 fs/nfs/pagelist.c | 10 fs/nfs/pnfs_nfs.c | 8 fs/nfs/write.c | 34 +- fs/ubifs/dir.c | 12 include/linux/gpio/driver.h | 9 include/linux/ipv6.h | 2 include/linux/mmzone.h | 11 include/linux/nfs_fs.h | 10 include/net/arp.h | 1 include/net/bluetooth/bluetooth.h | 14 include/uapi/linux/bpf.h | 3 include/uapi/linux/can/isotp.h | 28 + init/main.c | 6 kernel/cgroup/cgroup-v1.c | 7 kernel/cgroup/cgroup.c | 17 - lib/lz4/lz4_decompress.c | 8 lib/test_ubsan.c | 11 mm/memory.c | 25 + mm/mempolicy.c | 1 mm/mremap.c | 3 mm/rmap.c | 25 + net/batman-adv/multicast.c | 2 net/bluetooth/hci_event.c | 3 net/bluetooth/l2cap_core.c | 1 net/can/isotp.c | 12 net/core/filter.c | 27 + net/core/rtnetlink.c | 13 net/ipv4/arp.c | 9 net/ipv4/fib_frontend.c | 5 net/ipv4/fib_semantics.c | 7 net/ipv4/inet_hashtables.c | 53 +-- net/ipv6/addrconf.c | 4 net/ipv6/inet6_hashtables.c | 5 net/ipv6/ip6_input.c | 2 net/ipv6/ip6mr.c | 8 net/ipv6/route.c | 2 net/netlabel/netlabel_kapi.c | 2 net/openvswitch/actions.c | 2 net/openvswitch/flow_netlink.c | 99 +++++- net/rxrpc/net_ns.c | 2 net/smc/smc_core.c | 2 net/sunrpc/clnt.c | 7 net/sunrpc/sched.c | 11 net/sunrpc/svcsock.c | 4 net/sunrpc/xprt.c | 16 net/sunrpc/xprtrdma/transport.c | 6 net/sunrpc/xprtsock.c | 54 ++- net/tls/tls_sw.c | 2 net/wireless/scan.c | 9 scripts/Makefile.ubsan | 1 tools/build/feature/Makefile | 9 tools/lib/bpf/Makefile | 4 tools/perf/Makefile.config | 6 tools/perf/arch/arm64/util/arm-spe.c | 6 tools/perf/perf.c | 2 tools/perf/util/session.c | 15 tools/perf/util/setup.py | 8 tools/testing/selftests/cgroup/cgroup_util.c | 6 tools/testing/selftests/cgroup/test_core.c | 165 ++++++++++ 200 files changed, 1425 insertions(+), 533 deletions(-)
Adam Wujek (1):
clk: si5341: fix reported clk_rate when output divider is 2
Adrian Hunter (1):
perf tools: Fix perf's libperf_print callback
Aharon Landau (1):
RDMA/mlx5: Don't remove cache MRs when a delay is needed
Alex Deucher (2):
drm/amdkfd: make CRAT table missing message informational only drm/amdgpu/smu10: fix SoC/fclk units in auto mode
Alexander Lobakin (1):
MIPS: fix fortify panic when copying asm exception handlers
Amjad Ouled-Ameur (1):
phy: amlogic: meson8b-usb2: Use dev_err_probe()
Anatolii Gerasymenko (2):
ice: Set txq_teid to ICE_INVAL_TEID on ring creation
ice: Do not skip not enabled queues in ice_vc_dis_qs_msg
Andre Przywara (1):
irqchip/gic, gic-v3: Prevent GSI to SGI translations
Andrea Parri (Microsoft) (1):
Drivers: hv: vmbus: Replace smp_store_mb() with virt_store_mb()
Andreas Gruenbacher (2):
gfs2: Check for active reservation in gfs2_release
gfs2: gfs2_setattr_size error path fix
Andy Gospodarek (1):
bnxt_en: reserve space inside receive page for skb_shared_info
Anisse Astier (1):
drm: Add orientation quirk for GPD Win Max
Arnaldo Carvalho de Melo (4):
perf build: Don't use -ffat-lto-objects in the python feature test when building with clang-13 perf python: Fix probing for some clang command line options
tools build: Filter out options and warnings not supported by clang
tools build: Use $(shell ) instead of `` to get embedded libperl's ccopts
Avraham Stern (1):
cfg80211: don't add non transmitted BSS to 6GHz scanned channels
Bob Peterson (1):
gfs2: Fix gfs2_release for non-writers regression
Chanho Park (1):
arm64: Add part number for Arm Cortex-A78AE
Chen-Yu Tsai (1):
net: stmmac: Fix unset max_speed difference between DT and non-DT platforms
ChenXiaoSong (2):
Revert "NFSv4: Handle the special Linux file open access mode"
NFSv4: fix open failure with O_ACCMODE flag
Christian Lamparter (1):
ata: sata_dwc_460ex: Fix crash due to OOB write
Christophe JAILLET (1):
scsi: zorro7xx: Fix a resource leak in zorro7xx_remove_one()
Dale Zhao (1):
drm/amd/display: Add signal type check when verify stream backends same
Damien Le Moal (5):
scsi: pm8001: Fix pm80xx_pci_mem_copy() interface
scsi: pm8001: Fix pm8001_mpi_task_abort_resp()
scsi: pm8001: Fix task leak in pm8001_send_abort_all()
scsi: pm8001: Fix tag leaks on error
scsi: pm8001: Fix memory leak in pm8001_chip_fw_flash_update_req()Dan Carpenter (1):
drm/amdgpu: fix off by one in amdgpu_gfx_kiq_acquire()
David Ahern (1):
ipv6: Fix stats accounting in ip6_pkt_drop
Denis Nikitin (1):
perf session: Remap buf if there is no space for event
Dongli Zhang (1):
xen: delay xen_hvm_init_time_ops() if kdump is boot on vcpu>=32
Douglas Miller (1):
RDMA/hfi1: Fix use-after-free bug for mm struct
Dust Li (1):
net/smc: correct settings of RMB window update limit
Eric Dumazet (2):
ipv6: make mc_forwarding atomic
rxrpc: fix a race in rxrpc_exit_net()
Ethan Lien (1):
btrfs: fix qgroup reserve overflow the qgroup limit
Evgeny Boger (1):
power: supply: axp20x_battery: properly report current when discharging
Fangrui Song (1):
arm64: module: remove (NOLOAD) from linker script
Greg Kroah-Hartman (1):
Linux 5.10.111
Guilherme G. Piccoli (1):
Drivers: hv: vmbus: Fix potential crash on module unload
Guo Ren (1):
arm64: patch_text: Fixup last cpu should be master
Guo Xuenan (1):
lz4: fix LZ4_decompress_safe_partial read out of bound
H. Nikolaus Schaller (1):
usb: dwc3: omap: fix "unbalanced disables for smps10_out1" on omap5evm
Haimin Zhang (1):
jfs: prevent NULL deref in diFree
Hangyu Hua (2):
mips: ralink: fix a refcount leak in ill_acc_of_setup() powerpc/secvar: fix refcount leak in format_show()
Hans de Goede (1):
power: supply: axp288-charger: Set Vhold to 4.4V
Harold Huang (1):
tuntap: add sanity checks about msg_controllen in sendmsg
Helge Deller (1):
parisc: Fix CPU affinity for Lasi, WAX and Dino chips
Hou Wenlong (1):
KVM: x86/emulator: Emulate RDPID only if it is enabled in guest
Hou Zhiqiang (1):
PCI: endpoint: Fix alignment fault error in copy tests
Ido Schimmel (1):
ipv4: Invalidate neighbour for broadcast address upon address addition
Ilan Peer (1):
iwlwifi: mvm: Correctly set fragmented EBS
Ilya Maximets (2):
net: openvswitch: don't send internal clone attribute to the userspace.
net: openvswitch: fix leak of nested actions
Ivan Vecera (1):
ice: Clear default forwarding VSI during VSI release
Jakub Kicinski (2):
net: account alternate interface name memory
net: limit altnames to 64k total
Jakub Sitnicki (1):
bpf: Make dst_port field in struct bpf_sock 16-bit wide
James Clark (1):
perf: arm-spe: Fix perf report --mem-mode
Jamie Bainbridge (1):
qede: confirm skb is allocated before using
Jens Axboe (1):
io_uring: fix race between timeout flush and removal
Jianglei Nie (1):
scsi: libfc: Fix use after free in fc_exch_abts_resp()
Jiasheng Jiang (2):
rtc: wm8350: Handle error for wm8350_register_irq drm/imx: imx-ldb: Check for null pointer after calling kmemdup
Jim Mattson (1):
KVM: x86/svm: Clear reserved bits written to PerfEvtSeln MSRs
Jiri Slaby (1):
serial: samsung_tty: do not unlock port->lock for uart_write_wakeup()
John David Anglin (1):
parisc: Fix patch code locking and flushing
Jordy Zomer (1):
dm ioctl: prevent potential spectre v1 gadget
José Expósito (1):
drm/imx: Fix memory leak in imx_pd_connector_get_modes
Kaiwen Hu (1):
btrfs: prevent subvol with swapfile from being deleted
Kalle Valo (1):
ath11k: mhi: use mhi_sync_power_up()
Kamal Dasu (1):
spi: bcm-qspi: fix MSPI only access with bcm_qspi_exec_mem_op()
Karol Herbst (1):
drm/nouveau/pmu: Add missing callbacks for Tegra devices
Kees Cook (1):
ubsan: remove CONFIG_UBSAN_OBJECT_SIZE
Kefeng Wang (1):
powerpc: Fix virt_addr_valid() for 64-bit Book3E & 32-bit
Krzysztof Kozlowski (1):
MIPS: ingenic: correct unit node address
Lee Jones (1):
drm/amdkfd: Create file descriptor after client is added to smi_clients list
Li Chen (1):
PCI: endpoint: Fix misused goto label
Lorenzo Bianconi (1):
mt76: dma: initialize skip_unmap in mt76_dma_rx_fill
Lucas Denefle (1):
w1: w1_therm: fixes w1_seq for ds28ea00 sensors
Luiz Augusto von Dentz (2):
Bluetooth: Fix not checking for valid hdev on bt_dev_{info,warn,err,dbg}
Bluetooth: Fix use after free in hci_send_acl
Lv Yunlong (1):
drbd: Fix five use after free bugs in get_initial_state
Maciej Fijalkowski (1):
ice: synchronize_rcu() when terminating rings
Manivannan Sadhasivam (1):
PCI: pciehp: Add Qualcomm quirk for Command Completed erratum
Marc Zyngier (1):
irqchip/gic-v3: Fix GICR_CTLR.RWP polling
Martin Habets (1):
sfc: Do not free an empty page_ring
Mauricio Faria de Oliveira (1):
mm: fix race between MADV_FREE reclaim and blkdev direct IO read
Max Filippov (1):
xtensa: fix DTC warning unit_address_format
Maxim Kiselev (1):
powerpc: dts: t104xrdb: fix phy type for FMAN 4/5
Maxim Mikityanskiy (1):
bpf: Support dual-stack sockets in bpf_tcp_check_syncookie
Maxime Ripard (1):
clk: Enforce that disjoints limits are invalid
Miaohe Lin (1):
mm/mempolicy: fix mpol_new leak in shared_policy_replace
Miaoqian Lin (1):
dpaa2-ptp: Fix refcount leak in dpaa2_ptp_probe
Michael Chan (1):
bnxt_en: Eliminate unintended link toggle during FW reset
Michael Walle (2):
net: sfp: add 2500base-X quirk for Lantech SFP module
net: phy: mscc-miim: reject clause 45 register accesses
Mike Snitzer (1):
dm: requeue IO if mapping table not yet available
Minghao Chi (CGEL ZTE) (1):
Bluetooth: use memset avoid memory leaks
Nathan Chancellor (1):
x86/Kconfig: Do not allow CONFIG_X86_X32_ABI=y with llvm-objcopy
Neal Liu (1):
usb: ehci: add pci device support for Aspeed platforms
NeilBrown (5):
SUNRPC/call_alloc: async tasks mustn't block waiting for memory SUNRPC/xprt: async tasks mustn't block waiting for memory
SUNRPC: remove scheduling boost for "SWAPPER" tasks.
NFS: swap IO handling is slightly different for O_DIRECT IO
NFS: swap-out must always use STABLE writes.
Niels Dossche (1):
IB/rdmavt: add lock to call to rvt_error_qp to prevent a race condition
Nikolay Aleksandrov (1):
net: ipv4: fix route with nexthop object delete warning
Oliver Hartkopp (1):
can: isotp: set default value for N_As to 50 micro seconds
Pali Rohár (2):
PCI: aardvark: Fix support for MSI interrupts Revert "mmc: sdhci-xenon: fix annoying 1.8V regulator warning"
Paolo Bonzini (1):
mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)
Pavel Begunkov (1):
io_uring: don't touch scm_fp_list after queueing skb
Pawan Gupta (2):
x86/pm: Save the MSR validity status at context setup x86/speculation: Restore speculation related MSRs during S3 resume
Peter Xu (1):
mm: don't skip swap entry even if zap_details specified
Qi Liu (1):
scsi: hisi_sas: Free irq vectors in order for v3 HW
Qinghua Jin (1):
minix: fix bug when opening a file with O_DIRECT
Rajneesh Bhardwaj (1):
drm/amdgpu: Fix recursive locking warning
Randy Dunlap (3):
scsi: aha152x: Fix aha152x_setup() __setup handler return value init/main.c: return 1 from handled __setup() functions
virtio_console: eliminate anonymous module_init & module_exit
Sachin Sant (1):
selftests/cgroup: Fix build on older distros
Sasha Levin (1):
Revert "hv: utils: add PTP_1588_CLOCK to Kconfig to fix build"
Sebastian Andrzej Siewior (1):
tcp: Don't acquire inet_listen_hashbucket::lock with disabled BH.
Shreeya Patel (1):
gpio: Restrict usage of GPIO chip irq members before initialization
Sourabh Jain (1):
powerpc: Set crashkernel offset to mid of RMA region
Stefan Wahren (1):
staging: vchiq_core: handle NULL result of find_service_by_handle
Sven Eckelmann (1):
macvtap: advertise link netns via netlink
Tejun Heo (4):
cgroup: Use open-time credentials for process migraton perm checks
selftests: cgroup: Make cg_create() use 0755 for permission instead of 0644
selftests: cgroup: Test open-time credential usage for migration checks
selftests: cgroup: Test open-time cgroup namespace usage for migration checks
Tony Lindgren (2):
clk: ti: Preserve node in ti_dt_clocks_register() iommu/omap: Fix regression in probe for NULL pointer dereference
Trond Myklebust (7):
NFSv4: Protect the state recovery thread against direct reclaim
SUNRPC: Fix socket waits for write buffer space
NFS: nfsiod should not block forever in mempool_alloc()
NFS: Avoid writeback threads getting stuck in mempool_alloc()
SUNRPC: Handle ENOMEM in call_transmit_status()
SUNRPC: Handle low memory situations in call_status()
SUNRPC: svc_tcp_sendmsg() should handle errors from xdr_alloc_bvec()
Venkateswara Naralasetty (1):
ath11k: fix kernel panic during unload/load ath11k modules
Vinod Koul (1):
dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error"
Waiman Long (1):
mm/sparsemem: fix 'mem_section' will never be NULL gcc 12 warning
Wang Yufen (1):
netlabel: fix out-of-bounds memory accesses
Wayne Chang (2):
usb: gadget: tegra-xudc: Do not program SPARAM
usb: gadget: tegra-xudc: Fix control endpoint's definitions
Wolfram Sang (1):
mmc: renesas_sdhi: don't overwrite TAP settings when HS400 tuning is complete
Xiaoke Wang (1):
staging: wfx: fix an error handling in wfx_init_common()
Xiaomeng Tong (1):
perf: qcom_l2_pmu: fix an incorrect NULL check on list iterator
Xin Xiong (2):
drm/amd/amdgpu/amdgpu_cs: fix refcount leak of a dma_fence obj NFSv4.2: fix reference count leaks in _nfs42_proc_copy_notify()
Xiubo Li (1):
ceph: fix memory leak in ceph_readdir when note_last_dentry returns error
Yang Guang (3):
ptp: replace snprintf with sysfs_emit
scsi: mvsas: Replace snprintf() with sysfs_emit()
scsi: bfa: Replace snprintf() with sysfs_emit()
Yang Li (1):
mt76: mt7615: Fix assigning negative values to unsigned variable
Yann Gautier (1):
mmc: mmci: stm32: correctly check all elements of sg list
Yonghong Song (1):
libbpf: Fix build issue with llvm-readelf
Zekun Shen (1):
ath5k: fix OOB in ath5k_eeprom_read_pcal_info_5111
Zhihao Cheng (1):
ubifs: Rectify space amount budget for mkdir/tmpfile operations
Zhou Guanghui (1):
iommu/arm-smmu-v3: fix event handling soft lockup
Ziyang Xuan (1):
net/tls: fix slab-out-of-bounds bug in decrypt_internal
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 110 +SUBLEVEL = 111 EXTRAVERSION = NAME = Dare mighty things
arch/arm64/include/asm/cputype.h +2 -0
@@ -75,6 +75,7 @@#define ARM_CPU_PART_CORTEX_A77 0xD0D#define ARM_CPU_PART_NEOVERSE_V1 0xD40#define ARM_CPU_PART_CORTEX_A78 0xD41 +#define ARM_CPU_PART_CORTEX_A78AE 0xD42#define ARM_CPU_PART_CORTEX_X1 0xD44#define ARM_CPU_PART_CORTEX_A510 0xD46#define ARM_CPU_PART_CORTEX_A710 0xD47
@@ -123,6 +124,7 @@#define MIDR_CORTEX_A77 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A77)#define MIDR_NEOVERSE_V1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V1)#define MIDR_CORTEX_A78 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78) +#define MIDR_CORTEX_A78AE MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78AE)#define MIDR_CORTEX_X1 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1)#define MIDR_CORTEX_A510 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A510)#define MIDR_CORTEX_A710 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A710)
arch/arm64/include/asm/module.lds.h +3 -3
@@ -1,7 +1,7 @@ #ifdef CONFIG_ARM64_MODULE_PLTS SECTIONS { - .plt 0 (NOLOAD) : { BYTE(0) } - .init.plt 0 (NOLOAD) : { BYTE(0) } - .text.ftrace_trampoline 0 (NOLOAD) : { BYTE(0) } + .plt 0 : { BYTE(0) } + .init.plt 0 : { BYTE(0) } + .text.ftrace_trampoline 0 : { BYTE(0) } } #endif
arch/arm64/kernel/insn.c +2 -2
@@ -216,8 +216,8 @@ static int __kprobes aarch64_insn_patch_text_cb(void *arg)int i, ret =0 ;struct aarch64_insn_patch *pp = arg; -/* The first CPU becomes master */ -if (atomic_inc_return (&pp->cpu_count) ==1 ) { +/* The last CPU becomes master */ +if (atomic_inc_return (&pp->cpu_count) ==num_online_cpus ()) {for (i =0 ; ret ==0 && i < pp->insn_cnt; i++) ret =aarch64_insn_patch_text_nosync (pp->text_addrs[i], pp->new_insns[i]);
arch/arm64/kernel/proton-pack.c +1 -0
@@ -861,6 +861,7 @@ u8 spectre_bhb_loop_affected(int scope)if (scope ==SCOPE_LOCAL_CPU ) {static const struct midr_range spectre_bhb_k32_list[] = {MIDR_ALL_VERSIONS (MIDR_CORTEX_A78 ), +MIDR_ALL_VERSIONS (MIDR_CORTEX_A78AE ),MIDR_ALL_VERSIONS (MIDR_CORTEX_A78C ),MIDR_ALL_VERSIONS (MIDR_CORTEX_X1 ),MIDR_ALL_VERSIONS (MIDR_CORTEX_A710 ),
arch/mips/boot/dts/ingenic/jz4780.dtsi +1 -1
@@ -429,7 +429,7 @@ efuse: efuse@d0 { #address-cells = <1>; #size-cells = <1>; - eth0_addr: eth-mac-addr@0x22 { + eth0_addr: eth-mac-addr@22 { reg = <0x22 0x6>; }; };
arch/mips/include/asm/setup.h +1 -1
@@ -16,7 +16,7 @@ static inline void setup_8250_early_printk_port(unsigned long base, unsigned int reg_shift, unsigned int timeout) {}#endif -extern void set_handler (unsigned long offset,void *addr,unsigned long len); +void set_handler (unsigned long offset,const void *addr,unsigned long len);extern void set_uncached_handler (unsigned long offset,void *addr,unsigned long len);typedef void (*vi_handler_t )(void );
arch/mips/kernel/traps.c +11 -11
@@ -2097,19 +2097,19 @@ static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs)* If no shadow set is selected then use the default handler * that does normal register saving and standard interrupt exit */ -extern char except_vec_vi, except_vec_vi_lui; -extern char except_vec_vi_ori, except_vec_vi_end; -extern char rollback_except_vec_vi; -char *vec_start =using_rollback_handler () ? - &rollback_except_vec_vi : &except_vec_vi; +extern const u8 except_vec_vi[], except_vec_vi_lui[]; +extern const u8 except_vec_vi_ori[], except_vec_vi_end[]; +extern const u8 rollback_except_vec_vi[]; +const u8 *vec_start =using_rollback_handler () ? + rollback_except_vec_vi : except_vec_vi;#if defined(CONFIG_CPU_MICROMIPS ) || defined(CONFIG_CPU_BIG_ENDIAN ) -const int lui_offset = &except_vec_vi_lui - vec_start +2 ; -const int ori_offset = &except_vec_vi_ori - vec_start +2 ; +const int lui_offset = except_vec_vi_lui - vec_start +2 ; +const int ori_offset = except_vec_vi_ori - vec_start +2 ;#else -const int lui_offset = &except_vec_vi_lui - vec_start; -const int ori_offset = &except_vec_vi_ori - vec_start; +const int lui_offset = except_vec_vi_lui - vec_start; +const int ori_offset = except_vec_vi_ori - vec_start;#endif -const int handler_len = &except_vec_vi_end - vec_start; +const int handler_len = except_vec_vi_end - vec_start;if (handler_len >VECTORSPACING ) {/*
@@ -2317,7 +2317,7 @@ void per_cpu_trap_init(bool is_boot_cpu) }/* Install CPU exception handler */ -void set_handler (unsigned long offset,void *addr,unsigned long size) +void set_handler (unsigned long offset,const void *addr,unsigned long size) {#ifdef CONFIG_CPU_MICROMIPS memcpy ((void *)(ebase + offset), ((unsigned char *)addr -1 ), size);
arch/mips/ralink/ill_acc.c +1 -0
@@ -61,6 +61,7 @@ static int __init ill_acc_of_setup(void) pdev =of_find_device_by_node (np);if (!pdev) {pr_err ("%pOFn: failed to lookup pdev\n" , np); +of_node_put (np);return -EINVAL ; }
arch/parisc/kernel/patch.c +11 -14
@@ -40,10 +40,7 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags, *need_unmap =1 ;set_fixmap (fixmap,page_to_phys (page)); -if (flags) -raw_spin_lock_irqsave (&patch_lock, *flags); -else -__acquire (&patch_lock); +raw_spin_lock_irqsave (&patch_lock, *flags);return (void *) (__fix_to_virt (fixmap) + (uintaddr & ~PAGE_MASK )); }
@@ -52,10 +49,7 @@ static void __kprobes patch_unmap(int fixmap, unsigned long *flags) {clear_fixmap (fixmap); -if (flags) -raw_spin_unlock_irqrestore (&patch_lock, *flags); -else -__release (&patch_lock); +raw_spin_unlock_irqrestore (&patch_lock, *flags); }void __kprobes __patch_text_multiple (void *addr,u32 *insn,unsigned int len)
@@ -67,8 +61,9 @@ void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len)int mapped;/* Make sure we don't have any aliases in cache */ -flush_kernel_vmap_range (addr, len); -flush_icache_range (start, end); +flush_kernel_dcache_range_asm (start, end); +flush_kernel_icache_range_asm (start, end); +flush_tlb_kernel_range (start, end); p = fixmap =patch_map (addr,FIX_TEXT_POKE0 , &flags, &mapped);
@@ -81,8 +76,10 @@ void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len)* We're crossing a page boundary, so * need to remap */ -flush_kernel_vmap_range ((void *)fixmap, - (p-fixmap) *sizeof (*p)); +flush_kernel_dcache_range_asm ((unsigned long )fixmap, + (unsigned long )p); +flush_tlb_kernel_range ((unsigned long )fixmap, + (unsigned long )p);if (mapped)patch_unmap (FIX_TEXT_POKE0 , &flags); p = fixmap = patch_map(addr, FIX_TEXT_POKE0, &flags,
@@ -90,10 +87,10 @@ void __kprobes __patch_text_multiple(void *addr, u32 *insn, unsigned int len) } } -flush_kernel_vmap_range ((void *)fixmap, (p-fixmap) *sizeof (*p)); +flush_kernel_dcache_range_asm ((unsigned long )fixmap, (unsigned long )p); +flush_tlb_kernel_range ((unsigned long )fixmap, (unsigned long )p);if (mapped)patch_unmap (FIX_TEXT_POKE0 , &flags); -flush_icache_range (start, end); }void __kprobes __patch_text (void *addr,u32 insn)
arch/powerpc/boot/dts/fsl/t104xrdb.dtsi +2 -2
@@ -139,12 +139,12 @@ pca9546@77 { fman@400000 { ethernet@e6000 { phy-handle = <&phy_rgmii_0>; - phy-connection-type = "rgmii"; + phy-connection-type = "rgmii-id"; }; ethernet@e8000 { phy-handle = <&phy_rgmii_1>; - phy-connection-type = "rgmii"; + phy-connection-type = "rgmii-id"; }; mdio0: mdio@fc000 {
arch/powerpc/include/asm/page.h +5 -1
@@ -132,7 +132,11 @@ static inline bool pfn_valid(unsigned long pfn)#define virt_to_page (kaddr) pfn_to_page(virt_to_pfn(kaddr))#define pfn_to_kaddr (pfn) __va((pfn) << PAGE_SHIFT) -#define virt_addr_valid (kaddr) pfn_valid(virt_to_pfn(kaddr)) +#define virt_addr_valid (vaddr) ({ \ + unsigned long _addr = (unsigned long)vaddr; \ + _addr >= PAGE_OFFSET && _addr < (unsigned long)high_memory && \ + pfn_valid(virt_to_pfn(_addr)); \ +})/* * On Book-E parts we need __va to parse the device tree and we can't
arch/powerpc/kernel/rtas.c +6 -0
@@ -1296,6 +1296,12 @@ int __init early_init_dt_scan_rtas(unsigned long node, entryp =of_get_flat_dt_prop (node,"linux,rtas-entry" ,NULL ); sizep =of_get_flat_dt_prop (node,"rtas-size" ,NULL ); +#ifdef CONFIG_PPC64 +/* need this feature to decide the crashkernel offset */ +if (of_get_flat_dt_prop (node,"ibm,hypertas-functions" ,NULL )) + powerpc_firmware_features |=FW_FEATURE_LPAR ; +#endif +if (basep && entryp && sizep) { rtas.base = *basep; rtas.entry = *entryp;
arch/powerpc/kernel/secvar-sysfs.c +6 -3
@@ -26,15 +26,18 @@ static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr,const char *format; node =of_find_compatible_node (NULL ,NULL ,"ibm,secvar-backend" ); -if (!of_device_is_available (node)) -return -ENODEV ; +if (!of_device_is_available (node)) { + rc = -ENODEV ; + goto out; + } rc =of_property_read_string (node,"format" , &format);if (rc) -return rc; + goto out; rc =sprintf (buf,"%s\n" , format); +out:of_node_put (node);return rc;
arch/powerpc/kexec/core.c +11 -4
@@ -147,11 +147,18 @@ void __init reserve_crashkernel(void)if (!crashk_res.start) {#ifdef CONFIG_PPC64 /* -* On 64bit we split the RMO in half but cap it at half of -* a small SLB (128MB) since the crash kernel needs to place -* itself and some stacks to be in the first segment. +* On the LPAR platform place the crash kernel to mid of +* RMA size (512MB or more) to ensure the crash kernel +* gets enough space to place itself and some stack to be +* in the first segment. At the same time normal kernel +* also get enough space to allocate memory for essential +* system resource in the first segment. Keep the crash +* kernel starts at 128MB offset on other platforms. */ - crashk_res.start =min (0x8000000ULL , (ppc64_rma_size /2 )); +if (firmware_has_feature (FW_FEATURE_LPAR )) + crashk_res.start = ppc64_rma_size /2 ; +else + crashk_res.start =min (0x8000000ULL , (ppc64_rma_size /2 ));#else crashk_res.start =KDUMP_KERNELBASE ;#endif
arch/x86/Kconfig +5 -0
@@ -2865,6 +2865,11 @@ config IA32_AOUT config X86_X32 bool "x32 ABI for 64-bit mode" depends on X86_64 + # llvm-objcopy does not convert x86_64 .note.gnu.property or + # compressed debug sections to x86_x32 properly: + # https://github.com/ClangBuiltLinux/linux/issues/514 + # https://github.com/ClangBuiltLinux/linux/issues/1141 + depends on $(success,$(OBJCOPY) --version | head -n1 | grep -qv llvm) help Include code to run binaries for the x32 native 32-bit ABI for 64-bit processors. An x32 process gets access to the
arch/x86/kvm/emulate.c +3 -1
@@ -3611,8 +3611,10 @@ static int em_rdpid(struct x86_emulate_ctxt *ctxt) {u64 tsc_aux =0 ; -if (ctxt->ops->get_msr (ctxt,MSR_TSC_AUX , &tsc_aux)) +if (!ctxt->ops->guest_has_rdpid (ctxt))return emulate_ud (ctxt); + + ctxt->ops->get_msr (ctxt,MSR_TSC_AUX , &tsc_aux); ctxt->dst.val = tsc_aux;return X86EMUL_CONTINUE ; }
arch/x86/kvm/kvm_emulate.h +1 -0
@@ -225,6 +225,7 @@ struct x86_emulate_ops {bool (*guest_has_long_mode)(struct x86_emulate_ctxt *ctxt);bool (*guest_has_movbe)(struct x86_emulate_ctxt *ctxt);bool (*guest_has_fxsr)(struct x86_emulate_ctxt *ctxt); +bool (*guest_has_rdpid)(struct x86_emulate_ctxt *ctxt);void (*set_nmi_mask)(struct x86_emulate_ctxt *ctxt,bool masked);
arch/x86/kvm/svm/pmu.c +3 -5
@@ -253,12 +253,10 @@ static int amd_pmu_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)/* MSR_EVNTSELn */ pmc =get_gp_pmc_amd (pmu, msr,PMU_TYPE_EVNTSEL );if (pmc) { -if (data == pmc->eventsel) -return 0 ; -if (!(data & pmu->reserved_bits)) { + data &= ~pmu->reserved_bits; +if (data != pmc->eventsel)reprogram_gp_counter (pmc, data); -return 0 ; - } +return 0 ; }return 1 ;
arch/x86/kvm/x86.c +6 -0
@@ -6875,6 +6875,11 @@ static bool emulator_guest_has_fxsr(struct x86_emulate_ctxt *ctxt)return guest_cpuid_has (emul_to_vcpu (ctxt),X86_FEATURE_FXSR ); } +static bool emulator_guest_has_rdpid (struct x86_emulate_ctxt *ctxt) +{ +return guest_cpuid_has (emul_to_vcpu (ctxt),X86_FEATURE_RDPID ); +} +static ulong emulator_read_gpr (struct x86_emulate_ctxt *ctxt,unsigned reg) {return kvm_register_read (emul_to_vcpu (ctxt), reg);
@@ -6958,6 +6963,7 @@ static const struct x86_emulate_ops emulate_ops = { .guest_has_long_mode = emulator_guest_has_long_mode, .guest_has_movbe = emulator_guest_has_movbe, .guest_has_fxsr = emulator_guest_has_fxsr, + .guest_has_rdpid = emulator_guest_has_rdpid, .set_nmi_mask = emulator_set_nmi_mask, .get_hflags = emulator_get_hflags, .set_hflags = emulator_set_hflags,
arch/x86/power/cpu.c +19 -2
@@ -40,7 +40,8 @@ static void msr_save_context(struct saved_context *ctxt)struct saved_msr *end = msr + ctxt->saved_msrs.num;while (msr < end) { - msr->valid = !rdmsrl_safe (msr->info.msr_no, &msr->info.reg.q); +if (msr->valid) +rdmsrl (msr->info.msr_no, msr->info.reg.q); msr++; } }
@@ -427,8 +428,10 @@ static int msr_build_context(const u32 *msr_id, const int num) }for (i = saved_msrs->num, j =0 ; i < total_num; i++, j++) { +u64 dummy; + msr_array[i].info.msr_no = msr_id[j]; - msr_array[i].valid = false; + msr_array[i].valid = !rdmsrl_safe (msr_id[j], &dummy); msr_array[i].info.reg.q =0 ; } saved_msrs->num = total_num;
@@ -503,10 +506,24 @@ static int pm_cpu_check(const struct x86_cpu_id *c)return ret; } +static void pm_save_spec_msr (void ) +{ +u32 spec_msr_id[] = { +MSR_IA32_SPEC_CTRL , +MSR_IA32_TSX_CTRL , +MSR_TSX_FORCE_ABORT , +MSR_IA32_MCU_OPT_CTRL , +MSR_AMD64_LS_CFG , + }; + +msr_build_context (spec_msr_id,ARRAY_SIZE (spec_msr_id)); +} +static int pm_check_save_msr (void ) {dmi_check_system (msr_save_dmi_table);pm_cpu_check (msr_save_cpu_table); +pm_save_spec_msr ();return 0 ; }
arch/x86/xen/smp_hvm.c +6 -0
@@ -19,6 +19,12 @@ static void __init xen_hvm_smp_prepare_boot_cpu(void)*/ xen_vcpu_setup (0 ); +/* +* Called again in case the kernel boots on vcpu >= MAX_VIRT_CPUS. +* Refer to comments in xen_hvm_init_time_ops(). +*/ +xen_hvm_init_time_ops (); +/* * The alternative logic (which patches the unlock/lock) runs before * the smp bootup up code is activated. Hence we need to set this up
arch/x86/xen/time.c +23 -1
@@ -556,6 +556,11 @@ static void xen_hvm_setup_cpu_clockevents(void)void __init xen_hvm_init_time_ops (void ) { +static bool hvm_time_initialized; + +if (hvm_time_initialized) +return ; +/* * vector callback is needed otherwise we cannot receive interrupts * on cpu > 0 and at this point we don't know how many cpus are
@@ -565,7 +570,22 @@ void __init xen_hvm_init_time_ops(void)return ;if (!xen_feature (XENFEAT_hvm_safe_pvclock)) { -pr_info ("Xen doesn't support pvclock on HVM, disable pv timer" ); +pr_info_once ("Xen doesn't support pvclock on HVM, disable pv timer" ); +return ; + } + +/* +* Only MAX_VIRT_CPUS 'vcpu_info' are embedded inside 'shared_info'. +* The __this_cpu_read(xen_vcpu) is still NULL when Xen HVM guest +* boots on vcpu >= MAX_VIRT_CPUS (e.g., kexec), To access +* __this_cpu_read(xen_vcpu) via xen_clocksource_read() will panic. +* +* The xen_hvm_init_time_ops() should be called again later after +* __this_cpu_read(xen_vcpu) is available. +*/ +if (!__this_cpu_read (xen_vcpu)) { +pr_info ("Delay xen_init_time_common() as kernel is running on vcpu=%d\n" , +xen_vcpu_nr (0 ));return ; }
@@ -577,6 +597,8 @@ void __init xen_hvm_init_time_ops(void) x86_platform.calibrate_tsc = xen_tsc_khz; x86_platform.get_wallclock = xen_get_wallclock; x86_platform.set_wallclock = xen_set_wallclock; + + hvm_time_initialized = true; }#endif
arch/xtensa/boot/dts/xtfpga-flash-128m.dtsi +4 -4
@@ -8,19 +8,19 @@ flash: flash@00000000 { reg = <0x00000000 0x08000000>; bank-width = <2>; device-width = <2>; - partition@0x0 { + partition@0 { label = "data"; reg = <0x00000000 0x06000000>; }; - partition@0x6000000 { + partition@6000000 { label = "boot loader area"; reg = <0x06000000 0x00800000>; }; - partition@0x6800000 { + partition@6800000 { label = "kernel image"; reg = <0x06800000 0x017e0000>; }; - partition@0x7fe0000 { + partition@7fe0000 { label = "boot environment"; reg = <0x07fe0000 0x00020000>; };
arch/xtensa/boot/dts/xtfpga-flash-16m.dtsi +4 -4
@@ -8,19 +8,19 @@ flash: flash@08000000 { reg = <0x08000000 0x01000000>; bank-width = <2>; device-width = <2>; - partition@0x0 { + partition@0 { label = "boot loader area"; reg = <0x00000000 0x00400000>; }; - partition@0x400000 { + partition@400000 { label = "kernel image"; reg = <0x00400000 0x00600000>; }; - partition@0xa00000 { + partition@a00000 { label = "data"; reg = <0x00a00000 0x005e0000>; }; - partition@0xfe0000 { + partition@fe0000 { label = "boot environment"; reg = <0x00fe0000 0x00020000>; };
arch/xtensa/boot/dts/xtfpga-flash-4m.dtsi +2 -2
@@ -8,11 +8,11 @@ flash: flash@08000000 { reg = <0x08000000 0x00400000>; bank-width = <2>; device-width = <2>; - partition@0x0 { + partition@0 { label = "boot loader area"; reg = <0x00000000 0x003f0000>; }; - partition@0x3f0000 { + partition@3f0000 { label = "boot environment"; reg = <0x003f0000 0x00010000>; };
drivers/ata/sata_dwc_460ex.c +5 -1
@@ -145,7 +145,11 @@ struct sata_dwc_device {#endif }; -#define SATA_DWC_QCMD_MAX 32 +/* +* Allow one extra special slot for commands and DMA management +* to account for libata internal commands. +*/ +#define SATA_DWC_QCMD_MAX (ATA_MAX_QUEUE + 1)struct sata_dwc_device_port {struct sata_dwc_device *hsdev;
drivers/block/drbd/drbd_int.h +4 -4
@@ -1644,22 +1644,22 @@ struct sib_info { };void drbd_bcast_event (struct drbd_device *device,const struct sib_info *sib); -extern void notify_resource_state (struct sk_buff *, +extern int notify_resource_state (struct sk_buff *,unsigned int ,struct drbd_resource *,struct resource_info *,enum drbd_notification_type ); -extern void notify_device_state (struct sk_buff *, +extern int notify_device_state (struct sk_buff *,unsigned int ,struct drbd_device *,struct device_info *,enum drbd_notification_type ); -extern void notify_connection_state (struct sk_buff *, +extern int notify_connection_state (struct sk_buff *,unsigned int ,struct drbd_connection *,struct connection_info *,enum drbd_notification_type ); -extern void notify_peer_device_state(struct sk_buff *, +extern int notify_peer_device_state(struct sk_buff *, unsigned int, struct drbd_peer_device *, struct peer_device_info *,
drivers/block/drbd/drbd_nl.c +25 -16
156 lines not on this page · raw message
drivers/block/drbd/drbd_state.c +9 -9
@@ -1537,7 +1537,7 @@ int drbd_bitmap_io_from_worker(struct drbd_device *device,return rv; } -void notify_resource_state_change (struct sk_buff *skb, +int notify_resource_state_change (struct sk_buff *skb,unsigned int seq,struct drbd_resource_state_change *resource_state_change,enum drbd_notification_type type)
@@ -1550,10 +1550,10 @@ void notify_resource_state_change(struct sk_buff *skb, .res_susp_fen = resource_state_change->susp_fen[NEW], }; -notify_resource_state (skb, seq, resource, &resource_info, type); +return notify_resource_state (skb, seq, resource, &resource_info, type); } -void notify_connection_state_change (struct sk_buff *skb, +int notify_connection_state_change (struct sk_buff *skb,unsigned int seq,struct drbd_connection_state_change *connection_state_change,enum drbd_notification_type type)
@@ -1564,10 +1564,10 @@ void notify_connection_state_change(struct sk_buff *skb, .conn_role = connection_state_change->peer_role[NEW], }; -notify_connection_state (skb, seq, connection, &connection_info, type); +return notify_connection_state (skb, seq, connection, &connection_info, type); } -void notify_device_state_change (struct sk_buff *skb, +int notify_device_state_change (struct sk_buff *skb,unsigned int seq,struct drbd_device_state_change *device_state_change,enum drbd_notification_type type)
@@ -1577,10 +1577,10 @@ void notify_device_state_change(struct sk_buff *skb, .dev_disk_state = device_state_change->disk_state[NEW], }; -notify_device_state (skb, seq, device, &device_info, type); +return notify_device_state (skb, seq, device, &device_info, type); } -void notify_peer_device_state_change (struct sk_buff *skb, +int notify_peer_device_state_change (struct sk_buff *skb,unsigned int seq,struct drbd_peer_device_state_change *p,enum drbd_notification_type type)
@@ -1594,7 +1594,7 @@ void notify_peer_device_state_change(struct sk_buff *skb, .peer_resync_susp_dependency = p->resync_susp_dependency[NEW], }; -notify_peer_device_state (skb, seq, peer_device, &peer_device_info, type); +return notify_peer_device_state (skb, seq, peer_device, &peer_device_info, type); }static void broadcast_state_change (struct drbd_state_change *state_change)
@@ -1602,7 +1602,7 @@ static void broadcast_state_change(struct drbd_state_change *state_change)struct drbd_resource_state_change *resource_state_change = &state_change->resource[0 ];bool resource_state_has_changed;unsigned int n_device, n_connection, n_peer_device, n_peer_devices; -void (*last_func)(struct sk_buff *,unsigned int ,void *, +int (*last_func)(struct sk_buff *,unsigned int ,void *,enum drbd_notification_type ) =NULL ;void *last_arg =NULL ;
drivers/block/drbd/drbd_state_change.h +4 -4
@@ -44,19 +44,19 @@ extern struct drbd_state_change *remember_old_state(struct drbd_resource *, gfp_extern void copy_old_to_new_state_change (struct drbd_state_change *);extern void forget_state_change (struct drbd_state_change *); -extern void notify_resource_state_change (struct sk_buff *, +extern int notify_resource_state_change (struct sk_buff *,unsigned int ,struct drbd_resource_state_change *,enum drbd_notification_type type); -extern void notify_connection_state_change (struct sk_buff *, +extern int notify_connection_state_change (struct sk_buff *,unsigned int ,struct drbd_connection_state_change *,enum drbd_notification_type type); -extern void notify_device_state_change (struct sk_buff *, +extern int notify_device_state_change (struct sk_buff *,unsigned int ,struct drbd_device_state_change *,enum drbd_notification_type type); -extern void notify_peer_device_state_change (struct sk_buff *, +extern int notify_peer_device_state_change (struct sk_buff *,unsigned int ,struct drbd_peer_device_state_change *,enum drbd_notification_type type);
drivers/char/virtio_console.c +4 -4
@@ -2239,7 +2239,7 @@ static struct virtio_driver virtio_rproc_serial = { .remove = virtcons_remove, }; -static int __init init (void ) +static int __init virtio_console_init (void ) {int err;
@@ -2276,7 +2276,7 @@ static int __init init(void)return err; } -static void __exit fini(void) +static void __exit virtio_console_fini(void) {reclaim_dma_bufs ();
@@ -2286,8 +2286,8 @@ static void __exit fini(void)class_destroy (pdrvdata.class);debugfs_remove_recursive (pdrvdata.debugfs_dir); } -module_init (init); -module_exit (fini); +module_init (virtio_console_init); +module_exit (virtio_console_fini);MODULE_DESCRIPTION ("Virtio console driver" );MODULE_LICENSE ("GPL" );
drivers/clk/clk-si5341.c +9 -7
@@ -789,6 +789,15 @@ static unsigned long si5341_output_clk_recalc_rate(struct clk_hw *hw,u32 r_divider;u8 r[3 ]; + err =regmap_read (output->data->regmap, +SI5341_OUT_CONFIG (output), &val); +if (err <0 ) +return err; + +/* If SI5341_OUT_CFG_RDIV_FORCE2 is set, r_divider is 2 */ +if (val &SI5341_OUT_CFG_RDIV_FORCE2 ) +return parent_rate /2 ; + err =regmap_bulk_read (output->data->regmap,SI5341_OUT_R_REG (output), r,3 );if (err <0 )
@@ -805,13 +814,6 @@ static unsigned long si5341_output_clk_recalc_rate(struct clk_hw *hw, r_divider +=1 ; r_divider <<=1 ; - err =regmap_read (output->data->regmap, -SI5341_OUT_CONFIG (output), &val); -if (err <0 ) -return err; - -if (val &SI5341_OUT_CFG_RDIV_FORCE2 ) - r_divider =2 ;return parent_rate / r_divider; }
drivers/clk/clk.c +24 -0
@@ -631,6 +631,24 @@ static void clk_core_get_boundaries(struct clk_core *core, *max_rate =min (*max_rate, clk_user->max_rate); } +static bool clk_core_check_boundaries (struct clk_core *core, +unsigned long min_rate, +unsigned long max_rate) +{ +struct clk *user; + +lockdep_assert_held (&prepare_lock); + +if (min_rate > core->max_rate || max_rate < core->min_rate) +return false; + +hlist_for_each_entry (user, &core->clks, clks_node) +if (min_rate > user->max_rate || max_rate < user->min_rate) +return false; + +return true; +} +void clk_hw_set_rate_range (struct clk_hw *hw,unsigned long min_rate,unsigned long max_rate) {
@@ -2332,6 +2350,11 @@ int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max) clk->min_rate = min; clk->max_rate = max; +if (!clk_core_check_boundaries (clk->core, min, max)) { + ret = -EINVAL ; + goto out; + } + rate =clk_core_get_rate_nolock (clk->core);if (rate < min || rate > max) {/*
@@ -2360,6 +2383,7 @@ int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max) } } +out:if (clk->exclusive_count)clk_core_rate_protect (clk->core);
drivers/clk/ti/clk.c +8 -5
@@ -131,7 +131,7 @@ int ti_clk_setup_ll_ops(struct ti_clk_ll_ops *ops)void __init ti_dt_clocks_register (struct ti_dt_clk oclks[]) {struct ti_dt_clk *c; -struct device_node *node, *parent; +struct device_node *node, *parent, *child;struct clk *clk;struct of_phandle_args clkspec;char buf[64 ];
@@ -171,10 +171,13 @@ void __init ti_dt_clocks_register(struct ti_dt_clk oclks[]) node =of_find_node_by_name (NULL , buf);if (num_args && compat_mode) { parent = node; - node =of_get_child_by_name (parent,"clock" ); -if (!node) - node =of_get_child_by_name (parent,"clk" ); -of_node_put (parent); + child =of_get_child_by_name (parent,"clock" ); +if (!child) + child =of_get_child_by_name (parent,"clk" ); +if (child) { +of_node_put (parent); + node = child; + } } clkspec.np = node;
drivers/dma/sh/shdma-base.c +1 -3
@@ -115,10 +115,8 @@ static dma_cookie_t shdma_tx_submit(struct dma_async_tx_descriptor *tx) ret =pm_runtime_get (schan->dev);spin_unlock_irq (&schan->chan_lock); -if (ret <0 ) { +if (ret <0 )dev_err (schan->dev,"%s(): GET = %d\n" , __func__, ret); -pm_runtime_put (schan->dev); - }pm_runtime_barrier (schan->dev);
drivers/gpio/gpiolib.c +19 -0
@@ -1411,6 +1411,16 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned offset) {struct irq_domain *domain = gc->irq.domain; +#ifdef CONFIG_GPIOLIB_IRQCHIP +/* +* Avoid race condition with other code, which tries to lookup +* an IRQ before the irqchip has been properly registered, +* i.e. while gpiochip is still being brought up. +*/ +if (!gc->irq.initialized) +return -EPROBE_DEFER ; +#endif +if (!gpiochip_irqchip_irq_valid (gc, offset))return -ENXIO ;
@@ -1604,6 +1614,15 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc,acpi_gpiochip_request_interrupts (gc); +/* +* Using barrier() here to prevent compiler from reordering +* gc->irq.initialized before initialization of above +* GPIO chip irq members. +*/ +barrier (); + + gc->irq.initialized = true; +return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -0
@@ -1484,6 +1484,7 @@ int amdgpu_cs_fence_to_handle_ioctl(struct drm_device *dev, void *data,return 0 ;default : +dma_fence_put (fence);return -EINVAL ; } }
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +1 -1
@@ -263,7 +263,7 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,* adev->gfx.mec.num_pipe_per_mec * adev->gfx.mec.num_queue_per_pipe; -while (queue_bit-- >= 0) { +while (--queue_bit >= 0) { if (test_bit(queue_bit, adev->gfx.mec.queue_bitmap)) continue;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -1
@@ -1338,7 +1338,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo) !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE)) return; -dma_resv_lock (bo->base.resv,NULL ); +if (WARN_ON_ONCE (!dma_resv_trylock (bo->base.resv))) +return ; r =amdgpu_fill_buffer (abo,AMDGPU_POISON , bo->base.resv, &fence);if (!WARN_ON (r)) {
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +1 -1
@@ -784,7 +784,7 @@ int kfd_create_crat_image_acpi(void **crat_image, size_t *size)/* Fetch the CRAT table from ACPI */ status =acpi_get_table (CRAT_SIGNATURE ,0 , &crat_table);if (status ==AE_NOT_FOUND ) { -pr_warn ("CRAT table not found\n" ); +pr_info ("CRAT table not found\n" );return -ENODATA ; }else if (ACPI_FAILURE (status)) {const char *err =acpi_format_exception (status);
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c +15 -9
@@ -270,15 +270,6 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)return ret; } - ret =anon_inode_getfd (kfd_smi_name, &kfd_smi_ev_fops, (void *)client, -O_RDWR ); -if (ret <0 ) { -kfifo_free (&client->fifo); -kfree (client); -return ret; - } - *fd = ret; -init_waitqueue_head (&client->wait_queue);spin_lock_init (&client->lock); client->events =0 ;
@@ -288,5 +279,20 @@ int kfd_smi_event_open(struct kfd_dev *dev, uint32_t *fd)list_add_rcu (&client->list, &dev->smi_clients);spin_unlock (&dev->smi_lock); + ret =anon_inode_getfd (kfd_smi_name, &kfd_smi_ev_fops, (void *)client, +O_RDWR ); +if (ret <0 ) { +spin_lock (&dev->smi_lock); +list_del_rcu (&client->list); +spin_unlock (&dev->smi_lock); + +synchronize_rcu (); + +kfifo_free (&client->fifo); +kfree (client); +return ret; + } + *fd = ret; +return 0 ; }
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +3 -0
@@ -1674,6 +1674,9 @@ static bool are_stream_backends_same(if (is_timing_changed (stream_a, stream_b))return false; +if (stream_a->signal != stream_b->signal) +return false; +if (stream_a->dpms_off != stream_b->dpms_off)return false;
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c +4 -4
@@ -709,13 +709,13 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetHardMinFclkByFreq, hwmgr->display_config->num_display >3 ? - data->clock_vol_info.vdd_dep_on_fclk->entries[0 ].clk : + (data->clock_vol_info.vdd_dep_on_fclk->entries[0 ].clk /100 ) : min_mclk,NULL );smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetHardMinSocclkByFreq, - data->clock_vol_info.vdd_dep_on_socclk->entries[0 ].clk, + data->clock_vol_info.vdd_dep_on_socclk->entries[0 ].clk /100 ,NULL ); smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_SetHardMinVcn,
@@ -728,11 +728,11 @@ static int smu10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr, NULL);smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetSoftMaxFclkByFreq, - data->clock_vol_info.vdd_dep_on_fclk->entries[index_fclk].clk, + data->clock_vol_info.vdd_dep_on_fclk->entries[index_fclk].clk /100 ,NULL );smum_send_msg_to_smc_with_parameter (hwmgr, PPSMC_MSG_SetSoftMaxSocclkByFreq, - data->clock_vol_info.vdd_dep_on_socclk->entries[index_socclk].clk, + data->clock_vol_info.vdd_dep_on_socclk->entries[index_socclk].clk /100 ,NULL ); smum_send_msg_to_smc_with_parameter(hwmgr, PPSMC_MSG_SetSoftMaxVcn,
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -166,6 +166,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"), }, .driver_data = (void *)&lcd720x1280_rightside_up, + }, { /* GPD Win Max */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"GPD" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1619-01"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /** GPD Pocket, note that the the DMI data is less generic then * it seems, devices with a board-vendor of "AMI Corporation"
drivers/gpu/drm/imx/imx-ldb.c +2 -0
@@ -553,6 +553,8 @@ static int imx_ldb_panel_ddc(struct device *dev, edidp =of_get_property (child,"edid" , &edid_len);if (edidp) { channel->edid =kmemdup (edidp, edid_len,GFP_KERNEL ); +if (!channel->edid) +return -ENOMEM ; }else if (!channel->panel) {/* fallback to display-timings node */ ret = of_get_drm_display_mode(child,
drivers/gpu/drm/imx/parallel-display.c +3 -1
@@ -70,8 +70,10 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) ret =of_get_drm_display_mode (np, &imxpd->mode, &imxpd->bus_flags,OF_USE_NATIVE_MODE ); -if (ret) +if (ret) { +drm_mode_destroy (connector->dev, mode);return ret; + }drm_mode_copy (mode, &imxpd->mode); mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c +1 -0
@@ -216,6 +216,7 @@ gm20b_pmu = { .intr = gt215_pmu_intr, .recv = gm20b_pmu_recv, .initmsg = gm20b_pmu_initmsg, + .reset = gf100_pmu_reset, };#if IS_ENABLED (CONFIG_ARCH_TEGRA_210_SOC )
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c +1 -1
@@ -23,7 +23,7 @@*/ #include "priv.h" -static void +void gp102_pmu_reset (struct nvkm_pmu *pmu) {struct nvkm_device *device = pmu->subdev.device;
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c +1 -0
@@ -83,6 +83,7 @@ gp10b_pmu = { .intr = gt215_pmu_intr, .recv = gm20b_pmu_recv, .initmsg = gm20b_pmu_initmsg, + .reset = gp102_pmu_reset, };#if IS_ENABLED (CONFIG_ARCH_TEGRA_210_SOC )
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h +1 -0
@@ -41,6 +41,7 @@ int gt215_pmu_send(struct nvkm_pmu *, u32[2], u32, u32, u32, u32);bool gf100_pmu_enabled (struct nvkm_pmu *);void gf100_pmu_reset (struct nvkm_pmu *); +void gp102_pmu_reset (struct nvkm_pmu *pmu);void gk110_pmu_pgob (struct nvkm_pmu *,bool );
drivers/hv/Kconfig +0 -1
@@ -17,7 +17,6 @@ config HYPERV_TIMER config HYPERV_UTILS tristate "Microsoft Hyper-V Utilities driver" depends on HYPERV && CONNECTOR && NLS - depends on PTP_1588_CLOCK_OPTIONAL help Select this option to enable the Hyper-V Utilities.
drivers/hv/channel_mgmt.c +3 -3
@@ -350,7 +350,7 @@ void vmbus_channel_map_relid(struct vmbus_channel *channel)* execute: * * (a) In the "normal (i.e., not resuming from hibernation)" path, -* the full barrier in smp_store_mb() guarantees that the store +* the full barrier in virt_store_mb() guarantees that the store * is propagated to all CPUs before the add_channel_work work * is queued. In turn, add_channel_work is queued before the * channel's ring buffer is allocated/initialized and the
@@ -362,14 +362,14 @@ void vmbus_channel_map_relid(struct vmbus_channel *channel)* recv_int_page before retrieving the channel pointer from the * array of channels. * -* (b) In the "resuming from hibernation" path, the smp_store_mb() +* (b) In the "resuming from hibernation" path, the virt_store_mb() * guarantees that the store is propagated to all CPUs before * the VMBus connection is marked as ready for the resume event * (cf. check_ready_for_resume_event()). The interrupt handler * of the VMBus driver and vmbus_chan_sched() can not run before * vmbus_bus_resume() has completed execution (cf. resume_noirq). */ -smp_store_mb ( +virt_store_mb ( vmbus_connection.channels[channel->offermsg.child_relid], channel); }
drivers/hv/vmbus_drv.c +7 -2
@@ -2673,10 +2673,15 @@ static void __exit vmbus_exit(void)if (ms_hyperv.misc_features &HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE ) {kmsg_dump_unregister (&hv_kmsg_dumper);unregister_die_notifier (&hyperv_die_block); -atomic_notifier_chain_unregister (&panic_notifier_list, - &hyperv_panic_block); } +/* +* The panic notifier is always registered, hence we should +* also unconditionally unregister it here as well. +*/ +atomic_notifier_chain_unregister (&panic_notifier_list, + &hyperv_panic_block); +free_page ((unsigned long )hv_panic_page);unregister_sysctl_table (hv_ctl_table_hdr); hv_ctl_table_hdr =NULL ;
drivers/infiniband/hw/hfi1/mmu_rb.c +6 -0
@@ -121,6 +121,9 @@ void hfi1_mmu_rb_unregister(struct mmu_rb_handler *handler)unsigned long flags;struct list_head del_list; +/* Prevent freeing of mm until we are completely finished. */ +mmgrab (handler->mn.mm); +/* Unregister first so we don't get any more notifications. */ mmu_notifier_unregister (&handler->mn, handler->mn.mm);
@@ -143,6 +146,9 @@ void hfi1_mmu_rb_unregister(struct mmu_rb_handler *handler)do_remove (handler, &del_list); +/* Now the mm may be freed. */ +mmdrop (handler->mn.mm); +kfree (handler); }
drivers/infiniband/hw/mlx5/mr.c +3 -1
@@ -531,8 +531,10 @@ static void __cache_work_func(struct mlx5_cache_ent *ent)spin_lock_irq (&ent->lock);if (ent->disabled) goto out; -if (need_delay) +if (need_delay) {queue_delayed_work (cache->wq, &ent->dwork,300 *HZ ); + goto out; + }remove_cache_mr_locked (ent);queue_adjust_cache_locked (ent); }
drivers/infiniband/sw/rdmavt/qp.c +5 -1
@@ -3241,7 +3241,11 @@ void rvt_ruc_loopback(struct rvt_qp *sqp)spin_lock_irqsave (&sqp->s_lock, flags);rvt_send_complete (sqp, wqe, send_status);if (sqp->ibqp.qp_type ==IB_QPT_RC ) { -int lastwqe =rvt_error_qp (sqp,IB_WC_WR_FLUSH_ERR ); +int lastwqe; + +spin_lock (&sqp->r_lock); + lastwqe =rvt_error_qp (sqp,IB_WC_WR_FLUSH_ERR ); +spin_unlock (&sqp->r_lock); sqp->s_flags &= ~RVT_S_BUSY ;spin_unlock_irqrestore (&sqp->s_lock, flags);
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +1 -0
@@ -1368,6 +1368,7 @@ static irqreturn_t arm_smmu_evtq_thread(int irq, void *dev)dev_info (smmu->dev,"\t0x%016llx\n" , (unsigned long long )evt[i]); +cond_resched (); }/*
drivers/iommu/omap-iommu.c +1 -1
@@ -1665,7 +1665,7 @@ static struct iommu_device *omap_iommu_probe_device(struct device *dev) num_iommus =of_property_count_elems_of_size (dev->of_node,"iommus" ,sizeof (phandle));if (num_iommus <0 ) -return 0 ; +return ERR_PTR (-ENODEV ); arch_data =kcalloc (num_iommus +1 ,sizeof (*arch_data),GFP_KERNEL );if (!arch_data)
drivers/irqchip/irq-gic-v3.c +10 -4
@@ -206,11 +206,11 @@ static inline void __iomem *gic_dist_base(struct irq_data *d) } } -static void gic_do_wait_for_rwp (void __iomem *base) +static void gic_do_wait_for_rwp (void __iomem *base,u32 bit) {u32 count =1000000 ;/* 1s! */ -while (readl_relaxed (base +GICD_CTLR ) &GICD_CTLR_RWP ) { +while (readl_relaxed (base +GICD_CTLR ) & bit) { count--;if (!count) {pr_err_ratelimited ("RWP timeout, gone fishing\n" );
@@ -224,13 +224,13 @@ static void gic_do_wait_for_rwp(void __iomem *base)/* Wait for completion of a distributor change */ static void gic_dist_wait_for_rwp (void ) { -gic_do_wait_for_rwp (gic_data.dist_base); +gic_do_wait_for_rwp (gic_data.dist_base,GICD_CTLR_RWP ); }/* Wait for completion of a redistributor change */ static void gic_redist_wait_for_rwp (void ) { -gic_do_wait_for_rwp (gic_data_rdist_rd_base ()); +gic_do_wait_for_rwp (gic_data_rdist_rd_base (),GICR_CTLR_RWP ); }#ifdef CONFIG_ARM64
@@ -1467,6 +1467,12 @@ static int gic_irq_domain_translate(struct irq_domain *d,if (fwspec->param_count !=2 )return -EINVAL ; +if (fwspec->param[0 ] <16 ) { +pr_err (FW_BUG "Illegal GSI%d translation request\n" , + fwspec->param[0 ]); +return -EINVAL ; + } + *hwirq = fwspec->param[0 ]; *type = fwspec->param[1 ];
drivers/irqchip/irq-gic.c +6 -0
@@ -1094,6 +1094,12 @@ static int gic_irq_domain_translate(struct irq_domain *d,if (fwspec->param_count !=2 )return -EINVAL ; +if (fwspec->param[0 ] <16 ) { +pr_err (FW_BUG "Illegal GSI%d translation request\n" , + fwspec->param[0 ]); +return -EINVAL ; + } + *hwirq = fwspec->param[0 ]; *type = fwspec->param[1 ];
drivers/md/dm-ioctl.c +2 -0
@@ -17,6 +17,7 @@#include <linux/dm-ioctl.h> #include <linux/hdreg.h> #include <linux/compat.h> +#include <linux/nospec.h> #include <linux/uaccess.h>
@@ -1696,6 +1697,7 @@ static ioctl_fn lookup_ioctl(unsigned int cmd, int *ioctl_flags)if (unlikely (cmd >=ARRAY_SIZE (_ioctls)))return NULL ; + cmd =array_index_nospec (cmd,ARRAY_SIZE (_ioctls)); *ioctl_flags = _ioctls[cmd].flags;return _ioctls[cmd].fn; }
drivers/md/dm-rq.c +6 -1
@@ -492,8 +492,13 @@ static blk_status_t dm_mq_queue_rq(struct blk_mq_hw_ctx *hctx,if (unlikely (!ti)) {int srcu_idx; -struct dm_table *map =dm_get_live_table (md, &srcu_idx); +struct dm_table *map; + map =dm_get_live_table (md, &srcu_idx); +if (unlikely (!map)) { +dm_put_live_table (md, srcu_idx); +return BLK_STS_RESOURCE ; + } ti =dm_table_find_target (map,0 );dm_put_live_table (md, srcu_idx); }
drivers/md/dm.c +3 -8
@@ -1692,15 +1692,10 @@ static blk_qc_t dm_submit_bio(struct bio *bio)struct dm_table *map; map =dm_get_live_table (md, &srcu_idx); -if (unlikely (!map)) { -DMERR_LIMIT ("%s: mapping table unavailable, erroring io" , -dm_device_name (md)); -bio_io_error (bio); - goto out; - } -/* If suspended, queue this IO for later */ -if (unlikely (test_bit (DMF_BLOCK_IO_FOR_SUSPEND , &md->flags))) { +/* If suspended, or map not yet available, queue this IO for later */ +if (unlikely (test_bit (DMF_BLOCK_IO_FOR_SUSPEND , &md->flags)) || +unlikely (!map)) {if (bio->bi_opf &REQ_NOWAIT )bio_wouldblock_error (bio);else if (bio->bi_opf &REQ_RAHEAD )
drivers/mmc/host/mmci_stm32_sdmmc.c +3 -3
@@ -62,8 +62,8 @@ static int sdmmc_idma_validate_data(struct mmci_host *host,* excepted the last element which has no constraint on idmasize */ for_each_sg (data->sg, sg, data->sg_len -1 , i) { -if (!IS_ALIGNED (data->sg->offset,sizeof (u32)) || - !IS_ALIGNED (data->sg->length,SDMMC_IDMA_BURST )) { +if (!IS_ALIGNED (sg->offset,sizeof (u32)) || + !IS_ALIGNED (sg->length,SDMMC_IDMA_BURST )) {dev_err (mmc_dev (host->mmc),"unaligned scatterlist: ofst:%x length:%d\n" , data->sg->offset, data->sg->length);
@@ -71,7 +71,7 @@ static int sdmmc_idma_validate_data(struct mmci_host *host, } } -if (!IS_ALIGNED (data->sg->offset,sizeof (u32))) { +if (!IS_ALIGNED (sg->offset,sizeof (u32))) {dev_err (mmc_dev (host->mmc),"unaligned last scatterlist: ofst:%x length:%d\n" , data->sg->offset, data->sg->length);
drivers/mmc/host/renesas_sdhi_core.c +2 -2
@@ -390,10 +390,10 @@ static void renesas_sdhi_hs400_complete(struct mmc_host *mmc) SH_MOBILE_SDHI_SCC_TMPPORT2_HS400OSEL) | sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_TMPPORT2)); -/* Set the sampling clock selection range of HS400 mode */ sd_scc_write32 (host, priv,SH_MOBILE_SDHI_SCC_DTCNTL ,SH_MOBILE_SDHI_SCC_DTCNTL_TAPEN | -0x4 <<SH_MOBILE_SDHI_SCC_DTCNTL_TAPNUM_SHIFT ); +sd_scc_read32 (host, priv, +SH_MOBILE_SDHI_SCC_DTCNTL ));/* Avoid bad TAP */ if (bad_taps &BIT (priv->tap_set)) {
drivers/mmc/host/sdhci-xenon.c +0 -10
@@ -240,16 +240,6 @@ static void xenon_voltage_switch(struct sdhci_host *host) {/* Wait for 5ms after set 1.8V signal enable bit */ usleep_range (5000 ,5500 ); - -/* -* For some reason the controller's Host Control2 register reports -* the bit representing 1.8V signaling as 0 when read after it was -* written as 1. Subsequent read reports 1. -* -* Since this may cause some issues, do an empty read of the Host -* Control2 register here to circumvent this. -*/ -sdhci_readw (host,SDHCI_HOST_CONTROL2 ); }static const struct sdhci_ops sdhci_xenon_ops = {
drivers/net/ethernet/broadcom/bnxt/bnxt.h +2 -1
@@ -569,7 +569,8 @@ struct nqe_cn {#define BNXT_MAX_MTU 9500#define BNXT_MAX_PAGE_MODE_MTU \ ((unsigned int)PAGE_SIZE - VLAN_ETH_HLEN - NET_IP_ALIGN - \ - XDP_PACKET_HEADROOM) + XDP_PACKET_HEADROOM - \ + SKB_DATA_ALIGN((unsigned int)sizeof(struct skb_shared_info)))#define BNXT_MIN_PKT_SIZE 52
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +1 -3
@@ -2041,9 +2041,7 @@ static int bnxt_set_pauseparam(struct net_device *dev, } link_info->autoneg |=BNXT_AUTONEG_FLOW_CTRL ; -if (bp->hwrm_spec_code >=0x10201 ) - link_info->req_flow_ctrl = -PORT_PHY_CFG_REQ_AUTO_PAUSE_AUTONEG_PAUSE ; + link_info->req_flow_ctrl =0 ; }else {/* when transition from auto pause to force pause, * force a link change
drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp.c +3 -1
@@ -168,7 +168,7 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev) base =of_iomap (node,0 );if (!base) { err = -ENOMEM ; - goto err_close; + goto err_put; } err =fsl_mc_allocate_irqs (mc_dev);
@@ -212,6 +212,8 @@ static int dpaa2_ptp_probe(struct fsl_mc_device *mc_dev)fsl_mc_free_irqs (mc_dev); err_unmap:iounmap (base); +err_put: +of_node_put (node); err_close:dprtc_close (mc_dev->mc_io,0 , mc_dev->mc_handle); err_free_mcp:
drivers/net/ethernet/intel/ice/ice.h +1 -1
@@ -498,7 +498,7 @@ static inline struct ice_pf *ice_netdev_to_pf(struct net_device *netdev)static inline bool ice_is_xdp_ena_vsi (struct ice_vsi *vsi) { -return !!vsi->xdp_prog; +return !!READ_ONCE (vsi->xdp_prog); }static inline void ice_set_ring_xdp (struct ice_ring *ring)
drivers/net/ethernet/intel/ice/ice_lib.c +3 -0
@@ -1265,6 +1265,7 @@ static int ice_vsi_alloc_rings(struct ice_vsi *vsi) ring->vsi = vsi; ring->dev = dev; ring->count = vsi->num_tx_desc; + ring->txq_teid =ICE_INVAL_TEID ;WRITE_ONCE (vsi->tx_rings[i], ring); }
@@ -2667,6 +2668,8 @@ int ice_vsi_release(struct ice_vsi *vsi) } } +if (ice_is_vsi_dflt_vsi (pf->first_sw, vsi)) +ice_clear_dflt_vsi (pf->first_sw);ice_fltr_remove_all (vsi);ice_rm_vsi_lan_cfg (vsi->port_info, vsi->idx);ice_vsi_delete (vsi);
drivers/net/ethernet/intel/ice/ice_main.c +3 -1
@@ -2475,8 +2475,10 @@ int ice_destroy_xdp_rings(struct ice_vsi *vsi)for (i =0 ; i < vsi->num_xdp_txq; i++)if (vsi->xdp_rings[i]) { -if (vsi->xdp_rings[i]->desc) +if (vsi->xdp_rings[i]->desc) { +synchronize_rcu ();ice_free_tx_ring (vsi->xdp_rings[i]); + }kfree_rcu (vsi->xdp_rings[i], rcu); vsi->xdp_rings[i] =NULL ; }
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +2 -2
@@ -2723,9 +2723,9 @@ static int ice_vc_dis_qs_msg(struct ice_vf *vf, u8 *msg) goto error_param; } -/* Skip queue if not enabled */ if (!test_bit (vf_q_id, vf->txq_ena)) -continue ; +dev_dbg (ice_pf_to_dev (vsi->back),"Queue %u on VSI %u is not enabled, but stopping it anyway\n" , + vf_q_id, vsi->vsi_num);ice_fill_txq_meta (vsi, ring, &txq_meta);
drivers/net/ethernet/intel/ice/ice_xsk.c +3 -1
@@ -36,8 +36,10 @@ static void ice_qp_reset_stats(struct ice_vsi *vsi, u16 q_idx)static void ice_qp_clean_rings (struct ice_vsi *vsi,u16 q_idx) {ice_clean_tx_ring (vsi->tx_rings[q_idx]); -if (ice_is_xdp_ena_vsi (vsi)) +if (ice_is_xdp_ena_vsi (vsi)) { +synchronize_rcu ();ice_clean_tx_ring (vsi->xdp_rings[q_idx]); + }ice_clean_rx_ring (vsi->rx_rings[q_idx]); }
drivers/net/ethernet/qlogic/qede/qede_fp.c +3 -0
@@ -752,6 +752,9 @@ qede_build_skb(struct qede_rx_queue *rxq, buf =page_address (bd->data) + bd->page_offset; skb =build_skb (buf, rxq->rx_buf_seg_size); +if (unlikely (!skb)) +return NULL ; +skb_reserve (skb, pad);skb_put (skb, len);
drivers/net/ethernet/sfc/rx_common.c +3 -0
@@ -166,6 +166,9 @@ static void efx_fini_rx_recycle_ring(struct efx_rx_queue *rx_queue)struct efx_nic *efx = rx_queue->efx;int i; +if (unlikely (!rx_queue->page_ring)) +return ; +/* Unmap and release the pages in the recycle ring. Remove the ring. */ for (i =0 ; i <= rx_queue->page_ptr_mask; i++) {struct page *page = rx_queue->page_ring[i];
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +1 -2
@@ -432,8 +432,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) plat->phylink_node = np;/* Get max speed of operation from device tree */ -if (of_property_read_u32 (np,"max-speed" , &plat->max_speed)) - plat->max_speed =-1 ; +of_property_read_u32 (np,"max-speed" , &plat->max_speed); plat->bus_id =of_alias_get_id (np,"ethernet" );if (plat->bus_id <0 )
drivers/net/macvtap.c +6 -0
@@ -133,11 +133,17 @@ static void macvtap_setup(struct net_device *dev) dev->tx_queue_len =TUN_READQ_SIZE ; } +static struct net *macvtap_link_net (const struct net_device *dev) +{ +return dev_net (macvlan_dev_real_dev (dev)); +} +static struct rtnl_link_ops macvtap_link_ops__read_mostly = { .kind ="macvtap" , .setup = macvtap_setup, .newlink = macvtap_newlink, .dellink = macvtap_dellink, + .get_link_net = macvtap_link_net, .priv_size =sizeof (struct macvtap_dev ), };
drivers/net/mdio/mdio-mscc-miim.c +6 -0
@@ -76,6 +76,9 @@ static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)u32 val;int ret; +if (regnum &MII_ADDR_C45 ) +return -EOPNOTSUPP ; + ret =mscc_miim_wait_pending (bus);if (ret) goto out;
@@ -105,6 +108,9 @@ static int mscc_miim_write(struct mii_bus *bus, int mii_id,struct mscc_miim_dev *miim = bus->priv;int ret; +if (regnum &MII_ADDR_C45 ) +return -EOPNOTSUPP ; + ret =mscc_miim_wait_pending (bus);if (ret <0 ) goto out;
drivers/net/phy/sfp-bus.c +6 -0
@@ -74,6 +74,12 @@ static const struct sfp_quirk sfp_quirks[] = { .vendor = "HUAWEI", .part = "MA5671A", .modes = sfp_quirk_2500basex, + }, { +// Lantech 8330-262D-E can operate at 2500base-X, but +// incorrectly report 2500MBd NRZ in their EEPROM + .vendor = "Lantech", + .part = "8330-262D-E", + .modes = sfp_quirk_2500basex, }, { .vendor = "UBNT", .part = "UF-INSTANT",
drivers/net/tap.c +2 -1
@@ -1202,7 +1202,8 @@ static int tap_sendmsg(struct socket *sock, struct msghdr *m,struct xdp_buff *xdp;int i; -if (ctl && (ctl->type ==TUN_MSG_PTR )) { +if (m->msg_controllen ==sizeof (struct tun_msg_ctl ) && + ctl && ctl->type ==TUN_MSG_PTR ) {for (i =0 ; i < ctl->num; i++) { xdp = &((struct xdp_buff *)ctl->ptr)[i];tap_get_user_xdp (q, xdp);
drivers/net/tun.c +2 -1
@@ -2499,7 +2499,8 @@ static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)if (!tun)return -EBADFD ; -if (ctl && (ctl->type ==TUN_MSG_PTR )) { +if (m->msg_controllen ==sizeof (struct tun_msg_ctl ) && + ctl && ctl->type ==TUN_MSG_PTR ) {struct tun_page tpage;int n = ctl->num;int flush =0 ;
drivers/net/wireless/ath/ath11k/ahb.c +2 -0
@@ -366,6 +366,8 @@ static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab)for (j =0 ; j < irq_grp->num_irq; j++)free_irq (ab->irq_num[irq_grp->irqs[j]], irq_grp); + +netif_napi_del (&irq_grp->napi); } }
drivers/net/wireless/ath/ath11k/mhi.c +1 -1
@@ -402,7 +402,7 @@ static int ath11k_mhi_set_state(struct ath11k_pci *ab_pci, ret =0 ;break ;case ATH11K_MHI_POWER_ON : - ret =mhi_async_power_up (ab_pci->mhi_ctrl); + ret =mhi_sync_power_up (ab_pci->mhi_ctrl);break ;case ATH11K_MHI_POWER_OFF :mhi_power_down (ab_pci->mhi_ctrl, true);
drivers/net/wireless/ath/ath5k/eeprom.c +3 -0
@@ -746,6 +746,9 @@ ath5k_eeprom_convert_pcal_info_5111(struct ath5k_hw *ah, int mode, } } +if (idx ==AR5K_EEPROM_N_PD_CURVES ) + goto err_out; + ee->ee_pd_gains[mode] =1 ; pd = &chinfo[pier].pd_curves[idx];
drivers/net/wireless/intel/iwlwifi/mvm/scan.c +4 -1
@@ -1706,7 +1706,10 @@ static u8 iwl_mvm_scan_umac_chan_flags_v2(struct iwl_mvm *mvm,IWL_SCAN_CHANNEL_FLAG_CACHE_ADD ;/* set fragmented ebs for fragmented scan on HB channels */ -if (iwl_mvm_is_scan_fragmented (params->hb_type)) +if ((!iwl_mvm_is_cdb_supported (mvm) && +iwl_mvm_is_scan_fragmented (params->type)) || + (iwl_mvm_is_cdb_supported (mvm) && +iwl_mvm_is_scan_fragmented (params->hb_type))) flags |=IWL_SCAN_CHANNEL_FLAG_EBS_FRAG ;return flags;
drivers/net/wireless/mediatek/mt76/dma.c +1 -0
@@ -455,6 +455,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q) qbuf.addr = addr + offset; qbuf.len = len - offset; + qbuf.skip_unmap = false;mt76_dma_add_buf (dev, q, &qbuf,1 ,0 , buf,NULL ); frames++; }
drivers/net/wireless/mediatek/mt76/mt7615/mac.c +1 -1
@@ -1626,7 +1626,7 @@ mt7615_mac_adjust_sensitivity(struct mt7615_phy *phy,struct mt7615_dev *dev = phy->dev;int false_cca = ofdm ? phy->false_cca_ofdm : phy->false_cca_cck;bool ext_phy = phy != &dev->phy; -u16 def_th = ofdm ?-98 :-110 ; +s16 def_th = ofdm ?-98 :-110 ;bool update = false;s8 *sensitivity;int signal;
drivers/parisc/dino.c +33 -8
73 lines not on this page · raw message
drivers/parisc/gsc.c +31 -0
@@ -135,10 +135,41 @@ static void gsc_asic_unmask_irq(struct irq_data *d)*/ } +#ifdef CONFIG_SMP +static int gsc_set_affinity_irq (struct irq_data *d,const struct cpumask *dest, +bool force) +{ +struct gsc_asic *gsc_dev =irq_data_get_irq_chip_data (d); +struct cpumask tmask; +int cpu_irq; + +if (!cpumask_and (&tmask, dest, cpu_online_mask)) +return -EINVAL ; + + cpu_irq =cpu_check_affinity (d, &tmask); +if (cpu_irq <0 ) +return cpu_irq; + + gsc_dev->gsc_irq.txn_addr =txn_affinity_addr (d->irq, cpu_irq); + gsc_dev->eim = ((u32 ) gsc_dev->gsc_irq.txn_addr) | gsc_dev->gsc_irq.txn_data; + +/* switch IRQ's for devices below LASI/WAX to other CPU */ +gsc_writel (gsc_dev->eim, gsc_dev->hpa +OFFSET_IAR ); + +irq_data_update_effective_affinity (d, &tmask); + +return IRQ_SET_MASK_OK ; +} +#endif + +static struct irq_chip gsc_asic_interrupt_type = { .name ="GSC-ASIC" , .irq_unmask = gsc_asic_unmask_irq, .irq_mask = gsc_asic_mask_irq, +#ifdef CONFIG_SMP + .irq_set_affinity = gsc_set_affinity_irq, +#endif };int gsc_assign_irq (struct irq_chip *type,void *data)
drivers/parisc/gsc.h +1 -0
@@ -31,6 +31,7 @@ struct gsc_asic {int version;int type;int eim; +struct gsc_irq gsc_irq;int global_irq[32 ]; };
drivers/parisc/lasi.c +3 -4
@@ -163,7 +163,6 @@ static int __init lasi_init_chip(struct parisc_device *dev) {extern void (*chassis_power_off)(void );struct gsc_asic *lasi; -struct gsc_irq gsc_irq;int ret; lasi =kzalloc (sizeof (*lasi),GFP_KERNEL );
@@ -185,7 +184,7 @@ static int __init lasi_init_chip(struct parisc_device *dev)lasi_init_irq (lasi);/* the IRQ lasi should use */ - dev->irq =gsc_alloc_irq (&gsc_irq); + dev->irq =gsc_alloc_irq (&lasi->gsc_irq);if (dev->irq <0 ) {printk (KERN_ERR "%s(): cannot get GSC irq\n" , __func__);
@@ -193,9 +192,9 @@ static int __init lasi_init_chip(struct parisc_device *dev)return -EBUSY ; } - lasi->eim = ((u32 ) gsc_irq.txn_addr) | gsc_irq.txn_data; + lasi->eim = ((u32 ) lasi->gsc_irq.txn_addr) | lasi->gsc_irq.txn_data; - ret =request_irq (gsc_irq.irq, gsc_asic_intr,0 ,"lasi" , lasi); + ret =request_irq (lasi->gsc_irq.irq, gsc_asic_intr,0 ,"lasi" , lasi);if (ret <0 ) {kfree (lasi);return ret;
drivers/parisc/wax.c +3 -4
@@ -68,7 +68,6 @@ static int __init wax_init_chip(struct parisc_device *dev) {struct gsc_asic *wax;struct parisc_device *parent; -struct gsc_irq gsc_irq;int ret; wax =kzalloc (sizeof (*wax),GFP_KERNEL );
@@ -85,7 +84,7 @@ static int __init wax_init_chip(struct parisc_device *dev)wax_init_irq (wax);/* the IRQ wax should use */ - dev->irq =gsc_claim_irq (&gsc_irq,WAX_GSC_IRQ ); + dev->irq =gsc_claim_irq (&wax->gsc_irq,WAX_GSC_IRQ );if (dev->irq <0 ) {printk (KERN_ERR "%s(): cannot get GSC irq\n" , __func__);
@@ -93,9 +92,9 @@ static int __init wax_init_chip(struct parisc_device *dev)return -EBUSY ; } - wax->eim = ((u32 ) gsc_irq.txn_addr) | gsc_irq.txn_data; + wax->eim = ((u32 ) wax->gsc_irq.txn_addr) | wax->gsc_irq.txn_data; - ret =request_irq (gsc_irq.irq, gsc_asic_intr,0 ,"wax" , wax); + ret =request_irq (wax->gsc_irq.irq, gsc_asic_intr,0 ,"wax" , wax);if (ret <0 ) {kfree (wax);return ret;
drivers/pci/controller/pci-aardvark.c +6 -10
@@ -1186,7 +1186,7 @@ static void advk_msi_irq_compose_msi_msg(struct irq_data *data, msg->address_lo =lower_32_bits (msi_msg); msg->address_hi =upper_32_bits (msi_msg); - msg->data = data->irq; + msg->data = data->hwirq; } static int advk_msi_set_affinity(struct irq_data *irq_data,
@@ -1203,15 +1203,11 @@ static int advk_msi_irq_domain_alloc(struct irq_domain *domain,int hwirq, i;mutex_lock (&pcie->msi_used_lock); - hwirq =bitmap_find_next_zero_area (pcie->msi_used,MSI_IRQ_NUM , -0 , nr_irqs,0 ); -if (hwirq >=MSI_IRQ_NUM ) { -mutex_unlock (&pcie->msi_used_lock); -return -ENOSPC ; - } - -bitmap_set (pcie->msi_used, hwirq, nr_irqs); + hwirq =bitmap_find_free_region (pcie->msi_used,MSI_IRQ_NUM , +order_base_2 (nr_irqs));mutex_unlock (&pcie->msi_used_lock); +if (hwirq <0 ) +return -ENOSPC ;for (i =0 ; i < nr_irqs; i++) irq_domain_set_info(domain, virq + i, hwirq + i,
@@ -1229,7 +1225,7 @@ static void advk_msi_irq_domain_free(struct irq_domain *domain,struct advk_pcie *pcie = domain->host_data;mutex_lock (&pcie->msi_used_lock); -bitmap_clear (pcie->msi_used, d->hwirq, nr_irqs); +bitmap_release_region (pcie->msi_used, d->hwirq,order_base_2 (nr_irqs));mutex_unlock (&pcie->msi_used_lock); }
drivers/pci/endpoint/functions/pci-epf-test.c +12 -2
@@ -285,7 +285,17 @@ static int pci_epf_test_copy(struct pci_epf_test *epf_test)if (ret)dev_err (dev,"Data transfer failed\n" ); }else { -memcpy (dst_addr, src_addr, reg->size); +void *buf; + + buf =kzalloc (reg->size,GFP_KERNEL ); +if (!buf) { + ret = -ENOMEM ; + goto err_map_addr; + } + +memcpy_fromio (buf, src_addr, reg->size); +memcpy_toio (dst_addr, buf, reg->size); +kfree (buf); }ktime_get_ts64 (&end);pci_epf_test_print_rate ("COPY" , reg->size, &start, &end, use_dma);
@@ -441,7 +451,7 @@ static int pci_epf_test_write(struct pci_epf_test *epf_test)if (!epf_test->dma_supported) {dev_err (dev,"Cannot transfer data using DMA\n" ); ret = -EINVAL ; - goto err_map_addr; + goto err_dma_map; } src_phys_addr = dma_map_single(dma_dev, buf, reg->size,
drivers/pci/hotplug/pciehp_hpc.c +2 -0
@@ -1060,6 +1060,8 @@ static void quirk_cmd_compl(struct pci_dev *pdev) }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_INTEL ,PCI_ANY_ID ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); +DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_QCOM ,0x0110 , +PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl);DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_QCOM ,0x0400 ,PCI_CLASS_BRIDGE_PCI ,8 , quirk_cmd_compl); DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401,
drivers/perf/qcom_l2_pmu.c +3 -3
@@ -739,7 +739,7 @@ static struct cluster_pmu *l2_cache_associate_cpu_with_cluster( {u64 mpidr;int cpu_cluster_id; -struct cluster_pmu *cluster =NULL ; +struct cluster_pmu *cluster;/* * This assumes that the cluster_id is in MPIDR[aff1] for
@@ -761,10 +761,10 @@ static struct cluster_pmu *l2_cache_associate_cpu_with_cluster( cluster->cluster_id);cpumask_set_cpu (cpu, &cluster->cluster_cpus); *per_cpu_ptr (l2cache_pmu->pmu_cluster, cpu) = cluster; -break ; +return cluster; } -return cluster; +return NULL ; }static int l2cache_pmu_online_cpu (unsigned int cpu,struct hlist_node *node)
drivers/phy/amlogic/phy-meson8b-usb2.c +3 -2
@@ -261,8 +261,9 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev)return PTR_ERR (priv->clk_usb); priv->reset =devm_reset_control_get_optional_shared (&pdev->dev,NULL ); -if (PTR_ERR (priv->reset) == -EPROBE_DEFER ) -return PTR_ERR (priv->reset); +if (IS_ERR (priv->reset)) +return dev_err_probe (&pdev->dev,PTR_ERR (priv->reset), +"Failed to get the reset line" ); priv->dr_mode =of_usb_get_dr_mode_by_phy (pdev->dev.of_node,-1 );if (priv->dr_mode ==USB_DR_MODE_UNKNOWN ) {
drivers/power/supply/axp20x_battery.c +6 -7
@@ -185,7 +185,6 @@ static int axp20x_battery_get_prop(struct power_supply *psy, union power_supply_propval *val) {struct axp20x_batt_ps *axp20x_batt =power_supply_get_drvdata (psy); -struct iio_channel *chan;int ret =0 , reg, val1;switch (psp) {
@@ -265,12 +264,12 @@ static int axp20x_battery_get_prop(struct power_supply *psy,if (ret)return ret; -if (reg &AXP20X_PWR_STATUS_BAT_CHARGING ) - chan = axp20x_batt->batt_chrg_i; -else - chan = axp20x_batt->batt_dischrg_i; - - ret =iio_read_channel_processed (chan, &val->intval); +if (reg &AXP20X_PWR_STATUS_BAT_CHARGING ) { + ret =iio_read_channel_processed (axp20x_batt->batt_chrg_i, &val->intval); + }else { + ret =iio_read_channel_processed (axp20x_batt->batt_dischrg_i, &val1); + val->intval = -val1; + }if (ret)return ret;
drivers/power/supply/axp288_charger.c +12 -2
@@ -41,11 +41,11 @@#define VBUS_ISPOUT_CUR_LIM_1500MA 0x1/* 1500mA */ #define VBUS_ISPOUT_CUR_LIM_2000MA 0x2/* 2000mA */ #define VBUS_ISPOUT_CUR_NO_LIM 0x3/* 2500mA */ -#define VBUS_ISPOUT_VHOLD_SET_MASK 0x31 +#define VBUS_ISPOUT_VHOLD_SET_MASK 0x38#define VBUS_ISPOUT_VHOLD_SET_BIT_POS 0x3#define VBUS_ISPOUT_VHOLD_SET_OFFSET 4000/* 4000mV */ #define VBUS_ISPOUT_VHOLD_SET_LSB_RES 100/* 100mV */ -#define VBUS_ISPOUT_VHOLD_SET_4300MV 0x3/* 4300mV */ +#define VBUS_ISPOUT_VHOLD_SET_4400MV 0x4/* 4400mV */ #define VBUS_ISPOUT_VBUS_PATH_DIS BIT(7)#define CHRG_CCCV_CC_MASK 0xf/* 4 bits */
@@ -744,6 +744,16 @@ static int charger_init_hw_regs(struct axp288_chrg_info *info) ret =axp288_charger_vbus_path_select (info, true);if (ret <0 )return ret; + }else { +/* Set Vhold to the factory default / recommended 4.4V */ + val =VBUS_ISPOUT_VHOLD_SET_4400MV <<VBUS_ISPOUT_VHOLD_SET_BIT_POS ; + ret =regmap_update_bits (info->regmap,AXP20X_VBUS_IPSOUT_MGMT , +VBUS_ISPOUT_VHOLD_SET_MASK , val); +if (ret <0 ) { +dev_err (&info->pdev->dev,"register(%x) write error(%d)\n" , +AXP20X_VBUS_IPSOUT_MGMT , ret); +return ret; + } }/* Read current charge voltage and current limit */
drivers/ptp/ptp_sysfs.c +2 -2
@@ -13,7 +13,7 @@ static ssize_t clock_name_show(struct device *dev, struct device_attribute *attr, char *page) { struct ptp_clock *ptp = dev_get_drvdata(dev); -return snprintf (page,PAGE_SIZE -1 ,"%s\n" , ptp->info->name); +return sysfs_emit (page,"%s\n" , ptp->info->name); }static DEVICE_ATTR_RO (clock_name);
@@ -227,7 +227,7 @@ static ssize_t ptp_pin_show(struct device *dev, struct device_attribute *attr,mutex_unlock (&ptp->pincfg_mux); -return snprintf (page,PAGE_SIZE ,"%u %u\n" , func, chan); +return sysfs_emit (page,"%u %u\n" , func, chan); } static ssize_t ptp_pin_store(struct device *dev, struct device_attribute *attr,
drivers/rtc/rtc-wm8350.c +9 -2
@@ -432,14 +432,21 @@ static int wm8350_rtc_probe(struct platform_device *pdev)return ret; } -wm8350_register_irq (wm8350,WM8350_IRQ_RTC_SEC , + ret =wm8350_register_irq (wm8350,WM8350_IRQ_RTC_SEC , wm8350_rtc_update_handler,0 ,"RTC Seconds" , wm8350); +if (ret) +return ret; +wm8350_mask_irq (wm8350,WM8350_IRQ_RTC_SEC ); -wm8350_register_irq (wm8350,WM8350_IRQ_RTC_ALM , + ret =wm8350_register_irq (wm8350,WM8350_IRQ_RTC_ALM , wm8350_rtc_alarm_handler,0 ,"RTC Alarm" , wm8350); +if (ret) { +wm8350_free_irq (wm8350,WM8350_IRQ_RTC_SEC , wm8350); +return ret; + }return 0 ; }
drivers/scsi/aha152x.c +2 -4
@@ -3367,13 +3367,11 @@ static int __init aha152x_setup(char *str) setup[setup_count].synchronous = ints[0 ] >=6 ? ints[6 ] :1 ; setup[setup_count].delay = ints[0 ] >=7 ? ints[7 ] :DELAY_DEFAULT ; setup[setup_count].ext_trans = ints[0 ] >=8 ? ints[8 ] :0 ; -if (ints[0 ] >8 ) {/*}*/ +if (ints[0 ] >8 )printk (KERN_NOTICE "aha152x: usage: aha152x=<IOBASE>[,<IRQ>[,<SCSI ID>" "[,<RECONNECT>[,<PARITY>[,<SYNCHRONOUS>[,<DELAY>[,<EXT_TRANS>]]]]]]]\n" ); - }else { +else setup_count++; -return 0 ; - }return 1 ; }
drivers/scsi/bfa/bfad_attr.c +13 -13
@@ -711,7 +711,7 @@ bfad_im_serial_num_show(struct device *dev, struct device_attribute *attr,char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN ];bfa_get_adapter_serial_num (&bfad->bfa, serial_num); -return snprintf (buf,PAGE_SIZE ,"%s\n" , serial_num); +return sysfs_emit (buf,"%s\n" , serial_num); } static ssize_t
@@ -725,7 +725,7 @@ bfad_im_model_show(struct device *dev, struct device_attribute *attr,char model[BFA_ADAPTER_MODEL_NAME_LEN ];bfa_get_adapter_model (&bfad->bfa, model); -return snprintf (buf,PAGE_SIZE ,"%s\n" , model); +return sysfs_emit (buf,"%s\n" , model); } static ssize_t
@@ -805,7 +805,7 @@ bfad_im_model_desc_show(struct device *dev, struct device_attribute *attr,snprintf (model_descr,BFA_ADAPTER_MODEL_DESCR_LEN ,"Invalid Model" ); -return snprintf (buf,PAGE_SIZE ,"%s\n" , model_descr); +return sysfs_emit (buf,"%s\n" , model_descr); } static ssize_t
@@ -819,7 +819,7 @@ bfad_im_node_name_show(struct device *dev, struct device_attribute *attr,u64 nwwn; nwwn =bfa_fcs_lport_get_nwwn (port->fcs_port); -return snprintf (buf,PAGE_SIZE ,"0x%llx\n" ,cpu_to_be64 (nwwn)); +return sysfs_emit (buf,"0x%llx\n" ,cpu_to_be64 (nwwn)); } static ssize_t
@@ -836,7 +836,7 @@ bfad_im_symbolic_name_show(struct device *dev, struct device_attribute *attr,bfa_fcs_lport_get_attr (&bfad->bfa_fcs.fabric.bport, &port_attr);strlcpy (symname, port_attr.port_cfg.sym_name.symname,BFA_SYMNAME_MAXLEN ); -return snprintf (buf,PAGE_SIZE ,"%s\n" , symname); +return sysfs_emit (buf,"%s\n" , symname); } static ssize_t
@@ -850,14 +850,14 @@ bfad_im_hw_version_show(struct device *dev, struct device_attribute *attr,char hw_ver[BFA_VERSION_LEN ];bfa_get_pci_chip_rev (&bfad->bfa, hw_ver); -return snprintf (buf,PAGE_SIZE ,"%s\n" , hw_ver); +return sysfs_emit (buf,"%s\n" , hw_ver); }static ssize_t bfad_im_drv_version_show (struct device *dev,struct device_attribute *attr,char *buf) { -return snprintf (buf,PAGE_SIZE ,"%s\n" ,BFAD_DRIVER_VERSION ); +return sysfs_emit (buf,"%s\n" ,BFAD_DRIVER_VERSION ); } static ssize_t
@@ -871,7 +871,7 @@ bfad_im_optionrom_version_show(struct device *dev,char optrom_ver[BFA_VERSION_LEN ];bfa_get_adapter_optrom_ver (&bfad->bfa, optrom_ver); -return snprintf (buf,PAGE_SIZE ,"%s\n" , optrom_ver); +return sysfs_emit (buf,"%s\n" , optrom_ver); } static ssize_t
@@ -885,7 +885,7 @@ bfad_im_fw_version_show(struct device *dev, struct device_attribute *attr,char fw_ver[BFA_VERSION_LEN ];bfa_get_adapter_fw_ver (&bfad->bfa, fw_ver); -return snprintf (buf,PAGE_SIZE ,"%s\n" , fw_ver); +return sysfs_emit (buf,"%s\n" , fw_ver); } static ssize_t
@@ -897,7 +897,7 @@ bfad_im_num_of_ports_show(struct device *dev, struct device_attribute *attr, (struct bfad_im_port_s *) shost->hostdata[0 ];struct bfad_s *bfad = im_port->bfad; -return snprintf (buf,PAGE_SIZE ,"%d\n" , +return sysfs_emit (buf,"%d\n" ,bfa_get_nports (&bfad->bfa)); }
@@ -905,7 +905,7 @@ static ssize_t bfad_im_drv_name_show(struct device *dev, struct device_attribute *attr, char *buf) { - return snprintf(buf, PAGE_SIZE, "%s\n", BFAD_DRIVER_NAME); + return sysfs_emit(buf, "%s\n", BFAD_DRIVER_NAME); } static ssize_t
@@ -924,14 +924,14 @@ bfad_im_num_of_discovered_ports_show(struct device *dev, rports =kcalloc (nrports,sizeof (struct bfa_rport_qualifier_s ),GFP_ATOMIC );if (rports ==NULL ) -return snprintf (buf,PAGE_SIZE ,"Failed\n" ); +return sysfs_emit (buf,"Failed\n" );spin_lock_irqsave (&bfad->bfad_lock, flags);bfa_fcs_lport_get_rport_quals (port->fcs_port, rports, &nrports);spin_unlock_irqrestore (&bfad->bfad_lock, flags);kfree (rports); -return snprintf (buf,PAGE_SIZE ,"%d\n" , nrports); +return sysfs_emit (buf,"%d\n" , nrports); } static DEVICE_ATTR(serial_number, S_IRUGO,
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +11 -5
@@ -2372,17 +2372,25 @@ static irqreturn_t cq_interrupt_v3_hw(int irq_no, void *p)return IRQ_WAKE_THREAD ; } +static void hisi_sas_v3_free_vectors (void *data) +{ +struct pci_dev *pdev = data; + +pci_free_irq_vectors (pdev); +} +static int interrupt_preinit_v3_hw (struct hisi_hba *hisi_hba) {int vectors;int max_msi =HISI_SAS_MSI_COUNT_V3_HW , min_msi;struct Scsi_Host *shost = hisi_hba->shost; +struct pci_dev *pdev = hisi_hba->pci_dev;struct irq_affinity desc = { .pre_vectors =BASE_VECTORS_V3_HW , }; min_msi =MIN_AFFINE_VECTORS_V3_HW ; - vectors = pci_alloc_irq_vectors_affinity(hisi_hba->pci_dev, + vectors = pci_alloc_irq_vectors_affinity(pdev, min_msi, max_msi, PCI_IRQ_MSI | PCI_IRQ_AFFINITY,
@@ -2394,6 +2402,7 @@ static int interrupt_preinit_v3_hw(struct hisi_hba *hisi_hba) hisi_hba->cq_nvecs = vectors -BASE_VECTORS_V3_HW ; shost->nr_hw_queues = hisi_hba->cq_nvecs; +devm_add_action (&pdev->dev, hisi_sas_v3_free_vectors, pdev);return 0 ; }
@@ -3313,7 +3322,7 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id)dev_err (dev,"%d hw queues\n" , shost->nr_hw_queues); rc =scsi_add_host (shost, dev);if (rc) - goto err_out_free_irq_vectors; + goto err_out_debugfs; rc =sas_register_ha (sha);if (rc)
@@ -3340,8 +3349,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) err_out_register_ha:scsi_remove_host (shost); -err_out_free_irq_vectors: -pci_free_irq_vectors (pdev); err_out_debugfs:hisi_sas_debugfs_exit (hisi_hba); err_out_ha:
@@ -3369,7 +3376,6 @@ hisi_sas_v3_destroy_irqs(struct pci_dev *pdev, struct hisi_hba *hisi_hba)devm_free_irq (&pdev->dev,pci_irq_vector (pdev, nr), cq); } -pci_free_irq_vectors (pdev); }static void hisi_sas_v3_remove (struct pci_dev *pdev)
drivers/scsi/libfc/fc_exch.c +1 -0
@@ -1702,6 +1702,7 @@ static void fc_exch_abts_resp(struct fc_exch *ep, struct fc_frame *fp)if (cancel_delayed_work_sync (&ep->timeout_work)) {FC_EXCH_DBG (ep,"Exchange timer canceled due to ABTS response\n" );fc_exch_release (ep);/* release from pending timer hold */ +return ; }spin_lock_bh (&ep->ex_lock);
drivers/scsi/mvsas/mv_init.c +2 -2
@@ -697,7 +697,7 @@ static ssize_t mvs_show_driver_version(struct device *cdev, struct device_attribute *attr, char *buffer) { - return snprintf(buffer, PAGE_SIZE, "%s\n", DRV_VERSION); + return sysfs_emit(buffer, "%s\n", DRV_VERSION); } static DEVICE_ATTR(driver_version,
@@ -749,7 +749,7 @@ mvs_store_interrupt_coalescing(struct device *cdev,static ssize_t mvs_show_interrupt_coalescing (struct device *cdev,struct device_attribute *attr,char *buffer) { -return snprintf (buffer,PAGE_SIZE ,"%d\n" , interrupt_coalescing); +return sysfs_emit (buffer,"%d\n" , interrupt_coalescing); } static DEVICE_ATTR(interrupt_coalescing,
drivers/scsi/pm8001/pm8001_hwi.c +20 -7
@@ -1711,7 +1711,6 @@ static void pm8001_send_abort_all(struct pm8001_hba_info *pm8001_ha, } task =sas_alloc_slow_task (GFP_ATOMIC ); -if (!task) {pm8001_dbg (pm8001_ha,FAIL ,"cannot allocate task\n" );return ;
@@ -1720,8 +1719,10 @@ static void pm8001_send_abort_all(struct pm8001_hba_info *pm8001_ha, task->task_done = pm8001_task_done; res =pm8001_tag_alloc (pm8001_ha, &ccb_tag); -if (res) +if (res) { +sas_free_task (task);return ; + } ccb = &pm8001_ha->ccb_info[ccb_tag]; ccb->device = pm8001_ha_dev;
@@ -1738,8 +1739,10 @@ static void pm8001_send_abort_all(struct pm8001_hba_info *pm8001_ha, ret =pm8001_mpi_build_cmd (pm8001_ha, circularQ, opc, &task_abort,sizeof (task_abort),0 ); -if (ret) +if (ret) { +sas_free_task (task);pm8001_tag_free (pm8001_ha, ccb_tag); + } }
@@ -3669,12 +3672,11 @@ int pm8001_mpi_task_abort_resp(struct pm8001_hba_info *pm8001_ha, void *piomb)mb ();if (pm8001_dev->id &NCQ_ABORT_ALL_FLAG ) { -pm8001_tag_free (pm8001_ha, tag);sas_free_task (t); -/* clear the flag */ - pm8001_dev->id &=0xBFFFFFFF ; - }else + pm8001_dev->id &= ~NCQ_ABORT_ALL_FLAG ; + }else { t->task_done (t); + }return 0 ; }
@@ -4428,6 +4430,9 @@ static int pm8001_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha, SAS_ADDR_SIZE); rc =pm8001_mpi_build_cmd (pm8001_ha, circularQ, opc, &payload,sizeof (payload),0 ); +if (rc) +pm8001_tag_free (pm8001_ha, tag); +return rc; }
@@ -4840,6 +4845,11 @@ pm8001_chip_fw_flash_update_req(struct pm8001_hba_info *pm8001_ha, ccb->ccb_tag = tag; rc =pm8001_chip_fw_flash_update_build (pm8001_ha, &flash_update_info, tag); +if (rc) { +kfree (fw_control_context); +pm8001_tag_free (pm8001_ha, tag); + } +return rc; }
@@ -4944,6 +4954,9 @@ pm8001_chip_set_dev_state_req(struct pm8001_hba_info *pm8001_ha, payload.nds =cpu_to_le32 (state); rc =pm8001_mpi_build_cmd (pm8001_ha, circularQ, opc, &payload,sizeof (payload),0 ); +if (rc) +pm8001_tag_free (pm8001_ha, tag); +return rc; }
drivers/scsi/pm8001/pm8001_sas.c +1 -1
@@ -831,10 +831,10 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, res =PM8001_CHIP_DISP ->task_abort (pm8001_ha, pm8001_dev, flag, task_tag, ccb_tag); -if (res) {del_timer (&task->slow_task->timer);pm8001_dbg (pm8001_ha,FAIL ,"Executing internal task failed\n" ); +pm8001_tag_free (pm8001_ha, ccb_tag); goto ex_err; }wait_for_completion (&task->slow_task->completion);
drivers/scsi/pm8001/pm80xx_hwi.c +10 -7
@@ -66,18 +66,16 @@ int pm80xx_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shift_value) }static void pm80xx_pci_mem_copy (struct pm8001_hba_info *pm8001_ha,u32 soffset, -const void *destination, +__le32 *destination,u32 dw_count,u32 bus_base_number) {u32 index, value, offset; -u32 *destination1; - destination1 = (u32 *)destination; -for (index =0 ; index < dw_count; index +=4 , destination1++) { +for (index =0 ; index < dw_count; index +=4 , destination++) { offset = (soffset + index);if (offset < (64 *1024 )) { value =pm8001_cr32 (pm8001_ha, bus_base_number, offset); - *destination1 =cpu_to_le32 (value); + *destination =cpu_to_le32 (value); } }return ;
@@ -4849,8 +4847,13 @@ static int pm80xx_chip_phy_ctl_req(struct pm8001_hba_info *pm8001_ha, payload.tag =cpu_to_le32 (tag); payload.phyop_phyid =cpu_to_le32 (((phy_op &0xFF ) <<8 ) | (phyId &0xFF )); -return pm8001_mpi_build_cmd (pm8001_ha, circularQ, opc, &payload, -sizeof (payload),0 ); + + rc =pm8001_mpi_build_cmd (pm8001_ha, circularQ, opc, &payload, +sizeof (payload),0 ); +if (rc) +pm8001_tag_free (pm8001_ha, tag); + +return rc; }static u32 pm80xx_chip_is_our_interrupt (struct pm8001_hba_info *pm8001_ha)
drivers/scsi/zorro7xx.c +2 -0
@@ -159,6 +159,8 @@ static void zorro7xx_remove_one(struct zorro_dev *z)scsi_remove_host (host);NCR_700_release (host); +if (host->base >0x01000000 ) +iounmap (hostdata->base);kfree (hostdata);free_irq (host->irq, host);zorro_release_device (z);
drivers/spi/spi-bcm-qspi.c +2 -2
@@ -1032,7 +1032,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem, addr = op->addr.val; len = op->data.nbytes; -if (bcm_qspi_bspi_ver_three (qspi) == true) { +if (has_bspi (qspi) &&bcm_qspi_bspi_ver_three (qspi) == true) {/* * The address coming into this function is a raw flash offset. * But for BSPI <= V3, we need to convert it to a remapped BSPI
@@ -1051,7 +1051,7 @@ static int bcm_qspi_exec_mem_op(struct spi_mem *mem, len < 4) mspi_read = true; -if (mspi_read) +if (!has_bspi (qspi) || mspi_read)return bcm_qspi_mspi_exec_mem_op (spi, op); ret =bcm_qspi_bspi_set_mode (qspi, op,0 );
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +6 -0
@@ -2280,6 +2280,9 @@ void vchiq_msg_queue_push(unsigned int handle, struct vchiq_header *header)struct vchiq_service *service =find_service_by_handle (handle);int pos; +if (!service) +return ; +while (service->msg_queue_write == service->msg_queue_read +VCHIQ_MAX_SLOTS ) {if (wait_for_completion_interruptible (&service->msg_queue_pop))
@@ -2299,6 +2302,9 @@ struct vchiq_header *vchiq_msg_hold(unsigned int handle)struct vchiq_header *header;int pos; +if (!service) +return NULL ; +if (service->msg_queue_write == service->msg_queue_read)return NULL ;
drivers/staging/wfx/main.c +6 -1
@@ -309,7 +309,8 @@ struct wfx_dev *wfx_init_common(struct device *dev, wdev->pdata.gpio_wakeup =devm_gpiod_get_optional (dev,"wakeup" ,GPIOD_OUT_LOW );if (IS_ERR (wdev->pdata.gpio_wakeup)) -return NULL ; + goto err; +if (wdev->pdata.gpio_wakeup)gpiod_set_consumer_name (wdev->pdata.gpio_wakeup,"wfx wakeup" );
@@ -328,6 +329,10 @@ struct wfx_dev *wfx_init_common(struct device *dev,return NULL ;return wdev; + +err: +ieee80211_free_hw (hw); +return NULL ; }int wfx_probe (struct wfx_dev *wdev)
drivers/tty/serial/samsung_tty.c +1 -4
@@ -883,11 +883,8 @@ static irqreturn_t s3c24xx_serial_tx_chars(int irq, void *id) goto out; } -if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS ) { -spin_unlock (&port->lock); +if (uart_circ_chars_pending (xmit) <WAKEUP_CHARS )uart_write_wakeup (port); -spin_lock (&port->lock); - }if (uart_circ_empty (xmit))s3c24xx_serial_stop_tx (port);
drivers/usb/dwc3/dwc3-omap.c +1 -1
@@ -242,7 +242,7 @@ static void dwc3_omap_set_mailbox(struct dwc3_omap *omap,break ;case OMAP_DWC3_ID_FLOAT : -if (omap->vbus_reg) +if (omap->vbus_reg &®ulator_is_enabled (omap->vbus_reg))regulator_disable (omap->vbus_reg); val =dwc3_omap_read_utmi_ctrl (omap); val |=USBOTGSS_UTMI_OTG_CTRL_IDDIG ;
drivers/usb/gadget/udc/tegra-xudc.c +10 -10
@@ -32,9 +32,6 @@#include <linux/workqueue.h> /* XUSB_DEV registers */ -#define SPARAM 0x000 -#define SPARAM_ERSTMAX_MASK GENMASK(20, 16) -#define SPARAM_ERSTMAX (x) (((x) << 16) & SPARAM_ERSTMAX_MASK)#define DB 0x004#define DB_TARGET_MASK GENMASK(15, 8)#define DB_TARGET (x) (((x) << 8) & DB_TARGET_MASK)
@@ -275,8 +272,10 @@ BUILD_EP_CONTEXT_RW(deq_hi, deq_hi, 0, 0xffffffff) BUILD_EP_CONTEXT_RW(avg_trb_len, tx_info, 0, 0xffff) BUILD_EP_CONTEXT_RW(max_esit_payload, tx_info, 16, 0xffff) BUILD_EP_CONTEXT_RW(edtla, rsvd[0], 0, 0xffffff) -BUILD_EP_CONTEXT_RW(seq_num, rsvd[0], 24, 0xff) +BUILD_EP_CONTEXT_RW(rsvd, rsvd[0], 24, 0x1) BUILD_EP_CONTEXT_RW(partial_td, rsvd[0], 25, 0x1) +BUILD_EP_CONTEXT_RW(splitxstate, rsvd[0], 26, 0x1) +BUILD_EP_CONTEXT_RW(seq_num, rsvd[0], 27, 0x1f) BUILD_EP_CONTEXT_RW(cerrcnt, rsvd[1], 18, 0x3) BUILD_EP_CONTEXT_RW(data_offset, rsvd[2], 0, 0x1ffff)BUILD_EP_CONTEXT_RW (numtrbs, rsvd[2 ],22 ,0x1f )
@@ -1557,6 +1556,9 @@ static int __tegra_xudc_ep_set_halt(struct tegra_xudc_ep *ep, bool halt)ep_reload (xudc, ep->index);ep_ctx_write_state (ep->context,EP_STATE_RUNNING ); +ep_ctx_write_rsvd (ep->context,0 ); +ep_ctx_write_partial_td (ep->context,0 ); +ep_ctx_write_splitxstate (ep->context,0 );ep_ctx_write_seq_num (ep->context,0 );ep_reload (xudc, ep->index);
@@ -2812,7 +2814,10 @@ static void tegra_xudc_reset(struct tegra_xudc *xudc) xudc->setup_seq_num =0 ; xudc->queued_setup_packet = false; -ep_ctx_write_seq_num (ep0->context, xudc->setup_seq_num); +ep_ctx_write_rsvd (ep0->context,0 ); +ep_ctx_write_partial_td (ep0->context,0 ); +ep_ctx_write_splitxstate (ep0->context,0 ); +ep_ctx_write_seq_num (ep0->context,0 ); deq_ptr =trb_virt_to_phys (ep0, &ep0->transfer_ring[ep0->deq_ptr]);
@@ -3295,11 +3300,6 @@ static void tegra_xudc_init_event_ring(struct tegra_xudc *xudc)unsigned int i;u32 val; - val =xudc_readl (xudc,SPARAM ); - val &= ~(SPARAM_ERSTMAX_MASK ); - val |=SPARAM_ERSTMAX (XUDC_NR_EVENT_RINGS ); -xudc_writel (xudc, val,SPARAM ); -for (i =0 ; i <ARRAY_SIZE (xudc->event_ring); i++) {memset (xudc->event_ring[i],0 ,XUDC_EVENT_RING_SIZE *sizeof (*xudc->event_ring[i]));
drivers/usb/host/ehci-pci.c +9 -0
@@ -21,6 +21,9 @@ static const char hcd_name[] = "ehci-pci";/* defined here to avoid adding to pci_ids.h for single instance use */ #define PCI_DEVICE_ID_INTEL_CE4100_USB 0x2e70 +#define PCI_VENDOR_ID_ASPEED 0x1a03 +#define PCI_DEVICE_ID_ASPEED_EHCI 0x2603 +/*-------------------------------------------------------------------------*/ #define PCI_DEVICE_ID_INTEL_QUARK_X1000_SOC 0x0939static inline bool is_intel_quark_x1000 (struct pci_dev *pdev)
@@ -222,6 +225,12 @@ static int ehci_pci_setup(struct usb_hcd *hcd) ehci->has_synopsys_hc_bug =1 ; }break ; +case PCI_VENDOR_ID_ASPEED : +if (pdev->device ==PCI_DEVICE_ID_ASPEED_EHCI ) { +ehci_info (ehci,"applying Aspeed HC workaround\n" ); + ehci->is_aspeed =1 ; + } +break ; }/* optional debug port, normally in the first BAR */
drivers/vhost/net.c +1 -0
@@ -472,6 +472,7 @@ static void vhost_tx_batch(struct vhost_net *net, goto signal_used; msghdr->msg_control = &ctl; + msghdr->msg_controllen =sizeof (ctl); err = sock->ops->sendmsg (sock, msghdr,0 );if (unlikely (err <0 )) {vq_err (&nvq->vq,"Fail to batch sending packets\n" );
drivers/w1/slaves/w1_therm.c +6 -2
@@ -2092,16 +2092,20 @@ static ssize_t w1_seq_show(struct device *device,if (sl->reg_num.id == reg_num->id) seq = i; +if (w1_reset_bus (sl->master)) + goto error; + +/* Put the device into chain DONE state */ +w1_write_8 (sl->master,W1_MATCH_ROM ); +w1_write_block (sl->master, (u8 *)&rn,8 );w1_write_8 (sl->master,W1_42_CHAIN );w1_write_8 (sl->master,W1_42_CHAIN_DONE );w1_write_8 (sl->master,W1_42_CHAIN_DONE_INV ); -w1_read_block (sl->master, &ack,sizeof (ack));/* check for acknowledgment */ ack =w1_read_8 (sl->master);if (ack !=W1_42_SUCCESS_CONFIRM_BYTE ) goto error; - }/* Exit from CHAIN state */
fs/btrfs/extent_io.h +1 -1
@@ -121,7 +121,7 @@ struct extent_buffer {*/ struct extent_changeset {/* How many bytes are set/cleared in this operation */ -unsigned int bytes_changed; +u64 bytes_changed;/* Changed ranges */ struct ulist range_changed;
fs/btrfs/inode.c +22 -0
@@ -4023,6 +4023,13 @@ int btrfs_delete_subvolume(struct inode *dir, struct dentry *dentry) dest->root_key.objectid);return -EPERM ; } +if (atomic_read (&dest->nr_swapfiles)) { +spin_unlock (&dest->root_item_lock); +btrfs_warn (fs_info, +"attempt to delete subvolume %llu with active swapfile" , + root->root_key.objectid); +return -EPERM ; + } root_flags =btrfs_root_flags (&dest->root_item);btrfs_set_root_flags (&dest->root_item, root_flags |BTRFS_ROOT_SUBVOL_DEAD );
@@ -10215,8 +10222,23 @@ static int btrfs_swap_activate(struct swap_info_struct *sis, struct file *file,* set. We use this counter to prevent snapshots. We must increment it * before walking the extents because we don't want a concurrent * snapshot to run after we've already checked the extents. +* +* It is possible that subvolume is marked for deletion but still not +* removed yet. To prevent this race, we check the root status before +* activating the swapfile. */ +spin_lock (&root->root_item_lock); +if (btrfs_root_dead (root)) { +spin_unlock (&root->root_item_lock); + +btrfs_exclop_finish (fs_info); +btrfs_warn (fs_info, +"cannot activate swapfile because subvolume %llu is being deleted" , + root->root_key.objectid); +return -EPERM ; + }atomic_inc (&root->nr_swapfiles); +spin_unlock (&root->root_item_lock); isize =ALIGN_DOWN (inode->i_size, fs_info->sectorsize);
fs/ceph/dir.c +10 -1
@@ -478,8 +478,11 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx) 2 : (fpos_off(rde->offset) + 1); err =note_last_dentry (dfi, rde->name, rde->name_len, next_offset); -if (err) +if (err) { +ceph_mdsc_put_request (dfi->last_readdir); + dfi->last_readdir =NULL ;return err; + } }else if (req->r_reply_info.dir_end) { dfi->next_offset =2 ;/* keep last name */
@@ -520,6 +523,12 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)if (!dir_emit (ctx, rde->name, rde->name_len,ceph_present_ino (inode->i_sb,le64_to_cpu (rde->inode.in->ino)),le32_to_cpu (rde->inode.in->mode) >>12 )) { +/* +* NOTE: Here no need to put the 'dfi->last_readdir', +* because when dir_emit stops us it's most likely +* doesn't have enough memory, etc. So for next readdir +* it will continue. +*/ dout ("filldir stopping us...\n" );return 0 ; }
fs/gfs2/bmap.c +1 -1
@@ -2200,7 +2200,7 @@ int gfs2_setattr_size(struct inode *inode, u64 newsize) ret =do_shrink (inode, newsize); out: -gfs2_rs_delete (ip,NULL ); +gfs2_rs_delete (ip);gfs2_qa_put (ip);return ret; }
fs/gfs2/file.c +2 -1
@@ -717,7 +717,8 @@ static int gfs2_release(struct inode *inode, struct file *file) file->private_data =NULL ;if (file->f_mode &FMODE_WRITE ) { -gfs2_rs_delete (ip, &inode->i_writecount); +if (gfs2_rs_active (&ip->i_res)) +gfs2_rs_delete (ip);gfs2_qa_put (ip); }return 0 ;
fs/gfs2/inode.c +1 -1
@@ -811,7 +811,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,if (free_vfs_inode)/* else evict will do the put for us */ gfs2_glock_put (ip->i_gl); } -gfs2_rs_delete (ip,NULL ); +gfs2_rs_deltree (&ip->i_res);gfs2_qa_put (ip); fail_free_acls:posix_acl_release (default_acl);
fs/gfs2/rgrp.c +4 -3
@@ -664,13 +664,14 @@ void gfs2_rs_deltree(struct gfs2_blkreserv *rs)/** * gfs2_rs_delete - delete a multi-block reservation * @ip: The inode for this reservation -* @wcount: The inode's write count, or NULL * */ -void gfs2_rs_delete (struct gfs2_inode *ip,atomic_t *wcount) +void gfs2_rs_delete (struct gfs2_inode *ip) { +struct inode *inode = &ip->i_inode; +down_write (&ip->i_rw_mutex); -if ((wcount ==NULL ) || (atomic_read (wcount) <=1 )) +if (atomic_read (&inode->i_writecount) <=1 )gfs2_rs_deltree (&ip->i_res);up_write (&ip->i_rw_mutex); }
fs/gfs2/rgrp.h +1 -1
@@ -45,7 +45,7 @@ extern int gfs2_alloc_blocks(struct gfs2_inode *ip, u64 *bn, unsigned int *n, bool dinode, u64 *generation);extern void gfs2_rs_deltree (struct gfs2_blkreserv *rs); -extern void gfs2_rs_delete (struct gfs2_inode *ip,atomic_t *wcount); +extern void gfs2_rs_delete (struct gfs2_inode *ip);extern void __gfs2_free_blocks (struct gfs2_inode *ip,struct gfs2_rgrpd *rgd,u64 bstart,u32 blen,int meta); extern void gfs2_free_meta(struct gfs2_inode *ip, struct gfs2_rgrpd *rgd,
fs/gfs2/super.c +1 -1
@@ -1434,7 +1434,7 @@ static void gfs2_evict_inode(struct inode *inode)truncate_inode_pages_final (&inode->i_data);if (ip->i_qadata)gfs2_assert_warn (sdp, ip->i_qadata->qa_ref ==0 ); -gfs2_rs_delete (ip,NULL ); +gfs2_rs_deltree (&ip->i_res);gfs2_ordered_del_inode (ip);clear_inode (inode);gfs2_dir_hash_inval (ip);
fs/io_uring.c +13 -10
@@ -1556,6 +1556,7 @@ static void __io_queue_deferred(struct io_ring_ctx *ctx)static void io_flush_timeouts (struct io_ring_ctx *ctx) { +struct io_kiocb *req, *tmp;u32 seq;if (list_empty (&ctx->timeout_list))
@@ -1563,10 +1564,8 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx) seq = ctx->cached_cq_tail -atomic_read (&ctx->cq_timeouts); - do { +list_for_each_entry_safe (req, tmp, &ctx->timeout_list, timeout.list) {u32 events_needed, events_got; - struct io_kiocb *req = list_first_entry(&ctx->timeout_list, - struct io_kiocb, timeout.list);if (io_is_timeout_noseq (req))break ;
@@ -1583,9 +1582,8 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx)if (events_got < events_needed)break ; -list_del_init (&req->timeout.list);io_kill_timeout (req,0 ); - }while (!list_empty (&ctx->timeout_list)); + } ctx->cq_last_tm_flush = seq; }
@@ -5639,6 +5637,7 @@ static int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,else data->mode =HRTIMER_MODE_REL ; +INIT_LIST_HEAD (&req->timeout.list);hrtimer_init (&data->timer,CLOCK_MONOTONIC , data->mode);return 0 ; }
@@ -6282,12 +6281,12 @@ static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)if (!list_empty (&req->link_list)) { prev = list_entry(req->link_list.prev, struct io_kiocb, link_list); -if (refcount_inc_not_zero (&prev->refs)) -list_del_init (&req->link_list); -else +list_del_init (&req->link_list); +if (!refcount_inc_not_zero (&prev->refs)) prev =NULL ; } +list_del (&req->timeout.list);spin_unlock_irqrestore (&ctx->completion_lock, flags);if (prev) {
@@ -7346,8 +7345,12 @@ static int __io_sqe_files_scm(struct io_ring_ctx *ctx, int nr, int offset)refcount_add (skb->truesize, &sk->sk_wmem_alloc);skb_queue_head (&sk->sk_receive_queue, skb); -for (i =0 ; i < nr_files; i++) -fput (fpl->fp[i]); +for (i =0 ; i < nr; i++) { +struct file *file =io_file_from_index (ctx, i + offset); + +if (file) +fput (file); + } }else {kfree_skb (skb);free_uid (fpl->user);
fs/jfs/inode.c +2 -1
@@ -146,12 +146,13 @@ void jfs_evict_inode(struct inode *inode)dquot_initialize (inode);if (JFS_IP (inode)->fileset ==FILESYSTEM_I ) { +struct inode *ipimap =JFS_SBI (inode->i_sb)->ipimap;truncate_inode_pages_final (&inode->i_data);if (test_cflag (COMMIT_Freewmap, inode))jfs_free_zero_link (inode); -if (JFS_SBI (inode->i_sb)->ipimap) +if (ipimap &&JFS_IP (ipimap)->i_imap)diFree (inode);/*
fs/minix/inode.c +2 -1
@@ -446,7 +446,8 @@ static const struct address_space_operations minix_aops = { .writepage = minix_writepage, .write_begin = minix_write_begin, .write_end = generic_write_end, - .bmap = minix_bmap + .bmap = minix_bmap, + .direct_IO = noop_direct_IO };static const struct inode_operations minix_symlink_inode_operations = {
fs/nfs/dir.c +0 -10
@@ -1628,16 +1628,6 @@ const struct dentry_operations nfs4_dentry_operations = { };EXPORT_SYMBOL_GPL (nfs4_dentry_operations); -static fmode_t flags_to_mode (int flags) -{ -fmode_t res = (__force fmode_t )flags &FMODE_EXEC ; -if ((flags &O_ACCMODE ) !=O_WRONLY ) - res |=FMODE_READ ; -if ((flags &O_ACCMODE ) !=O_RDONLY ) - res |=FMODE_WRITE ; -return res; -} -static struct nfs_open_context *create_nfs_open_context (struct dentry *dentry,int open_flags,struct file *filp) {return alloc_nfs_open_context (dentry,flags_to_mode (open_flags), filp);
fs/nfs/direct.c +32 -16
115 lines not on this page · raw message
fs/nfs/file.c +2 -2
@@ -161,7 +161,7 @@ nfs_file_read(struct kiocb *iocb, struct iov_iter *to)ssize_t result;if (iocb->ki_flags &IOCB_DIRECT ) -return nfs_file_direct_read (iocb, to); +return nfs_file_direct_read (iocb, to, false); dprintk("NFS: read(%pD2, %zu@%lu)\n", iocb->ki_filp,
@@ -616,7 +616,7 @@ ssize_t nfs_file_write(struct kiocb *iocb, struct iov_iter *from)return result;if (iocb->ki_flags &IOCB_DIRECT ) -return nfs_file_direct_write (iocb, from); +return nfs_file_direct_write (iocb, from, false);dprintk ("NFS: write(%pD2, %zu@%Ld)\n" , file,iov_iter_count (from), (long long ) iocb->ki_pos);
fs/nfs/inode.c +0 -1
@@ -1139,7 +1139,6 @@ int nfs_open(struct inode *inode, struct file *filp)nfs_fscache_open_file (inode, filp);return 0 ; } -EXPORT_SYMBOL_GPL (nfs_open);/* * This function is called whenever some part of NFS notices that
fs/nfs/internal.h +17 -0
@@ -42,6 +42,16 @@ static inline bool nfs_lookup_is_soft_revalidate(const struct dentry *dentry)return true; } +static inline fmode_t flags_to_mode (int flags) +{ +fmode_t res = (__force fmode_t )flags &FMODE_EXEC ; +if ((flags &O_ACCMODE ) !=O_WRONLY ) + res |=FMODE_READ ; +if ((flags &O_ACCMODE ) !=O_RDONLY ) + res |=FMODE_WRITE ; +return res; +} +/* * Note: RFC 1813 doesn't limit the number of auth flavors that * a server can return, so make something up.
@@ -578,6 +588,13 @@ nfs_write_match_verf(const struct nfs_writeverf *verf, !nfs_write_verifier_cmp (&req->wb_verf, &verf->verifier); } +static inline gfp_t nfs_io_gfp_mask (void ) +{ +if (current->flags &PF_WQ_WORKER ) +return GFP_KERNEL | __GFP_NORETRY | __GFP_NOWARN; +return GFP_KERNEL ; +} +/* unlink.c */ extern struct rpc_task * nfs_async_rename(struct inode *old_dir, struct inode *new_dir,
fs/nfs/nfs42proc.c +6 -3
@@ -567,8 +567,10 @@ static int _nfs42_proc_copy_notify(struct file *src, struct file *dst, ctx =get_nfs_open_context (nfs_file_open_context (src)); l_ctx =nfs_get_lock_context (ctx); -if (IS_ERR (l_ctx)) -return PTR_ERR (l_ctx); +if (IS_ERR (l_ctx)) { + status =PTR_ERR (l_ctx); + goto out; + } status =nfs4_set_rw_stateid (&args->cna_src_stateid, ctx, l_ctx,FMODE_READ );
@@ -576,7 +578,7 @@ static int _nfs42_proc_copy_notify(struct file *src, struct file *dst,if (status) {if (status == -EAGAIN ) status = -NFS4ERR_BAD_STATEID ; -return status; + goto out; } status = nfs4_call_sync(src_server->client, src_server, &msg,
@@ -584,6 +586,7 @@ static int _nfs42_proc_copy_notify(struct file *src, struct file *dst,if (status == -ENOTSUPP ) src_server->caps &= ~NFS_CAP_COPY_NOTIFY ; +out:put_nfs_open_context (nfs_file_open_context (src));return status; }
fs/nfs/nfs4file.c +4 -2
@@ -32,6 +32,7 @@ nfs4_file_open(struct inode *inode, struct file *filp)struct dentry *parent =NULL ;struct inode *dir;unsigned openflags = filp->f_flags; +fmode_t f_mode;struct iattr attr;int err;
@@ -50,8 +51,9 @@ nfs4_file_open(struct inode *inode, struct file *filp)if (err)return err; + f_mode = filp->f_mode;if ((openflags &O_ACCMODE ) ==3 ) -return nfs_open (inode, filp); + f_mode |=flags_to_mode (openflags);/* We can't create new files here */ openflags &= ~(O_CREAT |O_EXCL );
@@ -59,7 +61,7 @@ nfs4_file_open(struct inode *inode, struct file *filp) parent =dget_parent (dentry); dir =d_inode (parent); - ctx =alloc_nfs_open_context (file_dentry (filp), filp->f_mode, filp); + ctx =alloc_nfs_open_context (file_dentry (filp), f_mode, filp); err =PTR_ERR (ctx);if (IS_ERR (ctx)) goto out;
fs/nfs/nfs4state.c +12 -0
@@ -49,6 +49,7 @@#include <linux/workqueue.h> #include <linux/bitops.h> #include <linux/jiffies.h> +#include <linux/sched/mm.h> #include <linux/sunrpc/clnt.h>
@@ -2557,9 +2558,17 @@ static void nfs4_layoutreturn_any_run(struct nfs_client *clp)static void nfs4_state_manager (struct nfs_client *clp) { +unsigned int memflags;int status =0 ;const char *section ="" , *section_sep ="" ; +/* +* State recovery can deadlock if the direct reclaim code tries +* start NFS writeback. So ensure memory allocations are all +* GFP_NOFS. +*/ + memflags =memalloc_nofs_save (); +/* Ensure exclusive access to NFSv4 state */ do { trace_nfs4_state_mgr(clp);
@@ -2654,6 +2663,7 @@ static void nfs4_state_manager(struct nfs_client *clp)clear_bit (NFS4CLNT_RECLAIM_NOGRACE , &clp->cl_state); } +memalloc_nofs_restore (memflags);nfs4_end_drain_session (clp);nfs4_clear_state_manager_bit (clp);
@@ -2671,6 +2681,7 @@ static void nfs4_state_manager(struct nfs_client *clp)return ;if (test_and_set_bit (NFS4CLNT_MANAGER_RUNNING , &clp->cl_state) !=0 )return ; + memflags =memalloc_nofs_save (); }while (refcount_read (&clp->cl_count) >1 && !signalled ()); goto out_drain;
@@ -2683,6 +2694,7 @@ static void nfs4_state_manager(struct nfs_client *clp) clp->cl_hostname, -status);ssleep (1 ); out_drain: +memalloc_nofs_restore (memflags);nfs4_end_drain_session (clp);nfs4_clear_state_manager_bit (clp); }
fs/nfs/pagelist.c +5 -5
@@ -90,10 +90,10 @@ void nfs_set_pgio_error(struct nfs_pgio_header *hdr, int error, loff_t pos) } } -static inline struct nfs_page * -nfs_page_alloc (void ) +static inline struct nfs_page *nfs_page_alloc (void ) { -struct nfs_page *p =kmem_cache_zalloc (nfs_page_cachep,GFP_KERNEL ); +struct nfs_page *p = +kmem_cache_zalloc (nfs_page_cachep,nfs_io_gfp_mask ());if (p)INIT_LIST_HEAD (&p->wb_list);return p;
@@ -901,7 +901,7 @@ int nfs_generic_pgio(struct nfs_pageio_descriptor *desc,struct nfs_commit_info cinfo;struct nfs_page_array *pg_array = &hdr->page_array;unsigned int pagecount, pageused; -gfp_t gfp_flags =GFP_KERNEL ; +gfp_t gfp_flags =nfs_io_gfp_mask (); pagecount =nfs_page_array_len (mirror->pg_base, mirror->pg_count); pg_array->npages = pagecount;
@@ -984,7 +984,7 @@ nfs_pageio_alloc_mirrors(struct nfs_pageio_descriptor *desc, desc->pg_mirrors_dynamic =NULL ;if (mirror_count ==1 )return desc->pg_mirrors_static; - ret =kmalloc_array (mirror_count,sizeof (*ret),GFP_KERNEL ); + ret =kmalloc_array (mirror_count,sizeof (*ret),nfs_io_gfp_mask ());if (ret !=NULL ) {for (i =0 ; i < mirror_count; i++)nfs_pageio_mirror_init (&ret[i], desc->pg_bsize);
fs/nfs/pnfs_nfs.c +6 -2
@@ -419,7 +419,7 @@ static struct nfs_commit_data * pnfs_bucket_fetch_commitdata(struct pnfs_commit_bucket *bucket, struct nfs_commit_info *cinfo) { - struct nfs_commit_data *data = nfs_commitdata_alloc(false); + struct nfs_commit_data *data = nfs_commitdata_alloc();if (!data)return NULL ;
@@ -515,7 +515,11 @@ pnfs_generic_commit_pagelist(struct inode *inode, struct list_head *mds_pages,unsigned int nreq =0 ;if (!list_empty (mds_pages)) { - data =nfs_commitdata_alloc (true); + data =nfs_commitdata_alloc (); +if (!data) { +nfs_retry_commit (mds_pages,NULL , cinfo,-1 ); +return -ENOMEM ; + } data->ds_commit_index =-1 ;list_splice_init (mds_pages, &data->pages);list_add_tail (&data->list, &list);
fs/nfs/write.c +17 -17
@@ -70,27 +70,17 @@ static mempool_t *nfs_wdata_mempool;static struct kmem_cache *nfs_cdata_cachep;static mempool_t *nfs_commit_mempool; -struct nfs_commit_data *nfs_commitdata_alloc (bool never_fail) +struct nfs_commit_data *nfs_commitdata_alloc (void ) {struct nfs_commit_data *p; -if (never_fail) - p =mempool_alloc (nfs_commit_mempool,GFP_NOIO ); -else { -/* It is OK to do some reclaim, not no safe to wait -* for anything to be returned to the pool. -* mempool_alloc() cannot handle that particular combination, -* so we need two separate attempts. -*/ + p =kmem_cache_zalloc (nfs_cdata_cachep,nfs_io_gfp_mask ()); +if (!p) { p =mempool_alloc (nfs_commit_mempool,GFP_NOWAIT ); -if (!p) - p =kmem_cache_alloc (nfs_cdata_cachep,GFP_NOIO | - __GFP_NOWARN | __GFP_NORETRY);if (!p)return NULL ; +memset (p,0 ,sizeof (*p)); } - -memset (p,0 ,sizeof (*p));INIT_LIST_HEAD (&p->pages);return p; }
@@ -104,9 +94,15 @@ EXPORT_SYMBOL_GPL(nfs_commit_free);static struct nfs_pgio_header *nfs_writehdr_alloc (void ) { -struct nfs_pgio_header *p =mempool_alloc (nfs_wdata_mempool,GFP_KERNEL ); +struct nfs_pgio_header *p; -memset (p,0 ,sizeof (*p)); + p =kmem_cache_zalloc (nfs_wdata_cachep,nfs_io_gfp_mask ()); +if (!p) {
Lines of this file are not shown. View the raw message.
net/ipv4/inet_hashtables.c +32 -21
53 lines not on this page · raw message
net/openvswitch/flow_netlink.c +93 -6
99 lines not on this page · raw message
net/sunrpc/xprtsock.c +39 -15
54 lines not on this page · raw message
tools/testing/selftests/cgroup/cgroup_util.c +3 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/cgroup/test_core.c +165 -0
165 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.