Linux 5.4.231
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.231 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/testing/sysfs-kernel-oops_count | 6 Documentation/ABI/testing/sysfs-kernel-warn_count | 6 Documentation/admin-guide/sysctl/kernel.rst | 19 + MAINTAINERS | 1 Makefile | 2 arch/alpha/kernel/traps.c | 6 arch/alpha/mm/fault.c | 2 arch/arm/boot/dts/imx53-ppd.dts | 2 arch/arm/boot/dts/imx6qdl-gw560x.dtsi | 1 arch/arm/kernel/traps.c | 2 arch/arm/mach-imx/cpu-imx25.c | 1 arch/arm/mach-imx/cpu-imx27.c | 11 arch/arm/mach-imx/cpu-imx31.c | 10 arch/arm/mach-imx/cpu-imx35.c | 10 arch/arm/mach-imx/cpu-imx5.c | 1 arch/arm/mm/fault.c | 2 arch/arm/mm/nommu.c | 2 arch/arm64/kernel/traps.c | 2 arch/arm64/mm/fault.c | 2 arch/csky/abiv1/alignment.c | 2 arch/csky/kernel/traps.c | 2 arch/h8300/kernel/traps.c | 3 arch/h8300/mm/fault.c | 2 arch/hexagon/kernel/traps.c | 2 arch/ia64/Kconfig | 2 arch/ia64/kernel/mca_drv.c | 3 arch/ia64/kernel/traps.c | 2 arch/ia64/mm/fault.c | 2 arch/m68k/kernel/traps.c | 2 arch/m68k/mm/fault.c | 2 arch/microblaze/kernel/exceptions.c | 4 arch/mips/kernel/traps.c | 2 arch/nds32/kernel/fpu.c | 2 arch/nds32/kernel/traps.c | 8 arch/nios2/kernel/traps.c | 4 arch/openrisc/kernel/traps.c | 2 arch/parisc/kernel/traps.c | 2 arch/powerpc/kernel/traps.c | 2 arch/riscv/kernel/traps.c | 2 arch/riscv/mm/fault.c | 2 arch/s390/include/asm/debug.h | 6 arch/s390/kernel/dumpstack.c | 2 arch/s390/kernel/nmi.c | 2 arch/s390/kvm/interrupt.c | 12 - arch/sh/kernel/traps.c | 2 arch/sparc/kernel/traps_32.c | 4 arch/sparc/kernel/traps_64.c | 4 arch/x86/entry/entry_32.S | 6 arch/x86/entry/entry_64.S | 6 arch/x86/events/amd/core.c | 2 arch/x86/kernel/dumpstack.c | 4 arch/x86/kernel/i8259.c | 1 arch/x86/kernel/irqinit.c | 4 arch/x86/kvm/vmx/vmx.c | 21 - arch/x86/lib/iomap_copy_64.S | 2 arch/xtensa/kernel/traps.c | 2 block/blk-cgroup.c | 4 block/blk-core.c | 5 drivers/base/test/test_async_driver_probe.c | 2 drivers/clk/clk-devres.c | 91 ++++++- drivers/cpufreq/armada-37xx-cpufreq.c | 2 drivers/cpufreq/cpufreq-dt-platdev.c | 1 drivers/dma/dmaengine.c | 7 drivers/dma/imx-sdma.c | 4 drivers/dma/xilinx/xilinx_dma.c | 21 - drivers/edac/edac_device.c | 15 - drivers/edac/highbank_mc_edac.c | 7 drivers/edac/qcom_edac.c | 5 drivers/gpio/gpio-mxc.c | 2 drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 drivers/gpu/drm/panfrost/Kconfig | 3 drivers/hid/hid-betopff.c | 17 - drivers/hid/hid-bigbenff.c | 5 drivers/hid/hid-core.c | 4 drivers/hid/hid-ids.h | 1 drivers/hid/hid-quirks.c | 1 drivers/hid/intel-ish-hid/ishtp/dma-if.c | 10 drivers/infiniband/core/verbs.c | 7 drivers/infiniband/hw/hfi1/user_exp_rcv.c | 101 ++++---- drivers/input/mouse/synaptics.c | 1 drivers/memory/atmel-sdramc.c | 6 drivers/memory/mvebu-devbus.c | 3 drivers/mmc/host/sdhci-esdhc-imx.c | 53 +++- drivers/net/dsa/microchip/ksz9477.c | 4 drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 23 + drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 24 ++ drivers/net/ethernet/amd/xgbe/xgbe.h | 2 drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 2 drivers/net/ethernet/broadcom/tg3.c | 8 drivers/net/ethernet/cadence/macb_main.c | 9 drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 drivers/net/ethernet/renesas/ravb_main.c | 4 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 drivers/net/phy/mdio-i2c.c | 3 drivers/net/phy/mdio-i2c.h | 16 - drivers/net/phy/mdio-mux-meson-g12a.c | 23 + drivers/net/phy/mdio-xgene.c | 2 drivers/net/phy/mdio-xgene.h | 130 ----------- drivers/net/phy/mdio_bus.c | 7 drivers/net/phy/sfp.c | 2 drivers/net/usb/sr9700.c | 2 drivers/net/wan/fsl_ucc_hdlc.c | 6 drivers/net/wireless/rndis_wlan.c | 19 - drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 4 drivers/platform/x86/asus-nb-wmi.c | 1 drivers/platform/x86/touchscreen_dmi.c | 25 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 2 drivers/scsi/hpsa.c | 2 drivers/spi/spidev.c | 2 drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 28 +- drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h | 1 drivers/usb/gadget/function/f_fs.c | 7 drivers/usb/host/xhci-plat.c | 2 drivers/usb/host/xhci.c | 1 drivers/w1/w1.c | 6 drivers/w1/w1_int.c | 5 fs/affs/file.c | 2 fs/cifs/smbdirect.c | 1 fs/nfsd/netns.h | 6 fs/nfsd/nfs4state.c | 8 fs/nfsd/nfsctl.c | 14 - fs/nfsd/nfsd.h | 3 fs/nfsd/nfssvc.c | 35 ++ fs/proc/proc_sysctl.c | 33 ++ fs/reiserfs/super.c | 6 include/linux/clk.h | 109 +++++++++ include/linux/kernel.h | 1 include/linux/mdio/mdio-i2c.h | 16 + include/linux/mdio/mdio-xgene.h | 130 +++++++++++ include/linux/sched/task.h | 1 include/linux/sysctl.h | 3 include/net/sch_generic.h | 7 include/net/sock.h | 2 include/uapi/linux/netfilter/nf_conntrack_sctp.h | 2 include/uapi/linux/netfilter/nfnetlink_cttimeout.h | 2 kernel/bpf/verifier.c | 4 kernel/exit.c | 72 ++++++ kernel/module.c | 26 +- kernel/panic.c | 75 +++++- kernel/sched/core.c | 3 kernel/trace/bpf_trace.c | 3 kernel/trace/trace.c | 2 kernel/trace/trace.h | 1 kernel/trace/trace_events_hist.c | 2 kernel/trace/trace_output.c | 3 lib/lockref.c | 1 lib/nlattr.c | 3 mm/kasan/report.c | 4 net/bluetooth/hci_core.c | 1 net/bluetooth/hci_event.c | 13 + net/core/net_namespace.c | 2 net/ipv4/fib_semantics.c | 2 net/ipv4/inet_hashtables.c | 17 + net/ipv4/inet_timewait_sock.c | 8 net/ipv4/metrics.c | 2 net/ipv4/tcp.c | 2 net/ipv6/ip6_gre.c | 12 - net/ipv6/ip6_tunnel.c | 10 net/ipv6/sit.c | 8 net/l2tp/l2tp_core.c | 30 +- net/netfilter/nf_conntrack_proto_sctp.c | 118 ++++----- net/netfilter/nf_conntrack_proto_tcp.c | 10 net/netfilter/nf_conntrack_standalone.c | 8 net/netfilter/nft_set_rbtree.c | 16 + net/netlink/af_netlink.c | 38 ++- net/netrom/nr_timer.c | 1 net/nfc/llcp_core.c | 1 net/sched/sch_taprio.c | 2 net/sctp/bind_addr.c | 6 net/sunrpc/xprtrdma/verbs.c | 1 scripts/tracing/ftrace-bisect.sh | 34 ++ security/tomoyo/Makefile | 2 sound/soc/fsl/fsl-asoc-card.c | 8 sound/soc/fsl/fsl_micfil.c | 16 - sound/soc/fsl/fsl_ssi.c | 4 tools/objtool/check.c | 3 tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c | 9 tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c | 42 --- 178 files changed, 1324 insertions(+), 673 deletions(-)
Alexander Potapenko (1):
affs: initialize fsdata in affs_truncate()
Alexey V. Vissarionov (1):
scsi: hpsa: Fix allocation size for scsi_host_alloc()
Andrew Lunn (2):
net/phy/mdio-i2c: Move header file to include/linux/mdio
net: xgene: Move shared header file into include/linux
Archie Pusaka (1):
Bluetooth: hci_sync: cancel cmd_timer if hci_open failed
Arnd Bergmann (1):
drm/panfrost: fix GENERIC_ATOMIC64 dependency
Bartosz Golaszewski (1):
spi: spidev: remove debug messages that access spidev->spi without locking
Chancel Liu (1):
ASoC: fsl_micfil: Correct the number of steps on SX controls
Chen Zhongjin (1):
driver core: Fix test_async_probe_init saves device in wrong array
Christoph Hellwig (1):
block: fix and cleanup bio_check_ro
Colin Ian King (1):
perf/x86/amd: fix potential integer overflow on shift of a int
Dario Binacchi (1):
ARM: imx: add missing of_node_put()
David Christensen (1):
net/tg3: resolve deadlock in tg3_reset_task() during EEH
David Gow (1):
mm: kasan: do not panic if both panic_on_warn and kasan_multishot set
David Howells (1):
cifs: Fix oops due to uncleared server->smbd_conn in reconnect
David Morley (1):
tcp: fix rate_app_limited to default to 1
Dean Luick (3):
IB/hfi1: Reject a zero-length user expected buffer IB/hfi1: Reserve user expected TIDs
IB/hfi1: Fix expected receive setup error exit issues
Dmitry Torokhov (1):
Revert "Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode"
Dongliang Mu (1):
fs: reiserfs: remove useless new_opts in reiserfs_remount
Eric Dumazet (9):
net/sched: sch_taprio: fix possible use-after-free
netlink: prevent potential spectre v1 gadgets
netlink: annotate data races around nlk->portid
netlink: annotate data races around dst_portid and dst_group
netlink: annotate data races around sk_state
ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()
ipv4: prevent potential spectre v1 gadget in fib_metrics_match() net/sched: sch_taprio: do not schedule in taprio_reset()
ipv6: ensure sane device mtu in tunnels
Eric W. Biederman (2):
exit: Add and use make_task_dead.
objtool: Add a missing comma to avoid string concatenation
Esina Ekaterina (1):
net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs
Fabio Estevam (4):
ARM: dts: imx6qdl-gw560x: Remove incorrect 'uart-has-rtscts'
ARM: imx27: Retrieve the SYSCTRL base address from devicetree
ARM: imx31: Retrieve the IIM base address from devicetree
ARM: imx35: Retrieve the IIM base address from devicetree
Florian Westphal (1):
netfilter: conntrack: do not renew entry stuck in tcp SYN_SENT state
Gaosheng Cui (2):
memory: atmel-sdramc: Fix missing clk_disable_unprepare in atmel_ramc_probe()
memory: mvebu-devbus: Fix missing clk_disable_unprepare in mvebu_devbus_probe()
Geert Uytterhoeven (1):
ARM: dts: imx: Fix pca9547 i2c-mux node name
Giulio Benetti (1):
ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment
Gong, Sishuai (1):
net: fix a concurrency bug in l2tp_tunnel_register()
Greg Kroah-Hartman (2):
Revert "xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()" Linux 5.4.231
Haibo Chen (3):
mmc: sdhci-esdhc-imx: clear pending interrupt and halt cqhci
mmc: sdhci-esdhc-imx: disable the CMD CRC check for standard tuning
mmc: sdhci-esdhc-imx: correct the tuning start tap and step setting
Hans de Goede (1):
platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK
Hao Sun (1):
bpf: Skip task with pid=1 in send_signal_common()
Heiko Carstens (1):
KVM: s390: interrupt: use READ_ONCE() before cmpxchg()
Heiner Kallweit (2):
net: mdio: validate parameter addr in mdiobus_get_phy()
net: stmmac: fix invalid call to mdiobus_get_phy()
Hendrik Borghorst (1):
KVM: x86/vmx: Do not skip segment attributes if unusable bit is set
Hui Wang (1):
dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
Jakub Sitnicki (2):
l2tp: Serialize access to sk_user_data with sk_callback_lock
l2tp: Don't sleep and disable BH under writer-side sk_callback_lock
Jann Horn (1):
exit: Put an upper limit on how often we can oops
Jason Xing (1):
tcp: avoid the lookup process failing to get sk in ehash table
Jerome Brunet (1):
net: mdio-mux-meson-g12a: force internal PHY off on mux switch
Jiasheng Jiang (1):
HID: intel_ish-hid: Add check for ishtp_dma_tx_map
Jiri Kosina (1):
HID: revert CHERRY_MOUSE_000C quirk
Jisoo Jang (1):
net: nfc: Fix use-after-free in local_cleanup()
Kees Cook (7):
exit: Expose "oops_count" to sysfs
exit: Allow oops_limit to be disabled
panic: Consolidate open-coded panic_on_warn checks
panic: Introduce warn_limit
panic: Expose "warn_count" to sysfs
docs: Fix path paste-o for /sys/kernel/warn_count
exit: Use READ_ONCE() for all oops/warn limit reads
Koba Ko (1):
dmaengine: Fix double increment of client_count in dma_chan_get()
Kuniyuki Iwashima (1):
netrom: Fix use-after-free of a listening socket.
Liu Shixin (1):
dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()
Luis Gerhorst (1):
bpf: Fix pointer-leak due to insufficient speculative store bypass mitigation
Manivannan Sadhasivam (2):
EDAC/device: Respect any driver-supplied workqueue polling value EDAC/qcom: Do not pass llcc_driv_data as edac_device_ctl_info's pvt_info
Marcelo Ricardo Leitner (1):
sctp: fail if no bound addresses can be used for a given scope
Marek Vasut (1):
gpio: mxc: Always set GPIOs used as interrupt source to INPUT mode
Mark Brown (2):
ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC
ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets
Masahiro Yamada (1):
tomoyo: fix broken dependency on *.conf.default
Mateusz Guzik (1):
lockref: stop doing cpu_relax in the cmpxchg loop
Miaoqian Lin (1):
EDAC/highbank: Fix memory leak in highbank_mc_probe()
Michael Klein (1):
platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
Mikulas Patocka (1):
x86/asm: Fix an assembler warning with current binutils
Miles Chen (1):
cpufreq: armada-37xx: stop using 0 as NULL pointer
Natalia Petrova (1):
trace_events_hist: add check for return value of 'create_hist_field'
Nathan Chancellor (3):
hexagon: Fix function name in die()
h8300: Fix build errors from do_exit() to make_task_dead() transition
csky: Fix function name in csky_alignment() and die()
Niklas Schnelle (1):
s390/debug: add _ASM_S390_ prefix to header guard
Pablo Neira Ayuso (1):
netfilter: nft_set_rbtree: skip elements in transaction from garbage collection
Paolo Abeni (1):
net: fix UaF in netns ops registration error path
Patrick Thompson (1):
drm: Add orientation quirk for Lenovo ideapad D330-10IGL
Peter Chen (1):
usb: host: xhci-plat: add wakeup entry at sysfs
Petr Pavlu (1):
module: Don't wait for GOING modules
Pietro Borrello (3):
HID: check empty report_list in hid_validate_values()
HID: check empty report_list in bigben_probe()
HID: betop: check shape of output reports
Radhey Shyam Pandey (1):
dmaengine: xilinx_dma: use devm_platform_ioremap_resource()
Rafael J. Wysocki (1):
thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()
Raju Rangoju (2):
amd-xgbe: TX Flow Ctrl Registers are h/w ver dependent
amd-xgbe: Delay AN timeout during KR training
Rakesh Sankaranarayanan (1):
net: dsa: microchip: ksz9477: port map correction in ALU table entry register
Randy Dunlap (2):
net: mlx5: eliminate anonymous module_init & module_exit
ia64: make IA64_MCA_RECOVERY bool instead of tristate
Robert Hancock (1):
net: macb: fix PTP TX timestamp failure due to packet padding
Sasha Levin (2):
Revert "selftests/bpf: check null propagation only neither reg is PTR_TO_BTF_ID" Revert "Revert "xhci: Set HCD flag to defer primary roothub registration""
Shang XiaoJing (1):
phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on()
Soenke Huster (1):
Bluetooth: fix null ptr deref on hci_sync_conn_complete_evt
Srinivas Pandruvada (1):
thermal: intel: int340x: Protect trip temperature from concurrent updates
Sriram Yagnaraman (2):
netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE
netfilter: conntrack: unify established states for SCTP paths
Steven Rostedt (Google) (2):
tracing: Make sure trace_printk() can output as soon as it can be used ftrace/scripts: Update the instructions for ftrace-bisect.sh
Sumit Gupta (1):
cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist
Swati Agarwal (1):
dmaengine: xilinx_dma: Fix devm_platform_ioremap_resource error handling
Szymon Heidrich (2):
wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid
net: usb: sr9700: Handle negative len
Thomas Gleixner (1):
x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL
Tiezhu Yang (1):
panic: unset panic_on_warn inside panic()
Trond Myklebust (1):
nfsd: Ensure knfsd shuts down when the "nfsd" pseudofs is unmounted
Udipto Goswami (2):
usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
usb: gadget: f_fs: Ensure ep0req is dequeued before free_request
Uwe Kleine-König (3):
clk: generalize devm_clk_get() a bit
clk: Provide new devm_clk helpers for prepared and enabled clocks
clk: Fix pointer casting to prevent oops in devm_clk_release()
Xiaoming Ni (1):
sysctl: add a new register_sysctl_init() interface
Yang Yingliang (2):
w1: fix deadloop in __w1_remove_master_device()
w1: fix WARNING after calling w1_process()
Yihang Li (1):
scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id
Yonatan Nachum (1):
RDMA/core: Fix ib block iterator counter overflow
Yoshihiro Shimoda (1):
net: ravb: Fix possible hang if RIS2_QFF1 happen
Yu Kuai (1):
blk-cgroup: fix missing pd_online_fn() while activating policy
Greg Kroah-Hartman
maintainerDocumentation/ABI/testing/sysfs-kernel-oops_count new file +6 -0
@@ -0,0 +1,6 @@ +What: /sys/kernel/oops_count +Date: November 2022 +KernelVersion: 6.2.0 +Contact: Linux Kernel Hardening List <[email protected]> +Description: + Shows how many times the system has Oopsed since last boot.
Documentation/ABI/testing/sysfs-kernel-warn_count new file +6 -0
@@ -0,0 +1,6 @@ +What: /sys/kernel/warn_count +Date: November 2022 +KernelVersion: 6.2.0 +Contact: Linux Kernel Hardening List <[email protected]> +Description: + Shows how many times the system has Warned since last boot.
Documentation/admin-guide/sysctl/kernel.rst +19 -0
@@ -557,6 +557,15 @@ numa_balancing_scan_size_mb is how many megabytes worth of pages are scanned for a given scan. +oops_limit +========== + +Number of kernel oopses after which the kernel should panic when +``panic_on_oops`` is not set. Setting this to 0 disables checking +the count. Setting this to 1 has the same effect as setting +``panic_on_oops=1``. The default value is 10000. + + osrelease, ostype & version: ============================
@@ -1177,6 +1186,16 @@ entry will default to 2 instead of 0. 2 Unprivileged calls to ``bpf()`` are disabled = ============================================================= + +warn_limit +========== + +Number of kernel warnings after which the kernel should panic when +``panic_on_warn`` is not set. Setting this to 0 disables checking +the warning count. Setting this to 1 has the same effect as setting +``panic_on_warn=1``. The default value is 0. + + watchdog: =========
MAINTAINERS +1 -0
@@ -14661,6 +14661,7 @@ L: [email protected] S: Maintained F: drivers/net/phy/phylink.c F: drivers/net/phy/sfp* +F: include/linux/mdio/mdio-i2c.h F: include/linux/phylink.h F: include/linux/sfp.h K: phylink
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 230 +SUBLEVEL = 231 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/alpha/kernel/traps.c +3 -3
@@ -192,7 +192,7 @@ die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)local_irq_enable ();while (1 ); } -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }#ifndef CONFIG_MATHEMU
@@ -577,7 +577,7 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,printk ("Bad unaligned kernel access at %016lx: %p %lx %lu\n" , pc, va, opcode, reg); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); got_exception:/* Ok, we caught the exception, but we don't want it. Is there
@@ -632,7 +632,7 @@ do_entUna(void * va, unsigned long opcode, unsigned long reg,local_irq_enable ();while (1 ); } -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }/*
arch/alpha/mm/fault.c +1 -1
@@ -206,7 +206,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,printk (KERN_ALERT "Unable to handle kernel paging request at " "virtual address %016lx\n" , address);die_if_kernel ("Oops" , regs, cause, (unsigned long *)regs -16 ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL );/* We ran out of memory, or some other thing happened to us that made us unable to handle the page fault gracefully. */
arch/arm/boot/dts/imx53-ppd.dts +1 -1
@@ -461,7 +461,7 @@ scl-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; status = "okay"; - i2c-switch@70 { + i2c-mux@70 { compatible = "nxp,pca9547"; #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/imx6qdl-gw560x.dtsi +0 -1
@@ -464,7 +464,6 @@ &uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; - uart-has-rtscts; rts-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>; status = "okay"; };
arch/arm/kernel/traps.c +1 -1
@@ -341,7 +341,7 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr)if (panic_on_oops)panic ("Fatal exception" );if (signr) -do_exit (signr); +make_task_dead (signr); }/*
arch/arm/mach-imx/cpu-imx25.c +1 -0
@@ -23,6 +23,7 @@ static int mx25_read_cpu_rev(void) np =of_find_compatible_node (NULL ,NULL ,"fsl,imx25-iim" ); iim_base =of_iomap (np,0 ); +of_node_put (np);BUG_ON (!iim_base); rev =readl (iim_base +MXC_IIMSREV );iounmap (iim_base);
arch/arm/mach-imx/cpu-imx27.c +10 -1
@@ -9,6 +9,7 @@*/ #include <linux/io.h> +#include <linux/of_address.h> #include <linux/module.h> #include "hardware.h"
@@ -17,16 +18,24 @@ static int mx27_cpu_rev = -1;static int mx27_cpu_partnumber;#define SYS_CHIP_ID 0x00/* The offset of CHIP ID register */ +#define SYSCTRL_OFFSET 0x800/* Offset from CCM base address */ static int mx27_read_cpu_rev (void ) { +void __iomem *ccm_base; +struct device_node *np;u32 val; + + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx27-ccm" ); + ccm_base =of_iomap (np,0 ); +of_node_put (np); +BUG_ON (!ccm_base);/* * now we have access to the IO registers. As we need * the silicon revision very early we read it here to * avoid any further hooks */ - val =imx_readl (MX27_IO_ADDRESS (MX27_SYSCTRL_BASE_ADDR +SYS_CHIP_ID )); + val =imx_readl (ccm_base +SYSCTRL_OFFSET +SYS_CHIP_ID ); mx27_cpu_partnumber = (int )((val >>12 ) &0xFFFF );
arch/arm/mach-imx/cpu-imx31.c +9 -1
@@ -6,6 +6,7 @@*/ #include <linux/module.h> +#include <linux/of_address.h> #include <linux/io.h> #include "common.h"
@@ -32,10 +33,17 @@ static struct {static int mx31_read_cpu_rev (void ) { +void __iomem *iim_base; +struct device_node *np;u32 i, srev; + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx31-iim" ); + iim_base =of_iomap (np,0 ); +of_node_put (np); +BUG_ON (!iim_base); +/* read SREV register from IIM module */ - srev =imx_readl (MX31_IO_ADDRESS (MX31_IIM_BASE_ADDR +MXC_IIMSREV )); + srev =imx_readl (iim_base +MXC_IIMSREV ); srev &=0xff ;for (i =0 ; i <ARRAY_SIZE (mx31_cpu_type); i++)
arch/arm/mach-imx/cpu-imx35.c +9 -1
@@ -5,6 +5,7 @@* Copyright (c) 2009 Daniel Mack <[email protected]> */ #include <linux/module.h> +#include <linux/of_address.h> #include <linux/io.h> #include "hardware.h"
@@ -14,9 +15,16 @@ static int mx35_cpu_rev = -1;static int mx35_read_cpu_rev (void ) { +void __iomem *iim_base; +struct device_node *np;u32 rev; - rev =imx_readl (MX35_IO_ADDRESS (MX35_IIM_BASE_ADDR +MXC_IIMSREV )); + np =of_find_compatible_node (NULL ,NULL ,"fsl,imx35-iim" ); + iim_base =of_iomap (np,0 ); +of_node_put (np); +BUG_ON (!iim_base); + + rev =imx_readl (iim_base +MXC_IIMSREV );switch (rev) {case 0x00 :return IMX_CHIP_REVISION_1_0 ;
arch/arm/mach-imx/cpu-imx5.c +1 -0
@@ -28,6 +28,7 @@ static u32 imx5_read_srev_reg(const char *compat) np =of_find_compatible_node (NULL ,NULL , compat); iim_base =of_iomap (np,0 ); +of_node_put (np);WARN_ON (!iim_base); srev =readl (iim_base +IIM_SREV ) &0xff ;
arch/arm/mm/fault.c +1 -1
@@ -124,7 +124,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,show_pte (KERN_ALERT , mm, addr);die ("Oops" , regs, fsr);bust_spinlocks (0 ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL ); }/*
arch/arm/mm/nommu.c +1 -1
@@ -161,7 +161,7 @@ void __init paging_init(const struct machine_desc *mdesc)mpu_setup ();/* allocate the zero page. */ - zero_page =memblock_alloc (PAGE_SIZE ,PAGE_SIZE ); + zero_page = (void *)memblock_alloc (PAGE_SIZE ,PAGE_SIZE );if (!zero_page)panic ("%s: Failed to allocate %lu bytes align=0x%lx\n" , __func__,PAGE_SIZE ,PAGE_SIZE );
arch/arm64/kernel/traps.c +1 -1
@@ -202,7 +202,7 @@ void die(const char *str, struct pt_regs *regs, int err)raw_spin_unlock_irqrestore (&die_lock, flags);if (ret !=NOTIFY_STOP ) -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }static void arm64_show_signal (int signo,const char *str)
arch/arm64/mm/fault.c +1 -1
@@ -296,7 +296,7 @@ static void die_kernel_fault(const char *msg, unsigned long addr,show_pte (addr);die ("Oops" , regs, esr);bust_spinlocks (0 ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL ); } static void __do_kernel_fault(unsigned long addr, unsigned int esr,
arch/csky/abiv1/alignment.c +1 -1
@@ -294,7 +294,7 @@ void csky_alignment(struct pt_regs *regs) __func__, opcode, rz, rx, imm, addr);show_regs (regs);bust_spinlocks (0 ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL ); }force_sig_fault (SIGBUS ,BUS_ADRALN , (void __user *)addr);
arch/csky/kernel/traps.c +1 -1
@@ -85,7 +85,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, int nr)pr_err ("%s: %08x\n" , str, nr);show_regs (regs);add_taint (TAINT_DIE ,LOCKDEP_NOW_UNRELIABLE ); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }void buserr (struct pt_regs *regs)
arch/h8300/kernel/traps.c +2 -1
@@ -17,6 +17,7 @@#include <linux/types.h> #include <linux/sched.h> #include <linux/sched/debug.h> +#include <linux/sched/task.h> #include <linux/mm_types.h> #include <linux/kernel.h> #include <linux/errno.h>
@@ -110,7 +111,7 @@ void die(const char *str, struct pt_regs *fp, unsigned long err)dump (fp);spin_unlock_irq (&die_lock); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }static int kstack_depth_to_print =24 ;
arch/h8300/mm/fault.c +1 -1
@@ -52,7 +52,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,printk (" at virtual address %08lx\n" , address);if (!user_mode (regs))die ("Oops" , regs, error_code); -do_exit (SIGKILL ); +make_task_dead (SIGKILL );return 1 ; }
arch/hexagon/kernel/traps.c +1 -1
@@ -221,7 +221,7 @@ int die(const char *str, struct pt_regs *regs, long err)panic ("Fatal exception" );oops_exit (); -do_exit (err); +make_task_dead (err);return 0 ; }
arch/ia64/Kconfig +1 -1
@@ -360,7 +360,7 @@ config ARCH_PROC_KCORE_TEXT depends on PROC_KCORE config IA64_MCA_RECOVERY - tristate "MCA recovery from errors other than TLB." + bool "MCA recovery from errors other than TLB." config PERFMON bool "Performance monitor support"
arch/ia64/kernel/mca_drv.c +2 -1
@@ -12,6 +12,7 @@#include <linux/types.h> #include <linux/init.h> #include <linux/sched.h> +#include <linux/sched/task.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/kallsyms.h>
@@ -176,7 +177,7 @@ mca_handler_bh(unsigned long paddr, void *iip, unsigned long ipsr)spin_unlock (&mca_bh_lock);/* This process is about to be killed itself */ -do_exit (SIGKILL ); +make_task_dead (SIGKILL ); }/**
arch/ia64/kernel/traps.c +1 -1
@@ -85,7 +85,7 @@ die (const char *str, struct pt_regs *regs, long err)if (panic_on_oops)panic ("Fatal exception" ); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV );return 0 ; }
arch/ia64/mm/fault.c +1 -1
@@ -272,7 +272,7 @@ ia64_do_page_fault (unsigned long address, unsigned long isr, struct pt_regs *re regs =NULL ;bust_spinlocks (0 );if (regs) -do_exit (SIGKILL ); +make_task_dead (SIGKILL );return ; out_of_memory:
arch/m68k/kernel/traps.c +1 -1
@@ -1139,7 +1139,7 @@ void die_if_kernel (char *str, struct pt_regs *fp, int nr)pr_crit ("%s: %08x\n" , str, nr);show_registers (fp);add_taint (TAINT_DIE ,LOCKDEP_NOW_UNRELIABLE ); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); } asmlinkage void set_esp0(unsigned long ssp)
arch/m68k/mm/fault.c +1 -1
@@ -48,7 +48,7 @@ int send_fault_sig(struct pt_regs *regs)pr_alert ("Unable to handle kernel access" );pr_cont (" at virtual address %p\n" , addr);die_if_kernel ("Oops" , regs,0 /*error_code*/ ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL ); }return 1 ;
arch/microblaze/kernel/exceptions.c +2 -2
@@ -44,10 +44,10 @@ void die(const char *str, struct pt_regs *fp, long err)pr_warn ("Oops: %s, sig: %ld\n" , str, err);show_regs (fp);spin_unlock_irq (&die_lock); -/* do_exit() should take care of panic'ing from an interrupt +/* make_task_dead() should take care of panic'ing from an interrupt * context so we don't handle it here */ -do_exit (err); +make_task_dead (err); }/* for user application debugging */
arch/mips/kernel/traps.c +1 -1
@@ -415,7 +415,7 @@ void __noreturn die(const char *str, struct pt_regs *regs)if (regs &&kexec_should_crash (current))crash_kexec (regs); -do_exit (sig); +make_task_dead (sig); }extern struct exception_table_entry __start___dbe_table[];
arch/nds32/kernel/fpu.c +1 -1
@@ -223,7 +223,7 @@ inline void handle_fpu_exception(struct pt_regs *regs) } }else if (fpcsr & FPCSR_mskRIT) {if (!user_mode (regs)) -do_exit (SIGILL ); +make_task_dead (SIGILL ); si_signo =SIGILL ; }
arch/nds32/kernel/traps.c +4 -4
@@ -184,7 +184,7 @@ void die(const char *str, struct pt_regs *regs, int err)bust_spinlocks (0 );spin_unlock_irq (&die_lock); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }EXPORT_SYMBOL (die);
@@ -288,7 +288,7 @@ void unhandled_interruption(struct pt_regs *regs)pr_emerg ("unhandled_interruption\n" );show_regs (regs);if (!user_mode (regs)) -do_exit (SIGKILL ); +make_task_dead (SIGKILL );force_sig (SIGKILL ); }
@@ -299,7 +299,7 @@ void unhandled_exceptions(unsigned long entry, unsigned long addr, addr, type);show_regs (regs);if (!user_mode (regs)) -do_exit (SIGKILL ); +make_task_dead (SIGKILL );force_sig (SIGKILL ); }
@@ -326,7 +326,7 @@ void do_revinsn(struct pt_regs *regs)pr_emerg ("Reserved Instruction\n" );show_regs (regs);if (!user_mode (regs)) -do_exit (SIGILL ); +make_task_dead (SIGILL );force_sig (SIGILL ); }
arch/nios2/kernel/traps.c +2 -2
@@ -37,10 +37,10 @@ void die(const char *str, struct pt_regs *regs, long err)show_regs (regs);spin_unlock_irq (&die_lock);/* -* do_exit() should take care of panic'ing from an interrupt +* make_task_dead() should take care of panic'ing from an interrupt * context so we don't handle it here */ -do_exit (err); +make_task_dead (err); }void _exception (int signo,struct pt_regs *regs,int code,unsigned long addr)
arch/openrisc/kernel/traps.c +1 -1
@@ -218,7 +218,7 @@ void die(const char *str, struct pt_regs *regs, long err) __asm__ __volatile__("l.nop 1" );do {}while (1 );#endif -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }/* This is normally the 'Oops' routine */
arch/parisc/kernel/traps.c +1 -1
@@ -268,7 +268,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)panic ("Fatal exception" );oops_exit (); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }/* gdb uses break 4,8 */
arch/powerpc/kernel/traps.c +1 -1
@@ -246,7 +246,7 @@ static void oops_end(unsigned long flags, struct pt_regs *regs,if (panic_on_oops)panic ("Fatal exception" ); -do_exit (signr); +make_task_dead (signr); }NOKPROBE_SYMBOL (oops_end);
arch/riscv/kernel/traps.c +1 -1
@@ -57,7 +57,7 @@ void die(struct pt_regs *regs, const char *str)if (panic_on_oops)panic ("Fatal exception" );if (ret !=NOTIFY_STOP ) -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }void do_trap (struct pt_regs *regs,int signo,int code,unsigned long addr)
arch/riscv/mm/fault.c +1 -1
@@ -189,7 +189,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs) (addr <PAGE_SIZE ) ?"NULL pointer dereference" : "paging request", addr);die (regs,"Oops" ); -do_exit (SIGKILL ); +make_task_dead (SIGKILL );/* * We ran out of memory, call the OOM killer, and return the userspace
arch/s390/include/asm/debug.h +3 -3
@@ -4,8 +4,8 @@* * Copyright IBM Corp. 1999, 2000 */ -#ifndef DEBUG_H -#define DEBUG_H +#ifndef _ASM_S390_DEBUG_H +#define _ASM_S390_DEBUG_H#include <linux/string.h> #include <linux/spinlock.h>
@@ -416,4 +416,4 @@ int debug_unregister_view(debug_info_t *id, struct debug_view *view); #define PRINT_FATAL(x...) printk(KERN_DEBUG PRINTK_HEADER x)#endif /* DASD_DEBUG */ -#endif /* DEBUG_H */ +#endif /* _ASM_S390_DEBUG_H */
arch/s390/kernel/dumpstack.c +1 -1
@@ -210,5 +210,5 @@ void die(struct pt_regs *regs, const char *str)if (panic_on_oops)panic ("Fatal exception: panic_on_oops" );oops_exit (); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }
arch/s390/kernel/nmi.c +1 -1
@@ -179,7 +179,7 @@ void s390_handle_mcck(void) "malfunction (code 0x%016lx).\n", mcck.mcck_code);printk (KERN_EMERG "mcck: task: %s, pid: %d.\n" , current->comm, current->pid); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); } }EXPORT_SYMBOL_GPL (s390_handle_mcck);
arch/s390/kvm/interrupt.c +8 -4
@@ -81,8 +81,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union esca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -93,8 +94,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union bsca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -124,16 +126,18 @@ static void sca_clear_ext_call(struct kvm_vcpu *vcpu)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl old = *sigp_ctrl; +union esca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }else {struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl old = *sigp_ctrl; +union bsca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }
arch/sh/kernel/traps.c +1 -1
@@ -57,7 +57,7 @@ void die(const char *str, struct pt_regs *regs, long err)if (panic_on_oops)panic ("Fatal exception" ); -do_exit (SIGSEGV ); +make_task_dead (SIGSEGV ); }void die_if_kernel (const char *str,struct pt_regs *regs,long err)
arch/sparc/kernel/traps_32.c +1 -3
@@ -86,9 +86,7 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) }printk ("Instruction DUMP:" );instruction_dump ((unsigned long *) regs->pc); -if (regs->psr &PSR_PS ) -do_exit (SIGKILL ); -do_exit (SIGSEGV ); +make_task_dead ((regs->psr &PSR_PS ) ?SIGKILL :SIGSEGV ); }void do_hw_interrupt (struct pt_regs *regs,unsigned long type)
arch/sparc/kernel/traps_64.c +1 -3
@@ -2564,9 +2564,7 @@ void __noreturn die_if_kernel(char *str, struct pt_regs *regs) }if (panic_on_oops)panic ("Fatal exception" ); -if (regs->tstate &TSTATE_PRIV ) -do_exit (SIGKILL ); -do_exit (SIGSEGV ); +make_task_dead ((regs->tstate &TSTATE_PRIV )?SIGKILL :SIGSEGV ); }EXPORT_SYMBOL (die_if_kernel);
arch/x86/entry/entry_32.S +3 -3
@@ -1659,13 +1659,13 @@ ENTRY(async_page_fault) END(async_page_fault) #endif -ENTRY(rewind_stack_do_exit) +ENTRY(rewind_stack_and_make_dead) /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp movl PER_CPU_VAR(cpu_current_top_of_stack), %esi leal -TOP_OF_KERNEL_STACK_PADDING-PTREGS_SIZE(%esi), %esp - call do_exit + call make_task_dead 1: jmp 1b -END(rewind_stack_do_exit) +END(rewind_stack_and_make_dead)
arch/x86/entry/entry_64.S +3 -3
@@ -1757,7 +1757,7 @@ ENTRY(ignore_sysret) END(ignore_sysret) #endif -ENTRY(rewind_stack_do_exit) +ENTRY(rewind_stack_and_make_dead) UNWIND_HINT_FUNC /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp
@@ -1766,5 +1766,5 @@ ENTRY(rewind_stack_do_exit) leaq -PTREGS_SIZE(%rax), %rsp UNWIND_HINT_REGS - call do_exit -END(rewind_stack_do_exit) + call make_task_dead +END(rewind_stack_and_make_dead)
arch/x86/events/amd/core.c +1 -1
@@ -969,7 +969,7 @@ static int __init amd_core_pmu_init(void)* numbered counter following it. */ for (i =0 ; i < x86_pmu.num_counters -1 ; i +=2 ) - even_ctr_mask |=1 << i; + even_ctr_mask |=BIT_ULL (i); pair_constraint = (struct event_constraint ) __EVENT_CONSTRAINT(0, even_ctr_mask, 0,
arch/x86/kernel/dumpstack.c +2 -2
@@ -326,7 +326,7 @@ unsigned long oops_begin(void) }NOKPROBE_SYMBOL (oops_begin); -void __noreturn rewind_stack_do_exit (int signr); +void __noreturn rewind_stack_and_make_dead (int signr);void oops_end (unsigned long flags,struct pt_regs *regs,int signr) {
@@ -361,7 +361,7 @@ void oops_end(unsigned long flags, struct pt_regs *regs, int signr)* reuse the task stack and that existing poisons are invalid. */ kasan_unpoison_task_stack (current); -rewind_stack_do_exit (signr); +rewind_stack_and_make_dead (signr); }NOKPROBE_SYMBOL (oops_end);
arch/x86/kernel/i8259.c +1 -0
@@ -114,6 +114,7 @@ static void make_8259A_irq(unsigned int irq)disable_irq_nosync (irq); io_apic_irqs &= ~(1 <<irq);irq_set_chip_and_handler (irq, &i8259A_chip, handle_level_irq); +irq_set_status_flags (irq,IRQ_LEVEL );enable_irq (irq);lapic_assign_legacy_vector (irq, true); }
arch/x86/kernel/irqinit.c +3 -1
@@ -72,8 +72,10 @@ void __init init_ISA_irqs(void) legacy_pic->init (0 ); -for (i =0 ; i <nr_legacy_irqs (); i++) +for (i =0 ; i <nr_legacy_irqs (); i++) {irq_set_chip_and_handler (i, chip, handle_level_irq); +irq_set_status_flags (i,IRQ_LEVEL ); + } }void __init init_IRQ (void )
arch/x86/kvm/vmx/vmx.c +9 -12
@@ -3241,18 +3241,15 @@ static u32 vmx_segment_access_rights(struct kvm_segment *var) {u32 ar; -if (var->unusable || !var->present) - ar =1 <<16 ; -else { - ar = var->type &15 ; - ar |= (var->s &1 ) <<4 ; - ar |= (var->dpl &3 ) <<5 ; - ar |= (var->present &1 ) <<7 ; - ar |= (var->avl &1 ) <<12 ; - ar |= (var->l &1 ) <<13 ; - ar |= (var->db &1 ) <<14 ; - ar |= (var->g &1 ) <<15 ; - } + ar = var->type &15 ; + ar |= (var->s &1 ) <<4 ; + ar |= (var->dpl &3 ) <<5 ; + ar |= (var->present &1 ) <<7 ; + ar |= (var->avl &1 ) <<12 ; + ar |= (var->l &1 ) <<13 ; + ar |= (var->db &1 ) <<14 ; + ar |= (var->g &1 ) <<15 ; + ar |= (var->unusable || !var->present) <<16 ;return ar; }
arch/x86/lib/iomap_copy_64.S +1 -1
@@ -10,6 +10,6 @@ */ ENTRY(__iowrite32_copy) movl %edx,%ecx - rep movsd + rep movsl ret ENDPROC(__iowrite32_copy)
arch/xtensa/kernel/traps.c +1 -1
@@ -543,5 +543,5 @@ void die(const char * str, struct pt_regs * regs, long err)if (panic_on_oops)panic ("Fatal exception" ); -do_exit (err); +make_task_dead (err); }
block/blk-cgroup.c +4 -0
@@ -1445,6 +1445,10 @@ int blkcg_activate_policy(struct request_queue *q,list_for_each_entry_reverse (blkg, &q->blkg_list, q_node) pol->pd_init_fn (blkg->pd[pol->plid]); +if (pol->pd_online_fn) +list_for_each_entry_reverse (blkg, &q->blkg_list, q_node) + pol->pd_online_fn (blkg->pd[pol->plid]); +__set_bit (pol->plid, q->blkcg_pols); ret =0 ;
block/blk-core.c +1 -4
@@ -793,10 +793,7 @@ static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)if (op_is_flush (bio->bi_opf) && !bio_sectors (bio))return false; - -WARN_ONCE (1 , -"generic_make_request: Trying to write " -"to read-only block-device %s (partno %d)\n" , +pr_warn ("Trying to write to read-only block-device %s (partno %d)\n" ,bio_devname (bio, b), part->partno);/* Older lvm-tools actually trigger this */ return false;
drivers/base/test/test_async_driver_probe.c +1 -1
@@ -146,7 +146,7 @@ static int __init test_async_probe_init(void) calltime =ktime_get ();for_each_online_cpu (cpu) { nid =cpu_to_node (cpu); - pdev = &sync_dev[sync_id]; + pdev = &async_dev[async_id]; *pdev = test_platform_device_register_node("test_async_driver", async_id,
drivers/clk/clk-devres.c +75 -16
117 lines not on this page · raw message
drivers/cpufreq/armada-37xx-cpufreq.c +1 -1
@@ -443,7 +443,7 @@ static int __init armada37xx_cpufreq_driver_init(void)return -ENODEV ; } - clk =clk_get (cpu_dev,0 ); + clk =clk_get (cpu_dev,NULL );if (IS_ERR (clk)) {dev_err (cpu_dev,"Cannot get clock for CPU0\n" );return PTR_ERR (clk);
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -126,6 +126,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "nvidia,tegra124", }, { .compatible = "nvidia,tegra210", }, + { .compatible = "nvidia,tegra234", }, { .compatible = "qcom,apq8096", }, { .compatible = "qcom,msm8996", },
drivers/dma/dmaengine.c +4 -3
@@ -212,7 +212,8 @@ static int dma_chan_get(struct dma_chan *chan)/* The channel is already in use, update client count */ if (chan->client_count) {__module_get (owner); - goto out; + chan->client_count++; +return 0 ; }if (!try_module_get (owner))
@@ -225,11 +226,11 @@ static int dma_chan_get(struct dma_chan *chan) goto err_out; } + chan->client_count++; +if (!dma_has_cap (DMA_PRIVATE , chan->device->cap_mask))balance_ref_count (chan); -out: - chan->client_count++;return 0 ; err_out:
drivers/dma/imx-sdma.c +3 -1
@@ -1360,10 +1360,12 @@ static struct sdma_desc *sdma_transfer_init(struct sdma_channel *sdmac,sdma_config_ownership (sdmac, false, true, false);if (sdma_load_context (sdmac)) - goto err_desc_out; + goto err_bd_out;return desc; +err_bd_out: +sdma_free_bd (desc); err_desc_out:kfree (desc); err_out:
drivers/dma/xilinx/xilinx_dma.c +11 -10
@@ -2626,7 +2626,6 @@ static int xilinx_dma_probe(struct platform_device *pdev)struct device_node *node = pdev->dev.of_node;struct xilinx_dma_device *xdev;struct device_node *child, *np = pdev->dev.of_node; -struct resource *io;u32 num_frames, addr_width, len_width;int i, err;
@@ -2652,11 +2651,11 @@ static int xilinx_dma_probe(struct platform_device *pdev)return err;/* Request and map I/O memory */ - io =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - xdev->regs =devm_ioremap_resource (&pdev->dev, io); -if (IS_ERR (xdev->regs)) -return PTR_ERR (xdev->regs); - + xdev->regs =devm_platform_ioremap_resource (pdev,0 ); +if (IS_ERR (xdev->regs)) { + err =PTR_ERR (xdev->regs); + goto disable_clks; + }/* Retrieve the DMA engine properties from the device tree */ xdev->max_buffer_len =GENMASK (XILINX_DMA_MAX_TRANS_LEN_MAX -1 ,0 );
@@ -2748,8 +2747,10 @@ static int xilinx_dma_probe(struct platform_device *pdev)/* Initialize the channels */ for_each_child_of_node (node, child) { err =xilinx_dma_child_probe (xdev, child); -if (err <0 ) - goto disable_clks; +if (err <0 ) { +of_node_put (child); + goto error; + } }if (xdev->dma_config->dmatype ==XDMA_TYPE_VDMA ) {
@@ -2782,12 +2783,12 @@ static int xilinx_dma_probe(struct platform_device *pdev)return 0 ; -disable_clks: -xdma_disable_allclks (xdev); error:for (i =0 ; i < xdev->nr_channels; i++)if (xdev->chan[i])xilinx_dma_chan_remove (xdev->chan[i]); +disable_clks: +xdma_disable_allclks (xdev);return err; }
drivers/edac/edac_device.c +7 -8
@@ -34,6 +34,9 @@static DEFINE_MUTEX (device_ctls_mutex);static LIST_HEAD (edac_device_list); +/* Default workqueue processing interval on this instance, in msecs */ +#define DEFAULT_POLL_INTERVAL 1000 +#ifdef CONFIG_EDAC_DEBUG static void edac_device_dump_device (struct edac_device_ctl_info *edac_dev) {
@@ -366,7 +369,7 @@ static void edac_device_workq_function(struct work_struct *work_req)* whole one second to save timers firing all over the period * between integral seconds */ -if (edac_dev->poll_msec ==1000 ) +if (edac_dev->poll_msec ==DEFAULT_POLL_INTERVAL )edac_queue_work (&edac_dev->work,round_jiffies_relative (edac_dev->delay));else edac_queue_work (&edac_dev->work, edac_dev->delay);
@@ -396,7 +399,7 @@ static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,* timers firing on sub-second basis, while they are happy * to fire together on the 1 second exactly */ -if (edac_dev->poll_msec ==1000 ) +if (edac_dev->poll_msec ==DEFAULT_POLL_INTERVAL )edac_queue_work (&edac_dev->work,round_jiffies_relative (edac_dev->delay));else edac_queue_work (&edac_dev->work, edac_dev->delay);
@@ -430,7 +433,7 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev, edac_dev->delay =msecs_to_jiffies (msec);/* See comment in edac_device_workq_setup() above */ -if (edac_dev->poll_msec ==1000 ) +if (edac_dev->poll_msec ==DEFAULT_POLL_INTERVAL )edac_mod_work (&edac_dev->work,round_jiffies_relative (edac_dev->delay));else edac_mod_work (&edac_dev->work, edac_dev->delay);
@@ -472,11 +475,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev)/* This instance is NOW RUNNING */ edac_dev->op_state =OP_RUNNING_POLL ; -/* -* enable workq processing on this instance, -* default = 1000 msec -*/ -edac_device_workq_setup (edac_dev,1000 ); +edac_device_workq_setup (edac_dev, edac_dev->poll_msec ?:DEFAULT_POLL_INTERVAL ); }else { edac_dev->op_state =OP_RUNNING_INTERRUPT ; }
drivers/edac/highbank_mc_edac.c +5 -2
@@ -174,8 +174,10 @@ static int highbank_mc_probe(struct platform_device *pdev) drvdata = mci->pvt_info;platform_set_drvdata (pdev, mci); -if (!devres_open_group (&pdev->dev,NULL ,GFP_KERNEL )) -return -ENOMEM ; +if (!devres_open_group (&pdev->dev,NULL ,GFP_KERNEL )) { + res = -ENOMEM ; + goto free; + } r =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!r) {
@@ -243,6 +245,7 @@ static int highbank_mc_probe(struct platform_device *pdev)edac_mc_del_mc (&pdev->dev); err:devres_release_group (&pdev->dev,NULL ); +free:edac_mc_free (mci);return res; }
drivers/edac/qcom_edac.c +2 -3
@@ -252,7 +252,7 @@ dump_syn_reg_values(struct llcc_drv_data *drv, u32 bank, int err_type)static int dump_syn_reg (struct edac_device_ctl_info *edev_ctl,int err_type,u32 bank) { -struct llcc_drv_data *drv = edev_ctl->pvt_info; +struct llcc_drv_data *drv = edev_ctl->dev->platform_data;int ret; ret =dump_syn_reg_values (drv, bank, err_type);
@@ -289,7 +289,7 @@ static irqreturn_t llcc_ecc_irq_handler(int irq, void *edev_ctl) { struct edac_device_ctl_info *edac_dev_ctl = edev_ctl; -struct llcc_drv_data *drv = edac_dev_ctl->pvt_info; +struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data;irqreturn_t irq_rc =IRQ_NONE ;u32 drp_error, trp_error, i;int ret;
@@ -358,7 +358,6 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev) edev_ctl->dev_name =dev_name (dev); edev_ctl->ctl_name ="llcc" ; edev_ctl->panic_on_ue =LLCC_ERP_PANIC_ON_UE ; - edev_ctl->pvt_info = llcc_driv_data; rc =edac_device_add_device (edev_ctl);if (rc)
drivers/gpio/gpio-mxc.c +1 -1
@@ -229,7 +229,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)writel (1 << gpio_idx, port->base +GPIO_ISR ); -return 0 ; +return port->gc.direction_input (&port->gc, gpio_idx); }static void mxc_flip_edge (struct mxc_gpio_port *port,u32 gpio)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -272,6 +272,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"), }, .driver_data = (void *)&lcd1200x1920_rightside_up, + }, { /* Lenovo Ideapad D330-10IGL (HD) */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGL"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* Lenovo Yoga Book X90F / X91F / X91L */ .matches = {/* Non exact match to match all versions */
drivers/gpu/drm/panfrost/Kconfig +2 -1
@@ -3,7 +3,8 @@ config DRM_PANFROST tristate "Panfrost (DRM support for ARM Mali Midgard/Bifrost GPUs)" depends on DRM - depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64) + depends on ARM || ARM64 || COMPILE_TEST + depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE depends on MMU select DRM_SCHED select IOMMU_SUPPORT
drivers/hid/hid-betopff.c +9 -8
@@ -60,7 +60,6 @@ static int betopff_init(struct hid_device *hid)struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list;struct input_dev *dev; -int field_count =0 ;int error;int i, j;
@@ -86,19 +85,21 @@ static int betopff_init(struct hid_device *hid)* ----------------------------------------- * Do init them with default value. */ +if (report->maxfield <4 ) { +hid_err (hid,"not enough fields in the report: %d\n" , + report->maxfield); +return -ENODEV ; + }for (i =0 ; i < report->maxfield; i++) { +if (report->field[i]->report_count <1 ) { +hid_err (hid,"no values in the field\n" ); +return -ENODEV ; + }for (j =0 ; j < report->field[i]->report_count; j++) { report->field[i]->value[j] =0x00 ; - field_count++; } } -if (field_count <4 ) { -hid_err (hid,"not enough fields in the report: %d\n" , - field_count); -return -ENODEV ; - } - betopff =kzalloc (sizeof (*betopff),GFP_KERNEL );if (!betopff)return -ENOMEM ;
drivers/hid/hid-bigbenff.c +5 -0
@@ -344,6 +344,11 @@ static int bigben_probe(struct hid_device *hid, } report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list; +if (list_empty (report_list)) { +hid_err (hid,"no output report found\n" ); + error = -ENODEV ; + goto error_hw_stop; + } bigben->report =list_entry (report_list->next, struct hid_report, list);
drivers/hid/hid-core.c +2 -2
@@ -981,8 +981,8 @@ struct hid_report *hid_validate_values(struct hid_device *hid,* Validating on id 0 means we should examine the first * report in the list. */ - report =list_entry ( - hid->report_enum[type].report_list.next, + report =list_first_entry_or_null ( + &hid->report_enum[type].report_list, struct hid_report, list); }else { report = hid->report_enum[type].report_id_hash[id];
drivers/hid/hid-ids.h +0 -1
@@ -259,7 +259,6 @@#define USB_DEVICE_ID_CH_AXIS_295 0x001c#define USB_VENDOR_ID_CHERRY 0x046a -#define USB_DEVICE_ID_CHERRY_MOUSE_000C 0x000c#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023#define USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR 0x0027
drivers/hid/hid-quirks.c +0 -1
@@ -54,7 +54,6 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_THROTTLE), HID_QUIRK_NOGET }, - { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_MOUSE_000C), HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL }, { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70RGB), HID_QUIRK_NO_INIT_REPORTS },
drivers/hid/intel-ish-hid/ishtp/dma-if.c +10 -0
@@ -104,6 +104,11 @@ void *ishtp_cl_get_dma_send_buf(struct ishtp_device *dev,int required_slots = (size /DMA_SLOT_SIZE ) +1 * (size %DMA_SLOT_SIZE !=0 ); +if (!dev->ishtp_dma_tx_map) { +dev_err (dev->devc,"Fail to allocate Tx map\n" ); +return NULL ; + } +spin_lock_irqsave (&dev->ishtp_dma_tx_lock, flags);for (i =0 ; i <= (dev->ishtp_dma_num_slots - required_slots); i++) { free =1 ;
@@ -150,6 +155,11 @@ void ishtp_cl_release_dma_acked_mem(struct ishtp_device *dev,return ; } +if (!dev->ishtp_dma_tx_map) { +dev_err (dev->devc,"Fail to allocate Tx map\n" ); +return ; + } + i = (msg_addr - dev->ishtp_host_dma_tx_buf) /DMA_SLOT_SIZE ;spin_lock_irqsave (&dev->ishtp_dma_tx_lock, flags);for (j =0 ; j < acked_slots; j++) {
drivers/infiniband/core/verbs.c +5 -2
@@ -2840,15 +2840,18 @@ EXPORT_SYMBOL(__rdma_block_iter_start);bool __rdma_block_iter_next (struct ib_block_iter *biter) {unsigned int block_offset; +unsigned int sg_delta;if (!biter->__sg_nents || !biter->__sg)return false; biter->__dma_addr =sg_dma_address (biter->__sg) + biter->__sg_advance; block_offset = biter->__dma_addr & (BIT_ULL (biter->__pg_bit) -1 ); - biter->__sg_advance +=BIT_ULL (biter->__pg_bit) - block_offset; + sg_delta =BIT_ULL (biter->__pg_bit) - block_offset; -if (biter->__sg_advance >=sg_dma_len (biter->__sg)) { +if (sg_dma_len (biter->__sg) - biter->__sg_advance > sg_delta) { + biter->__sg_advance += sg_delta; + }else { biter->__sg_advance =0 ; biter->__sg =sg_next (biter->__sg); biter->__sg_nents--;
drivers/infiniband/hw/hfi1/user_exp_rcv.c +59 -42
148 lines not on this page · raw message
drivers/input/mouse/synaptics.c +0 -1
@@ -189,7 +189,6 @@ static const char * const smbus_pnp_ids[] = {"SYN3221" ,/* HP 15-ay000 */ "SYN323d" ,/* HP Spectre X360 13-w013dx */ "SYN3257" ,/* HP Envy 13-ad105ng */ -"SYN3286" ,/* HP Laptop 15-da3001TU */ NULL };
drivers/memory/atmel-sdramc.c +2 -4
@@ -47,19 +47,17 @@ static int atmel_ramc_probe(struct platform_device *pdev) caps =of_device_get_match_data (&pdev->dev);if (caps->has_ddrck) { - clk =devm_clk_get (&pdev->dev,"ddrck" ); + clk =devm_clk_get_enabled (&pdev->dev,"ddrck" );if (IS_ERR (clk))return PTR_ERR (clk); -clk_prepare_enable (clk); }if (caps->has_mpddr_clk) { - clk =devm_clk_get (&pdev->dev,"mpddr" ); + clk =devm_clk_get_enabled (&pdev->dev,"mpddr" );if (IS_ERR (clk)) {pr_err ("AT91 RAMC: couldn't get mpddr clock\n" );return PTR_ERR (clk); } -clk_prepare_enable (clk); }return 0 ;
drivers/memory/mvebu-devbus.c +1 -2
@@ -282,10 +282,9 @@ static int mvebu_devbus_probe(struct platform_device *pdev)if (IS_ERR (devbus->base))return PTR_ERR (devbus->base); - clk =devm_clk_get (&pdev->dev,NULL ); + clk =devm_clk_get_enabled (&pdev->dev,NULL );if (IS_ERR (clk))return PTR_ERR (clk); -clk_prepare_enable (clk);/* * Obtain clock period in picoseconds,
drivers/mmc/host/sdhci-esdhc-imx.c +44 -9
89 lines not on this page · raw message
drivers/net/dsa/microchip/ksz9477.c +2 -2
@@ -682,10 +682,10 @@ static int ksz9477_port_fdb_del(struct dsa_switch *ds, int port,ksz_read32 (dev,REG_SW_ALU_VAL_D , &alu_table[3 ]);/* clear forwarding port */ - alu_table[2 ] &= ~BIT (port); + alu_table[1 ] &= ~BIT (port);/* if there is no port to forward, clear table */ -if ((alu_table[2 ] &ALU_V_PORT_MAP ) ==0 ) { +if ((alu_table[1 ] &ALU_V_PORT_MAP ) ==0 ) { alu_table[0 ] =0 ; alu_table[1 ] =0 ; alu_table[2 ] =0 ;
drivers/net/ethernet/amd/xgbe/xgbe-dev.c +15 -8
@@ -524,19 +524,28 @@ static void xgbe_disable_vxlan(struct xgbe_prv_data *pdata)netif_dbg (pdata, drv, pdata->netdev,"VXLAN acceleration disabled\n" ); } +static unsigned int xgbe_get_fc_queue_count (struct xgbe_prv_data *pdata) +{ +unsigned int max_q_count =XGMAC_MAX_FLOW_CONTROL_QUEUES ; + +/* From MAC ver 30H the TFCR is per priority, instead of per queue */ +if (XGMAC_GET_BITS (pdata->hw_feat.version,MAC_VR ,SNPSVER ) >=0x30 ) +return max_q_count; +else + return min_t(unsigned int, pdata->tx_q_count, max_q_count); +} +static int xgbe_disable_tx_flow_control (struct xgbe_prv_data *pdata) { -unsigned int max_q_count, q_count;unsigned int reg, reg_val; -unsigned int i; +unsigned int i, q_count;/* Clear MTL flow control */ for (i =0 ; i < pdata->rx_q_count; i++)XGMAC_MTL_IOWRITE_BITS (pdata, i,MTL_Q_RQOMR ,EHFC ,0 );/* Clear MAC flow control */ - max_q_count =XGMAC_MAX_FLOW_CONTROL_QUEUES ; - q_count = min_t(unsigned int, pdata->tx_q_count, max_q_count); + q_count =xgbe_get_fc_queue_count (pdata); reg =MAC_Q0TFCR ;for (i =0 ; i < q_count; i++) { reg_val =XGMAC_IOREAD (pdata, reg);
@@ -553,9 +562,8 @@ static int xgbe_enable_tx_flow_control(struct xgbe_prv_data *pdata) {struct ieee_pfc *pfc = pdata->pfc;struct ieee_ets *ets = pdata->ets; -unsigned int max_q_count, q_count;unsigned int reg, reg_val; -unsigned int i; +unsigned int i, q_count;/* Set MTL flow control */ for (i =0 ; i < pdata->rx_q_count; i++) {
@@ -579,8 +587,7 @@ static int xgbe_enable_tx_flow_control(struct xgbe_prv_data *pdata) }/* Set MAC flow control */ - max_q_count =XGMAC_MAX_FLOW_CONTROL_QUEUES ; - q_count = min_t(unsigned int, pdata->tx_q_count, max_q_count); + q_count =xgbe_get_fc_queue_count (pdata); reg =MAC_Q0TFCR ;for (i =0 ; i < q_count; i++) { reg_val =XGMAC_IOREAD (pdata, reg);
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +24 -0
@@ -496,6 +496,7 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata, reg |=XGBE_KR_TRAINING_ENABLE ; reg |=XGBE_KR_TRAINING_START ;XMDIO_WRITE (pdata,MDIO_MMD_PMAPMD ,MDIO_PMA_10GBR_PMD_CTRL , reg); + pdata->kr_start_time = jiffies;netif_dbg (pdata, link, pdata->netdev,"KR training initiated\n" );
@@ -632,6 +633,8 @@ static enum xgbe_an xgbe_an73_incompat_link(struct xgbe_prv_data *pdata)xgbe_switch_mode (pdata); + pdata->an_result =XGBE_AN_READY ; +xgbe_an_restart (pdata);return XGBE_AN_INCOMPAT_LINK ;
@@ -1275,9 +1278,30 @@ static bool xgbe_phy_aneg_done(struct xgbe_prv_data *pdata)static void xgbe_check_link_timeout (struct xgbe_prv_data *pdata) {unsigned long link_timeout; +unsigned long kr_time; +int wait; link_timeout = pdata->link_check + (XGBE_LINK_TIMEOUT *HZ );if (time_after (jiffies, link_timeout)) { +if ((xgbe_cur_mode (pdata) ==XGBE_MODE_KR ) && + pdata->phy.autoneg ==AUTONEG_ENABLE ) { +/* AN restart should not happen while KR training is in progress. +* The while loop ensures no AN restart during KR training, +* waits up to 500ms and AN restart is triggered only if KR +* training is failed. +*/ + wait =XGBE_KR_TRAINING_WAIT_ITER ; +while (wait--) { + kr_time = pdata->kr_start_time + +msecs_to_jiffies (XGBE_AN_MS_TIMEOUT ); +if (time_after (jiffies, kr_time)) +break ; +/* AN restart is not required, if AN result is COMPLETE */ +if (pdata->an_result ==XGBE_AN_COMPLETE ) +return ; +usleep_range (10000 ,11000 ); + } + }netif_dbg (pdata, link, pdata->netdev,"AN link timeout\n" );xgbe_phy_config_aneg (pdata); }
drivers/net/ethernet/amd/xgbe/xgbe.h +2 -0
@@ -290,6 +290,7 @@/* Auto-negotiation */ #define XGBE_AN_MS_TIMEOUT 500#define XGBE_LINK_TIMEOUT 5 +#define XGBE_KR_TRAINING_WAIT_ITER 50#define XGBE_SGMII_AN_LINK_STATUS BIT(1)#define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))
@@ -1266,6 +1267,7 @@ struct xgbe_prv_data {unsigned int parallel_detect;unsigned int fec_ability;unsigned long an_start; +unsigned long kr_start_time;enum xgbe_an_mode an_mode;/* I2C support */
drivers/net/ethernet/apm/xgene/xgene_enet_main.h +1 -1
@@ -18,6 +18,7 @@#include <linux/of_platform.h> #include <linux/of_net.h> #include <linux/of_mdio.h> +#include <linux/mdio/mdio-xgene.h> #include <linux/module.h> #include <net/ip.h> #include <linux/prefetch.h>
@@ -26,7 +27,6 @@#include "xgene_enet_hw.h" #include "xgene_enet_cle.h" #include "xgene_enet_ring2.h" -#include "../../../phy/mdio-xgene.h" #define XGENE_DRV_VERSION "v1.0"#define ETHER_MIN_PACKET 64
drivers/net/ethernet/broadcom/tg3.c +4 -4
@@ -11195,7 +11195,7 @@ static void tg3_reset_task(struct work_struct *work)rtnl_lock ();tg3_full_lock (tp,0 ); -if (!netif_running (tp->dev)) { +if (tp->pcierr_recovery || !netif_running (tp->dev)) {tg3_flag_clear (tp,RESET_TASK_PENDING );tg3_full_unlock (tp);rtnl_unlock ();
@@ -18187,6 +18187,9 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,netdev_info (netdev,"PCI I/O error detected\n" ); +/* Want to make sure that the reset task doesn't run */ +tg3_reset_task_cancel (tp); +rtnl_lock ();/* Could be second call or maybe we don't have netdev yet */
@@ -18203,9 +18206,6 @@ static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,tg3_timer_stop (tp); -/* Want to make sure that the reset task doesn't run */ -tg3_reset_task_cancel (tp); -netif_device_detach (netdev);/* Clean up software state, even if MMIO is blocked */
drivers/net/ethernet/cadence/macb_main.c +1 -8
@@ -1752,7 +1752,6 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)bool cloned =skb_cloned (*skb) ||skb_header_cloned (*skb) ||skb_is_nonlinear (*skb);int padlen =ETH_ZLEN - (*skb)->len; -int headroom =skb_headroom (*skb);int tailroom =skb_tailroom (*skb);struct sk_buff *nskb;u32 fcs;
@@ -1766,9 +1765,6 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)/* FCS could be appeded to tailroom. */ if (tailroom >=ETH_FCS_LEN ) goto add_fcs; -/* FCS could be appeded by moving data to headroom. */ -else if (!cloned && headroom + tailroom >=ETH_FCS_LEN ) - padlen =0 ;/* No room for FCS, need to reallocate skb. */ else padlen =ETH_FCS_LEN ;
@@ -1777,10 +1773,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev) padlen +=ETH_FCS_LEN ; } -if (!cloned && headroom + tailroom >= padlen) { - (*skb)->data =memmove ((*skb)->head, (*skb)->data, (*skb)->len); -skb_set_tail_pointer (*skb, (*skb)->len); - }else { +if (cloned || tailroom < padlen) { nskb =skb_copy_expand (*skb,0 , padlen,GFP_ATOMIC );if (!nskb)return -ENOMEM ;
drivers/net/ethernet/mellanox/mlx5/core/main.c +4 -4
@@ -1640,7 +1640,7 @@ static void mlx5_core_verify_params(void) } } -static int __init init (void ) +static int __init mlx5_init (void ) {int err;
@@ -1665,7 +1665,7 @@ static int __init init(void)return err; } -static void __exit cleanup(void) +static void __exit mlx5_cleanup(void) {#ifdef CONFIG_MLX5_CORE_EN mlx5e_cleanup ();
@@ -1674,5 +1674,5 @@ static void __exit cleanup(void)mlx5_unregister_debugfs (); } -module_init (init); -module_exit (cleanup); +module_init (mlx5_init); +module_exit (mlx5_cleanup);
drivers/net/ethernet/renesas/ravb_main.c +2 -2
@@ -736,14 +736,14 @@ static void ravb_error_interrupt(struct net_device *ndev)ravb_write (ndev, ~(EIS_QFS |EIS_RESERVED ),EIS );if (eis &EIS_QFS ) { ris2 =ravb_read (ndev,RIS2 ); -ravb_write (ndev, ~(RIS2_QFF0 |RIS2_RFFF |RIS2_RESERVED ), +ravb_write (ndev, ~(RIS2_QFF0 |RIS2_QFF1 |RIS2_RFFF |RIS2_RESERVED ),RIS2 );/* Receive Descriptor Empty int */ if (ris2 &RIS2_QFF0 ) priv->stats[RAVB_BE ].rx_over_errors++; -/* Receive Descriptor Empty int */ +/* Receive Descriptor Empty int */ if (ris2 &RIS2_QFF1 ) priv->stats[RAVB_NC ].rx_over_errors++;
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +5 -0
@@ -998,6 +998,11 @@ static int stmmac_init_phy(struct net_device *dev)int addr = priv->plat->phy_addr;struct phy_device *phydev; +if (addr <0 ) { +netdev_err (priv->dev,"no phy found\n" ); +return -ENODEV ; + } + phydev =mdiobus_get_phy (priv->mii, addr);if (!phydev) {netdev_err (priv->dev,"no phy at addr %d\n" , addr);
drivers/net/phy/mdio-i2c.c +1 -2
@@ -10,10 +10,9 @@* of their settings. */ #include <linux/i2c.h> +#include <linux/mdio/mdio-i2c.h> #include <linux/phy.h> -#include "mdio-i2c.h" -/* * I2C bus addresses 0x50 and 0x51 are normally an EEPROM, which is * specified to be present in SFP modules. These correspond with PHY
drivers/net/phy/mdio-i2c.h deleted +0 -16
@@ -1,16 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* -* MDIO I2C bridge -* -* Copyright (C) 2015 Russell King -*/ -#ifndef MDIO_I2C_H -#define MDIO_I2C_H - -struct device ; -struct i2c_adapter ; -struct mii_bus ; - -struct mii_bus *mdio_i2c_alloc (struct device *parent,struct i2c_adapter *i2c); - -#endif
drivers/net/phy/mdio-mux-meson-g12a.c +16 -7
@@ -4,6 +4,7 @@*/ #include <linux/bitfield.h> +#include <linux/delay.h> #include <linux/clk.h> #include <linux/clk-provider.h> #include <linux/device.h>
@@ -148,6 +149,7 @@ static const struct clk_ops g12a_ephy_pll_ops = {static int g12a_enable_internal_mdio (struct g12a_mdio_mux *priv) { +u32 value;int ret;/* Enable the phy clock */
@@ -161,18 +163,25 @@ static int g12a_enable_internal_mdio(struct g12a_mdio_mux *priv)/* Initialize ephy control */ writel (EPHY_G12A_ID , priv->regs +ETH_PHY_CNTL0 ); -writel (FIELD_PREP (PHY_CNTL1_ST_MODE ,3 ) | -FIELD_PREP (PHY_CNTL1_ST_PHYADD ,EPHY_DFLT_ADD ) | -FIELD_PREP (PHY_CNTL1_MII_MODE ,EPHY_MODE_RMII ) | -PHY_CNTL1_CLK_EN | -PHY_CNTL1_CLKFREQ | -PHY_CNTL1_PHY_ENB , - priv->regs +ETH_PHY_CNTL1 ); + +/* Make sure we get a 0 -> 1 transition on the enable bit */ + value =FIELD_PREP (PHY_CNTL1_ST_MODE ,3 ) | +FIELD_PREP (PHY_CNTL1_ST_PHYADD ,EPHY_DFLT_ADD ) | +FIELD_PREP (PHY_CNTL1_MII_MODE ,EPHY_MODE_RMII ) | +PHY_CNTL1_CLK_EN | +PHY_CNTL1_CLKFREQ ; +writel (value, priv->regs +ETH_PHY_CNTL1 );writel (PHY_CNTL2_USE_INTERNAL |PHY_CNTL2_SMI_SRC_MAC |PHY_CNTL2_RX_CLK_EPHY , priv->regs +ETH_PHY_CNTL2 ); + value |=PHY_CNTL1_PHY_ENB ; +writel (value, priv->regs +ETH_PHY_CNTL1 ); + +/* The phy needs a bit of time to power up */ +mdelay (10 ); +return 0 ; }
drivers/net/phy/mdio-xgene.c +1 -1
@@ -11,6 +11,7 @@#include <linux/efi.h> #include <linux/if_vlan.h> #include <linux/io.h> +#include <linux/mdio/mdio-xgene.h> #include <linux/module.h> #include <linux/of_platform.h> #include <linux/of_net.h>
@@ -18,7 +19,6 @@#include <linux/prefetch.h> #include <linux/phy.h> #include <net/ip.h> -#include "mdio-xgene.h" static bool xgene_mdio_status;
drivers/net/phy/mdio-xgene.h deleted +0 -130
130 lines not on this page · raw message
drivers/net/phy/mdio_bus.c +6 -1
@@ -117,7 +117,12 @@ EXPORT_SYMBOL(mdiobus_unregister_device);struct phy_device *mdiobus_get_phy (struct mii_bus *bus,int addr) { -struct mdio_device *mdiodev = bus->mdio_map[addr]; +struct mdio_device *mdiodev; + +if (addr <0 || addr >=ARRAY_SIZE (bus->mdio_map)) +return NULL ; + + mdiodev = bus->mdio_map[addr];if (!mdiodev)return NULL ;
drivers/net/phy/sfp.c +1 -1
@@ -7,6 +7,7 @@#include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/jiffies.h> +#include <linux/mdio/mdio-i2c.h> #include <linux/module.h> #include <linux/mutex.h> #include <linux/of.h>
@@ -16,7 +17,6 @@#include <linux/slab.h> #include <linux/workqueue.h> -#include "mdio-i2c.h" #include "sfp.h" #include "swphy.h"
drivers/net/usb/sr9700.c +1 -1
@@ -410,7 +410,7 @@ static int sr9700_rx_fixup(struct usbnet *dev, struct sk_buff *skb)/* ignore the CRC length */ len = (skb->data[1 ] | (skb->data[2 ] <<8 )) -4 ; -if (len >ETH_FRAME_LEN || len > skb->len) +if (len >ETH_FRAME_LEN || len > skb->len || len <0 )return 0 ;/* the last packet of current skb */
drivers/net/wan/fsl_ucc_hdlc.c +4 -2
@@ -1249,9 +1249,11 @@ static int ucc_hdlc_probe(struct platform_device *pdev) free_dev:free_netdev (dev); undo_uhdlc_init: -iounmap (utdm->siram); +if (utdm) +iounmap (utdm->siram); unmap_si_regs: -iounmap (utdm->si_regs); +if (utdm) +iounmap (utdm->si_regs); free_utdm:if (uhdlc_priv->tsa)kfree (utdm);
drivers/net/wireless/rndis_wlan.c +6 -13
@@ -700,8 +700,8 @@ static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len)struct rndis_query *get;struct rndis_query_c *get_c; } u; -int ret, buflen; -int resplen, respoffs, copylen; +int ret; +size_t buflen, resplen, respoffs, copylen; buflen = *len +sizeof (*u.get);if (buflen <CONTROL_BUFFER_SIZE )
@@ -736,22 +736,15 @@ static int rndis_query_oid(struct usbnet *dev, u32 oid, void *data, int *len)if (respoffs > buflen) {/* Device returned data offset outside buffer, error. */ -netdev_dbg (dev->net,"%s(%s): received invalid " -"data offset: %d > %d\n" , __func__, -oid_to_string (oid), respoffs, buflen); +netdev_dbg (dev->net, +"%s(%s): received invalid data offset: %zu > %zu\n" , + __func__,oid_to_string (oid), respoffs, buflen); ret = -EINVAL ; goto exit_unlock; } -if ((resplen + respoffs) > buflen) { -/* Device would have returned more data if buffer would -* have been big enough. Copy just the bits that we got. -*/ - copylen = buflen - respoffs; - }else { - copylen = resplen; - } + copylen =min (resplen, buflen - respoffs);if (copylen > *len) copylen = *len;
drivers/phy/rockchip/phy-rockchip-inno-usb2.c +3 -1
@@ -467,8 +467,10 @@ static int rockchip_usb2phy_power_on(struct phy *phy)return ret; ret =property_enable (base, &rport->port_cfg->phy_sus, false); -if (ret) +if (ret) { +clk_disable_unprepare (rphy->clk480m);return ret; + }/* waiting for the utmi_clk to become stable */ usleep_range (1500 ,2000 );
drivers/platform/x86/asus-nb-wmi.c +1 -0
@@ -528,6 +528,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x30, { KEY_VOLUMEUP } }, { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, { KE_KEY, 0x32, { KEY_MUTE } }, + { KE_KEY, 0x33, { KEY_SCREENLOCK } }, { KE_KEY, 0x35, { KEY_SCREENLOCK } }, { KE_KEY, 0x40, { KEY_PREVIOUSSONG } }, { KE_KEY, 0x41, { KEY_NEXTSONG } },
drivers/platform/x86/touchscreen_dmi.c +25 -0
@@ -169,6 +169,23 @@ static const struct ts_dmi_data connect_tablet9_data = { .properties = connect_tablet9_props, }; +static const struct property_entry csl_panther_tab_hd_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,1 ), +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,20 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1980 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1526 ), +PROPERTY_ENTRY_BOOL ("touchscreen-inverted-y" ), +PROPERTY_ENTRY_BOOL ("touchscreen-swapped-x-y" ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl1680-csl-panther-tab-hd.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), + { } +}; + +static const struct ts_dmi_data csl_panther_tab_hd_data = { + .acpi_name ="MSSL1680:00" , + .properties = csl_panther_tab_hd_props, +}; +static const struct property_entry cube_iwork8_air_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,1 ),PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,3 ),
@@ -721,6 +738,14 @@ static const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"), }, }, + { +/* CSL Panther Tab HD */ + .driver_data = (void *)&csl_panther_tab_hd_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"CSL Computer GmbH & Co. KG" ), + DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"), + }, + }, {/* CUBE iwork8 Air */ .driver_data = (void *)&cube_iwork8_air_data,
drivers/scsi/hisi_sas/hisi_sas_main.c +1 -1
@@ -1397,7 +1397,7 @@ static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba) device->linkrate = phy->sas_phy.linkrate; hisi_hba->hw->setup_itct (hisi_hba, sas_dev); - }else + }else if (!port->port_attached) port->id =0xff ; } }
drivers/scsi/hpsa.c +1 -1
@@ -5810,7 +5810,7 @@ static int hpsa_scsi_host_alloc(struct ctlr_info *h) {struct Scsi_Host *sh; - sh =scsi_host_alloc (&hpsa_driver_template,sizeof (h)); + sh =scsi_host_alloc (&hpsa_driver_template,sizeof (struct ctlr_info ));if (sh ==NULL ) {dev_err (&h->pdev->dev,"scsi_host_alloc failed\n" );return -ENOMEM ;
drivers/spi/spidev.c +0 -2
@@ -588,7 +588,6 @@ static int spidev_open(struct inode *inode, struct file *filp)if (!spidev->tx_buffer) { spidev->tx_buffer =kmalloc (bufsiz,GFP_KERNEL );if (!spidev->tx_buffer) { -dev_dbg (&spidev->spi->dev,"open/ENOMEM\n" ); status = -ENOMEM ; goto err_find_dev; }
@@ -597,7 +596,6 @@ static int spidev_open(struct inode *inode, struct file *filp)if (!spidev->rx_buffer) { spidev->rx_buffer =kmalloc (bufsiz,GFP_KERNEL );if (!spidev->rx_buffer) { -dev_dbg (&spidev->spi->dev,"open/ENOMEM\n" ); status = -ENOMEM ; goto err_alloc_rx_buf; }
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +22 -6
@@ -43,11 +43,13 @@ static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone, int trip, int *temp) { struct int34x_thermal_zone *d = zone->devdata; -int i; +int i, ret =0 ;if (d->override_ops && d->override_ops->get_trip_temp)return d->override_ops->get_trip_temp (zone, trip, temp); +mutex_lock (&d->trip_mutex); +if (trip < d->aux_trip_nr) *temp = d->aux_trips[trip];else if (trip == d->crt_trip_id)
@@ -65,10 +67,12 @@ static int int340x_thermal_get_trip_temp(struct thermal_zone_device *zone, } }if (i ==INT340X_THERMAL_MAX_ACT_TRIP_COUNT ) -return -EINVAL ; + ret = -EINVAL ; } -return 0 ; +mutex_unlock (&d->trip_mutex); + +return ret; } static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone,
@@ -76,11 +80,13 @@ static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone, enum thermal_trip_type *type) {struct int34x_thermal_zone *d = zone->devdata; -int i; +int i, ret =0 ;if (d->override_ops && d->override_ops->get_trip_type)return d->override_ops->get_trip_type (zone, trip, type); +mutex_lock (&d->trip_mutex); +if (trip < d->aux_trip_nr) *type =THERMAL_TRIP_PASSIVE ;else if (trip == d->crt_trip_id)
@@ -98,10 +104,12 @@ static int int340x_thermal_get_trip_type(struct thermal_zone_device *zone, } }if (i ==INT340X_THERMAL_MAX_ACT_TRIP_COUNT ) -return -EINVAL ; + ret = -EINVAL ; } -return 0 ; +mutex_unlock (&d->trip_mutex); + +return ret; } static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone,
@@ -173,6 +181,8 @@ int int340x_thermal_read_trips(struct int34x_thermal_zone *int34x_zone)int trip_cnt = int34x_zone->aux_trip_nr;int i; +mutex_lock (&int34x_zone->trip_mutex); + int34x_zone->crt_trip_id =-1 ;if (!int340x_thermal_get_trip_config (int34x_zone->adev->handle,"_CRT" , &int34x_zone->crt_temp))
@@ -200,6 +210,8 @@ int int340x_thermal_read_trips(struct int34x_thermal_zone *int34x_zone) int34x_zone->act_trips[i].valid = true; } +mutex_unlock (&int34x_zone->trip_mutex); +return trip_cnt; }EXPORT_SYMBOL_GPL (int340x_thermal_read_trips);
@@ -223,6 +235,8 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,if (!int34x_thermal_zone)return ERR_PTR (-ENOMEM ); +mutex_init (&int34x_thermal_zone->trip_mutex); + int34x_thermal_zone->adev = adev; int34x_thermal_zone->override_ops = override_ops;
@@ -269,6 +283,7 @@ struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *adev,acpi_lpat_free_conversion_table (int34x_thermal_zone->lpat_table);kfree (int34x_thermal_zone->aux_trips); err_trip_alloc: +mutex_destroy (&int34x_thermal_zone->trip_mutex);kfree (int34x_thermal_zone);return ERR_PTR (ret); }
@@ -280,6 +295,7 @@ void int340x_thermal_zone_remove(struct int34x_thermal_zonethermal_zone_device_unregister (int34x_thermal_zone->zone);acpi_lpat_free_conversion_table (int34x_thermal_zone->lpat_table);kfree (int34x_thermal_zone->aux_trips); +mutex_destroy (&int34x_thermal_zone->trip_mutex);kfree (int34x_thermal_zone); }EXPORT_SYMBOL_GPL (int340x_thermal_zone_remove);
drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.h +1 -0
@@ -32,6 +32,7 @@ struct int34x_thermal_zone {struct thermal_zone_device_ops *override_ops;void *priv_data;struct acpi_lpat_conversion_table *lpat_table; +struct mutex trip_mutex; }; struct int34x_thermal_zone *int340x_thermal_zone_add(struct acpi_device *,
drivers/usb/gadget/function/f_fs.c +7 -0
@@ -278,6 +278,9 @@ static int __ffs_ep0_queue_wait(struct ffs_data *ffs, char *data, size_t len)struct usb_request *req = ffs->ep0req;int ret; +if (!req) +return -EINVAL ; + req->zero = len <le16_to_cpu (ffs->ev.setup.wLength);spin_unlock_irq (&ffs->ev.waitq.lock);
@@ -1900,10 +1903,14 @@ static void functionfs_unbind(struct ffs_data *ffs)ENTER ();if (!WARN_ON (!ffs->gadget)) { +/* dequeue before freeing ep0req */ +usb_ep_dequeue (ffs->gadget->ep0, ffs->ep0req); +mutex_lock (&ffs->mutex);usb_ep_free_request (ffs->gadget->ep0, ffs->ep0req); ffs->ep0req =NULL ; ffs->gadget =NULL ;clear_bit (FFS_FL_BOUND , &ffs->flags); +mutex_unlock (&ffs->mutex);ffs_data_put (ffs); } }
drivers/usb/host/xhci-plat.c +1 -1
@@ -276,7 +276,7 @@ static int xhci_plat_probe(struct platform_device *pdev) *priv = *priv_match; } -device_wakeup_enable (hcd->self.controller); +device_set_wakeup_capable (&pdev->dev, true); xhci->main_hcd = hcd; xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
drivers/usb/host/xhci.c +1 -0
@@ -693,6 +693,7 @@ int xhci_run(struct usb_hcd *hcd)if (ret)xhci_free_command (xhci, command); } +set_bit (HCD_FLAG_DEFER_RH_REGISTER , &hcd->flags);xhci_dbg_trace (xhci, trace_xhci_dbg_init,"Finished xhci_run for USB2 roothub" );
drivers/w1/w1.c +5 -1
@@ -1131,6 +1131,8 @@ int w1_process(void *data)/* remainder if it woke up early */ unsigned long jremain =0 ; +atomic_inc (&dev->refcnt); +for (;;) {if (!jremain && dev->search_count) {
@@ -1158,8 +1160,10 @@ int w1_process(void *data)*/ mutex_unlock (&dev->list_mutex); -if (kthread_should_stop ()) +if (kthread_should_stop ()) { +__set_current_state (TASK_RUNNING );break ; + }/* Only sleep when the search is active. */ if (dev->search_count) {
drivers/w1/w1_int.c +2 -3
@@ -51,10 +51,9 @@ static struct w1_master *w1_alloc_dev(u32 id, int slave_count, int slave_ttl, dev->search_count = w1_search_count; dev->enable_pullup = w1_enable_pullup; -/* 1 for w1_process to decrement -* 1 for __w1_remove_master_device to decrement +/* For __w1_remove_master_device to decrement */ -atomic_set (&dev->refcnt,2 ); +atomic_set (&dev->refcnt,1 );INIT_LIST_HEAD (&dev->slist);INIT_LIST_HEAD (&dev->async_list);
fs/affs/file.c +1 -1
@@ -878,7 +878,7 @@ affs_truncate(struct inode *inode)if (inode->i_size >AFFS_I (inode)->mmu_private) {struct address_space *mapping = inode->i_mapping;struct page *page; -void *fsdata; +void *fsdata =NULL ;loff_t isize = inode->i_size;int res;
fs/cifs/smbdirect.c +1 -0
@@ -1478,6 +1478,7 @@ void smbd_destroy(struct TCP_Server_Info *server)destroy_workqueue (info->workqueue);log_rdma_event (INFO ,"rdma session destroyed\n" );kfree (info); + server->smbd_conn =NULL ; }/*
fs/nfsd/netns.h +3 -3
@@ -42,9 +42,6 @@ struct nfsd_net {bool grace_ended;time_t boot_time; -/* internal mount of the "nfsd" pseudofilesystem: */ -struct vfsmount *nfsd_mnt; -struct dentry *nfsd_client_dir;/*
@@ -121,6 +118,9 @@ struct nfsd_net {wait_queue_head_t ntf_wq;atomic_t ntf_refcnt; +/* Allow umount to wait for nfsd state cleanup */ +struct completion nfsd_shutdown_complete; +/* * clientid and stateid data for construction of net unique COPY * stateids.
fs/nfsd/nfs4state.c +1 -7
@@ -7754,14 +7754,9 @@ nfs4_state_start_net(struct net *net)struct nfsd_net *nn =net_generic (net, nfsd_net_id);int ret; - ret =get_nfsdfs (net); -if (ret) -return ret; ret =nfs4_state_create_net (net); -if (ret) { -mntput (nn->nfsd_mnt); +if (ret)return ret; - }locks_start_grace (net, &nn->nfsd4_manager);nfsd4_client_tracking_init (net);if (nn->track_reclaim_completes && nn->reclaim_str_hashtbl_size ==0 )
@@ -7830,7 +7825,6 @@ nfs4_state_shutdown_net(struct net *net)nfsd4_client_tracking_exit (net);nfs4_state_destroy_net (net); -mntput (nn->nfsd_mnt); }void
fs/nfsd/nfsctl.c +2 -12
@@ -1417,6 +1417,8 @@ static void nfsd_umount(struct super_block *sb) {struct net *net = sb->s_fs_info; +nfsd_shutdown_threads (net); +kill_litter_super (sb);put_net (net); }
@@ -1429,18 +1431,6 @@ static struct file_system_type nfsd_fs_type = { };MODULE_ALIAS_FS ("nfsd" ); -int get_nfsdfs (struct net *net) -{ -struct nfsd_net *nn =net_generic (net, nfsd_net_id); -struct vfsmount *mnt; - - mnt =vfs_kern_mount (&nfsd_fs_type,SB_KERNMOUNT ,"nfsd" ,NULL ); -if (IS_ERR (mnt)) -return PTR_ERR (mnt); - nn->nfsd_mnt = mnt; -return 0 ; -} -#ifdef CONFIG_PROC_FS static int create_proc_exports_entry (void ) {
fs/nfsd/nfsd.h +1 -2
@@ -84,11 +84,10 @@ int nfsd_get_nrthreads(int n, int *, struct net *);int nfsd_set_nrthreads (int n,int *,struct net *);int nfsd_pool_stats_open (struct inode *,struct file *);int nfsd_pool_stats_release (struct inode *,struct file *); +void nfsd_shutdown_threads (struct net *net);void nfsd_destroy (struct net *net); -int get_nfsdfs (struct net *); -struct nfsdfs_client {struct kref cl_ref;void (*cl_release)(struct kref *kref);
fs/nfsd/nfssvc.c +34 -1
@@ -594,6 +594,37 @@ static const struct svc_serv_ops nfsd_thread_sv_ops = { .svo_module = THIS_MODULE, }; +static void nfsd_complete_shutdown (struct net *net) +{ +struct nfsd_net *nn =net_generic (net, nfsd_net_id); + +WARN_ON (!mutex_is_locked (&nfsd_mutex)); + + nn->nfsd_serv =NULL ; +complete (&nn->nfsd_shutdown_complete); +} + +void nfsd_shutdown_threads (struct net *net) +{ +struct nfsd_net *nn =net_generic (net, nfsd_net_id); +struct svc_serv *serv; + +mutex_lock (&nfsd_mutex); + serv = nn->nfsd_serv; +if (serv ==NULL ) { +mutex_unlock (&nfsd_mutex); +return ; + } + +svc_get (serv); +/* Kill outstanding nfsd threads */ + serv->sv_ops->svo_setup (serv,NULL ,0 ); +nfsd_destroy (net); +mutex_unlock (&nfsd_mutex); +/* Wait for shutdown of nfsd_serv to complete */ +wait_for_completion (&nn->nfsd_shutdown_complete); +} +int nfsd_create_serv (struct net *net) {int error;
@@ -611,11 +642,13 @@ int nfsd_create_serv(struct net *net) &nfsd_thread_sv_ops);if (nn->nfsd_serv ==NULL )return -ENOMEM ; +init_completion (&nn->nfsd_shutdown_complete); nn->nfsd_serv->sv_maxconn = nn->max_connections; error =svc_bind (nn->nfsd_serv, net);if (error <0 ) {svc_destroy (nn->nfsd_serv); +nfsd_complete_shutdown (net);return error; }
@@ -664,7 +697,7 @@ void nfsd_destroy(struct net *net)svc_shutdown_net (nn->nfsd_serv, net);svc_destroy (nn->nfsd_serv);if (destroy) - nn->nfsd_serv =NULL ; +nfsd_complete_shutdown (net); }int nfsd_set_nrthreads (int n,int *nthreads,struct net *net)
fs/proc/proc_sysctl.c +33 -0
@@ -14,6 +14,7 @@#include <linux/mm.h> #include <linux/module.h> #include <linux/bpf-cgroup.h> +#include <linux/kmemleak.h> #include "internal.h" static const struct dentry_operations proc_sys_dentry_operations;
@@ -1397,6 +1398,38 @@ struct ctl_table_header *register_sysctl(const char *path, struct ctl_table *tab }EXPORT_SYMBOL (register_sysctl); +/** +* __register_sysctl_init() - register sysctl table to path +* @path: path name for sysctl base +* @table: This is the sysctl table that needs to be registered to the path +* @table_name: The name of sysctl table, only used for log printing when +* registration fails +* +* The sysctl interface is used by userspace to query or modify at runtime +* a predefined value set on a variable. These variables however have default +* values pre-set. Code which depends on these variables will always work even +* if register_sysctl() fails. If register_sysctl() fails you'd just loose the +* ability to query or modify the sysctls dynamically at run time. Chances of +* register_sysctl() failing on init are extremely low, and so for both reasons +* this function does not return any error as it is used by initialization code. +* +* Context: Can only be called after your respective sysctl base path has been +* registered. So for instance, most base directories are registered early on +* init before init levels are processed through proc_sys_init() and +* sysctl_init(). +*/ +void __init __register_sysctl_init (const char *path,struct ctl_table *table, +const char *table_name) +{ +struct ctl_table_header *hdr =register_sysctl (path, table); + +if (unlikely (!hdr)) { +pr_err ("failed when register_sysctl %s to %s\n" , table_name, path); +return ; + } +kmemleak_not_leak (hdr); +} +static char *append_path (const char *path,char *pos,const char *name) {int namelen;
fs/reiserfs/super.c +0 -6
@@ -1437,7 +1437,6 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)unsigned long safe_mask =0 ;unsigned int commit_max_age = (unsigned int )-1 ;struct reiserfs_journal *journal =SB_JOURNAL (s); -char *new_opts;int err;char *qf_names[REISERFS_MAXQUOTAS ];unsigned int qfmt =0 ;
@@ -1445,10 +1444,6 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg)int i;#endif - new_opts =kstrdup (arg,GFP_KERNEL ); -if (arg && !new_opts) -return -ENOMEM ; -sync_filesystem (s);reiserfs_write_lock (s);
@@ -1599,7 +1594,6 @@ static int reiserfs_remount(struct super_block *s, int *mount_flags, char *arg) out_err_unlock:reiserfs_write_unlock (s); out_err: -kfree (new_opts);return err; }
include/linux/clk.h +109 -0
133 lines not on this page · raw message
include/linux/kernel.h +1 -0
@@ -321,6 +321,7 @@ extern long (*panic_blink)(int state); __printf(1, 2)void panic (const char *fmt, ...)__noreturn __cold ;void nmi_panic (struct pt_regs *regs,const char *msg); +void check_panic_on_warn (const char *origin);extern void oops_enter (void );extern void oops_exit (void );void print_oops_end_marker (void );
include/linux/mdio/mdio-i2c.h new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* MDIO I2C bridge +* +* Copyright (C) 2015 Russell King +*/ +#ifndef MDIO_I2C_H +#define MDIO_I2C_H + +struct device ; +struct i2c_adapter ; +struct mii_bus ; + +struct mii_bus *mdio_i2c_alloc (struct device *parent,struct i2c_adapter *i2c); + +#endif
include/linux/mdio/mdio-xgene.h new file +130 -0
130 lines not on this page · raw message
include/linux/sched/task.h +1 -0
@@ -51,6 +51,7 @@ extern int sched_fork(unsigned long clone_flags, struct task_struct *p);extern void sched_dead (struct task_struct *p);void __noreturn do_task_dead (void ); +void __noreturn make_task_dead (int signr);extern void proc_caches_init (void );
include/linux/sysctl.h +3 -0
@@ -208,6 +208,9 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,void unregister_sysctl_table (struct ctl_table_header * table);extern int sysctl_init (void ); +extern void __register_sysctl_init (const char *path,struct ctl_table *table, +const char *table_name); +#define register_sysctl_init (path, table) __register_sysctl_init(path, table, #table)extern struct ctl_table sysctl_mount_point[];
include/net/sch_generic.h +7 -0
@@ -1334,4 +1334,11 @@ static inline void skb_tc_reinsert(struct sk_buff *skb, struct tcf_result *res) qstats_overlimit_inc(res->qstats); } +/* Make sure qdisc is no longer in SCHED state. */ +static inline void qdisc_synchronize (const struct Qdisc *q) +{ +while (test_bit (__QDISC_STATE_SCHED, &q->state)) +msleep (1 ); +} +#endif
include/net/sock.h +1 -1
@@ -300,7 +300,7 @@ struct bpf_sk_storage;* @sk_tskey: counter to disambiguate concurrent tstamp requests * @sk_zckey: counter to order MSG_ZEROCOPY notifications * @sk_socket: Identd and reporting IO signals -* @sk_user_data: RPC layer private data +* @sk_user_data: RPC layer private data. Write-protected by @sk_callback_lock. * @sk_frag: cached page frag * @sk_peek_off: current peek_offset value * @sk_send_head: front of stuff to transmit
include/uapi/linux/netfilter/nf_conntrack_sctp.h +1 -1
@@ -15,7 +15,7 @@ enum sctp_conntrack {SCTP_CONNTRACK_SHUTDOWN_RECD ,SCTP_CONNTRACK_SHUTDOWN_ACK_SENT ,SCTP_CONNTRACK_HEARTBEAT_SENT , -SCTP_CONNTRACK_HEARTBEAT_ACKED , +SCTP_CONNTRACK_HEARTBEAT_ACKED ,/* no longer used */ SCTP_CONNTRACK_MAX };
include/uapi/linux/netfilter/nfnetlink_cttimeout.h +1 -1
@@ -94,7 +94,7 @@ enum ctattr_timeout_sctp {CTA_TIMEOUT_SCTP_SHUTDOWN_RECD ,CTA_TIMEOUT_SCTP_SHUTDOWN_ACK_SENT ,CTA_TIMEOUT_SCTP_HEARTBEAT_SENT , -CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED , +CTA_TIMEOUT_SCTP_HEARTBEAT_ACKED ,/* no longer used */ __CTA_TIMEOUT_SCTP_MAX };#define CTA_TIMEOUT_SCTP_MAX (__CTA_TIMEOUT_SCTP_MAX - 1)
kernel/bpf/verifier.c +3 -1
@@ -1924,7 +1924,9 @@ static int check_stack_write(struct bpf_verifier_env *env,bool sanitize = reg &&is_spillable_regtype (reg->type);for (i =0 ; i < size; i++) { -if (state->stack[spi].slot_type[i] ==STACK_INVALID ) { +u8 type = state->stack[spi].slot_type[i]; + +if (type !=STACK_MISC && type !=STACK_ZERO ) { sanitize = true;break ; }
kernel/exit.c +72 -0
90 lines not on this page · raw message
kernel/module.c +21 -5
@@ -3654,7 +3654,8 @@ static bool finished_loading(const char *name)sched_annotate_sleep ();mutex_lock (&module_mutex); mod =find_module_all (name,strlen (name), true); - ret = !mod || mod->state ==MODULE_STATE_LIVE ; + ret = !mod || mod->state ==MODULE_STATE_LIVE + || mod->state ==MODULE_STATE_GOING ;mutex_unlock (&module_mutex);return ret;
@@ -3820,20 +3821,35 @@ static int add_unformed_module(struct module *mod) mod->state =MODULE_STATE_UNFORMED ; -again:mutex_lock (&module_mutex); old =find_module_all (mod->name,strlen (mod->name), true);if (old !=NULL ) { -if (old->state !=MODULE_STATE_LIVE ) { +if (old->state ==MODULE_STATE_COMING + || old->state ==MODULE_STATE_UNFORMED ) {/* Wait in case it fails to load. */ mutex_unlock (&module_mutex); err =wait_event_interruptible (module_wq,finished_loading (mod->name));if (err) goto out_unlocked; - goto again; + +/* The module might have gone in the meantime. */ +mutex_lock (&module_mutex); + old =find_module_all (mod->name,strlen (mod->name), + true); } - err = -EEXIST ; + +/* +* We are here only when the same module was being loaded. Do +* not try to load it again right now. It prevents long delays +* caused by serialized module load failures. It might happen +* when more devices of the same type trigger load of +* a particular module. +*/ +if (old && old->state ==MODULE_STATE_LIVE ) + err = -EEXIST ; +else + err = -EBUSY ; goto out; }mod_update_bounds (mod);
kernel/panic.c +65 -10
87 lines not on this page · raw message
net/netfilter/nf_conntrack_proto_sctp.c +55 -63
118 lines not on this page · raw message
net/netfilter/nf_conntrack_proto_tcp.c +10 -0
Lines of this file are not shown. View the raw message.
net/netfilter/nf_conntrack_standalone.c +0 -8
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/prog_tests/jeq_infer_not_null.c deleted +0 -9
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/progs/jeq_infer_not_null_fail.c deleted +0 -42
42 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.