Linux 5.15.194
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.15.194 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml | 2 Makefile | 2 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 arch/um/drivers/virtio_uml.c | 6 arch/x86/kvm/cpuid.c | 31 - arch/x86/kvm/svm/svm.c | 3 crypto/af_alg.c | 7 drivers/cpufreq/cpufreq.c | 20 drivers/dma/qcom/bam_dma.c | 8 drivers/dma/ti/edma.c | 4 drivers/edac/altera_edac.c | 1 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 drivers/gpu/drm/bridge/analogix/anx7625.c | 6 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 drivers/gpu/drm/i915/display/intel_backlight.c | 5 drivers/gpu/drm/i915/display/intel_display_power.c | 6 drivers/infiniband/hw/mlx5/devx.c | 1 drivers/input/serio/i8042-acpipnpio.h | 14 drivers/media/i2c/imx214.c | 27 drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 6 drivers/mmc/host/mvsdio.c | 2 drivers/mtd/nand/raw/atmel/nand-controller.c | 18 drivers/mtd/nand/raw/stm32_fmc2_nand.c | 48 - drivers/net/can/dev/bittiming.c | 15 drivers/net/can/dev/dev.c | 50 + drivers/net/can/rcar/rcar_can.c | 8 drivers/net/can/spi/hi311x.c | 1 drivers/net/can/sun4i_can.c | 1 drivers/net/can/usb/etas_es58x/es581_4.c | 9 drivers/net/can/usb/etas_es58x/es58x_core.c | 16 drivers/net/can/usb/etas_es58x/es58x_core.h | 8 drivers/net/can/usb/etas_es58x/es58x_fd.c | 16 drivers/net/can/usb/mcba_usb.c | 1 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 drivers/net/can/xilinx_can.c | 16 drivers/net/dsa/lantiq_gswip.c | 37 - drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 2 drivers/net/ethernet/broadcom/cnic.c | 3 drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 2 drivers/net/ethernet/freescale/fec_main.c | 3 drivers/net/ethernet/intel/i40e/i40e.h | 1 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 25 drivers/net/ethernet/intel/i40e/i40e_main.c | 10 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 45 + drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 3 drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 drivers/net/ethernet/natsemi/ns83820.c | 13 drivers/net/ethernet/qlogic/qed/qed_debug.c | 7 drivers/pcmcia/omap_cf.c | 8 drivers/phy/broadcom/phy-bcm-ns-usb3.c | 9 drivers/phy/marvell/phy-berlin-usb.c | 7 drivers/phy/ralink/phy-ralink-usb.c | 10 drivers/phy/rockchip/phy-rockchip-pcie.c | 11 drivers/phy/rockchip/phy-rockchip-usb.c | 10 drivers/phy/tegra/xusb-tegra210.c | 6 drivers/phy/ti/phy-omap-control.c | 9 drivers/phy/ti/phy-omap-usb2.c | 24 drivers/phy/ti/phy-ti-pipe3.c | 27 drivers/power/supply/bq27xxx_battery.c | 4 drivers/regulator/sy7636a-regulator.c | 7 drivers/soc/qcom/mdt_loader.c | 12 drivers/tty/hvc/hvc_console.c | 6 drivers/tty/serial/sc16is7xx.c | 14 drivers/usb/core/quirks.c | 2 drivers/usb/gadget/udc/dummy_hcd.c | 25 drivers/usb/host/xhci-dbgcap.c | 94 ++- drivers/usb/serial/option.c | 17 drivers/video/fbdev/core/fbcon.c | 13 drivers/video/fbdev/core/fbmem.c | 12 fs/btrfs/tree-checker.c | 4 fs/fuse/file.c | 5 fs/hugetlbfs/inode.c | 14 fs/ksmbd/transport_rdma.c | 17 fs/nfs/client.c | 2 fs/nfs/flexfilelayout/flexfilelayout.c | 21 fs/nfs/nfs4proc.c | 6 fs/nilfs2/sysfs.c | 4 fs/nilfs2/sysfs.h | 8 fs/ocfs2/extent_map.c | 10 fs/xfs/xfs_fsops.c | 4 include/crypto/if_alg.h | 10 include/linux/can/bittiming.h | 69 +- include/linux/can/dev.h | 8 include/linux/compiler-clang.h | 29 - include/linux/interrupt.h | 53 + include/linux/pgalloc.h | 29 + include/linux/pgtable.h | 13 include/net/sock.h | 40 + include/uapi/linux/can/netlink.h | 2 kernel/bpf/verifier.c | 4 kernel/cgroup/cgroup.c | 43 + kernel/irq/manage.c | 8 kernel/time/hrtimer.c | 50 - kernel/trace/trace.c | 4 kernel/trace/trace_dynevent.c | 4 kernel/trace/trace_events_synth.c | 2 lib/test_kasan.c | 1 mm/kasan/init.c | 12 mm/khugepaged.c | 2 mm/memory-failure.c | 7 mm/migrate.c | 12 mm/rmap.c | 2 mm/sparse-vmemmap.c | 6 net/can/j1939/bus.c | 5 net/can/j1939/socket.c | 3 net/ceph/messenger.c | 7 net/core/sock.c | 5 net/hsr/hsr_device.c | 163 +++++ net/hsr/hsr_main.c | 4 net/hsr/hsr_main.h | 4 net/hsr/hsr_slave.c | 18 net/ipv4/ip_tunnel_core.c | 6 net/ipv4/nexthop.c | 7 net/ipv4/tcp.c | 5 net/ipv4/tcp_bpf.c | 5 net/mac80211/driver-ops.h | 2 net/mptcp/protocol.c | 15 net/mptcp/sockopt.c | 11 net/mptcp/subflow.c | 3 net/rds/ib_frmr.c | 20 net/rfkill/rfkill-gpio.c | 22 net/unix/af_unix.c | 15 sound/firewire/motu/motu-hwdep.c | 2 sound/soc/codecs/wm8940.c | 2 sound/soc/codecs/wm8974.c | 8 sound/soc/sof/intel/hda-stream.c | 2 sound/usb/mixer_quirks.c | 285 +++++++++- tools/testing/selftests/net/fib_nexthops.sh | 12 133 files changed, 1468 insertions(+), 535 deletions(-)
Alan Stern (1):
USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
Alex Deucher (1):
drm/amdgpu: fix a memory leak in fence cleanup when unloading
Alexander Dahl (1):
mtd: nand: raw: atmel: Fix comment in timings preparation
Alexander Sverdlin (1):
mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
Alexey Nepomnyashih (1):
net: liquidio: fix overflow in octeon_init_instr_queue()
Alok Tiwari (1):
bnxt_en: correct offset handling for IPv6 destination address
Anders Roxell (1):
dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
Andreas Kemnade (1):
regulator: sy7636a: fix lifecycle of power good gpio
André Apitzsch (1):
media: i2c: imx214: Fix link frequency validation
Anssi Hannula (1):
can: xilinx_can: xcan_write_frame(): fix use-after-free of transmitted SKB
Antoine Tenart (1):
tunnels: reset the GSO metadata before reusing the skb
Arnd Bergmann (1):
media: mtk-vcodec: venc: avoid -Wenum-compare-conditional warning
Bjorn Andersson (1):
soc: qcom: mdt_loader: Deal with zero e_shentsize
Boris Ostrovsky (1):
KVM: SVM: Return TSA_SQ_NO and TSA_L1_NO bits in __do_cpuid_func()
Borislav Petkov (AMD) (1):
KVM: SVM: Set synthesized TSA CPUID flags
Brett A C Sheffield (1):
Revert "fbdev: Disable sysfb device registration when removing conflicting FBs"
Charles Keepax (2):
ASoC: wm8940: Correct typo in control name
ASoC: wm8974: Correct PLL rate rounding
Chen Ni (1):
ALSA: usb-audio: Convert comma to semicolon
Chen Ridong (1):
cgroup: split cgroup_destroy_wq into 3 workqueues
Christian Loehle (1):
cpufreq: Initialize cpufreq-based invariance before subsys
Christoffer Sandberg (1):
Input: i8042 - add TUXEDO InfinityBook Pro Gen10 AMD to i8042 quirk table
Christophe Kerello (2):
mtd: rawnand: stm32_fmc2: fix ECC overwrite
mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
Colin Ian King (1):
ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message
Cristian Ciocaltea (6):
ALSA: usb-audio: Fix block comments in mixer_quirks
ALSA: usb-audio: Drop unnecessary parentheses in mixer_quirks
ALSA: usb-audio: Avoid multiple assignments in mixer_quirks
ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
ALSA: usb-audio: Remove unneeded wmb() in mixer_quirks
ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5
David Hildenbrand (2):
mm/rmap: reject hugetlb folios in folio_make_device_exclusive() mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()
Duoming Zhou (1):
cnic: Fix use-after-free bugs in cnic_delete_task
Eric Biggers (1):
crypto: af_alg - Fix incorrect boolean values in af_alg_ctx
Eric Sandeen (1):
xfs: short circuit xfs_growfs_data_private() if delta is zero
Fabian Vogt (1):
tty: hvc_console: Call hvc_kick in hvc_write unconditionally
Fabio Porcedda (2):
USB: serial: option: add Telit Cinterion FN990A w/audio compositions
USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
Geert Uytterhoeven (2):
pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
can: rcar_can: rcar_can_resume(): fix s2ram with PSCI
Greg Kroah-Hartman (1):
Linux 5.15.194
Guenter Roeck (1):
drm/i915/backlight: Return immediately when scale() finds invalid parameters
H. Nikolaus Schaller (2):
power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
power: supply: bq27xxx: restrict no-battery detection to bq27000
Hangbin Liu (2):
hsr: use rtnl lock when iterating over ports
hsr: use hsr_for_each_port_rtnl in hsr_port_get_hsr
Hans de Goede (1):
net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Harry Yoo (1):
mm: introduce and use {pgd,p4d}_populate_kernel()
Herbert Xu (1):
crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
Hugo Villeneuve (1):
serial: sc16is7xx: fix bug in flow control levels init
Håkon Bugge (1):
rds: ib: Increment i_fastreg_wrs before bailing out
Ido Schimmel (2):
nexthop: Forbid FDB status change while nexthop is in a group
selftests: fib_nexthops: Fix creation of non-FDB nexthops
Ilya Dryomov (1):
libceph: fix invalid accesses to ceph_connection_v1_info
Ioana Ciornei (1):
dpaa2-switch: fix buffer pool seeding for control traffic
Jack Wang (1):
mtd: rawnand: stm32_fmc2: Fix dma_map_sg error check
Jakob Koschel (1):
usb: gadget: dummy_hcd: remove usage of list iterator past the loop body
Jamie Bainbridge (1):
qed: Don't collect too many protection override GRC elements
Jani Nikula (1):
drm/i915/power: fix size for for_each_set_bit() in abox iteration
Jiapeng Chong (2):
hrtimer: Remove unused function
hrtimer: Rename __hrtimer_hres_active() to hrtimer_hres_active()
Jiayi Li (1):
usb: core: Add 0x prefix to quirks debug output
Jinjiang Tu (1):
mm/hugetlb: fix folio is still mapped when deleted
Johan Hovold (3):
phy: tegra: xusb: fix device and OF node leak at probe
phy: ti-pipe3: fix device leak at unbind
phy: ti: omap-usb2: fix device leak at unbind
Jonathan Curley (1):
NFSv4/flexfiles: Fix layout merge mirror check.
Justin Bronder (1):
i40e: increase max descriptors for XL710
Kim Phillips (1):
KVM: x86: Move open-coded CPUID leaf 0x80000021 EAX bit propagation code
Kohei Enju (1):
igb: fix link test skipping when interface is admin down
Krister Johansen (1):
mptcp: sockopt: make sync_socket_options propagate SOCK_KEEPOPEN
Krzysztof Kozlowski (2):
dt-bindings: serial: brcm,bcm7271-uart: Constrain clocks
phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning
Kuniyuki Iwashima (4):
net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod.
tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork.
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
af_unix: Don't leave consecutive consumed OOB skbs.
Leon Hwang (1):
bpf: Reject bpf_timer for PREEMPT_RT
Liao Yuanhong (1):
wifi: mac80211: fix incorrect type for ret
Loic Poulain (1):
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
Lukasz Czapnik (7):
i40e: fix idx validation in i40e_validate_queue_map
i40e: fix input validation logic for action_meta
i40e: add max boundary check for VF filters
i40e: add mask to apply valid bits for itr_idx
i40e: fix validation of VF state in get resources
i40e: fix idx validation in config queues msg
i40e: add validation for ring_len param
Luo Gengkun (1):
tracing: Fix tracing_marker may trigger page fault during preempt_disable
Maciej Fijalkowski (1):
i40e: remove redundant memory barrier when cleaning Tx descs
Maciej S. Szmigiero (1):
KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active
Mark Tinguely (1):
ocfs2: fix recursive semaphore deadlock in fiemap call
Martin Schiller (1):
net: dsa: lantiq_gswip: do also enable or disable cpu port
Masami Hiramatsu (Google) (1):
tracing: dynevent: Add a missing lockdown check on dynevent
Mathias Nyman (2):
xhci: dbc: decouple endpoint allocation from initialization
xhci: dbc: Fix full DbC transfer ring after several reconnects
Matthieu Baerts (NGI0) (2):
mptcp: set remote_deny_join_id0 on SYN recv
mptcp: propagate shutdown to subflows when possible
Miaohe Lin (1):
mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory
Miaoqian Lin (1):
um: virtio_uml: Fix use-after-free after put_device in probe
Michal Schmidt (1):
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
Miklos Szeredi (2):
fuse: check if copy_file_range() returns larger than requested size
fuse: prevent overflow in copy_file_range return value
Murali Karicheri (2):
net: hsr: Add support for MC filtering at the slave device
net: hsr: Add VLAN CTAG filter support
Namjae Jeon (1):
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer
Nathan Chancellor (2):
compiler-clang.h: define __SANITIZE_*__ macros only when undefined
nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
Nitesh Narayan Lal (1):
i40e: Use irq_update_affinity_hint()
Or Har-Toov (1):
IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions
Peng Fan (1):
arm64: dts: imx8mp: Correct thermal sensor index
Petr Malat (1):
ethernet: rvu-af: Remove slash from the driver name
Philipp Zabel (1):
net: rfkill: gpio: add DT support
Qi Xi (1):
drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
Qu Wenruo (1):
btrfs: tree-checker: fix the incorrect inode ref size check
Ravi Gunasekaran (2):
net: hsr: Disable promiscuous mode in offload mode
net: hsr: hsr_slave: Fix the promiscuous mode in offload mode
Rob Herring (1):
phy: Use device_get_match_data()
Salah Triki (1):
EDAC/altera: Delete an inappropriate dma_free_coherent() call
Samasth Norway Ananda (1):
fbcon: fix integer overflow in fbcon_do_set_font
Stefan Wahren (1):
net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable()
Stephan Gerhold (1):
dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
Steven Rostedt (1):
tracing: Do not add length to print format in synthetic events
Stéphane Grosjean (1):
can: peak_usb: fix shift-out-of-bounds issue
Takashi Iwai (1):
ALSA: usb-audio: Fix build with CONFIG_INPUT=n
Takashi Sakamoto (1):
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
Tariq Toukan (1):
Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
Tetsuo Handa (2):
can: j1939: j1939_sk_bind(): call j1939_priv_put() immediately when j1939_local_ecu_get() failed
can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() failsThomas Fourier (1):
mmc: mvsdio: Fix dma_unmap_sg() nents value
Thomas Gleixner (1):
genirq: Provide new interfaces for affinity hints
Thomas Zimmermann (1):
fbcon: Fix OOB access in font allocation
Tigran Mkrtchyan (1):
flexfiles/pNFS: fix NULL checks on result of ff_layout_choose_ds_for_read
Trond Myklebust (3):
NFSv4: Don't clear capabilities that won't be reset
NFSv4: Clear the NFS_CAP_FS_LOCATIONS flag if it is not set
NFSv4: Clear the NFS_CAP_XATTR flag if not supported by the server
Vincent Mailhol (10):
can: bittiming: allow TDC{V,O} to be zero and add can_tdc_const::tdc{v,o,f}_min
can: bittiming: replace CAN units with the generic ones from linux/units.h
can: dev: add generic function can_ethtool_op_get_ts_info_hwts()
can: dev: add generic function can_eth_ioctl_hwts()
can: etas_es58x: advertise timestamping capabilities and add ioctl support
can: etas_es58x: sort the includes by alphabetic order
can: etas_es58x: populate ndo_change_mtu() to prevent buffer overflow
can: hi311x: populate ndo_change_mtu() to prevent buffer overflow
can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow
can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow
Vladimir Oltean (2):
net: dsa: lantiq_gswip: move gswip_add_single_port_br() call to port_setup()
net: dsa: lantiq_gswip: suppress -EINVAL errors for bridge FDB entries added to the CPU port
Wei Yang (1):
mm/khugepaged: fix the address passed to notifier on testing young
Xiongfeng Wang (1):
hrtimers: Unconditionally update target CPU base after offline timer migration
Yeoreum Yun (1):
kunit: kasan_test: disable fortify string checker on kasan_strings() test
Yeounsu Moon (1):
net: natsemi: fix rx_dropped double accounting on netif_rx() failure
Zabelin Nikita (1):
drm/gma500: Fix null dereference in hdmi teardown
Greg Kroah-Hartman
maintainerDocumentation/devicetree/bindings/serial/brcm,bcm7271-uart.yaml +1 -1
@@ -41,7 +41,7 @@ properties: - const: dma_intr2 clocks: - minItems: 1 + maxItems: 1 clock-names: const: sw_baud
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 15 -SUBLEVEL = 193 +SUBLEVEL = 194 EXTRAVERSION = NAME = Trick or Treat
arch/arm64/boot/dts/freescale/imx8mp.dtsi +2 -2
@@ -161,7 +161,7 @@ thermal-zones { cpu-thermal { polling-delay-passive = <250>; polling-delay = <2000>; - thermal-sensors = <&tmu 0>; + thermal-sensors = <&tmu 1>; trips { cpu_alert0: trip0 { temperature = <85000>;
@@ -191,7 +191,7 @@ map0 { soc-thermal { polling-delay-passive = <250>; polling-delay = <2000>; - thermal-sensors = <&tmu 1>; + thermal-sensors = <&tmu 0>; trips { soc_alert0: trip0 { temperature = <85000>;
arch/um/drivers/virtio_uml.c +4 -2
@@ -1225,10 +1225,12 @@ static int virtio_uml_probe(struct platform_device *pdev)device_set_wakeup_capable (&vu_dev->vdev.dev, true); rc =register_virtio_device (&vu_dev->vdev); -if (rc) +if (rc) {put_device (&vu_dev->vdev.dev); +return rc; + } vu_dev->registered =1 ; -return rc; +return 0 ; error_init:os_close_file (vu_dev->sock);
arch/x86/kvm/cpuid.c +18 -13
@@ -544,6 +544,17 @@ void kvm_set_cpu_caps(void)0 /* SME */ |F (SEV ) |0 /* VM_PAGE_FLUSH */ |F (SEV_ES ) | F(SME_COHERENT)); +kvm_cpu_cap_mask (CPUID_8000_0021_EAX , +BIT (0 )/* NO_NESTED_DATA_BP */ | +BIT (2 )/* LFENCE Always serializing */ |0 /* SmmPgCfgLock */ | +BIT (5 )/* The memory form of VERW mitigates TSA */ | +BIT (6 )/* NULL_SEL_CLR_BASE */ |0 /* PrefetchCtlMsr */ + ); +if (cpu_feature_enabled (X86_FEATURE_LFENCE_RDTSC )) + kvm_cpu_caps[CPUID_8000_0021_EAX ] |=BIT (2 )/* LFENCE Always serializing */ ; +if (!static_cpu_has_bug (X86_BUG_NULL_SEG )) + kvm_cpu_caps[CPUID_8000_0021_EAX ] |=BIT (6 )/* NULL_SEL_CLR_BASE */ ; + kvm_cpu_cap_mask(CPUID_C000_0001_EDX, F(XSTORE) | F(XSTORE_EN) | F(XCRYPT) | F(XCRYPT_EN) | F(ACE2) | F(ACE2_EN) | F(PHE) | F(PHE_EN) |
@@ -553,12 +564,15 @@ void kvm_set_cpu_caps(void)if (cpu_feature_enabled (X86_FEATURE_SRSO_NO ))kvm_cpu_cap_set (X86_FEATURE_SRSO_NO ); -kvm_cpu_cap_mask (CPUID_8000_0021_EAX ,F (VERW_CLEAR )); +kvm_cpu_cap_check_and_set (X86_FEATURE_VERW_CLEAR );kvm_cpu_cap_init_kvm_defined (CPUID_8000_0021_ECX ,F (TSA_SQ_NO ) |F (TSA_L1_NO ) ); +kvm_cpu_cap_check_and_set (X86_FEATURE_TSA_SQ_NO ); +kvm_cpu_cap_check_and_set (X86_FEATURE_TSA_L1_NO ); +/* * Hide RDTSCP and RDPID if either feature is reported as supported but * probing MSR_TSC_AUX failed. This is purely a sanity check and
@@ -1005,18 +1019,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function) entry->eax = entry->ebx = entry->ecx = entry->edx =0 ;break ;case 0x80000021 : - entry->ebx = entry->ecx = entry->edx =0 ; -/* -* Pass down these bits: -* EAX 0 NNDBP, Processor ignores nested data breakpoints -* EAX 2 LAS, LFENCE always serializing -* EAX 6 NSCB, Null selector clear base -* -* Other defined bits are for MSRs that KVM does not expose: -* EAX 3 SPCL, SMM page configuration lock -* EAX 13 PCMSR, Prefetch control MSR -*/ - entry->eax &=BIT (0 ) |BIT (2 ) |BIT (6 ); + entry->ebx = entry->edx =0 ; +cpuid_entry_override (entry,CPUID_8000_0021_EAX ); +cpuid_entry_override (entry,CPUID_8000_0021_ECX );break ;/*Add support for Centaur's CPUID instruction*/ case 0xC0000000 :
arch/x86/kvm/svm/svm.c +1 -2
@@ -3666,8 +3666,7 @@ static inline void sync_lapic_to_cr8(struct kvm_vcpu *vcpu)struct vcpu_svm *svm =to_svm (vcpu);u64 cr8; -if (nested_svm_virtualize_tpr (vcpu) || -kvm_vcpu_apicv_active (vcpu)) +if (nested_svm_virtualize_tpr (vcpu))return ; cr8 =kvm_get_cr8 (vcpu);
crypto/af_alg.c +7 -0
@@ -862,6 +862,12 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, }lock_sock (sk); +if (ctx->write) { +release_sock (sk); +return -EBUSY ; + } + ctx->write = true; +if (ctx->init && !ctx->more) {if (ctx->used) { err = -EINVAL ;
@@ -969,6 +975,7 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size, unlock:af_alg_data_wakeup (sk); + ctx->write = false;release_sock (sk);return copied ?: err;
drivers/cpufreq/cpufreq.c +11 -9
@@ -2853,6 +2853,15 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) goto err_null_driver; } +/* +* Mark support for the scheduler's frequency invariance engine for +* drivers that implement target(), target_index() or fast_switch(). +*/ +if (!cpufreq_driver->setpolicy) { +static_branch_enable_cpuslocked (&cpufreq_freq_invariance); +pr_debug ("cpufreq: supports frequency invariance\n" ); + } + ret =subsys_interface_register (&cpufreq_interface);if (ret) goto err_boost_unreg;
@@ -2874,21 +2883,14 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data) hp_online = ret; ret =0 ; -/* -* Mark support for the scheduler's frequency invariance engine for -* drivers that implement target(), target_index() or fast_switch(). -*/ -if (!cpufreq_driver->setpolicy) { -static_branch_enable_cpuslocked (&cpufreq_freq_invariance); -pr_debug ("supports frequency invariance" ); - } -pr_debug ("driver %s up and running\n" , driver_data->name); goto out; err_if_unreg:subsys_interface_unregister (&cpufreq_interface); err_boost_unreg: +if (!cpufreq_driver->setpolicy) +static_branch_disable_cpuslocked (&cpufreq_freq_invariance);remove_boost_sysfs_file (); err_null_driver:write_lock_irqsave (&cpufreq_driver_lock, flags);
drivers/dma/qcom/bam_dma.c +6 -2
@@ -1253,13 +1253,17 @@ static int bam_dma_probe(struct platform_device *pdev)if (bdev->controlled_remotely) { ret =of_property_read_u32 (pdev->dev.of_node,"num-channels" , &bdev->num_channels); -if (ret) +if (ret) {dev_err (bdev->dev,"num-channels unspecified in dt\n" ); +return ret; + } ret =of_property_read_u32 (pdev->dev.of_node,"qcom,num-ees" , &bdev->num_ees); -if (ret) +if (ret) {dev_err (bdev->dev,"num-ees unspecified in dt\n" ); +return ret; + } }if (bdev->controlled_remotely)
drivers/dma/ti/edma.c +2 -2
@@ -2121,8 +2121,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,* priority. So Q0 is the highest priority queue and the last queue has * the lowest priority. */ - queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 ,sizeof (s8), -GFP_KERNEL ); + queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 , +sizeof (*queue_priority_map),GFP_KERNEL );if (!queue_priority_map)return -ENOMEM ;
drivers/edac/altera_edac.c +0 -1
@@ -127,7 +127,6 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file, ptemp =dma_alloc_coherent (mci->pdev,16 , &dma_handle,GFP_KERNEL );if (!ptemp) { -dma_free_coherent (mci->pdev,16 , ptemp, dma_handle);edac_printk (KERN_ERR ,EDAC_MC ,"Inject: Buffer Allocation error\n" );return -ENOMEM ;
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c +0 -2
@@ -302,8 +302,6 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)dma_fence_put (ring->vmid_wait); ring->vmid_wait =NULL ; ring->me =0 ; - - ring->adev->rings[ring->idx] =NULL ; }/**
drivers/gpu/drm/bridge/analogix/anx7625.c +4 -2
@@ -1822,7 +1822,7 @@ static int anx7625_i2c_probe(struct i2c_client *client, ret =devm_request_threaded_irq (dev, platform->pdata.intp_irq,NULL , anx7625_intr_hpd_isr,IRQF_TRIGGER_FALLING | -IRQF_ONESHOT , +IRQF_ONESHOT |IRQF_NO_AUTOEN ,"anx7625-intp" , platform);if (ret) {DRM_DEV_ERROR (dev,"fail to request irq\n" );
@@ -1844,8 +1844,10 @@ static int anx7625_i2c_probe(struct i2c_client *client, }/* Add work function */ -if (platform->pdata.intp_irq) +if (platform->pdata.intp_irq) { +enable_irq (platform->pdata.intp_irq);queue_work (platform->workqueue, &platform->work); + } platform->bridge.funcs = &anx7625_bridge_funcs; platform->bridge.of_node = client->dev.of_node;
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +4 -2
@@ -2040,8 +2040,10 @@ static void cdns_mhdp_atomic_enable(struct drm_bridge *bridge, mhdp_state =to_cdns_mhdp_bridge_state (new_state); mhdp_state->current_mode =drm_mode_duplicate (bridge->dev, mode); -if (!mhdp_state->current_mode) -return ; +if (!mhdp_state->current_mode) { + ret = -EINVAL ; + goto out; + }drm_mode_set_name (mhdp_state->current_mode);
drivers/gpu/drm/gma500/oaktrail_hdmi.c +1 -1
@@ -724,8 +724,8 @@ void oaktrail_hdmi_teardown(struct drm_device *dev)if (hdmi_dev) { pdev = hdmi_dev->dev; -pci_set_drvdata (pdev,NULL );oaktrail_hdmi_i2c_exit (pdev); +pci_set_drvdata (pdev,NULL );iounmap (hdmi_dev->regs);kfree (hdmi_dev);pci_dev_put (pdev);
drivers/gpu/drm/i915/display/intel_backlight.c +3 -2
@@ -31,8 +31,9 @@ static u32 scale(u32 source_val, {u64 target_val; -WARN_ON (source_min > source_max); -WARN_ON (target_min > target_max); +if (WARN_ON (source_min >= source_max) || +WARN_ON (target_min > target_max)) +return target_min;/* defensive */ source_val =clamp (source_val, source_min, source_max);
drivers/gpu/drm/i915/display/intel_display_power.c +3 -3
@@ -5293,7 +5293,7 @@ static void icl_mbus_init(struct drm_i915_private *dev_priv)if (DISPLAY_VER (dev_priv) ==12 ) abox_regs |=BIT (0 ); -for_each_set_bit (i, &abox_regs,sizeof (abox_regs)) +for_each_set_bit (i, &abox_regs,BITS_PER_TYPE (abox_regs))intel_de_rmw (dev_priv,MBUS_ABOX_CTL (i), mask, val); }
@@ -5754,11 +5754,11 @@ static void tgl_bw_buddy_init(struct drm_i915_private *dev_priv)if (table[config].page_mask ==0 ) {drm_dbg (&dev_priv->drm,"Unknown memory configuration; disabling address buddy logic.\n" ); -for_each_set_bit (i, &abox_mask,sizeof (abox_mask)) +for_each_set_bit (i, &abox_mask,BITS_PER_TYPE (abox_mask))intel_de_write (dev_priv,BW_BUDDY_CTL (i),BW_BUDDY_DISABLE ); }else { -for_each_set_bit (i, &abox_mask,sizeof (abox_mask)) { +for_each_set_bit (i, &abox_mask,BITS_PER_TYPE (abox_mask)) {intel_de_write (dev_priv,BW_BUDDY_PAGE_MASK (i), table[config].page_mask);
drivers/infiniband/hw/mlx5/devx.c +1 -0
@@ -191,6 +191,7 @@ static u16 get_legacy_obj_type(u16 opcode) {switch (opcode) {case MLX5_CMD_OP_CREATE_RQ : +case MLX5_CMD_OP_CREATE_RMP :return MLX5_EVENT_QUEUE_TYPE_RQ ;case MLX5_CMD_OP_CREATE_QP :return MLX5_EVENT_QUEUE_TYPE_QP ;
drivers/input/serio/i8042-acpipnpio.h +14 -0
@@ -1147,6 +1147,20 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = { .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "XxHP4NAx"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "XxKK4NAx_XxSP4NAx"), + }, + .driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS | + SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP) + }, /* * A lot of modern Clevo barebones have touchpad and/or keyboard issues * after suspend fixable with nomux + reset + noloop + nopnp. Luckily,
drivers/media/i2c/imx214.c +19 -8
@@ -20,7 +20,9 @@#include <media/v4l2-subdev.h> #define IMX214_DEFAULT_CLK_FREQ 24000000 -#define IMX214_DEFAULT_LINK_FREQ 480000000 +#define IMX214_DEFAULT_LINK_FREQ 600000000 +/* Keep wrong link frequency for backward compatibility */ +#define IMX214_DEFAULT_LINK_FREQ_LEGACY 480000000#define IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10)#define IMX214_FPS 30#define IMX214_MBUS_CODE MEDIA_BUS_FMT_SRGGB10_1X10
@@ -892,17 +894,26 @@ static int imx214_parse_fwnode(struct device *dev) goto done; } -for (i =0 ; i < bus_cfg.nr_of_link_frequencies; i++) +if (bus_cfg.nr_of_link_frequencies !=1 ) +dev_warn (dev,"Only one link-frequency supported, please review your DT. Continuing anyway\n" ); + +for (i =0 ; i < bus_cfg.nr_of_link_frequencies; i++) {if (bus_cfg.link_frequencies[i] ==IMX214_DEFAULT_LINK_FREQ )break ; - -if (i == bus_cfg.nr_of_link_frequencies) { -dev_err (dev,"link-frequencies %d not supported, Please review your DT\n" , -IMX214_DEFAULT_LINK_FREQ ); - ret = -EINVAL ; - goto done; +if (bus_cfg.link_frequencies[i] == +IMX214_DEFAULT_LINK_FREQ_LEGACY ) { +dev_warn (dev, +"link-frequencies %d not supported, please review your DT. Continuing anyway\n" , +IMX214_DEFAULT_LINK_FREQ ); +break ; + } } +if (i == bus_cfg.nr_of_link_frequencies) + ret =dev_err_probe (dev, -EINVAL , +"link-frequencies %d not supported, please review your DT\n" , +IMX214_DEFAULT_LINK_FREQ ); + done:v4l2_fwnode_endpoint_free (&bus_cfg);fwnode_handle_put (endpoint);
drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c +5 -1
@@ -513,7 +513,11 @@ static int h264_enc_init(struct mtk_vcodec_ctx *ctx) inst->ctx = ctx; inst->vpu_inst.ctx = ctx; - inst->vpu_inst.id = is_ext ?SCP_IPI_VENC_H264 :IPI_VENC_H264 ; +if (is_ext) + inst->vpu_inst.id =SCP_IPI_VENC_H264 ; +else + inst->vpu_inst.id =IPI_VENC_H264 ; + inst->hw_base =mtk_vcodec_get_reg_addr (inst->ctx,VENC_SYS );mtk_vcodec_debug_enter (inst);
drivers/mmc/host/mvsdio.c +1 -1
@@ -292,7 +292,7 @@ static u32 mvsd_finish_data(struct mvsd_host *host, struct mmc_data *data, host->pio_ptr =NULL ; host->pio_size =0 ; }else { -dma_unmap_sg (mmc_dev (host->mmc), data->sg, host->sg_frags, +dma_unmap_sg (mmc_dev (host->mmc), data->sg, data->sg_len,mmc_get_dma_dir (data)); }
drivers/mtd/nand/raw/atmel/nand-controller.c +14 -4
@@ -1378,13 +1378,23 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,return ret;/* -* The write cycle timing is directly matching tWC, but is also +* Read setup timing depends on the operation done on the NAND: +* +* NRD_SETUP = max(tAR, tCLR) +*/ + timeps =max (conf->timings.sdr.tAR_min, conf->timings.sdr.tCLR_min); + ncycles =DIV_ROUND_UP (timeps, mckperiodps); + totalcycles += ncycles; + ret =atmel_smc_cs_conf_set_setup (smcconf,ATMEL_SMC_NRD_SHIFT , ncycles); +if (ret) +return ret; + +/* +* The read cycle timing is directly matching tRC, but is also * dependent on the setup and hold timings we calculated earlier, * which gives: * -* NRD_CYCLE = max(tRC, NRD_PULSE + NRD_HOLD) -* -* NRD_SETUP is always 0. +* NRD_CYCLE = max(tRC, NRD_SETUP + NRD_PULSE + NRD_HOLD) */ ncycles =DIV_ROUND_UP (conf->timings.sdr.tRC_min, mckperiodps); ncycles =max (totalcycles, ncycles);
drivers/mtd/nand/raw/stm32_fmc2_nand.c +26 -22
105 lines not on this page · raw message
drivers/net/can/dev/bittiming.c +10 -5
@@ -4,6 +4,7 @@* Copyright (C) 2008-2009 Wolfgang Grandegger <[email protected]> */ +#include <linux/units.h> #include <linux/can/dev.h> #ifdef CONFIG_CAN_CALC_BITTIMING
@@ -81,9 +82,9 @@ int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,if (bt->sample_point) { sample_point_nominal = bt->sample_point; }else { -if (bt->bitrate >800 *CAN_KBPS ) +if (bt->bitrate >800 *KILO /* BPS */ ) sample_point_nominal =750 ; -else if (bt->bitrate >500 *CAN_KBPS ) +else if (bt->bitrate >500 *KILO /* BPS */ ) sample_point_nominal =800 ;else sample_point_nominal =875 ;
@@ -182,9 +183,12 @@ void can_calc_tdco(struct net_device *dev)struct can_tdc *tdc = &priv->tdc;const struct can_tdc_const *tdc_const = priv->tdc_const; -if (!tdc_const) +if (!tdc_const || + !(priv->ctrlmode_supported &CAN_CTRLMODE_TDC_AUTO ))return ; + priv->ctrlmode &= ~CAN_CTRLMODE_TDC_MASK ; +/* As specified in ISO 11898-1 section 11.3.3 "Transmitter * delay compensation" (TDC) is only applicable if data BRP is * one or two.
@@ -193,9 +197,10 @@ void can_calc_tdco(struct net_device *dev)/* Reuse "normal" sample point and convert it to time quanta */ u32 sample_point_in_tq =can_bit_time (dbt) * dbt->sample_point /1000 ; +if (sample_point_in_tq < tdc_const->tdco_min) +return ; tdc->tdco =min (sample_point_in_tq, tdc_const->tdco_max); - }else { - tdc->tdco =0 ; + priv->ctrlmode |= CAN_CTRLMODE_TDC_AUTO; } }#endif /* CONFIG_CAN_CALC_BITTIMING */
drivers/net/can/dev/dev.c +50 -0
56 lines not on this page · raw message
drivers/net/can/rcar/rcar_can.c +1 -7
@@ -863,7 +863,6 @@ static int __maybe_unused rcar_can_resume(struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct rcar_can_priv *priv =netdev_priv (ndev); -u16 ctlr;int err;if (!netif_running (ndev))
@@ -875,12 +874,7 @@ static int __maybe_unused rcar_can_resume(struct device *dev)return err; } - ctlr =readw (&priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_SLPM ; -writew (ctlr, &priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_CANM ; -writew (ctlr, &priv->regs->ctlr); - priv->can.state =CAN_STATE_ERROR_ACTIVE ; +rcar_can_start (ndev);netif_device_attach (ndev);netif_start_queue (ndev);
drivers/net/can/spi/hi311x.c +1 -0
@@ -807,6 +807,7 @@ static const struct net_device_ops hi3110_netdev_ops = { .ndo_open = hi3110_open, .ndo_stop = hi3110_stop, .ndo_start_xmit = hi3110_hard_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct of_device_id hi3110_of_match[] = {
drivers/net/can/sun4i_can.c +1 -0
@@ -748,6 +748,7 @@ static const struct net_device_ops sun4ican_netdev_ops = { .ndo_open = sun4ican_open, .ndo_stop = sun4ican_close, .ndo_start_xmit = sun4ican_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct of_device_id sun4ican_of_match[] = {
drivers/net/can/usb/etas_es58x/es581_4.c +5 -4
@@ -6,11 +6,12 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ -#include <linux/kernel.h> #include <asm/unaligned.h> +#include <linux/kernel.h> +#include <linux/units.h> #include "es58x_core.h" #include "es581_4.h"
@@ -469,8 +470,8 @@ const struct es58x_parameters es581_4_param = { .bittiming_const = &es581_4_bittiming_const, .data_bittiming_const = NULL, .tdc_const = NULL, - .bitrate_max = 1 * CAN_MBPS, - .clock = {.freq = 50 * CAN_MHZ}, + .bitrate_max = 1 * MEGA /* BPS */, + .clock = {.freq = 50 * MEGA /* Hz */}, .ctrlmode_supported = CAN_CTRLMODE_CC_LEN8_DLC, .tx_start_of_frame = 0xAFAF, .rx_start_of_frame = 0xFAFA,
drivers/net/can/usb/etas_es58x/es58x_core.c +12 -4
@@ -7,14 +7,15 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2025 Vincent Mailhol <[email protected]> */ +#include <asm/unaligned.h> +#include <linux/crc16.h> +#include <linux/ethtool.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/usb.h> -#include <linux/crc16.h> -#include <asm/unaligned.h> #include "es58x_core.h"
@@ -1981,7 +1982,13 @@ static netdev_tx_t es58x_start_xmit(struct sk_buff *skb,static const struct net_device_ops es58x_netdev_ops = { .ndo_open = es58x_open, .ndo_stop = es58x_stop, - .ndo_start_xmit = es58x_start_xmit + .ndo_start_xmit = es58x_start_xmit, + .ndo_eth_ioctl = can_eth_ioctl_hwts, + .ndo_change_mtu = can_change_mtu, +}; + +static const struct ethtool_ops es58x_ethtool_ops = { + .get_ts_info = can_ethtool_op_get_ts_info_hwts, };/**
@@ -2088,6 +2095,7 @@ static int es58x_init_netdev(struct es58x_device *es58x_dev, int channel_idx)es58x_init_priv (es58x_dev,es58x_priv (netdev), channel_idx); netdev->netdev_ops = &es58x_netdev_ops; + netdev->ethtool_ops = &es58x_ethtool_ops; netdev->flags |=IFF_ECHO ;/* We support local echo */ ret =register_candev (netdev);
drivers/net/can/usb/etas_es58x/es58x_core.h +4 -4
@@ -6,17 +6,17 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ #ifndef __ES58X_COMMON_H__#define __ES58X_COMMON_H__ -#include <linux/types.h> -#include <linux/usb.h> -#include <linux/netdevice.h> #include <linux/can.h> #include <linux/can/dev.h> +#include <linux/netdevice.h> +#include <linux/types.h> +#include <linux/usb.h> #include "es581_4.h" #include "es58x_fd.h"
drivers/net/can/usb/etas_es58x/es58x_fd.c +10 -6
@@ -8,11 +8,12 @@* * Copyright (c) 2019 Robert Bosch Engineering and Business Solutions. All rights reserved. * Copyright (c) 2020 ETAS K.K.. All rights reserved. -* Copyright (c) 2020, 2021 Vincent Mailhol <[email protected]> +* Copyright (c) 2020-2022 Vincent Mailhol <[email protected]> */ -#include <linux/kernel.h> #include <asm/unaligned.h> +#include <linux/kernel.h> +#include <linux/units.h> #include "es58x_core.h" #include "es58x_fd.h"
@@ -427,7 +428,7 @@ static int es58x_fd_enable_channel(struct es58x_priv *priv)es58x_fd_convert_bittiming (&tx_conf_msg.data_bittiming, &priv->can.data_bittiming); -if (priv->can.tdc.tdco) { +if (can_tdc_is_enabled (&priv->can)) { tx_conf_msg.tdc_enabled =1 ; tx_conf_msg.tdco =cpu_to_le16 (priv->can.tdc.tdco); tx_conf_msg.tdcf =cpu_to_le16 (priv->can.tdc.tdcf);
@@ -504,8 +505,11 @@ static const struct can_bittiming_const es58x_fd_data_bittiming_const = {* Register" from Microchip. */ static const struct can_tdc_const es58x_tdc_const = { + .tdcv_min =0 , .tdcv_max =0 ,/* Manual mode not supported. */ + .tdco_min =0 , .tdco_max =127 , + .tdcf_min =0 , .tdcf_max =127 };
@@ -518,11 +522,11 @@ const struct es58x_parameters es58x_fd_param = {* Mbps work in an optimal environment but are not recommended * for production environment. */ - .bitrate_max = 8 * CAN_MBPS, - .clock = {.freq = 80 * CAN_MHZ}, + .bitrate_max = 8 * MEGA /* BPS */, + .clock = {.freq = 80 * MEGA /* Hz */}, .ctrlmode_supported =CAN_CTRLMODE_LOOPBACK |CAN_CTRLMODE_LISTENONLY |CAN_CTRLMODE_3_SAMPLES |CAN_CTRLMODE_FD |CAN_CTRLMODE_FD_NON_ISO | - CAN_CTRLMODE_CC_LEN8_DLC, + CAN_CTRLMODE_CC_LEN8_DLC | CAN_CTRLMODE_TDC_AUTO, .tx_start_of_frame = 0xCEFA, /* FACE in little endian */ .rx_start_of_frame = 0xFECA, /* CAFE in little endian */ .tx_urb_cmd_max_len = ES58X_FD_TX_URB_CMD_MAX_LEN,
drivers/net/can/usb/mcba_usb.c +1 -0
@@ -769,6 +769,7 @@ static const struct net_device_ops mcba_netdev_ops = { .ndo_open = mcba_usb_open, .ndo_stop = mcba_usb_close, .ndo_start_xmit = mcba_usb_start_xmit, + .ndo_change_mtu = can_change_mtu, };/* Microchip CANBUS has hardcoded bittiming values by default.
drivers/net/can/usb/peak_usb/pcan_usb_core.c +1 -1
@@ -89,7 +89,7 @@ void peak_usb_update_ts_now(struct peak_time_ref *time_ref, u32 ts_now)u32 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1;if (time_ref->ts_dev_2 < time_ref->ts_dev_1) - delta_ts &= (1 << time_ref->adapter->ts_used_bits) -1 ; + delta_ts &= (1ULL << time_ref->adapter->ts_used_bits) -1 ; time_ref->ts_total += delta_ts; }
drivers/net/can/xilinx_can.c +8 -8
@@ -590,14 +590,6 @@ static void xcan_write_frame(struct net_device *ndev, struct sk_buff *skb, dlc |=XCAN_DLCR_EDL_MASK ; } -if (!(priv->devtype.flags &XCAN_FLAG_TX_MAILBOXES ) && - (priv->devtype.flags &XCAN_FLAG_TXFEMP )) -can_put_echo_skb (skb, ndev, priv->tx_head % priv->tx_max,0 ); -else -can_put_echo_skb (skb, ndev,0 ,0 ); - - priv->tx_head++; - priv->write_reg (priv,XCAN_FRAME_ID_OFFSET (frame_offset), id);/* If the CAN frame is RTR frame this write triggers transmission * (not on CAN FD)
@@ -630,6 +622,14 @@ static void xcan_write_frame(struct net_device *ndev, struct sk_buff *skb, data[1]); } } + +if (!(priv->devtype.flags &XCAN_FLAG_TX_MAILBOXES ) && + (priv->devtype.flags &XCAN_FLAG_TXFEMP )) +can_put_echo_skb (skb, ndev, priv->tx_head % priv->tx_max,0 ); +else +can_put_echo_skb (skb, ndev,0 ,0 ); + + priv->tx_head++; }/**
drivers/net/dsa/lantiq_gswip.c +20 -17
@@ -655,30 +655,24 @@ static int gswip_add_single_port_br(struct gswip_priv *priv, int port, bool add)return 0 ; } -static int gswip_port_enable (struct dsa_switch *ds,int port, -struct phy_device *phydev) +static int gswip_port_setup (struct dsa_switch *ds,int port) {struct gswip_priv *priv = ds->priv;int err; -if (!dsa_is_user_port (ds, port)) -return 0 ; -if (!dsa_is_cpu_port (ds, port)) { err =gswip_add_single_port_br (priv, port, true);if (err)return err; } -/* RMON Counter Enable for port */ -gswip_switch_w (priv,GSWIP_BM_PCFG_CNTEN ,GSWIP_BM_PCFGp (port)); +return 0 ; +} -/* enable port fetch/store dma & VLAN Modification */ -gswip_switch_mask (priv,0 ,GSWIP_FDMA_PCTRL_EN | -GSWIP_FDMA_PCTRL_VLANMOD_BOTH , -GSWIP_FDMA_PCTRLp (port)); -gswip_switch_mask (priv,0 ,GSWIP_SDMA_PCTRL_EN , -GSWIP_SDMA_PCTRLp (port)); +static int gswip_port_enable (struct dsa_switch *ds,int port, +struct phy_device *phydev) +{ +struct gswip_priv *priv = ds->priv;if (!dsa_is_cpu_port (ds, port)) {u32 mdio_phy =0 ;
@@ -690,6 +684,16 @@ static int gswip_port_enable(struct dsa_switch *ds, int port, GSWIP_MDIO_PHYp(port)); } +/* RMON Counter Enable for port */ +gswip_switch_w (priv,GSWIP_BM_PCFG_CNTEN ,GSWIP_BM_PCFGp (port)); + +/* enable port fetch/store dma & VLAN Modification */ +gswip_switch_mask (priv,0 ,GSWIP_FDMA_PCTRL_EN | +GSWIP_FDMA_PCTRL_VLANMOD_BOTH , +GSWIP_FDMA_PCTRLp (port)); +gswip_switch_mask (priv,0 ,GSWIP_SDMA_PCTRL_EN , +GSWIP_SDMA_PCTRLp (port)); +return 0 ; }
@@ -697,9 +701,6 @@ static void gswip_port_disable(struct dsa_switch *ds, int port) {struct gswip_priv *priv = ds->priv; -if (!dsa_is_user_port (ds, port)) -return ; -gswip_switch_mask (priv,GSWIP_FDMA_PCTRL_EN ,0 ,GSWIP_FDMA_PCTRLp (port)); gswip_switch_mask(priv, GSWIP_SDMA_PCTRL_EN, 0,
@@ -1336,8 +1337,9 @@ static int gswip_port_fdb(struct dsa_switch *ds, int port,int i;int err; +/* Operation not supported on the CPU port, don't throw errors */ if (!bridge) -return -EINVAL ; +return 0 ;for (i = cpu_port; i <ARRAY_SIZE (priv->vlans); i++) {if (priv->vlans[i].bridge == bridge) {
@@ -1802,6 +1804,7 @@ static int gswip_get_sset_count(struct dsa_switch *ds, int port, int sset)static const struct dsa_switch_ops gswip_xrx200_switch_ops = { .get_tag_protocol = gswip_get_tag_protocol, .setup = gswip_setup, + .port_setup = gswip_port_setup, .port_enable = gswip_port_enable, .port_disable = gswip_port_disable, .port_bridge_join = gswip_port_bridge_join,
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c +1 -1
@@ -244,7 +244,7 @@ bnxt_tc_parse_pedit(struct bnxt *bp, struct bnxt_tc_actions *actions, offset < offset_of_ip6_daddr + 16) { actions->nat.src_xlate = false; idx = (offset - offset_of_ip6_daddr) / 4; - actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); + actions->nat.l3.ipv6.daddr.s6_addr32[idx] = htonl(val); } else { netdev_err(bp->dev, "%s: IPv6_hdr: Invalid pedit field\n",
drivers/net/ethernet/broadcom/cnic.c +1 -2
@@ -4223,8 +4223,7 @@ static void cnic_cm_stop_bnx2x_hw(struct cnic_dev *dev)cnic_bnx2x_delete_wait (dev,0 ); -cancel_delayed_work (&cp->delete_task); -flush_workqueue (cnic_wq); +cancel_delayed_work_sync (&cp->delete_task);if (atomic_read (&cp->iscsi_conn) !=0 ) netdev_warn(dev->netdev, "%d iSCSI connections not destroyed\n",
drivers/net/ethernet/cavium/liquidio/request_manager.c +1 -1
@@ -135,7 +135,7 @@ int octeon_init_instr_queue(struct octeon_device *oct, oct->io_qmask.iq |=BIT_ULL (iq_no);/* Set the 32B/64B mode for each input queue */ - oct->io_qmask.iq64B |= ((conf->instr_type ==64 ) << iq_no); + oct->io_qmask.iq64B |= ((u64)(conf->instr_type ==64 ) << iq_no); iq->iqcmd_64B = (conf->instr_type ==64 ); oct->fn_list.setup_iq_regs (oct, iq_no);
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c +1 -1
@@ -2682,7 +2682,7 @@ static int dpaa2_switch_setup_dpbp(struct ethsw_core *ethsw)dev_err (dev,"dpsw_ctrl_if_set_pools() failed\n" ); goto err_get_attr; } - ethsw->bpid = dpbp_attrs.id; + ethsw->bpid = dpbp_attrs.bpid;return 0 ;
drivers/net/ethernet/freescale/fec_main.c +2 -1
@@ -2033,7 +2033,8 @@ static void fec_enet_phy_reset_after_clk_enable(struct net_device *ndev)*/ phy_dev =of_phy_find_device (fep->phy_node);phy_reset_after_clk_enable (phy_dev); -put_device (&phy_dev->mdio.dev); +if (phy_dev) +put_device (&phy_dev->mdio.dev); } }
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -50,6 +50,7 @@#define I40E_MAX_VEB 16#define I40E_MAX_NUM_DESCRIPTORS 4096 +#define I40E_MAX_NUM_DESCRIPTORS_XL710 8160#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)#define I40E_DEFAULT_NUM_DESCRIPTORS 512#define I40E_REQ_DESCRIPTOR_MULTIPLE 32
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +19 -6
@@ -1918,6 +1918,18 @@ static void i40e_get_drvinfo(struct net_device *netdev, drvinfo->n_priv_flags +=I40E_GL_PRIV_FLAGS_STR_LEN ; } +static u32 i40e_get_max_num_descriptors (struct i40e_pf *pf) +{ +struct i40e_hw *hw = &pf->hw; + +switch (hw->mac.type) { +case I40E_MAC_XL710 : +return I40E_MAX_NUM_DESCRIPTORS_XL710 ; +default : +return I40E_MAX_NUM_DESCRIPTORS ; + } +} +static void i40e_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) {
@@ -1925,8 +1937,8 @@ static void i40e_get_ringparam(struct net_device *netdev,struct i40e_pf *pf = np->vsi->back;struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; - ring->rx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; - ring->tx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; + ring->rx_max_pending =i40e_get_max_num_descriptors (pf); + ring->tx_max_pending =i40e_get_max_num_descriptors (pf); ring->rx_mini_max_pending =0 ; ring->rx_jumbo_max_pending =0 ; ring->rx_pending = vsi->rx_rings[0 ]->count;
@@ -1949,12 +1961,12 @@ static bool i40e_active_tx_ring_index(struct i40e_vsi *vsi, u16 index)static int i40e_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) { +u32 new_rx_count, new_tx_count, max_num_descriptors;struct i40e_ring *tx_rings =NULL , *rx_rings =NULL ;struct i40e_netdev_priv *np =netdev_priv (netdev);struct i40e_hw *hw = &np->vsi->back->hw;struct i40e_vsi *vsi = np->vsi;struct i40e_pf *pf = vsi->back; -u32 new_rx_count, new_tx_count;u16 tx_alloc_queue_pairs;int timeout =50 ;int i, err =0 ;
@@ -1962,14 +1974,15 @@ static int i40e_set_ringparam(struct net_device *netdev,if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))return -EINVAL ; -if (ring->tx_pending >I40E_MAX_NUM_DESCRIPTORS || + max_num_descriptors =i40e_get_max_num_descriptors (pf); +if (ring->tx_pending > max_num_descriptors || ring->tx_pending <I40E_MIN_NUM_DESCRIPTORS || - ring->rx_pending >I40E_MAX_NUM_DESCRIPTORS || + ring->rx_pending > max_num_descriptors || ring->rx_pending <I40E_MIN_NUM_DESCRIPTORS ) {netdev_info (netdev,"Descriptors requested (Tx: %d / Rx: %d) out of range [%d-%d]\n" , ring->tx_pending, ring->rx_pending, -I40E_MIN_NUM_DESCRIPTORS ,I40E_MAX_NUM_DESCRIPTORS ); +I40E_MIN_NUM_DESCRIPTORS , max_num_descriptors);return -EINVAL ; }
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -5
@@ -4152,10 +4152,10 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename)* * get_cpu_mask returns a static constant mask with * a permanent lifetime so it's ok to pass to -* irq_set_affinity_hint without making a copy. +* irq_update_affinity_hint without making a copy. */ cpu =cpumask_local_spread (q_vector->v_idx,-1 ); -irq_set_affinity_hint (irq_num,get_cpu_mask (cpu)); +irq_update_affinity_hint (irq_num,get_cpu_mask (cpu)); } vsi->irqs_ready = true;
@@ -4166,8 +4166,8 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) vector--; irq_num = pf->msix_entries[base + vector].vector;irq_set_affinity_notifier (irq_num,NULL ); -irq_set_affinity_hint (irq_num,NULL ); -free_irq (irq_num, &vsi->q_vectors[vector]); +irq_update_affinity_hint (irq_num,NULL ); +free_irq (irq_num, vsi->q_vectors[vector]); }return err; }
@@ -4987,7 +4987,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi)/* clear the affinity notifier in the IRQ descriptor */ irq_set_affinity_notifier (irq_num,NULL );/* remove our suggested affinity mask for this IRQ */ -irq_set_affinity_hint (irq_num,NULL ); +irq_update_affinity_hint (irq_num,NULL );synchronize_irq (irq_num);free_irq (irq_num, vsi->q_vectors[i]);
drivers/net/ethernet/intel/i40e/i40e_txrx.c +0 -3
@@ -949,9 +949,6 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,if (!eop_desc)break ; -/* prevent any other reads prior to eop_desc */ -smp_rmb (); -i40e_trace (clean_tx_irq, tx_ring, tx_desc, tx_buf);/* we have caught up to head, no work left to do */ if (tx_head == tx_desc)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +38 -7
117 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +2 -1
@@ -39,7 +39,8 @@ enum i40e_vf_states {I40E_VF_STATE_MC_PROMISC ,I40E_VF_STATE_UC_PROMISC ,I40E_VF_STATE_PRE_ENABLE , - I40E_VF_STATE_RESETTING +I40E_VF_STATE_RESETTING , + I40E_VF_STATE_RESOURCES_LOADED, };/* VF capabilities */
drivers/net/ethernet/intel/igb/igb_ethtool.c +1 -4
@@ -2077,11 +2077,8 @@ static void igb_diag_test(struct net_device *netdev, }else {dev_info (&adapter->pdev->dev,"online testing starting\n" ); -/* PHY is powered down when interface is down */ -if (if_running &&igb_link_test (adapter, &data[TEST_LINK ])) +if (igb_link_test (adapter, &data[TEST_LINK ])) eth_test->flags |=ETH_TEST_FL_FAILED ; -else - data[TEST_LINK ] =0 ;/* Online tests aren't run; pass by default */ data[TEST_REG ] =0 ;
drivers/net/ethernet/marvell/octeontx2/af/cgx.c +1 -2
@@ -21,8 +21,7 @@#include "rvu.h" #include "lmac_common.h" -#define DRV_NAME "Marvell-CGX/RPM" -#define DRV_STRING "Marvell CGX/RPM Driver" +#define DRV_NAME "Marvell-CGX-RPM"static LIST_HEAD (cgx_list);
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +0 -2
@@ -104,8 +104,6 @@ void mlx5e_update_carrier(struct mlx5e_priv *priv)if (up) {netdev_info (priv->netdev,"Link up\n" );netif_carrier_on (priv->netdev); -mlx5e_port_manual_buffer_config (priv,0 , priv->netdev->mtu, -NULL ,NULL ,NULL ); }else {netdev_info (priv->netdev,"Link down\n" );netif_carrier_off (priv->netdev);
drivers/net/ethernet/natsemi/ns83820.c +6 -7
@@ -820,7 +820,7 @@ static void rx_irq(struct net_device *ndev)struct ns83820 *dev =PRIV (ndev);struct rx_info *info = &dev->rx_info;unsigned next_rx; -int rx_rc, len; +int len;u32 cmdsts;__le32 *desc;unsigned long flags;
@@ -881,8 +881,10 @@ static void rx_irq(struct net_device *ndev)if (likely (CMDSTS_OK & cmdsts)) {#endif skb_put (skb, len); -if (unlikely (!skb)) +if (unlikely (!skb)) { + ndev->stats.rx_dropped++; goto netdev_mangle_me_harder_failed; + }if (cmdsts &CMDSTS_DEST_MULTI ) ndev->stats.multicast++; ndev->stats.rx_packets++;
@@ -901,15 +903,12 @@ static void rx_irq(struct net_device *ndev) __vlan_hwaccel_put_tag(skb, htons(ETH_P_IPV6), tag); }#endif - rx_rc =netif_rx (skb); -if (NET_RX_DROP == rx_rc) { -netdev_mangle_me_harder_failed: - ndev->stats.rx_dropped++; - } +netif_rx (skb); }else {dev_kfree_skb_irq (skb); } +netdev_mangle_me_harder_failed: nr++; next_rx = info->next_rx; desc = info->descs + (DESC_SIZE * next_rx);
drivers/net/ethernet/qlogic/qed/qed_debug.c +4 -3
@@ -4374,10 +4374,11 @@ static enum dbg_status qed_protection_override_dump(struct qed_hwfn *p_hwfn, goto out; } -/* Add override window info to buffer */ +/* Add override window info to buffer, preventing buffer overflow */ override_window_dwords = -qed_rd (p_hwfn, p_ptt,GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW ) * -PROTECTION_OVERRIDE_ELEMENT_DWORDS ; +min (qed_rd (p_hwfn, p_ptt,GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW ) * +PROTECTION_OVERRIDE_ELEMENT_DWORDS , +PROTECTION_OVERRIDE_DEPTH_DWORDS );if (override_window_dwords) { addr =BYTES_TO_DWORDS (GRC_REG_PROTECTION_OVERRIDE_WINDOW ); offset += qed_grc_dump_addr_range(p_hwfn,
drivers/pcmcia/omap_cf.c +7 -1
@@ -331,7 +331,13 @@ static int __exit omap_cf_remove(struct platform_device *pdev)return 0 ; } -static struct platform_driver omap_cf_driver = { +/* +* omap_cf_remove() lives in .exit.text. For drivers registered via +* platform_driver_probe() this is ok because they cannot get unbound at +* runtime. So mark the driver struct with __refdata to prevent modpost +* triggering a section mismatch warning. +*/ +static struct platform_driver omap_cf_driver__refdata = { .driver = { .name = driver_name, },
drivers/phy/broadcom/phy-bcm-ns-usb3.c +3 -6
@@ -16,10 +16,11 @@#include <linux/iopoll.h> #include <linux/mdio.h> #include <linux/module.h> +#include <linux/of.h> #include <linux/of_address.h> -#include <linux/of_platform.h> #include <linux/platform_device.h> #include <linux/phy/phy.h> +#include <linux/property.h> #include <linux/slab.h> #define BCM_NS_USB3_PHY_BASE_ADDR_REG 0x1f
@@ -189,7 +190,6 @@ static int bcm_ns_usb3_mdio_phy_write(struct bcm_ns_usb3 *usb3, u16 reg,static int bcm_ns_usb3_mdio_probe (struct mdio_device *mdiodev) {struct device *dev = &mdiodev->dev; -const struct of_device_id *of_id;struct phy_provider *phy_provider;struct device_node *syscon_np;struct bcm_ns_usb3 *usb3;
@@ -203,10 +203,7 @@ static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) usb3->dev = dev; usb3->mdiodev = mdiodev; - of_id =of_match_device (bcm_ns_usb3_id_table, dev); -if (!of_id) -return -EINVAL ; - usb3->family = (enum bcm_ns_family )of_id->data; + usb3->family = (enum bcm_ns_family )device_get_match_data (dev); syscon_np =of_parse_phandle (dev->of_node,"usb3-dmp-syscon" ,0 ); err =of_address_to_resource (syscon_np,0 , &res);
drivers/phy/marvell/phy-berlin-usb.c +3 -4
@@ -8,9 +8,10 @@#include <linux/io.h> #include <linux/module.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/phy/phy.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/reset.h> #define USB_PHY_PLL 0x04
@@ -162,8 +163,6 @@ MODULE_DEVICE_TABLE(of, phy_berlin_usb_of_match);static int phy_berlin_usb_probe (struct platform_device *pdev) { -const struct of_device_id *match = -of_match_device (phy_berlin_usb_of_match, &pdev->dev);struct phy_berlin_usb_priv *priv;struct phy *phy;struct phy_provider *phy_provider;
@@ -180,7 +179,7 @@ static int phy_berlin_usb_probe(struct platform_device *pdev)if (IS_ERR (priv->rst_ctrl))return PTR_ERR (priv->rst_ctrl); - priv->pll_divider = *((u32 *)match->data); + priv->pll_divider = *((u32 *)device_get_match_data (&pdev->dev)); phy =devm_phy_create (&pdev->dev,NULL , &phy_berlin_usb_ops);if (IS_ERR (phy)) {
drivers/phy/ralink/phy-ralink-usb.c +3 -7
@@ -13,9 +13,10 @@#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/mutex.h> -#include <linux/of_platform.h> +#include <linux/of.h> #include <linux/phy/phy.h> #include <linux/platform_device.h> +#include <linux/platform_device.h> #include <linux/regmap.h> #include <linux/reset.h>
@@ -171,18 +172,13 @@ static int ralink_usb_phy_probe(struct platform_device *pdev) {struct device *dev = &pdev->dev;struct phy_provider *phy_provider; -const struct of_device_id *match;struct ralink_usb_phy *phy; - match =of_match_device (ralink_usb_phy_of_match, &pdev->dev); -if (!match) -return -ENODEV ; - phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL );if (!phy)return -ENOMEM ; - phy->clk = (uintptr_t )match->data; + phy->clk = (uintptr_t )device_get_match_data (&pdev->dev); phy->base =NULL ; phy->sysctl =syscon_regmap_lookup_by_phandle (dev->of_node,"ralink,sysctl" );
drivers/phy/rockchip/phy-rockchip-pcie.c +4 -7
@@ -12,10 +12,9 @@#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> -#include <linux/of_address.h> -#include <linux/of_platform.h> #include <linux/phy/phy.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/reset.h>
@@ -63,7 +62,7 @@ struct rockchip_pcie_data { };struct rockchip_pcie_phy { -struct rockchip_pcie_data *phy_data; +const struct rockchip_pcie_data *phy_data;struct regmap *reg_base;struct phy_pcie_instance {struct phy *phy;
@@ -365,7 +364,6 @@ static int rockchip_pcie_phy_probe(struct platform_device *pdev)struct rockchip_pcie_phy *rk_phy;struct phy_provider *phy_provider;struct regmap *grf; -const struct of_device_id *of_id;int i;u32 phy_num;
@@ -379,11 +377,10 @@ static int rockchip_pcie_phy_probe(struct platform_device *pdev)if (!rk_phy)return -ENOMEM ; - of_id =of_match_device (rockchip_pcie_phy_dt_ids, &pdev->dev); -if (!of_id) + rk_phy->phy_data =device_get_match_data (&pdev->dev); +if (!rk_phy->phy_data)return -EINVAL ; - rk_phy->phy_data = (struct rockchip_pcie_data *)of_id->data; rk_phy->reg_base = grf;mutex_init (&rk_phy->pcie_mutex);
drivers/phy/rockchip/phy-rockchip-usb.c +3 -7
@@ -13,10 +13,9 @@#include <linux/module.h> #include <linux/mutex.h> #include <linux/of.h> -#include <linux/of_address.h> -#include <linux/of_platform.h> #include <linux/phy/phy.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/regulator/consumer.h> #include <linux/reset.h> #include <linux/regmap.h>
@@ -458,7 +457,6 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)struct device *dev = &pdev->dev;struct rockchip_usb_phy_base *phy_base;struct phy_provider *phy_provider; -const struct of_device_id *match;struct device_node *child;int err;
@@ -466,14 +464,12 @@ static int rockchip_usb_phy_probe(struct platform_device *pdev)if (!phy_base)return -ENOMEM ; - match =of_match_device (dev->driver->of_match_table, dev); -if (!match || !match->data) { + phy_base->pdata =device_get_match_data (dev); +if (!phy_base->pdata) {dev_err (dev,"missing phy data\n" );return -EINVAL ; } - phy_base->pdata = match->data; - phy_base->dev = dev; phy_base->reg_base =ERR_PTR (-ENODEV );if (dev->parent && dev->parent->of_node)
drivers/phy/tegra/xusb-tegra210.c +5 -1
@@ -3165,18 +3165,22 @@ tegra210_xusb_padctl_probe(struct device *dev, } pdev =of_find_device_by_node (np); +of_node_put (np);if (!pdev) {dev_warn (dev,"PMC device is not available\n" ); goto out; } -if (!platform_get_drvdata (pdev)) +if (!platform_get_drvdata (pdev)) { +put_device (&pdev->dev);return ERR_PTR (-EPROBE_DEFER ); + } padctl->regmap =dev_get_regmap (&pdev->dev,"usb_sleepwalk" );if (!padctl->regmap)dev_info (dev,"failed to find PMC regmap\n" ); +put_device (&pdev->dev); out:return &padctl->base; }
drivers/phy/ti/phy-omap-control.c +2 -7
@@ -8,9 +8,9 @@#include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/slab.h> #include <linux/of.h> -#include <linux/of_device.h> #include <linux/err.h> #include <linux/io.h> #include <linux/clk.h>
@@ -268,20 +268,15 @@ MODULE_DEVICE_TABLE(of, omap_control_phy_id_table);static int omap_control_phy_probe (struct platform_device *pdev) { -const struct of_device_id *of_id;struct omap_control_phy *control_phy; - of_id =of_match_device (omap_control_phy_id_table, &pdev->dev); -if (!of_id) -return -EINVAL ; - control_phy =devm_kzalloc (&pdev->dev,sizeof (*control_phy),GFP_KERNEL );if (!control_phy)return -ENOMEM ; control_phy->dev = &pdev->dev; - control_phy->type = *(enum omap_control_phy_type *)of_id->data; + control_phy->type = *(enum omap_control_phy_type *)device_get_match_data (&pdev->dev);if (control_phy->type ==OMAP_CTRL_TYPE_OTGHS ) { control_phy->otghs_control =
drivers/phy/ti/phy-omap-usb2.c +17 -7
@@ -19,6 +19,7 @@#include <linux/phy/phy.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/slab.h> #include <linux/sys_soc.h>
@@ -362,6 +363,13 @@ static void omap_usb2_init_errata(struct omap_usb *phy) phy->flags |=OMAP_USB2_DISABLE_CHRG_DET ; } +static void omap_usb2_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int omap_usb2_probe (struct platform_device *pdev) {struct omap_usb *phy;
@@ -371,16 +379,13 @@ static int omap_usb2_probe(struct platform_device *pdev)struct device_node *node = pdev->dev.of_node;struct device_node *control_node;struct platform_device *control_pdev; -const struct of_device_id *of_id; -struct usb_phy_data *phy_data; - - of_id =of_match_device (omap_usb2_id_table, &pdev->dev); +const struct usb_phy_data *phy_data; +int ret; -if (!of_id) + phy_data =device_get_match_data (&pdev->dev); +if (!phy_data)return -EINVAL ; - phy_data = (struct usb_phy_data *)of_id->data; - phy =devm_kzalloc (&pdev->dev,sizeof (*phy),GFP_KERNEL );if (!phy)return -ENOMEM ;
@@ -426,6 +431,11 @@ static int omap_usb2_probe(struct platform_device *pdev)return -EINVAL ; } phy->control_dev = &control_pdev->dev; + + ret =devm_add_action_or_reset (&pdev->dev, omap_usb2_put_device, + phy->control_dev); +if (ret) +return ret; }else { if (of_property_read_u32_index(node, "syscon-phy-power", 1,
drivers/phy/ti/phy-ti-pipe3.c +17 -10
@@ -8,6 +8,7 @@#include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> #include <linux/slab.h> #include <linux/phy/phy.h> #include <linux/of.h>
@@ -666,12 +667,20 @@ static int ti_pipe3_get_clk(struct ti_pipe3 *phy)return 0 ; } +static void ti_pipe3_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int ti_pipe3_get_sysctrl (struct ti_pipe3 *phy) {struct device *dev = phy->dev;struct device_node *node = dev->of_node;struct device_node *control_node;struct platform_device *control_pdev; +int ret; phy->phy_power_syscon =syscon_regmap_lookup_by_phandle (node,"syscon-phy-power" );
@@ -702,6 +711,11 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) } phy->control_dev = &control_pdev->dev; + + ret =devm_add_action_or_reset (dev, ti_pipe3_put_device, + phy->control_dev); +if (ret) +return ret; }if (phy->mode ==PIPE3_MODE_PCIE ) {
@@ -777,23 +791,16 @@ static int ti_pipe3_probe(struct platform_device *pdev)struct phy_provider *phy_provider;struct device *dev = &pdev->dev;int ret; -const struct of_device_id *match; -struct pipe3_data *data; +const struct pipe3_data *data; phy =devm_kzalloc (dev,sizeof (*phy),GFP_KERNEL );if (!phy)return -ENOMEM ; - match =of_match_device (ti_pipe3_id_table, dev); -if (!match) + data =device_get_match_data (dev); +if (!data)return -EINVAL ; - data = (struct pipe3_data *)match->data; -if (!data) { -dev_err (dev,"no driver data\n" ); -return -EINVAL ; - } - phy->dev = dev; phy->mode = data->mode; phy->dpll_map = data->dpll_map;
drivers/power/supply/bq27xxx_battery.c +2 -2
@@ -1872,8 +1872,8 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)bool has_singe_flag = di->opts &BQ27XXX_O_ZERO ; cache.flags =bq27xxx_read (di,BQ27XXX_REG_FLAGS , has_singe_flag); -if ((cache.flags &0xff ) ==0xff ) - cache.flags =-1 ;/* read error */ +if (di->chip ==BQ27000 && (cache.flags &0xff ) ==0xff ) + cache.flags = -ENODEV ;/* bq27000 hdq read error */ if (cache.flags >=0 ) { cache.temperature =bq27xxx_battery_read_temperature (di);if (di->regs[BQ27XXX_REG_TTE ] !=INVALID_REG_ADDR )
drivers/regulator/sy7636a-regulator.c +4 -3
@@ -80,9 +80,11 @@ static int sy7636a_regulator_probe(struct platform_device *pdev)if (!regmap)return -EPROBE_DEFER ; - gdp =devm_gpiod_get (pdev->dev.parent,"epd-pwr-good" ,GPIOD_IN ); +device_set_of_node_from_dev (&pdev->dev, pdev->dev.parent); + + gdp =devm_gpiod_get (&pdev->dev,"epd-pwr-good" ,GPIOD_IN );if (IS_ERR (gdp)) { -dev_err (pdev->dev.parent,"Power good GPIO fault %ld\n" ,PTR_ERR (gdp)); +dev_err (&pdev->dev,"Power good GPIO fault %ld\n" ,PTR_ERR (gdp));return PTR_ERR (gdp); }
@@ -102,7 +104,6 @@ static int sy7636a_regulator_probe(struct platform_device *pdev) } config.dev = &pdev->dev; - config.dev->of_node = pdev->dev.parent->of_node; config.regmap = regmap; rdev =devm_regulator_register (&pdev->dev, &desc, &config);
drivers/soc/qcom/mdt_loader.c +7 -5
@@ -39,12 +39,14 @@ static bool mdt_header_valid(const struct firmware *fw)if (phend > fw->size)return false; -if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) -return false; +if (ehdr->e_shentsize || ehdr->e_shnum) { +if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) +return false; - shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); -if (shend > fw->size) -return false; + shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); +if (shend > fw->size) +return false; + }return true; }
drivers/tty/hvc/hvc_console.c +3 -3
@@ -543,10 +543,10 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count }/* -* Racy, but harmless, kick thread if there is still pending data. +* Kick thread to flush if there's still pending data +* or to wakeup the write queue. */ -if (hp->n_outbuf) -hvc_kick (); +hvc_kick ();return written; }
drivers/tty/serial/sc16is7xx.c +2 -12
@@ -1018,7 +1018,6 @@ static int sc16is7xx_config_rs485(struct uart_port *port,static int sc16is7xx_startup (struct uart_port *port) {struct sc16is7xx_one *one =to_sc16is7xx_one (port, port); -struct sc16is7xx_port *s =dev_get_drvdata (port->dev);unsigned int val;sc16is7xx_power (port,1 );
@@ -1030,16 +1029,6 @@ static int sc16is7xx_startup(struct uart_port *port)sc16is7xx_port_write (port,SC16IS7XX_FCR_REG ,SC16IS7XX_FCR_FIFO_BIT ); -/* Enable EFR */ -sc16is7xx_port_write (port,SC16IS7XX_LCR_REG , -SC16IS7XX_LCR_CONF_MODE_B ); - -regcache_cache_bypass (s->regmap, true); - -/* Enable write access to enhanced features and internal clock div */ -sc16is7xx_port_write (port,SC16IS7XX_EFR_REG , -SC16IS7XX_EFR_ENABLE_BIT ); -/* Enable TCR/TLR */ sc16is7xx_port_update(port, SC16IS7XX_MCR_REG, SC16IS7XX_MCR_TCRTLR_BIT,
@@ -1051,7 +1040,8 @@ static int sc16is7xx_startup(struct uart_port *port)SC16IS7XX_TCR_RX_RESUME (24 ) | SC16IS7XX_TCR_RX_HALT(48)); -regcache_cache_bypass (s->regmap, false); +/* Disable TCR/TLR access */ +sc16is7xx_port_update (port,SC16IS7XX_MCR_REG ,SC16IS7XX_MCR_TCRTLR_BIT ,0 );/* Now, initialize the UART */ sc16is7xx_port_write (port,SC16IS7XX_LCR_REG ,SC16IS7XX_LCR_WORD_LEN_8 );
drivers/usb/core/quirks.c +1 -1
@@ -727,7 +727,7 @@ void usb_detect_quirks(struct usb_device *udev) udev->quirks ^=usb_detect_dynamic_quirks (udev);if (udev->quirks) -dev_dbg (&udev->dev,"USB quirks for this device: %x\n" , +dev_dbg (&udev->dev,"USB quirks for this device: 0x%x\n" , udev->quirks);#ifdef CONFIG_USB_DEFAULT_PERSIST
drivers/usb/gadget/udc/dummy_hcd.c +13 -12
@@ -751,7 +751,7 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req)struct dummy *dum;int retval = -EINVAL ;unsigned long flags; -struct dummy_request *req =NULL ; +struct dummy_request *req =NULL , *iter;if (!_ep || !_req)return retval;
@@ -761,25 +761,26 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req)if (!dum->driver)return -ESHUTDOWN ; -local_irq_save (flags); -spin_lock (&dum->lock); -list_for_each_entry (req, &ep->queue, queue) { -if (&req->req == _req) { -list_del_init (&req->queue); - _req->status = -ECONNRESET ; - retval =0 ; -break ; - } +spin_lock_irqsave (&dum->lock, flags); +list_for_each_entry (iter, &ep->queue, queue) { +if (&iter->req != _req) +continue ; +list_del_init (&iter->queue); + _req->status = -ECONNRESET ; + req = iter; + retval =0 ; +break ; } -spin_unlock (&dum->lock);if (retval ==0 ) {dev_dbg (udc_dev (dum),"dequeued req %p from %s, len %d buf %p\n" , req, _ep->name, _req->length, _req->buf); +spin_unlock (&dum->lock);usb_gadget_giveback_request (_ep, _req); +spin_lock (&dum->lock); } -local_irq_restore (flags); +spin_unlock_irqrestore (&dum->lock, flags);return retval; }
drivers/usb/host/xhci-dbgcap.c +67 -27
135 lines not on this page · raw message
drivers/usb/serial/option.c +17 -0
@@ -1322,7 +1322,18 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff), /* Telit LE910C1-EUX (ECM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1034, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1035, 0xff) }, /* Telit LE910C4-WWX (ECM) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1036, 0xff) }, /* Telit LE910C4-WWX */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1037, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1038, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103b, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) | NCTRL(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103c, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
@@ -1369,6 +1380,12 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ .driver_info = RSVD(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1077, 0xff), /* Telit FN990A (rmnet + audio) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1078, 0xff), /* Telit FN990A (MBIM + audio) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1079, 0xff), /* Telit FN990A (RNDIS + audio) */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990A (rmnet) */ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990A (MBIM) */
drivers/video/fbdev/core/fbcon.c +10 -3
@@ -2479,7 +2479,7 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,unsigned charcount = font->charcount;int w = font->width;int h = font->height; -int size; +int size, alloc_size;int i, csum;u8 *new_data, *data = font->data;int pitch =PITCH (font->width);
@@ -2506,9 +2506,16 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,if (fbcon_invalid_charcount (info, charcount))return -EINVAL ; - size =CALC_FONTSZ (h, pitch, charcount); +/* Check for integer overflow in font size calculation */ +if (check_mul_overflow (h, pitch, &size) || +check_mul_overflow (size, charcount, &size)) +return -EINVAL ; + +/* Check for overflow in allocation size calculation */ +if (check_add_overflow (FONT_EXTRA_WORDS *sizeof (int ), size, &alloc_size)) +return -EINVAL ; - new_data =kmalloc (FONT_EXTRA_WORDS *sizeof (int ) + size,GFP_USER ); + new_data =kmalloc (alloc_size,GFP_USER );if (!new_data)return -ENOMEM ;
drivers/video/fbdev/core/fbmem.c +0 -12
@@ -19,7 +19,6 @@#include <linux/kernel.h> #include <linux/major.h> #include <linux/slab.h> -#include <linux/sysfb.h> #include <linux/mm.h> #include <linux/mman.h> #include <linux/vt.h>
@@ -1795,17 +1794,6 @@ int remove_conflicting_framebuffers(struct apertures_struct *a, do_free = true; } -/* -* If a driver asked to unregister a platform device registered by -* sysfb, then can be assumed that this is a driver for a display -* that is set up by the system firmware and has a generic driver. -* -* Drivers for devices that don't have a generic driver will never -* ask for this, so let's assume that a real driver for the display -* was already probed and prevent sysfb to register devices later. -*/ -sysfb_disable (); -mutex_lock (®istration_lock);do_remove_conflicting_framebuffers (a, name, primary);mutex_unlock (®istration_lock);
fs/btrfs/tree-checker.c +2 -2
@@ -1595,10 +1595,10 @@ static int check_inode_ref(struct extent_buffer *leaf,while (ptr < end) {u16 namelen; -if (unlikely (ptr +sizeof (iref) > end)) { +if (unlikely (ptr +sizeof (*iref) > end)) {inode_ref_err (leaf, slot,"inode ref overflow, ptr %lu end %lu inode_ref_size %zu" , - ptr, end,sizeof (iref)); + ptr, end,sizeof (*iref));return -EUCLEAN ; }
fs/fuse/file.c +4 -1
@@ -3047,7 +3047,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, .nodeid_out = ff_out->nodeid, .fh_out = ff_out->fh, .off_out = pos_out, - .len = len, + .len = min_t(size_t, len, UINT_MAX & PAGE_MASK), .flags = flags };struct fuse_write_out outarg;
@@ -3113,6 +3113,9 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, fc->no_copy_file_range =1 ; err = -EOPNOTSUPP ; } +if (!err && outarg.size > len) + err = -EIO ; +if (err) goto out;
fs/hugetlbfs/inode.c +6 -8
@@ -519,13 +519,13 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart,/* * If page is mapped, it was faulted in after being -* unmapped in caller. Unmap (again) now after taking -* the fault mutex. The mutex will prevent faults -* until we finish removing the page. -* -* This race can only happen in the hole punch case. -* Getting here in a truncate operation is a bug. +* unmapped in caller or hugetlb_vmdelete_list() skips +* unmapping it due to fail to grab lock. Unmap (again) +* while holding the fault mutex. The mutex will prevent +* faults until we finish removing the page. Hold page +* lock to guarantee no concurrent migration. */ +lock_page (page);if (unlikely (page_mapped (page))) {BUG_ON (truncate_op);
@@ -537,8 +537,6 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart, (index + 1) * pages_per_huge_page(h));i_mmap_unlock_write (mapping); } - -lock_page (page);/* * We must free the huge page and remove from page * cache (remove_huge_page) BEFORE removing the
fs/ksmbd/transport_rdma.c +9 -8
@@ -548,7 +548,7 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc)case SMB_DIRECT_MSG_DATA_TRANSFER : {struct smb_direct_data_transfer *data_transfer = (struct smb_direct_data_transfer *)recvmsg->packet; -unsigned int data_length; +unsigned int data_offset, data_length;int avail_recvmsg_count, receive_credits; if (wc->byte_len <
@@ -559,14 +559,15 @@ static void recv_done(struct ib_cq *cq, struct ib_wc *wc) } data_length =le32_to_cpu (data_transfer->data_length); -if (data_length) { -if (wc->byte_len <sizeof (struct smb_direct_data_transfer ) + - (u64 )data_length) { -put_recvmsg (t, recvmsg); -smb_direct_disconnect_rdma_connection (t); -return ; - } + data_offset =le32_to_cpu (data_transfer->data_offset); +if (wc->byte_len < data_offset || + wc->byte_len < (u64 )data_offset + data_length) { +put_recvmsg (t, recvmsg); +smb_direct_disconnect_rdma_connection (t); +return ; + } +if (data_length) {if (t->full_packet_received) recvmsg->first_segment = true;
fs/nfs/client.c +2 -0
@@ -862,6 +862,8 @@ static void nfs_server_set_fsinfo(struct nfs_server *server,if (fsinfo->xattr_support) server->caps |=NFS_CAP_XATTR ; +else + server->caps &= ~NFS_CAP_XATTR ;#endif }
fs/nfs/flexfilelayout/flexfilelayout.c +13 -8
@@ -270,7 +270,7 @@ ff_lseg_match_mirrors(struct pnfs_layout_segment *l1, struct pnfs_layout_segment *l2) {const struct nfs4_ff_layout_segment *fl1 =FF_LAYOUT_LSEG (l1); -const struct nfs4_ff_layout_segment *fl2 =FF_LAYOUT_LSEG (l1); +const struct nfs4_ff_layout_segment *fl2 =FF_LAYOUT_LSEG (l2);u32 i;if (fl1->mirror_array_cnt != fl2->mirror_array_cnt)
@@ -750,8 +750,11 @@ ff_layout_choose_ds_for_read(struct pnfs_layout_segment *lseg,continue ;if (check_device && -nfs4_test_deviceid_unavailable (&mirror->mirror_ds->id_node)) +nfs4_test_deviceid_unavailable (&mirror->mirror_ds->id_node)) { +// reinitialize the error state in case if this is the last iteration + ds =ERR_PTR (-EINVAL );continue ; + } *best_idx = idx;break ;
@@ -781,7 +784,7 @@ ff_layout_choose_best_ds_for_read(struct pnfs_layout_segment *lseg,struct nfs4_pnfs_ds *ds; ds =ff_layout_choose_valid_ds_for_read (lseg, start_idx, best_idx); -if (ds) +if (!IS_ERR (ds))return ds;return ff_layout_choose_any_ds_for_read (lseg, start_idx, best_idx); }
@@ -795,7 +798,7 @@ ff_layout_get_ds_for_read(struct nfs_pageio_descriptor *pgio, ds =ff_layout_choose_best_ds_for_read (lseg, pgio->pg_mirror_idx, best_idx); -if (ds || !pgio->pg_mirror_idx) +if (!IS_ERR (ds) || !pgio->pg_mirror_idx)return ds;return ff_layout_choose_best_ds_for_read (lseg,0 , best_idx); }
@@ -856,7 +859,7 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio, req->wb_nio =0 ; ds =ff_layout_get_ds_for_read (pgio, &ds_idx); -if (!ds) { +if (IS_ERR (ds)) {if (!ff_layout_no_fallback_to_mds (pgio->pg_lseg)) goto out_mds;pnfs_generic_pg_cleanup (pgio);
@@ -1066,11 +1069,13 @@ static void ff_layout_resend_pnfs_read(struct nfs_pgio_header *hdr) {u32 idx = hdr->pgio_mirror_idx +1 ;u32 new_idx =0 ; +struct nfs4_pnfs_ds *ds; -if (ff_layout_choose_any_ds_for_read (hdr->lseg, idx, &new_idx)) -ff_layout_send_layouterror (hdr->lseg); -else + ds =ff_layout_choose_any_ds_for_read (hdr->lseg, idx, &new_idx); +if (IS_ERR (ds))pnfs_error_mark_layout_for_return (hdr->inode, hdr->lseg); +else +ff_layout_send_layouterror (hdr->lseg);pnfs_read_resend_pnfs (hdr, new_idx); }
fs/nfs/nfs4proc.c +3 -3
@@ -3904,8 +3904,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f res.attr_bitmask[2 ] &=FATTR4_WORD2_NFS42_MASK ; }memcpy (server->attr_bitmask, res.attr_bitmask,sizeof (server->attr_bitmask)); - server->caps &= ~(NFS_CAP_ACLS |NFS_CAP_HARDLINKS | -NFS_CAP_SYMLINKS |NFS_CAP_SECURITY_LABEL ); + server->caps &= + ~(NFS_CAP_ACLS |NFS_CAP_HARDLINKS |NFS_CAP_SYMLINKS | +NFS_CAP_SECURITY_LABEL |NFS_CAP_FS_LOCATIONS ); server->fattr_valid =NFS_ATTR_FATTR_V4 ;if (res.attr_bitmask[0 ] &FATTR4_WORD0_ACL && res.acl_bitmask &ACL4_SUPPORT_ALLOW_ACL )
@@ -3969,7 +3970,6 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) };int err; -nfs_server_set_init_caps (server); do { err = nfs4_handle_exception(server, _nfs4_server_capabilities(server, fhandle),
fs/nilfs2/sysfs.c +2 -2
@@ -1068,7 +1068,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)************************************************************************/ static ssize_t nilfs_feature_revision_show (struct kobject *kobj, -struct attribute *attr,char *buf) +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf,"%d.%d\n" ,NILFS_CURRENT_REV ,NILFS_MINOR_REV );
@@ -1080,7 +1080,7 @@ static const char features_readme_str[] ="(1) revision\n\tshow current revision of NILFS file system driver.\n" ;static ssize_t nilfs_feature_README_show (struct kobject *kobj, -struct attribute *attr, +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf, features_readme_str);
fs/nilfs2/sysfs.h +4 -4
@@ -50,16 +50,16 @@ struct nilfs_sysfs_dev_subgroups {struct completion sg_segments_kobj_unregister; }; -#define NILFS_COMMON_ATTR_STRUCT (name) \ +#define NILFS_KOBJ_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \ struct attribute attr; \ - ssize_t (*show)(struct kobject *, struct attribute *, \ + ssize_t (*show)(struct kobject *, struct kobj_attribute *, \ char *); \ - ssize_t (*store)(struct kobject *, struct attribute *, \ + ssize_t (*store)(struct kobject *, struct kobj_attribute *, \ const char *, size_t); \ } -NILFS_COMMON_ATTR_STRUCT (feature); +NILFS_KOBJ_ATTR_STRUCT (feature);#define NILFS_DEV_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \
fs/ocfs2/extent_map.c +9 -1
@@ -696,6 +696,8 @@ int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,* it not only handles the fiemap for inlined files, but also deals * with the fast symlink, cause they have no difference for extent * mapping per se. +* +* Must be called with ip_alloc_sem semaphore held. */ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, struct fiemap_extent_info *fieinfo,
@@ -707,6 +709,7 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh,u64 phys;u32 flags =FIEMAP_EXTENT_DATA_INLINE |FIEMAP_EXTENT_LAST ;struct ocfs2_inode_info *oi =OCFS2_I (inode); +lockdep_assert_held_read (&oi->ip_alloc_sem); di = (struct ocfs2_dinode *)di_bh->b_data;if (ocfs2_inode_is_fast_symlink (inode))
@@ -722,8 +725,11 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, phys += offsetof(struct ocfs2_dinode , id2.i_data.id_data); +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo,0 , phys, id_count, flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret <0 )return ret; }
@@ -792,9 +798,11 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, len_bytes = (u64 )le16_to_cpu (rec.e_leaf_clusters) << osb->s_clustersize_bits; phys_bytes =le64_to_cpu (rec.e_blkno) << osb->sb->s_blocksize_bits; virt_bytes = (u64 )le32_to_cpu (rec.e_cpos) << osb->s_clustersize_bits; - +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo, virt_bytes, phys_bytes, len_bytes, fe_flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret)break ;
fs/xfs/xfs_fsops.c +4 -0
@@ -126,6 +126,10 @@ xfs_growfs_data_private(if (delta <0 && nagcount <2 )return -EINVAL ; +/* No work to do */ +if (delta ==0 ) +return 0 ; + oagcount = mp->m_sb.sb_agcount;/* allocate the new per-ag structures */
include/crypto/if_alg.h +6 -4
@@ -136,6 +136,7 @@ struct af_alg_async_req {* SG? * @enc: Cryptographic operation to be performed when * recvmsg is invoked. +* @write: True if we are in the middle of a write. * @init: True if metadata has been sent. * @len: Length of memory allocated for this data structure. * @inflight: Non-zero when AIO requests are in flight.
@@ -151,10 +152,11 @@ struct af_alg_ctx {size_t used;atomic_t rcvused; -bool more; -bool merge; -bool enc; -bool init; + bool more:1, + merge:1, + enc:1, + write:1, + init:1;unsigned int len;
include/linux/can/bittiming.h +46 -23
106 lines not on this page · raw message
include/linux/can/dev.h +8 -0
@@ -21,6 +21,7 @@#include <linux/can/length.h> #include <linux/can/netlink.h> #include <linux/can/skb.h> +#include <linux/ethtool.h> #include <linux/netdevice.h> /*
@@ -96,6 +97,10 @@ struct can_priv {#endif }; +static inline bool can_tdc_is_enabled (const struct can_priv *priv) +{ +return !!(priv->ctrlmode &CAN_CTRLMODE_TDC_MASK ); +}/* helper to define static CAN controller features at device creation time */ static inline void can_set_static_ctrlmode(struct net_device *dev,
@@ -128,6 +133,9 @@ struct can_priv *safe_candev_priv(struct net_device *dev);int open_candev (struct net_device *dev);void close_candev (struct net_device *dev);int can_change_mtu (struct net_device *dev,int new_mtu); +int can_eth_ioctl_hwts (struct net_device *netdev,struct ifreq *ifr,int cmd); +int can_ethtool_op_get_ts_info_hwts (struct net_device *dev, +struct ethtool_ts_info *info);int register_candev (struct net_device *dev);void unregister_candev (struct net_device *dev);
include/linux/compiler-clang.h +24 -5
@@ -14,23 +14,42 @@#define KASAN_ABI_VERSION 5/* +* Clang 22 added preprocessor macros to match GCC, in hopes of eventually +* dropping __has_feature support for sanitizers: +* https://github.com/llvm/llvm-project/commit/568c23bbd3303518c5056d7f03444dae4fdc8a9c +* Create these macros for older versions of clang so that it is easy to clean +* up once the minimum supported version of LLVM for building the kernel always +* creates these macros. +* * Note: Checking __has_feature(*_sanitizer) is only true if the feature is * enabled. Therefore it is not required to additionally check defined(CONFIG_*) * to avoid adding redundant attributes in other configurations. */ +#if __has_feature (address_sanitizer) && !defined(__SANITIZE_ADDRESS__) +#define __SANITIZE_ADDRESS__ +#endif +#if __has_feature (hwaddress_sanitizer) && !defined(__SANITIZE_HWADDRESS__) +#define __SANITIZE_HWADDRESS__ +#endif +#if __has_feature (thread_sanitizer) && !defined(__SANITIZE_THREAD__) +#define __SANITIZE_THREAD__ +#endif -#if __has_feature (address_sanitizer) ||__has_feature (hwaddress_sanitizer) -/* Emulate GCC's __SANITIZE_ADDRESS__ flag */ +/* +* Treat __SANITIZE_HWADDRESS__ the same as __SANITIZE_ADDRESS__ in the kernel. +*/ +#ifdef __SANITIZE_HWADDRESS__#define __SANITIZE_ADDRESS__ +#endif + +#ifdef __SANITIZE_ADDRESS__#define __no_sanitize_address \ __attribute__((no_sanitize("address", "hwaddress")))#else #define __no_sanitize_address#endif -#if __has_feature (thread_sanitizer) -/* emulate gcc's __SANITIZE_THREAD__ flag */ -#define __SANITIZE_THREAD__ +#ifdef __SANITIZE_THREAD__#define __no_sanitize_thread \ __attribute__((no_sanitize("thread")))#else
include/linux/interrupt.h +52 -1
65 lines not on this page · raw message
include/linux/pgalloc.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PGALLOC_H +#define _LINUX_PGALLOC_H + +#include <linux/pgtable.h> +#include <asm/pgalloc.h> + +/* +* {pgd,p4d}_populate_kernel() are defined as macros to allow +* compile-time optimization based on the configured page table levels. +* Without this, linking may fail because callers (e.g., KASAN) may rely +* on calls to these functions being optimized away when passing symbols +* that exist only for certain page table levels. +*/ +#define pgd_populate_kernel (addr, pgd, p4d) \ + do { \ + pgd_populate(&init_mm, pgd, p4d); \ + if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) \ + arch_sync_kernel_mappings(addr, addr); \ + } while (0) + +#define p4d_populate_kernel (addr, p4d, pud) \ + do { \ + p4d_populate(&init_mm, p4d, pud); \ + if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_P4D_MODIFIED) \ + arch_sync_kernel_mappings(addr, addr); \ + } while (0) + +#endif /* _LINUX_PGALLOC_H */
include/linux/pgtable.h +7 -6
@@ -1382,8 +1382,8 @@ static inline int pmd_protnone(pmd_t pmd)/* * Architectures can set this mask to a combination of PGTBL_P?D_MODIFIED values -* and let generic vmalloc and ioremap code know when arch_sync_kernel_mappings() -* needs to be called. +* and let generic vmalloc, ioremap and page table update code know when +* arch_sync_kernel_mappings() needs to be called. */ #ifndef ARCH_PAGE_TABLE_SYNC_MASK #define ARCH_PAGE_TABLE_SYNC_MASK 0
@@ -1522,10 +1522,11 @@ static inline bool arch_has_pfn_modify_check(void)/* * Page Table Modification bits for pgtbl_mod_mask. * -* These are used by the p?d_alloc_track*() set of functions an in the generic -* vmalloc/ioremap code to track at which page-table levels entries have been -* modified. Based on that the code can better decide when vmalloc and ioremap -* mapping changes need to be synchronized to other page-tables in the system. +* These are used by the p?d_alloc_track*() and p*d_populate_kernel() +* functions in the generic vmalloc, ioremap and page table update code +* to track at which page-table levels entries have been modified. +* Based on that the code can better decide when page table changes need +* to be synchronized to other page-tables in the system. */ #define __PGTBL_PGD_MODIFIED 0#define __PGTBL_P4D_MODIFIED 1
include/net/sock.h +38 -2
@@ -349,6 +349,8 @@ struct bpf_local_storage;* @sk_txtime_deadline_mode: set deadline mode for SO_TXTIME * @sk_txtime_report_errors: set report errors mode for SO_TXTIME * @sk_txtime_unused: unused txtime flags +* @sk_owner: reference to the real owner of the socket that calls +* sock_lock_init_class_and_name(). */ struct sock {/*
@@ -537,6 +539,10 @@ struct sock {struct bpf_local_storage __rcu *sk_bpf_storage;#endif struct rcu_head sk_rcu; + +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +struct module *sk_owner; +#endif };enum sk_pacing {
@@ -1662,6 +1668,35 @@ static inline void sock_release_ownership(struct sock *sk) } } +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +__module_get (owner); + sk->sk_owner = owner; +} + +static inline void sk_owner_clear (struct sock *sk) +{ + sk->sk_owner =NULL ; +} + +static inline void sk_owner_put (struct sock *sk) +{ +module_put (sk->sk_owner); +} +#else +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +} + +static inline void sk_owner_clear (struct sock *sk) +{ +} + +static inline void sk_owner_put (struct sock *sk) +{ +} +#endif /* * Macro so as to not evaluate some arguments when * lockdep is not enabled.
@@ -1671,13 +1706,14 @@ static inline void sock_release_ownership(struct sock *sk)*/ #define sock_lock_init_class_and_name (sk, sname, skey, name, key) \ do { \ + sk_owner_set(sk, THIS_MODULE); \ sk->sk_lock.owned = 0; \ init_waitqueue_head(&sk->sk_lock.wq); \ spin_lock_init(&(sk)->sk_lock.slock); \ debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ - sizeof((sk)->sk_lock)); \ + sizeof((sk)->sk_lock)); \ lockdep_set_class_and_name(&(sk)->sk_lock.slock, \ - (skey), (sname)); \ + (skey), (sname)); \ lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ } while (0)
include/uapi/linux/can/netlink.h +2 -0
@@ -101,6 +101,8 @@ struct can_ctrlmode {#define CAN_CTRLMODE_PRESUME_ACK 0x40/* Ignore missing CAN ACKs */ #define CAN_CTRLMODE_FD_NON_ISO 0x80/* CAN FD in non-ISO mode */ #define CAN_CTRLMODE_CC_LEN8_DLC 0x100/* Classic CAN DLC option */ +#define CAN_CTRLMODE_TDC_AUTO 0x200/* CAN transiver automatically calculates TDCV */ +#define CAN_CTRLMODE_TDC_MANUAL 0x400/* TDCV is manually set up by user */ /* * CAN device statistics
kernel/bpf/verifier.c +4 -0
@@ -5071,6 +5071,10 @@ static int process_timer_func(struct bpf_verifier_env *env, int regno,verbose (env,"verifier bug. Two map pointers in a timer helper\n" );return -EFAULT ; } +if (IS_ENABLED (CONFIG_PREEMPT_RT )) { +verbose (env,"bpf_timer cannot be used for PREEMPT_RT.\n" ); +return -EOPNOTSUPP ; + } meta->map_uid = reg->map_uid; meta->map_ptr = map;return 0 ;
kernel/cgroup/cgroup.c +36 -7
80 lines not on this page · raw message
kernel/irq/manage.c +4 -4
@@ -501,7 +501,8 @@ int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask) }EXPORT_SYMBOL_GPL (irq_force_affinity); -int irq_set_affinity_hint (unsigned int irq,const struct cpumask *m) +int __irq_apply_affinity_hint (unsigned int irq,const struct cpumask *m, +bool setaffinity) {unsigned long flags;struct irq_desc *desc =irq_get_desc_lock (irq, &flags,IRQ_GET_DESC_CHECK_GLOBAL );
@@ -510,12 +511,11 @@ int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m)return -EINVAL ; desc->affinity_hint = m;irq_put_desc_unlock (desc, flags); -/* set the initial affinity to prevent every interrupt being on CPU0 */ -if (m) +if (m && setaffinity)__irq_set_affinity (irq, m, false);return 0 ; } -EXPORT_SYMBOL_GPL (irq_set_affinity_hint); +EXPORT_SYMBOL_GPL (__irq_apply_affinity_hint);static void irq_affinity_notify (struct work_struct *work) {
kernel/time/hrtimer.c +11 -39
112 lines not on this page · raw message
kernel/trace/trace.c +2 -2
@@ -7233,7 +7233,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, entry =ring_buffer_event_data (event); entry->ip = _THIS_IP_; - len =__copy_from_user_inatomic (&entry->buf, ubuf, cnt); + len =copy_from_user_nofault (&entry->buf, ubuf, cnt);if (len) {memcpy (&entry->buf,FAULTED_STR ,FAULTED_SIZE ); cnt =FAULTED_SIZE ;
@@ -7308,7 +7308,7 @@ tracing_mark_raw_write(struct file *filp, const char __user *ubuf, entry =ring_buffer_event_data (event); - len =__copy_from_user_inatomic (&entry->id, ubuf, cnt); + len =copy_from_user_nofault (&entry->id, ubuf, cnt);if (len) { entry->id =-1 ;memcpy (&entry->buf,FAULTED_STR ,FAULTED_SIZE );
kernel/trace/trace_dynevent.c +4 -0
@@ -239,6 +239,10 @@ static int dyn_event_open(struct inode *inode, struct file *file) {int ret; + ret =security_locked_down (LOCKDOWN_TRACEFS ); +if (ret) +return ret; + ret =tracing_check_open_get_tr (NULL );if (ret)return ret;
kernel/trace/trace_events_synth.c +0 -2
@@ -364,13 +364,11 @@ static enum print_line_t print_synth_event(struct trace_iterator *iter, str_field = (char *)entry + data_offset;trace_seq_printf (s, print_fmt, se->fields[i]->name, -STR_VAR_LEN_MAX , str_field, i == se->n_fields -1 ?"" :" " ); n_u64++; }else {trace_seq_printf (s, print_fmt, se->fields[i]->name, -STR_VAR_LEN_MAX , (char *)&entry->fields[n_u64], i == se->n_fields -1 ?"" :" " ); n_u64 +=STR_VAR_LEN_MAX /sizeof (u64);
lib/test_kasan.c +1 -0
@@ -917,6 +917,7 @@ static void kasan_strings(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL | __GFP_ZERO);KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);kfree (ptr);
mm/kasan/init.c +6 -6
@@ -13,9 +13,9 @@#include <linux/mm.h> #include <linux/pfn.h> #include <linux/slab.h> +#include <linux/pgalloc.h> #include <asm/page.h> -#include <asm/pgalloc.h> #include "kasan.h"
@@ -188,7 +188,7 @@ static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr,pud_t *pud;pmd_t *pmd; -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,lm_alias (kasan_early_shadow_pud)); pud =pud_offset (p4d, addr); pud_populate(&init_mm, pud,
@@ -207,7 +207,7 @@ static int __ref zero_p4d_populate(pgd_t *pgd, unsigned long addr,if (!p)return -ENOMEM ; }else { -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,early_alloc (PAGE_SIZE ,NUMA_NO_NODE )); } }
@@ -247,10 +247,10 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,* puds,pmds, so pgd_populate(), pud_populate() * is noops. */ -pgd_populate (&init_mm, pgd, +pgd_populate_kernel (addr, pgd,lm_alias (kasan_early_shadow_p4d)); p4d =p4d_offset (pgd, addr); -p4d_populate (&init_mm, p4d, +p4d_populate_kernel (addr, p4d,lm_alias (kasan_early_shadow_pud)); pud =pud_offset (p4d, addr); pud_populate(&init_mm, pud,
@@ -269,7 +269,7 @@ int __ref kasan_populate_early_shadow(const void *shadow_start,if (!p)return -ENOMEM ; }else { -pgd_populate (&init_mm, pgd, +pgd_populate_kernel (addr, pgd,early_alloc (PAGE_SIZE ,NUMA_NO_NODE )); } }
mm/khugepaged.c +1 -1
@@ -1358,7 +1358,7 @@ static int khugepaged_scan_pmd(struct mm_struct *mm, }if (pte_young (pteval) ||page_is_young (page) ||PageReferenced (page) || -mmu_notifier_test_young (vma->vm_mm, address)) +mmu_notifier_test_young (vma->vm_mm, _address)) referenced++; }if (!writable) {
mm/memory-failure.c +3 -4
@@ -2056,10 +2056,9 @@ int unpoison_memory(unsigned long pfn) static DEFINE_RATELIMIT_STATE(unpoison_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); -if (!pfn_valid (pfn)) -return -ENXIO ; - - p =pfn_to_page (pfn); + p =pfn_to_online_page (pfn); +if (!p) +return -EIO ; page =compound_head (p);mutex_lock (&mf_mutex);
mm/migrate.c +4 -8
@@ -3065,20 +3065,16 @@ void migrate_vma_finalize(struct migrate_vma *migrate) newpage = page; } +if (!is_zone_device_page (newpage)) +lru_cache_add (newpage);remove_migration_ptes (page, newpage, false);unlock_page (page); -if (is_zone_device_page (page)) -put_page (page); -else -putback_lru_page (page); +put_page (page);if (newpage != page) {unlock_page (newpage); -if (is_zone_device_page (newpage)) -put_page (newpage); -else -putback_lru_page (newpage); +put_page (newpage); } } }
mm/rmap.c +1 -1
@@ -2184,7 +2184,7 @@ static bool page_make_device_exclusive(struct page *page, struct mm_struct *mm,* issues. Also tail pages shouldn't be passed to rmap_walk so skip * those. */ -if (!PageAnon (page) ||PageTail (page)) +if (!PageAnon (page) ||PageTail (page) ||PageHuge (page))return false;rmap_walk (page, &rwc);
mm/sparse-vmemmap.c +3 -3
@@ -29,9 +29,9 @@#include <linux/sched.h> #include <linux/pgtable.h> #include <linux/bootmem_info.h> +#include <linux/pgalloc.h> #include <asm/dma.h> -#include <asm/pgalloc.h> #include <asm/tlbflush.h> /**
@@ -553,7 +553,7 @@ p4d_t * __meminit vmemmap_p4d_populate(pgd_t *pgd, unsigned long addr, int node)void *p =vmemmap_alloc_block_zero (PAGE_SIZE , node);if (!p)return NULL ; -p4d_populate (&init_mm, p4d, p); +p4d_populate_kernel (addr, p4d, p); }return p4d; }
@@ -565,7 +565,7 @@ pgd_t * __meminit vmemmap_pgd_populate(unsigned long addr, int node)void *p =vmemmap_alloc_block_zero (PAGE_SIZE , node);if (!p)return NULL ; -pgd_populate (&init_mm, pgd, p); +pgd_populate_kernel (addr, pgd, p); }return pgd; }
net/can/j1939/bus.c +4 -1
@@ -290,8 +290,11 @@ int j1939_local_ecu_get(struct j1939_priv *priv, name_t name, u8 sa)if (!ecu) ecu =j1939_ecu_create_locked (priv, name); err =PTR_ERR_OR_ZERO (ecu); -if (err)
Lines of this file are not shown. View the raw message.
net/hsr/hsr_device.c +157 -6
163 lines not on this page · raw message
sound/usb/mixer_quirks.c +277 -8
285 lines not on this page · raw message
tools/testing/selftests/net/fib_nexthops.sh +6 -6
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.