Linux 5.10.234
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.234 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm64/boot/dts/rockchip/px30.dtsi | 8 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 20 ++++ arch/m68k/fpsp040/skeleton.S | 3 arch/m68k/kernel/entry.S | 2 arch/m68k/kernel/traps.c | 2 arch/riscv/kernel/traps.c | 6 - arch/x86/include/asm/special_insns.h | 2 arch/x86/xen/xen-asm.S | 2 block/genhd.c | 13 +- drivers/acpi/resource.c | 18 +++ drivers/block/loop.c | 8 - drivers/block/virtio_blk.c | 2 drivers/block/xen-blkfront.c | 2 drivers/gpio/gpiolib-cdev.c | 2 drivers/gpu/drm/amd/display/dc/dc.h | 2 drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h | 8 + drivers/gpu/drm/bridge/adv7511/adv7511.h | 1 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 +-- drivers/gpu/drm/bridge/adv7511/adv7533.c | 38 ++----- drivers/gpu/drm/drm_mipi_dsi.c | 81 ++++++++++++++++ drivers/gpu/drm/radeon/radeon_gem.c | 2 drivers/gpu/drm/v3d/v3d_irq.c | 12 ++ drivers/i2c/busses/i2c-rcar.c | 20 +++- drivers/i2c/muxes/i2c-demux-pinctrl.c | 4 drivers/iio/adc/at91_adc.c | 2 drivers/iio/adc/rockchip_saradc.c | 2 drivers/iio/adc/ti-ads124s08.c | 4 drivers/iio/adc/ti-ads8688.c | 2 drivers/iio/dummy/iio_simple_dummy_buffer.c | 2 drivers/iio/gyro/fxas21002c_core.c | 9 + drivers/iio/imu/inv_icm42600/inv_icm42600.h | 1 drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 18 +++ drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c | 3 drivers/iio/imu/kmx61.c | 2 drivers/iio/inkern.c | 2 drivers/iio/light/vcnl4035.c | 2 drivers/iio/pressure/zpa2326.c | 2 drivers/infiniband/hw/hns/hns_roce_main.c | 1 drivers/infiniband/hw/hns/hns_roce_srq.c | 6 - drivers/input/joystick/xpad.c | 2 drivers/input/keyboard/atkbd.c | 2 drivers/irqchip/irq-gic-v3.c | 2 drivers/irqchip/irq-sunxi-nmi.c | 3 drivers/md/dm-ebs-target.c | 2 drivers/md/dm-thin.c | 5 - drivers/md/persistent-data/dm-array.c | 19 ++- drivers/md/raid5.c | 14 +- drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 19 --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 5 - drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 95 +++++++++++++++---- drivers/net/ethernet/netronome/nfp/bpf/offload.c | 3 drivers/net/ethernet/ti/cpsw_ale.c | 14 +- drivers/net/gtp.c | 42 +++++--- drivers/net/ieee802154/ca8210.c | 6 + drivers/net/wireless/intel/iwlwifi/dvm/rs.c | 7 + drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 9 + drivers/nvme/host/core.c | 5 - drivers/nvme/target/io-cmd-bdev.c | 2 drivers/pci/controller/pci-host-common.c | 4 drivers/pci/probe.c | 20 ++-- drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 53 ++++++++-- drivers/phy/broadcom/phy-brcm-usb-init.h | 1 drivers/phy/broadcom/phy-brcm-usb.c | 8 + drivers/scsi/scsi_transport_iscsi.c | 4 drivers/scsi/sd.c | 9 - drivers/scsi/sg.c | 2 drivers/staging/iio/frequency/ad9832.c | 2 drivers/staging/iio/frequency/ad9834.c | 2 drivers/usb/class/usblp.c | 7 - drivers/usb/core/hub.c | 6 - drivers/usb/core/port.c | 7 - drivers/usb/dwc3/core.h | 1 drivers/usb/dwc3/gadget.c | 4 drivers/usb/gadget/function/f_fs.c | 2 drivers/usb/host/xhci-pci.c | 4 drivers/usb/serial/cp210x.c | 1 drivers/usb/serial/option.c | 4 drivers/usb/serial/quatech2.c | 2 drivers/usb/storage/unusual_devs.h | 7 + drivers/vfio/platform/vfio_platform_common.c | 10 ++ fs/afs/afs.h | 2 fs/afs/afs_vl.h | 1 fs/afs/vl_alias.c | 8 + fs/afs/vlclient.c | 2 fs/ceph/mds_client.c | 9 - fs/exfat/dir.c | 3 fs/file.c | 1 fs/gfs2/file.c | 1 fs/hfs/super.c | 4 fs/jbd2/commit.c | 4 fs/nfsd/filecache.c | 18 ++- fs/nfsd/filecache.h | 1 fs/ocfs2/quota_global.c | 2 fs/ocfs2/quota_local.c | 10 -- fs/proc/vmcore.c | 2 include/drm/drm_mipi_dsi.h | 4 include/linux/blk-cgroup.h | 6 + include/linux/genhd.h | 3 include/linux/hrtimer.h | 1 include/linux/mlx5/device.h | 2 include/linux/mlx5/fs.h | 2 include/linux/poll.h | 10 +- include/linux/seccomp.h | 2 include/linux/usb.h | 3 include/linux/usb/hcd.h | 2 include/net/inet_connection_sock.h | 2 include/net/net_namespace.h | 3 include/net/netfilter/nf_tables.h | 2 kernel/cpu.c | 2 kernel/gen_kheaders.sh | 1 kernel/time/hrtimer.c | 11 ++ mm/vmalloc.c | 3 net/802/psnap.c | 4 net/bluetooth/rfcomm/sock.c | 14 +- net/core/filter.c | 30 +++--- net/core/net_namespace.c | 83 ++++++++++------ net/dccp/ipv6.c | 2 net/ipv4/fou.c | 2 net/ipv4/ip_tunnel.c | 2 net/ipv6/route.c | 2 net/ipv6/tcp_ipv6.c | 4 net/mac802154/iface.c | 4 net/netfilter/nf_conntrack_core.c | 5 - net/netfilter/nf_tables_api.c | 38 ++++++- net/netfilter/nft_dynset.c | 7 + net/sched/cls_flow.c | 3 net/sched/sch_ets.c | 2 net/sctp/sysctl.c | 9 + net/tls/tls_sw.c | 2 net/vmw_vsock/af_vsock.c | 15 +++ net/vmw_vsock/virtio_transport_common.c | 36 +++++-- scripts/sorttable.h | 10 +- sound/soc/codecs/Kconfig | 1 sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 sound/soc/samsung/Kconfig | 6 - 137 files changed, 813 insertions(+), 354 deletions(-)
Aharon Landau (1):
net/mlx5: Add priorities for counters in RDMA namespaces
Ahmad Fatoum (1):
drm: bridge: adv7511: use dev_err_probe in probe function
Akash M (1):
usb: gadget: f_fs: Remove WARN_ON in functionfs_bind
Al Cooper (1):
phy: usb: Add "wake on" functionality for newer Synopsis XHCI controllers
Al Viro (1):
m68k: Update ->thread.esp0 before calling syscall_trace() in ret_from_signal
Alex Williamson (1):
vfio/platform: check the bounds of read/write syscalls
Alvin Šipraga (1):
drm: bridge: adv7511: unregister cec i2c device after cec adapter
Andreas Gruenbacher (1):
gfs2: Truncate address space when flipping GFS2_DIF_JDATA flag
André Draszik (1):
usb: dwc3: gadget: fix writing NYET threshold
Anjaneyulu (1):
wifi: iwlwifi: add a few rate index validity checks
Antonio Pastor (1):
net: 802: LLC+SNAP OID:PID lookup on start of skb data
Anumula Murali Mohan Reddy (1):
cxgb4: Avoid removal of uninserted tid
Arnd Bergmann (1):
xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
Benjamin Coddington (1):
tls: Fix tls_sw_sendmsg error handling
Biju Das (1):
drm: adv7511: Fix use-after-free in adv7533_attach_dsi()
Carlos Song (1):
iio: gyro: fxas21002c: Fix missing data update in trigger handler
Charles Keepax (3):
ASoC: wm8994: Add depends on MFD core
ASoC: samsung: Add missing selects for MFD_WM8994
ASoC: samsung: Add missing depends on I2C
Chen-Yu Tsai (1):
ASoC: mediatek: disable buffer pre-allocation
Chengchang Tang (1):
RDMA/hns: Fix deadlock on SRQ async events.
Christoph Hellwig (4):
loop: let set_capacity_revalidate_and_notify update the bdev size
nvme: let set_capacity_revalidate_and_notify update the bdev size
sd: update the bdev size in sd_revalidate_disk
block: remove the update_bdev parameter to set_capacity_revalidate_and_notify
Chukun Pan (1):
USB: serial: option: add MeiG Smart SRM815
Dan Carpenter (1):
nfp: bpf: prevent integer overflow in nfp_bpf_event_output()
David Howells (2):
afs: Fix the maximum cell name length
kheaders: Ignore silly-rename files
Dennis Lam (1):
ocfs2: fix slab-use-after-free due to dangling pointer dqi_priv
Eric Dumazet (4):
net_sched: cls_flow: validate TCA_FLOW_RSHIFT attribute
net: add exit_batch_rtnl() method
gtp: use exit_batch_rtnl() method
ipv6: avoid possible NULL deref in rt6_uncached_list_flush_dev()
Eric W. Biederman (1):
signal/m68k: Use force_sigsegv(SIGSEGV) in fpsp040_die
Fabio Estevam (1):
iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()
Greg Kroah-Hartman (2):
Revert "usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null" Linux 5.10.234
Gui-Dong Han (1):
md/raid5: fix atomicity violation in raid5_cache_count
Hans de Goede (2):
ACPI: resource: Add TongFang GM5HG0A to irq1_edge_low_force_override[]
ACPI: resource: Add Asus Vivobook X1504VAP to irq1_level_low_skip_override[]Heiner Kallweit (1):
net: ethernet: xgbe: re-add aneg to supported features in PHY quirks
Ido Schimmel (1):
ipv4: ip_tunnel: Fix suspicious RCU usage warning in ip_tunnel_find()
Jack Greiner (1):
Input: xpad - add support for wooting two he (arm)
Jamal Hadi Salim (1):
net: sched: fix ets qdisc OOB Indexing
Jason Xing (1):
tcp/dccp: complete lockless accesses to sk->sk_max_ack_backlog
Javier Carrasco (6):
iio: pressure: zpa2326: fix information leak in triggered buffer
iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer
iio: light: vcnl4035: fix information leak in triggered buffer
iio: imu: kmx61: fix information leak in triggered buffer
iio: adc: ti-ads8688: fix information leak in triggered buffer
iio: adc: rockchip_saradc: fix information leak in triggered buffer
Jean-Baptiste Maneyrol (2):
iio: imu: inv_icm42600: fix spi burst write not supported
iio: imu: inv_icm42600: fix timestamps after suspend if sensor is on
Joe Hattori (2):
iio: adc: at91: call input_free_device() on allocated iio_dev
iio: inkern: call iio_device_put() only on mapped devices
Johan Hovold (1):
USB: serial: cp210x: add Phoenix Contact UPS Device
Johan Jonker (1):
arm64: dts: rockchip: add #power-domain-cells to power domain nodes
Joseph Qi (1):
ocfs2: correct return value of ocfs2_local_free_info()
Juergen Gross (2):
x86/asm: Make serialize() always_inline x86/xen: fix SLS mitigation in xen_hypercall_iret()
Jun Yan (1):
USB: usblp: return error when setting unsupported protocol
Justin Chen (3):
phy: usb: Toggle the PHY power during init
phy: usb: Use slow clock for wake enabled suspend
phy: usb: Fix clock imbalance for suspend/resume
Kai-Heng Feng (1):
USB: core: Disable LPM only for non-suspended ports
Keisuke Nishimura (1):
ieee802154: ca8210: Add missing check for kfifo_alloc() in ca8210_probe()
Koichiro Den (1):
hrtimers: Handle CPU state correctly on hotplug
Krister Johansen (1):
dm thin: make get_first_thin use rcu-safe list first function
Kuan-Wei Chiu (1):
scripts/sorttable: fix orc_sort_cmp() to maintain symmetry and transitivity
Kuniyuki Iwashima (2):
gtp: Use for_each_netdev_rcu() in gtp_genl_dump_pdp().
gtp: Destroy device along with udp socket's netns dismantle.
Leo Stone (1):
hfs: Sanity check the root record
Lianqin Hu (1):
usb: gadget: u_serial: Disable ep before setting port to null to fix the crash caused by port being null
Linus Walleij (1):
seccomp: Stub for !CONFIG_SECCOMP
Lizhi Xu (1):
mac802154: check local interfaces before deleting sdata list
Lubomir Rintel (1):
usb-storage: Add max sectors quirk for Nokia 208
Luis Chamberlain (1):
nvmet: propagate npwg topology
Luiz Augusto von Dentz (1):
Bluetooth: RFCOMM: Fix not validating setsockopt user input
Ma Ke (1):
usb: fix reference leak in usb_new_device()
Maor Gottlieb (1):
net/mlx5: Refactor mlx5_get_flow_namespace
Mark Pearson (1):
Input: atkbd - map F23 key to support default copilot shortcut
Matthew Wilcox (Oracle) (1):
vmalloc: fix accounting with i915
Matthieu Baerts (NGI0) (3):
sctp: sysctl: cookie_hmac_alg: avoid using current->nsproxy
sctp: sysctl: auth_enable: avoid using current->nsproxy
sctp: sysctl: rto_min/max: avoid using current->nsproxyMax Kellermann (1):
ceph: give up on paths longer than PATH_MAX
Maxime Ripard (3):
drm/mipi-dsi: Create devm device registration drm/mipi-dsi: Create devm device attachment drm/bridge: adv7533: Switch to devm MIPI-DSI helpers
Maíra Canal (2):
drm/v3d: Ensure job pointer is set to NULL after job completion drm/v3d: Assign job pointer to NULL before signaling the fence
Melissa Wen (1):
drm/amd/display: increase MAX_SURFACES to the value supported by hw
Michal Hrusecky (1):
USB: serial: option: add Neoway N723-EA support
Michal Luczaj (1):
bpf: Fix bpf_sk_select_reuseport() memory leak
Mikulas Patocka (1):
dm-ebs: don't set the flag DM_TARGET_PASSES_INTEGRITY
Ming-Hung Tsai (3):
dm array: fix releasing a faulty array block twice in dm_array_cursor_end dm array: fix unreleased btree blocks on closing a faulty array cursor dm array: fix cursor index when skipping across block boundaries
Nam Cao (1):
riscv: Fix sleeping in invalid context in die()
Nilton Perim Neto (1):
Input: xpad - add unofficial Xbox 360 wireless receiver clone
Oleg Nesterov (1):
poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
Pablo Neira Ayuso (3):
netfilter: nft_dynset: honor stateful expressions in set definition
netfilter: nf_tables: imbalance in flowtable binding
netfilter: conntrack: clamp maximum hashtable size to INT_MAX
Patrisious Haddad (1):
net/mlx5: Fix RDMA TX steering prio
Peter Geis (1):
arm64: dts: rockchip: add hevc power domain clock to rk3328
Philippe Simons (1):
irqchip/sunxi-nmi: Add missing SKIP_WAKE flag
Pierre-Eric Pelloux-Prayer (1):
drm/radeon: check bo_va->bo is non-NULL before using it
Qasim Ijaz (1):
USB: serial: quatech2: fix null-ptr-deref in qt2_process_read_urb()
Rik van Riel (1):
fs/proc: fix softlockup in __read_vmcore (part 2)
Roman Li (1):
drm/amd/display: Add check for granularity in dml ceil/floor helpers
Ron Economos (1):
Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals
Stefano Garzarella (4):
vsock/virtio: cancel close work in the destructor
vsock: reset socket state when de-assigning the transport vsock/virtio: discard packets if the transport changes
vsock: prevent null-ptr-deref in vsock_*[has_data|has_space]
Sudheer Kumar Doredla (1):
net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()
Suraj Sonawane (1):
scsi: sg: Fix slab-use-after-free read in sg_release()
Tejun Heo (1):
blk-cgroup: Fix UAF in blkcg_unpin_online()
Terry Tritton (1):
Revert "PCI: Use preserve_config in place of pci_flags"
Wang Liang (1):
net: fix data-races around sk->sk_forward_alloc
Willem de Bruijn (1):
fou: remove warn in gue_gro_receive on unsupported protocol
Wolfram Sang (2):
i2c: mux: demux-pinctrl: check initial mux selection, too
i2c: rcar: fix NACK handling when being a target
Xiang Zhang (1):
scsi: iscsi: Fix redundant response for ISCSI_UEVENT_GET_HOST_STATS request
Xu Wang (1):
drm: bridge: adv7511: Remove redundant null check before clk_disable_unprepare
Yajun Deng (1):
net: net_namespace: Optimize the code
Yogesh Lal (1):
irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
Youzhong Yang (1):
nfsd: add list_head nf_gc to struct nfsd_file
Yuezhang Mo (1):
exfat: fix the infinite loop in exfat_readdir()
Zhang Kunbo (1):
fs: fix missing declaration of init_files
Zhang Yi (1):
jbd2: flush filesystem device before updating tail sequence
Zhongqiu Duan (1):
tcp/dccp: allow a connection when sk_max_ack_backlog is zero
Zhongqiu Han (1):
gpiolib: cdev: Fix use after free in lineinfo_changed_notify
Zicheng Qu (2):
staging: iio: ad9834: Correct phase range check
staging: iio: ad9832: Correct phase range check
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 233 +SUBLEVEL = 234 EXTRAVERSION = NAME = Dare mighty things
arch/arm64/boot/dts/rockchip/px30.dtsi +8 -0
@@ -250,12 +250,14 @@ power-domain@PX30_PD_USB { <&cru HCLK_OTG>, <&cru SCLK_OTG_ADP>; pm_qos = <&qos_usb_host>, <&qos_usb_otg>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_SDCARD { reg = <PX30_PD_SDCARD>; clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>; pm_qos = <&qos_sdmmc>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_GMAC { reg = <PX30_PD_GMAC>;
@@ -264,6 +266,7 @@ power-domain@PX30_PD_GMAC { <&cru SCLK_MAC_REF>, <&cru SCLK_GMAC_RX_TX>; pm_qos = <&qos_gmac>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_MMC_NAND { reg = <PX30_PD_MMC_NAND>;
@@ -277,6 +280,7 @@ power-domain@PX30_PD_MMC_NAND { <&cru SCLK_SFC>; pm_qos = <&qos_emmc>, <&qos_nand>, <&qos_sdio>, <&qos_sfc>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_VPU { reg = <PX30_PD_VPU>;
@@ -284,6 +288,7 @@ power-domain@PX30_PD_VPU { <&cru HCLK_VPU>, <&cru SCLK_CORE_VPU>; pm_qos = <&qos_vpu>, <&qos_vpu_r128>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_VO { reg = <PX30_PD_VO>;
@@ -300,6 +305,7 @@ power-domain@PX30_PD_VO { <&cru SCLK_VOPB_PWM>; pm_qos = <&qos_rga_rd>, <&qos_rga_wr>, <&qos_vop_m0>, <&qos_vop_m1>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_VI { reg = <PX30_PD_VI>;
@@ -311,11 +317,13 @@ power-domain@PX30_PD_VI { pm_qos = <&qos_isp_128>, <&qos_isp_rd>, <&qos_isp_wr>, <&qos_isp_m1>, <&qos_vip>; + #power-domain-cells = <0>; }; power-domain@PX30_PD_GPU { reg = <PX30_PD_GPU>; clocks = <&cru SCLK_GPU>; pm_qos = <&qos_gpu>; + #power-domain-cells = <0>; }; }; };
arch/arm64/boot/dts/rockchip/rk3328.dtsi +4 -0
@@ -320,13 +320,17 @@ power: power-controller { power-domain@RK3328_PD_HEVC { reg = <RK3328_PD_HEVC>; + clocks = <&cru SCLK_VENC_CORE>; + #power-domain-cells = <0>; }; power-domain@RK3328_PD_VIDEO { reg = <RK3328_PD_VIDEO>; + #power-domain-cells = <0>; }; power-domain@RK3328_PD_VPU { reg = <RK3328_PD_VPU>; clocks = <&cru ACLK_VPU>, <&cru HCLK_VPU>; + #power-domain-cells = <0>; }; };
arch/arm64/boot/dts/rockchip/rk3399.dtsi +20 -0
@@ -1005,6 +1005,7 @@ power-domain@RK3399_PD_IEP { clocks = <&cru ACLK_IEP>, <&cru HCLK_IEP>; pm_qos = <&qos_iep>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_RGA { reg = <RK3399_PD_RGA>;
@@ -1012,12 +1013,14 @@ power-domain@RK3399_PD_RGA { <&cru HCLK_RGA>; pm_qos = <&qos_rga_r>, <&qos_rga_w>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_VCODEC { reg = <RK3399_PD_VCODEC>; clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; pm_qos = <&qos_video_m0>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_VDU { reg = <RK3399_PD_VDU>;
@@ -1027,6 +1030,7 @@ power-domain@RK3399_PD_VDU { <&cru SCLK_VDU_CORE>; pm_qos = <&qos_video_m1_r>, <&qos_video_m1_w>; + #power-domain-cells = <0>; }; /* These power domains are grouped by VD_GPU */
@@ -1034,53 +1038,63 @@ power-domain@RK3399_PD_GPU { reg = <RK3399_PD_GPU>; clocks = <&cru ACLK_GPU>; pm_qos = <&qos_gpu>; + #power-domain-cells = <0>; }; /* These power domains are grouped by VD_LOGIC */ power-domain@RK3399_PD_EDP { reg = <RK3399_PD_EDP>; clocks = <&cru PCLK_EDP_CTRL>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_EMMC { reg = <RK3399_PD_EMMC>; clocks = <&cru ACLK_EMMC>; pm_qos = <&qos_emmc>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_GMAC { reg = <RK3399_PD_GMAC>; clocks = <&cru ACLK_GMAC>, <&cru PCLK_GMAC>; pm_qos = <&qos_gmac>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_SD { reg = <RK3399_PD_SD>; clocks = <&cru HCLK_SDMMC>, <&cru SCLK_SDMMC>; pm_qos = <&qos_sd>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_SDIOAUDIO { reg = <RK3399_PD_SDIOAUDIO>; clocks = <&cru HCLK_SDIO>; pm_qos = <&qos_sdioaudio>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_TCPD0 { reg = <RK3399_PD_TCPD0>; clocks = <&cru SCLK_UPHY0_TCPDCORE>, <&cru SCLK_UPHY0_TCPDPHY_REF>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_TCPD1 { reg = <RK3399_PD_TCPD1>; clocks = <&cru SCLK_UPHY1_TCPDCORE>, <&cru SCLK_UPHY1_TCPDPHY_REF>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_USB3 { reg = <RK3399_PD_USB3>; clocks = <&cru ACLK_USB3>; pm_qos = <&qos_usb_otg0>, <&qos_usb_otg1>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_VIO { reg = <RK3399_PD_VIO>; + #power-domain-cells = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -1090,6 +1104,7 @@ power-domain@RK3399_PD_HDCP { <&cru HCLK_HDCP>, <&cru PCLK_HDCP>; pm_qos = <&qos_hdcp>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_ISP0 { reg = <RK3399_PD_ISP0>;
@@ -1097,6 +1112,7 @@ power-domain@RK3399_PD_ISP0 { <&cru HCLK_ISP0>; pm_qos = <&qos_isp0_m0>, <&qos_isp0_m1>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_ISP1 { reg = <RK3399_PD_ISP1>;
@@ -1104,9 +1120,11 @@ power-domain@RK3399_PD_ISP1 { <&cru HCLK_ISP1>; pm_qos = <&qos_isp1_m0>, <&qos_isp1_m1>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_VO { reg = <RK3399_PD_VO>; + #power-domain-cells = <1>; #address-cells = <1>; #size-cells = <0>;
@@ -1116,12 +1134,14 @@ power-domain@RK3399_PD_VOPB { <&cru HCLK_VOP0>; pm_qos = <&qos_vop_big_r>, <&qos_vop_big_w>; + #power-domain-cells = <0>; }; power-domain@RK3399_PD_VOPL { reg = <RK3399_PD_VOPL>; clocks = <&cru ACLK_VOP1>, <&cru HCLK_VOP1>; pm_qos = <&qos_vop_little>; + #power-domain-cells = <0>; }; }; };
arch/m68k/fpsp040/skeleton.S +2 -1
@@ -502,7 +502,8 @@ in_ea: .section .fixup,"ax" .even 1: - jbra fpsp040_die + jbsr fpsp040_die + jbra .Lnotkern .section __ex_table,"a" .align 4
arch/m68k/kernel/entry.S +2 -0
@@ -189,6 +189,8 @@ ENTRY(ret_from_signal) movel %curptr@(TASK_STACK),%a1 tstb %a1@(TINFO_FLAGS+2) jge 1f + lea %sp@(SWITCH_STACK_SIZE),%a1 + movel %a1,%curptr@(TASK_THREAD+THREAD_ESP0) jbsr syscall_trace 1: RESTORE_SWITCH_STACK addql #4,%sp
arch/m68k/kernel/traps.c +1 -1
@@ -1152,7 +1152,7 @@ asmlinkage void set_esp0(unsigned long ssp)*/ asmlinkage void fpsp040_die(void) { -do_exit (SIGSEGV ); +force_sigsegv (SIGSEGV ); }#ifdef CONFIG_M68KFPU_EMU
arch/riscv/kernel/traps.c +3 -3
@@ -25,7 +25,7 @@ int show_unhandled_signals = 1; extern asmlinkage void handle_exception(void); -static DEFINE_SPINLOCK (die_lock); +static DEFINE_RAW_SPINLOCK (die_lock);void die (struct pt_regs *regs,const char *str) {
@@ -36,7 +36,7 @@ void die(struct pt_regs *regs, const char *str)oops_enter (); -spin_lock_irqsave (&die_lock, flags); +raw_spin_lock_irqsave (&die_lock, flags);console_verbose ();bust_spinlocks (1 );
@@ -53,7 +53,7 @@ void die(struct pt_regs *regs, const char *str)bust_spinlocks (0 );add_taint (TAINT_DIE ,LOCKDEP_NOW_UNRELIABLE ); -spin_unlock_irqrestore (&die_lock, flags); +raw_spin_unlock_irqrestore (&die_lock, flags);oops_exit ();if (in_interrupt ())
arch/x86/include/asm/special_insns.h +1 -1
@@ -236,7 +236,7 @@ static inline void clwb(volatile void *__p)#define nop () asm volatile ("nop") -static inline void serialize (void ) +static __always_inline void serialize(void) {/* Instruction opcode for SERIALIZE; supported in binutils >= 2.35. */ asmvolatile (".byte 0xf, 0x1, 0xe8" :::"memory" );
arch/x86/xen/xen-asm.S +1 -1
@@ -242,7 +242,7 @@ SYM_CODE_END(xen_early_idt_handler_array) push %rax mov $__HYPERVISOR_iret, %eax syscall /* Do the IRET. */ -#ifdef CONFIG_MITIGATION_SLS +#ifdef CONFIG_SLS int3 #endif .endm
block/genhd.c +5 -8
@@ -46,17 +46,15 @@ static void disk_del_events(struct gendisk *disk);static void disk_release_events (struct gendisk *disk);/* -* Set disk capacity and notify if the size is not currently -* zero and will not be set to zero +* Set disk capacity and notify if the size is not currently zero and will not +* be set to zero. Returns true if a uevent was sent, otherwise false. */ -bool set_capacity_revalidate_and_notify (struct gendisk *disk,sector_t size, -bool update_bdev) +bool set_capacity_and_notify (struct gendisk *disk,sector_t size) {sector_t capacity =get_capacity (disk);set_capacity (disk, size); -if (update_bdev) -revalidate_disk_size (disk, true); +revalidate_disk_size (disk, true);if (capacity != size && capacity !=0 && size !=0 ) {char *envp[] = {"RESIZE=1" ,NULL };
@@ -67,8 +65,7 @@ bool set_capacity_revalidate_and_notify(struct gendisk *disk, sector_t size,return false; } - -EXPORT_SYMBOL_GPL (set_capacity_revalidate_and_notify); +EXPORT_SYMBOL_GPL (set_capacity_and_notify);/* * Format the device name of the indicated disk into the supplied buffer and
drivers/acpi/resource.c +18 -0
@@ -442,6 +442,13 @@ static const struct dmi_system_id asus_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"), }, }, + { +/* Asus Vivobook X1504VAP */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_MATCH(DMI_BOARD_NAME, "X1504VAP"), + }, + }, {/* Asus Vivobook X1704VAP */ .matches = {
@@ -514,6 +521,17 @@ static const struct dmi_system_id asus_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "16T90SP"), }, }, + { +/* +* TongFang GM5HG0A in case of the SKIKK Vanaheim relabel the +* board-name is changed, so check OEM strings instead. Note +* OEM string matches are always exact matches. +* https://bugzilla.kernel.org/show_bug.cgi?id=219614 +*/ + .matches = { + DMI_EXACT_MATCH(DMI_OEM_STRING, "GM5HG0A"), + }, + }, { } };
drivers/block/loop.c +2 -6
@@ -238,12 +238,8 @@ static void __loop_update_dio(struct loop_device *lo, bool dio)*/ static void loop_set_size (struct loop_device *lo,loff_t size) { -struct block_device *bdev = lo->lo_device; - -bd_set_nr_sectors (bdev, size); - -if (!set_capacity_revalidate_and_notify (lo->lo_disk, size, false)) -kobject_uevent (&disk_to_dev (bdev->bd_disk)->kobj,KOBJ_CHANGE ); +if (!set_capacity_and_notify (lo->lo_disk, size)) +kobject_uevent (&disk_to_dev (lo->lo_disk)->kobj,KOBJ_CHANGE ); } static inline int
drivers/block/virtio_blk.c +1 -1
@@ -470,7 +470,7 @@ static void virtblk_update_capacity(struct virtio_blk *vblk, bool resize) cap_str_10, cap_str_2); -set_capacity_revalidate_and_notify (vblk->disk, capacity, true); +set_capacity_and_notify (vblk->disk, capacity); }static void virtblk_config_changed_work (struct work_struct *work)
drivers/block/xen-blkfront.c +1 -1
@@ -2443,7 +2443,7 @@ static void blkfront_connect(struct blkfront_info *info)return ;printk (KERN_INFO "Setting capacity to %Lu\n" , sectors); -set_capacity_revalidate_and_notify (info->gd, sectors, true); +set_capacity_and_notify (info->gd, sectors);return ;case BLKIF_STATE_SUSPENDED :
drivers/gpio/gpiolib-cdev.c +1 -1
@@ -2352,9 +2352,9 @@ static int gpio_chrdev_release(struct inode *inode, struct file *file)struct gpio_chardev_data *cdev = file->private_data;struct gpio_device *gdev = cdev->gdev; -bitmap_free (cdev->watched_lines);blocking_notifier_chain_unregister (&gdev->notifier, &cdev->lineinfo_changed_nb); +bitmap_free (cdev->watched_lines);put_device (&gdev->dev);kfree (cdev);
drivers/gpu/drm/amd/display/dc/dc.h +1 -1
@@ -44,7 +44,7 @@#define DC_VER "3.2.104" -#define MAX_SURFACES 3 +#define MAX_SURFACES 4#define MAX_PLANES 6#define MAX_STREAMS 6#define MAX_SINKS_PER_LINK 4
drivers/gpu/drm/amd/display/dc/dml/dml_inline_defs.h +8 -0
@@ -66,11 +66,15 @@ static inline double dml_max5(double a, double b, double c, double d, double e)static inline double dml_ceil (double a,double granularity) { +if (granularity ==0 ) +return 0 ;return (double )dcn_bw_ceil2 (a, granularity); }static inline double dml_floor (double a,double granularity) { +if (granularity ==0 ) +return 0 ;return (double )dcn_bw_floor2 (a, granularity); }
@@ -119,11 +123,15 @@ static inline double dml_ceil_2(double f)static inline double dml_ceil_ex (double x,double granularity) { +if (granularity ==0 ) +return 0 ;return (double )dcn_bw_ceil2 (x, granularity); }static inline double dml_floor_ex (double x,double granularity) { +if (granularity ==0 ) +return 0 ;return (double )dcn_bw_floor2 (x, granularity); }
drivers/gpu/drm/bridge/adv7511/adv7511.h +0 -1
@@ -399,7 +399,6 @@ enum drm_mode_status adv7533_mode_valid(struct adv7511 *adv,int adv7533_patch_registers (struct adv7511 *adv);int adv7533_patch_cec_registers (struct adv7511 *adv);int adv7533_attach_dsi (struct adv7511 *adv); -void adv7533_detach_dsi (struct adv7511 *adv);int adv7533_parse_dt (struct device_node *np,struct adv7511 *adv);#ifdef CONFIG_DRM_I2C_ADV7511_AUDIO
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +8 -9
@@ -1221,8 +1221,8 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) ret =adv7511_init_regulators (adv7511);if (ret) { -dev_err (dev,"failed to init regulators\n" ); -return ret; +dev_err_probe (dev, ret,"failed to init regulators\n" ); + goto err_of_node_put; }/*
@@ -1324,14 +1324,15 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id) err_unregister_cec:cec_unregister_adapter (adv7511->cec_adap);i2c_unregister_device (adv7511->i2c_cec); -if (adv7511->cec_clk) -clk_disable_unprepare (adv7511->cec_clk); +clk_disable_unprepare (adv7511->cec_clk); err_i2c_unregister_packet:i2c_unregister_device (adv7511->i2c_packet); err_i2c_unregister_edid:i2c_unregister_device (adv7511->i2c_edid); uninit_regulators:adv7511_uninit_regulators (adv7511); +err_of_node_put: +of_node_put (adv7511->host_node);return ret; }
@@ -1340,11 +1341,7 @@ static int adv7511_remove(struct i2c_client *i2c) {struct adv7511 *adv7511 =i2c_get_clientdata (i2c); -if (adv7511->type ==ADV7533 || adv7511->type ==ADV7535 ) -adv7533_detach_dsi (adv7511); -i2c_unregister_device (adv7511->i2c_cec); -if (adv7511->cec_clk) -clk_disable_unprepare (adv7511->cec_clk); +of_node_put (adv7511->host_node);adv7511_uninit_regulators (adv7511);
@@ -1353,6 +1350,8 @@ static int adv7511_remove(struct i2c_client *i2c)adv7511_audio_exit (adv7511);cec_unregister_adapter (adv7511->cec_adap); +i2c_unregister_device (adv7511->i2c_cec); +clk_disable_unprepare (adv7511->cec_clk);i2c_unregister_device (adv7511->i2c_packet);i2c_unregister_device (adv7511->i2c_edid);
drivers/gpu/drm/bridge/adv7511/adv7533.c +10 -28
@@ -146,17 +146,14 @@ int adv7533_attach_dsi(struct adv7511 *adv) }; host =of_find_mipi_dsi_host_by_node (adv->host_node); -if (!host) { -dev_err (dev,"failed to find dsi host\n" ); -return -EPROBE_DEFER ; - } +if (!host) +return dev_err_probe (dev, -EPROBE_DEFER , +"failed to find dsi host\n" ); - dsi =mipi_dsi_device_register_full (host, &info); -if (IS_ERR (dsi)) { -dev_err (dev,"failed to create dsi device\n" ); - ret =PTR_ERR (dsi); - goto err_dsi_device; - } + dsi =devm_mipi_dsi_device_register_full (dev, host, &info); +if (IS_ERR (dsi)) +return dev_err_probe (dev,PTR_ERR (dsi), +"failed to create dsi device\n" ); adv->dsi = dsi;
@@ -165,24 +162,11 @@ int adv7533_attach_dsi(struct adv7511 *adv) dsi->mode_flags =MIPI_DSI_MODE_VIDEO |MIPI_DSI_MODE_VIDEO_SYNC_PULSE |MIPI_DSI_MODE_EOT_PACKET |MIPI_DSI_MODE_VIDEO_HSE ; - ret =mipi_dsi_attach (dsi); -if (ret <0 ) { -dev_err (dev,"failed to attach dsi to host\n" ); - goto err_dsi_attach; - } + ret =devm_mipi_dsi_attach (dev, dsi); +if (ret <0 ) +return dev_err_probe (dev, ret,"failed to attach dsi to host\n" );return 0 ; - -err_dsi_attach: -mipi_dsi_device_unregister (dsi); -err_dsi_device: -return ret; -} - -void adv7533_detach_dsi (struct adv7511 *adv) -{ -mipi_dsi_detach (adv->dsi); -mipi_dsi_device_unregister (adv->dsi); }int adv7533_parse_dt (struct device_node *np,struct adv7511 *adv)
@@ -200,8 +184,6 @@ int adv7533_parse_dt(struct device_node *np, struct adv7511 *adv)if (!adv->host_node)return -ENODEV ; -of_node_put (adv->host_node); - adv->use_timing_gen = !of_property_read_bool (np,"adi,disable-timing-generator" );
drivers/gpu/drm/drm_mipi_dsi.c +81 -0
93 lines not on this page · raw message
drivers/gpu/drm/radeon/radeon_gem.c +1 -1
@@ -582,7 +582,7 @@ static void radeon_gem_va_update_vm(struct radeon_device *rdev,if (r) goto error_unlock; -if (bo_va->it.start) +if (bo_va->it.start && bo_va->bo) r =radeon_vm_bo_update (rdev, bo_va, &bo_va->bo->tbo.mem); error_unlock:
drivers/gpu/drm/v3d/v3d_irq.c +12 -0
@@ -102,7 +102,10 @@ v3d_irq(int irq, void *arg)to_v3d_fence (v3d->bin_job->base.irq_fence);trace_v3d_bcl_irq (&v3d->drm, fence->seqno); + + v3d->bin_job =NULL ;dma_fence_signal (&fence->base); + status =IRQ_HANDLED ; }
@@ -111,7 +114,10 @@ v3d_irq(int irq, void *arg)to_v3d_fence (v3d->render_job->base.irq_fence);trace_v3d_rcl_irq (&v3d->drm, fence->seqno); + + v3d->render_job =NULL ;dma_fence_signal (&fence->base); + status =IRQ_HANDLED ; }
@@ -120,7 +126,10 @@ v3d_irq(int irq, void *arg)to_v3d_fence (v3d->csd_job->base.irq_fence);trace_v3d_csd_irq (&v3d->drm, fence->seqno); + + v3d->csd_job =NULL ;dma_fence_signal (&fence->base); + status =IRQ_HANDLED ; }
@@ -156,7 +165,10 @@ v3d_hub_irq(int irq, void *arg)to_v3d_fence (v3d->tfu_job->base.irq_fence);trace_v3d_tfu_irq (&v3d->drm, fence->seqno); + + v3d->tfu_job =NULL ;dma_fence_signal (&fence->base); + status =IRQ_HANDLED ; }
drivers/i2c/busses/i2c-rcar.c +15 -5
@@ -112,6 +112,8 @@#define ID_P_PM_BLOCKED BIT(31)#define ID_P_MASK GENMASK(31, 28) +#define ID_SLAVE_NACK BIT(0) +enum rcar_i2c_type {I2C_RCAR_GEN1 ,I2C_RCAR_GEN2 ,
@@ -145,6 +147,7 @@ struct rcar_i2c_priv {int irq;struct i2c_client *host_notify_client; +u8 slave_flags; };#define rcar_i2c_priv_to_dev (p) ((p)->adap.dev.parent)
@@ -573,6 +576,7 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv) {u32 ssr_raw, ssr_filtered;u8 value; +int ret; ssr_raw =rcar_i2c_read (priv,ICSSR ) &0xff ; ssr_filtered = ssr_raw &rcar_i2c_read (priv,ICSIER );
@@ -588,7 +592,10 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)rcar_i2c_write (priv,ICRXTX , value);rcar_i2c_write (priv,ICSIER ,SDE |SSR |SAR ); }else { -i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_REQUESTED , &value); + ret =i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_REQUESTED , &value); +if (ret) + priv->slave_flags |=ID_SLAVE_NACK ; +rcar_i2c_read (priv,ICRXTX );/* dummy read */ rcar_i2c_write (priv,ICSIER ,SDR |SSR |SAR ); }
@@ -601,18 +608,21 @@ static bool rcar_i2c_slave_irq(struct rcar_i2c_priv *priv)if (ssr_filtered &SSR ) {i2c_slave_event (priv->slave,I2C_SLAVE_STOP , &value);rcar_i2c_write (priv,ICSCR ,SIE |SDBS );/* clear our NACK */ + priv->slave_flags &= ~ID_SLAVE_NACK ;rcar_i2c_write (priv,ICSIER ,SAR );rcar_i2c_write (priv,ICSSR , ~SSR &0xff ); }/* master wants to write to us */ if (ssr_filtered &SDR ) { -int ret; - value =rcar_i2c_read (priv,ICRXTX ); ret =i2c_slave_event (priv->slave,I2C_SLAVE_WRITE_RECEIVED , &value); -/* Send NACK in case of error */ -rcar_i2c_write (priv,ICSCR ,SIE |SDBS | (ret <0 ?FNA :0 )); +if (ret) + priv->slave_flags |=ID_SLAVE_NACK ; + +/* Send NACK in case of error, but it will come 1 byte late :( */ +rcar_i2c_write (priv,ICSCR ,SIE |SDBS | + (priv->slave_flags &ID_SLAVE_NACK ?FNA :0 ));rcar_i2c_write (priv,ICSSR , ~SDR &0xff ); }
drivers/i2c/muxes/i2c-demux-pinctrl.c +3 -1
@@ -261,7 +261,9 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)pm_runtime_no_callbacks (&pdev->dev);/* switch to first parent as active master */ -i2c_demux_activate_master (priv,0 ); + err =i2c_demux_activate_master (priv,0 ); +if (err) + goto err_rollback; err =device_create_file (&pdev->dev, &dev_attr_available_masters);if (err)
drivers/iio/adc/at91_adc.c +1 -1
@@ -1139,7 +1139,7 @@ static int at91_ts_register(struct iio_dev *idev,return ret; err: -input_free_device (st->ts_input); +input_free_device (input);return ret; }
drivers/iio/adc/rockchip_saradc.c +2 -0
@@ -254,6 +254,8 @@ static irqreturn_t rockchip_saradc_trigger_handler(int irq, void *p)int ret;int i, j =0 ; +memset (&data,0 ,sizeof (data)); +mutex_lock (&i_dev->mlock);for_each_set_bit (i, i_dev->active_scan_mask, i_dev->masklength) {
drivers/iio/adc/ti-ads124s08.c +2 -2
@@ -184,9 +184,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)struct ads124s_private *priv =iio_priv (indio_dev);if (priv->reset_gpio) { -gpiod_set_value (priv->reset_gpio,0 ); +gpiod_set_value_cansleep (priv->reset_gpio,0 );udelay (200 ); -gpiod_set_value (priv->reset_gpio,1 ); +gpiod_set_value_cansleep (priv->reset_gpio,1 ); }else {return ads124s_write_cmd (indio_dev,ADS124S08_CMD_RESET ); }
drivers/iio/adc/ti-ads8688.c +1 -1
@@ -384,7 +384,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *indio_dev = pf->indio_dev;/* Ensure naturally aligned timestamp */ -u16 buffer[ADS8688_MAX_CHANNELS +sizeof (s64)/sizeof (u16)]__aligned(8) ; +u16 buffer[ADS8688_MAX_CHANNELS +sizeof (s64)/sizeof (u16)]__aligned(8) = { };int i, j =0 ;for (i =0 ; i < indio_dev->masklength; i++) {
drivers/iio/dummy/iio_simple_dummy_buffer.c +1 -1
@@ -48,7 +48,7 @@ static irqreturn_t iio_simple_dummy_trigger_h(int irq, void *p)int len =0 ;u16 *data; - data =kmalloc (indio_dev->scan_bytes,GFP_KERNEL ); + data =kzalloc (indio_dev->scan_bytes,GFP_KERNEL );if (!data) goto done;
drivers/iio/gyro/fxas21002c_core.c +8 -1
@@ -730,14 +730,21 @@ static irqreturn_t fxas21002c_trigger_handler(int irq, void *p)int ret;mutex_lock (&data->lock); + ret =fxas21002c_pm_get (data); +if (ret <0 ) + goto out_unlock; + ret =regmap_bulk_read (data->regmap,FXAS21002C_REG_OUT_X_MSB , data->buffer,CHANNEL_SCAN_MAX *sizeof (s16));if (ret <0 ) - goto out_unlock; + goto out_pm_put;iio_push_to_buffers_with_timestamp (indio_dev, data->buffer, data->timestamp); +out_pm_put: +fxas21002c_pm_put (data); + out_unlock:mutex_unlock (&data->lock);
drivers/iio/imu/inv_icm42600/inv_icm42600.h +1 -0
@@ -360,6 +360,7 @@ struct inv_icm42600_state {typedef int (*inv_icm42600_bus_setup )(struct inv_icm42600_state *);extern const struct regmap_config inv_icm42600_regmap_config; +extern const struct regmap_config inv_icm42600_spi_regmap_config;extern const struct dev_pm_ops inv_icm42600_pm_ops; const struct iio_mount_matrix *
drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +17 -1
@@ -43,6 +43,17 @@ const struct regmap_config inv_icm42600_regmap_config = { };EXPORT_SYMBOL_GPL (inv_icm42600_regmap_config); +/* define specific regmap for SPI not supporting burst write */ +const struct regmap_config inv_icm42600_spi_regmap_config = { + .reg_bits =8 , + .val_bits =8 , + .max_register =0x4FFF , + .ranges = inv_icm42600_regmap_ranges, + .num_ranges =ARRAY_SIZE (inv_icm42600_regmap_ranges), + .use_single_write = true, +}; +EXPORT_SYMBOL_GPL (inv_icm42600_spi_regmap_config); +struct inv_icm42600_hw {uint8_t whoami;const char *name;
@@ -709,6 +720,8 @@ static int __maybe_unused inv_icm42600_suspend(struct device *dev)static int __maybe_unused inv_icm42600_resume (struct device *dev) {struct inv_icm42600_state *st =dev_get_drvdata (dev); +struct inv_icm42600_timestamp *gyro_ts =iio_priv (st->indio_gyro); +struct inv_icm42600_timestamp *accel_ts =iio_priv (st->indio_accel);int ret;mutex_lock (&st->lock);
@@ -729,9 +742,12 @@ static int __maybe_unused inv_icm42600_resume(struct device *dev) goto out_unlock;/* restore FIFO data streaming */ -if (st->fifo.on) +if (st->fifo.on) { +inv_icm42600_timestamp_reset (gyro_ts); +inv_icm42600_timestamp_reset (accel_ts); ret =regmap_write (st->map,INV_ICM42600_REG_FIFO_CONFIG ,INV_ICM42600_FIFO_CONFIG_STREAM ); + } out_unlock:mutex_unlock (&st->lock);
drivers/iio/imu/inv_icm42600/inv_icm42600_spi.c +2 -1
@@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)return -EINVAL ; chip = (enum inv_icm42600_chip )match; - regmap =devm_regmap_init_spi (spi, &inv_icm42600_regmap_config); +/* use SPI specific regmap */ + regmap =devm_regmap_init_spi (spi, &inv_icm42600_spi_regmap_config);if (IS_ERR (regmap))return PTR_ERR (regmap);
drivers/iio/imu/kmx61.c +1 -1
@@ -1198,7 +1198,7 @@ static irqreturn_t kmx61_trigger_handler(int irq, void *p)struct kmx61_data *data =kmx61_get_data (indio_dev);int bit, ret, i =0 ;u8 base; -s16 buffer[8 ]; +s16 buffer[8 ] = { };if (indio_dev == data->acc_indio_dev) base =KMX61_ACC_XOUT_L ;
drivers/iio/inkern.c +1 -1
@@ -447,7 +447,7 @@ struct iio_channel *iio_channel_get_all(struct device *dev)return chans; error_free_chans: -for (i =0 ; i < nummaps; i++) +for (i =0 ; i < mapind; i++)iio_device_put (chans[i].indio_dev);kfree (chans); error_ret:
drivers/iio/light/vcnl4035.c +1 -1
@@ -105,7 +105,7 @@ static irqreturn_t vcnl4035_trigger_consumer_handler(int irq, void *p)struct iio_dev *indio_dev = pf->indio_dev;struct vcnl4035_data *data =iio_priv (indio_dev);/* Ensure naturally aligned timestamp */ -u8 buffer[ALIGN (sizeof (u16),sizeof (s64)) +sizeof (s64)]__aligned(8) ; +u8 buffer[ALIGN (sizeof (u16),sizeof (s64)) +sizeof (s64)]__aligned(8) = { };int ret; ret =regmap_read (data->regmap,VCNL4035_ALS_DATA , (int *)buffer);
drivers/iio/pressure/zpa2326.c +2 -0
@@ -586,6 +586,8 @@ static int zpa2326_fill_sample_buffer(struct iio_dev *indio_dev, } sample;int err; +memset (&sample,0 ,sizeof (sample)); +if (test_bit (0 , indio_dev->active_scan_mask)) {/* Get current pressure from hardware FIFO. */ err =zpa2326_dequeue_pressure (indio_dev, &sample.pressure);
drivers/infiniband/hw/hns/hns_roce_main.c +1 -0
@@ -37,6 +37,7 @@#include <rdma/ib_smi.h> #include <rdma/ib_user_verbs.h> #include <rdma/ib_cache.h> +#include "hnae3.h" #include "hns_roce_common.h" #include "hns_roce_device.h" #include <rdma/hns-abi.h>
drivers/infiniband/hw/hns/hns_roce_srq.c +3 -3
@@ -120,7 +120,7 @@ static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq, goto err_out; } - ret =xa_err (xa_store (&srq_table->xa, srq->srqn, srq,GFP_KERNEL )); + ret =xa_err (xa_store_irq (&srq_table->xa, srq->srqn, srq,GFP_KERNEL ));if (ret) {ibdev_err (ibdev,"failed to store SRQC, ret = %d.\n" , ret); goto err_put;
@@ -149,7 +149,7 @@ static int alloc_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq,return ret; err_xa: -xa_erase (&srq_table->xa, srq->srqn); +xa_erase_irq (&srq_table->xa, srq->srqn); err_put:hns_roce_table_put (hr_dev, &srq_table->table, srq->srqn);
@@ -169,7 +169,7 @@ static void free_srqc(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)dev_err (hr_dev->dev,"DESTROY_SRQ failed (%d) for SRQN %06lx\n" , ret, srq->srqn); -xa_erase (&srq_table->xa, srq->srqn); +xa_erase_irq (&srq_table->xa, srq->srqn);if (atomic_dec_and_test (&srq->refcount))complete (&srq->free);
drivers/input/joystick/xpad.c +2 -0
@@ -128,6 +128,7 @@ static const struct xpad_device { { 0x045e, 0x028e, "Microsoft X-Box 360 pad", 0, XTYPE_XBOX360 }, { 0x045e, 0x028f, "Microsoft X-Box 360 pad v2", 0, XTYPE_XBOX360 }, { 0x045e, 0x0291, "Xbox 360 Wireless Receiver (XBOX)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, + { 0x045e, 0x02a9, "Xbox 360 Wireless Receiver (Unofficial)", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360W }, { 0x045e, 0x02d1, "Microsoft X-Box One pad", 0, XTYPE_XBOXONE }, { 0x045e, 0x02dd, "Microsoft X-Box One pad (Firmware 2015)", 0, XTYPE_XBOXONE }, { 0x045e, 0x02e3, "Microsoft X-Box One Elite pad", 0, XTYPE_XBOXONE },
@@ -344,6 +345,7 @@ static const struct xpad_device { { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1220, "Wooting Two HE", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1230, "Wooting Two HE (ARM)", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1300, "Wooting 60HE (AVR)", 0, XTYPE_XBOX360 }, { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 },
drivers/input/keyboard/atkbd.c +1 -1
@@ -90,7 +90,7 @@ static const unsigned short atkbd_set2_keycode[ATKBD_KEYMAP_SIZE] = {0 ,46 ,45 ,32 ,18 ,5 ,4 ,95 ,0 ,57 ,47 ,33 ,20 ,19 ,6 ,183 ,0 ,49 ,48 ,35 ,34 ,21 ,7 ,184 ,0 ,0 ,50 ,36 ,22 ,8 ,9 ,185 ,0 ,51 ,37 ,23 ,24 ,11 ,10 ,0 ,0 ,52 ,53 ,38 ,39 ,25 ,12 ,0 , -0 ,89 ,40 ,0 ,26 ,13 ,0 ,0 ,58 ,54 ,28 ,27 ,0 ,43 ,0 ,85 , +0 ,89 ,40 ,0 ,26 ,13 ,0 ,193 ,58 ,54 ,28 ,27 ,0 ,43 ,0 ,85 ,0 ,86 ,91 ,90 ,92 ,0 ,14 ,94 ,0 ,79 ,124 ,75 ,71 ,121 ,0 ,0 , 82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
drivers/irqchip/irq-gic-v3.c +1 -1
@@ -1309,7 +1309,7 @@ static int gic_retrigger(struct irq_data *data)static int gic_cpu_pm_notifier (struct notifier_block *self,unsigned long cmd,void *v) { -if (cmd ==CPU_PM_EXIT ) { +if (cmd ==CPU_PM_EXIT || cmd ==CPU_PM_ENTER_FAILED ) {if (gic_dist_security_disabled ())gic_enable_redist (true);gic_cpu_sys_reg_init ();
drivers/irqchip/irq-sunxi-nmi.c +2 -1
@@ -200,7 +200,8 @@ static int __init sunxi_sc_nmi_irq_init(struct device_node *node, gc->chip_types[0 ].chip.irq_unmask = irq_gc_mask_set_bit; gc->chip_types[0 ].chip.irq_eoi = irq_gc_ack_set_bit; gc->chip_types[0 ].chip.irq_set_type = sunxi_sc_nmi_set_type; - gc->chip_types[0 ].chip.flags =IRQCHIP_EOI_THREADED |IRQCHIP_EOI_IF_HANDLED ; + gc->chip_types[0 ].chip.flags =IRQCHIP_EOI_THREADED |IRQCHIP_EOI_IF_HANDLED | +IRQCHIP_SKIP_SET_WAKE ; gc->chip_types[0 ].regs.ack = reg_offs->pend; gc->chip_types[0 ].regs.mask = reg_offs->enable; gc->chip_types[0 ].regs.type = reg_offs->ctrl;
drivers/md/dm-ebs-target.c +1 -1
@@ -437,7 +437,7 @@ static int ebs_iterate_devices(struct dm_target *ti,static struct target_type ebs_target = { .name ="ebs" , .version = {1 ,0 ,1 }, - .features =DM_TARGET_PASSES_INTEGRITY , + .features =0 , .module =THIS_MODULE , .ctr = ebs_ctr, .dtr = ebs_dtr,
drivers/md/dm-thin.c +2 -3
@@ -2317,10 +2317,9 @@ static struct thin_c *get_first_thin(struct pool *pool)struct thin_c *tc =NULL ;rcu_read_lock (); -if (!list_empty (&pool->active_thins)) { - tc = list_entry_rcu(pool->active_thins.next, struct thin_c, list); + tc = list_first_or_null_rcu(&pool->active_thins, struct thin_c, list); +if (tc)thin_get (tc); - }rcu_read_unlock ();return tc;
drivers/md/persistent-data/dm-array.c +12 -7
@@ -907,23 +907,27 @@ static int load_ablock(struct dm_array_cursor *c)if (c->block)unlock_ablock (c->info, c->block); - c->block =NULL ; - c->ab =NULL ; c->index =0 ; r =dm_btree_cursor_get_value (&c->cursor, &key, &value_le);if (r) {DMERR ("dm_btree_cursor_get_value failed" ); -dm_btree_cursor_end (&c->cursor); + goto out; }else { r =get_ablock (c->info,le64_to_cpu (value_le), &c->block, &c->ab);if (r) {DMERR ("get_ablock failed" ); -dm_btree_cursor_end (&c->cursor); + goto out; } } +return 0 ; + +out: +dm_btree_cursor_end (&c->cursor); + c->block =NULL ; + c->ab =NULL ;return r; }
@@ -946,10 +950,10 @@ EXPORT_SYMBOL_GPL(dm_array_cursor_begin);void dm_array_cursor_end (struct dm_array_cursor *c) { -if (c->block) { +if (c->block)unlock_ablock (c->info, c->block); -dm_btree_cursor_end (&c->cursor); - } + +dm_btree_cursor_end (&c->cursor); }EXPORT_SYMBOL_GPL (dm_array_cursor_end);
@@ -989,6 +993,7 @@ int dm_array_cursor_skip(struct dm_array_cursor *c, uint32_t count) } count -= remaining; + c->index += (remaining -1 ); r =dm_array_cursor_next (c); }while (!r);
drivers/md/raid5.c +8 -6
@@ -2349,7 +2349,7 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)atomic_inc (&conf->active_stripes);raid5_release_stripe (sh); - conf->max_nr_stripes++; +WRITE_ONCE (conf->max_nr_stripes, conf->max_nr_stripes +1 );return 1 ; }
@@ -2646,7 +2646,7 @@ static int drop_one_stripe(struct r5conf *conf)shrink_buffers (sh);free_stripe (conf->slab_cache, sh);atomic_dec (&conf->active_stripes); - conf->max_nr_stripes--; +WRITE_ONCE (conf->max_nr_stripes, conf->max_nr_stripes -1 );return 1 ; }
@@ -6575,7 +6575,7 @@ raid5_set_cache_size(struct mddev *mddev, int size)if (size <=16 || size >32768 )return -EINVAL ; - conf->min_nr_stripes = size; +WRITE_ONCE (conf->min_nr_stripes, size);mutex_lock (&conf->cache_size_mutex);while (size < conf->max_nr_stripes &&drop_one_stripe (conf))
@@ -6587,7 +6587,7 @@ raid5_set_cache_size(struct mddev *mddev, int size)mutex_lock (&conf->cache_size_mutex);while (size > conf->max_nr_stripes)if (!grow_one_stripe (conf,GFP_KERNEL )) { - conf->min_nr_stripes = conf->max_nr_stripes; +WRITE_ONCE (conf->min_nr_stripes, conf->max_nr_stripes); result = -ENOMEM ;break ; }
@@ -7151,11 +7151,13 @@ static unsigned long raid5_cache_count(struct shrinker *shrink, struct shrink_control *sc) { struct r5conf *conf = container_of(shrink, struct r5conf, shrinker); +int max_stripes =READ_ONCE (conf->max_nr_stripes); +int min_stripes =READ_ONCE (conf->min_nr_stripes); -if (conf->max_nr_stripes < conf->min_nr_stripes) +if (max_stripes < min_stripes)/* unlikely, but not impossible */ return 0 ; -return conf->max_nr_stripes - conf->min_nr_stripes; +return max_stripes - min_stripes; }static struct r5conf *setup_conf (struct mddev *mddev)
drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c +2 -17
@@ -856,7 +856,6 @@ static void xgbe_phy_free_phy_device(struct xgbe_prv_data *pdata)static bool xgbe_phy_finisar_phy_quirks (struct xgbe_prv_data *pdata) { -__ETHTOOL_DECLARE_LINK_MODE_MASK (supported) = {0 , };struct xgbe_phy_data *phy_data = pdata->phy_data;unsigned int phy_id = phy_data->phydev->phy_id;
@@ -878,14 +877,7 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)phy_write (phy_data->phydev,0x04 ,0x0d01 );phy_write (phy_data->phydev,0x00 ,0x9140 ); -linkmode_set_bit_array (phy_10_100_features_array, -ARRAY_SIZE (phy_10_100_features_array), - supported); -linkmode_set_bit_array (phy_gbit_features_array, -ARRAY_SIZE (phy_gbit_features_array), - supported); - -linkmode_copy (phy_data->phydev->supported, supported); +linkmode_copy (phy_data->phydev->supported,PHY_GBIT_FEATURES );phy_support_asym_pause (phy_data->phydev);
@@ -897,7 +889,6 @@ static bool xgbe_phy_finisar_phy_quirks(struct xgbe_prv_data *pdata)static bool xgbe_phy_belfuse_phy_quirks (struct xgbe_prv_data *pdata) { -__ETHTOOL_DECLARE_LINK_MODE_MASK (supported) = {0 , };struct xgbe_phy_data *phy_data = pdata->phy_data;struct xgbe_sfp_eeprom *sfp_eeprom = &phy_data->sfp_eeprom;unsigned int phy_id = phy_data->phydev->phy_id;
@@ -961,13 +952,7 @@ static bool xgbe_phy_belfuse_phy_quirks(struct xgbe_prv_data *pdata) reg =phy_read (phy_data->phydev,0x00 );phy_write (phy_data->phydev,0x00 , reg & ~0x00800 ); -linkmode_set_bit_array (phy_10_100_features_array, -ARRAY_SIZE (phy_10_100_features_array), - supported); -linkmode_set_bit_array (phy_gbit_features_array, -ARRAY_SIZE (phy_gbit_features_array), - supported); -linkmode_copy (phy_data->phydev->supported, supported); +linkmode_copy (phy_data->phydev->supported,PHY_GBIT_FEATURES );phy_support_asym_pause (phy_data->phydev); netif_dbg(pdata, drv, pdata->netdev,
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +4 -1
@@ -1800,7 +1800,10 @@ void cxgb4_remove_tid(struct tid_info *t, unsigned int chan, unsigned int tid, struct adapter *adap = container_of(t, struct adapter, tids);struct sk_buff *skb; -WARN_ON (tid_out_of_range (&adap->tids, tid)); +if (tid_out_of_range (&adap->tids, tid)) { +dev_err (adap->pdev_dev,"tid %d out of range\n" , tid); +return ; + }if (t->tid_tab[tid - adap->tids.tid_base]) { t->tid_tab[tid - adap->tids.tid_base] =NULL ;
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +77 -18
148 lines not on this page · raw message
drivers/net/ethernet/netronome/nfp/bpf/offload.c +2 -1
@@ -458,7 +458,8 @@ int nfp_bpf_event_output(struct nfp_app_bpf *bpf, const void *data, map_id_full =be64_to_cpu (cbe->map_ptr); map_id = map_id_full; -if (len <sizeof (struct cmsg_bpf_event ) + pkt_size + data_size) +if (size_add (pkt_size, data_size) >INT_MAX || + len <sizeof (struct cmsg_bpf_event ) + pkt_size + data_size)return -EINVAL ;if (cbe->hdr.ver !=NFP_CCM_ABI_VERSION )return -EINVAL ;
drivers/net/ethernet/ti/cpsw_ale.c +7 -7
@@ -104,15 +104,15 @@ struct cpsw_ale_dev_id {static inline int cpsw_ale_get_field (u32 *ale_entry,u32 start,u32 bits) { -int idx, idx2; +int idx, idx2, index;u32 hi_val =0 ; idx = start /32 ; idx2 = (start + bits -1 ) /32 ;/* Check if bits to be fetched exceed a word */ if (idx != idx2) { - idx2 =2 - idx2;/* flip */ - hi_val = ale_entry[idx2] << ((idx2 *32 ) - start); + index =2 - idx2;/* flip */ + hi_val = ale_entry[index] << ((idx2 *32 ) - start); } start -= idx *32 ; idx =2 - idx;/* flip */
@@ -122,16 +122,16 @@ static inline int cpsw_ale_get_field(u32 *ale_entry, u32 start, u32 bits)static inline void cpsw_ale_set_field (u32 *ale_entry,u32 start,u32 bits,u32 value) { -int idx, idx2; +int idx, idx2, index; value &=BITMASK (bits); idx = start /32 ; idx2 = (start + bits -1 ) /32 ;/* Check if bits to be set exceed a word */ if (idx != idx2) { - idx2 =2 - idx2;/* flip */ - ale_entry[idx2] &= ~(BITMASK (bits + start - (idx2 *32 ))); - ale_entry[idx2] |= (value >> ((idx2 *32 ) - start)); + index =2 - idx2;/* flip */ + ale_entry[index] &= ~(BITMASK (bits + start - (idx2 *32 ))); + ale_entry[index] |= (value >> ((idx2 *32 ) - start)); } start -= idx *32 ; idx =2 - idx;/* flip */
drivers/net/gtp.c +25 -17
79 lines not on this page · raw message
drivers/net/ieee802154/ca8210.c +5 -1
@@ -3125,7 +3125,11 @@ static int ca8210_probe(struct spi_device *spi_device)spi_set_drvdata (priv->spi, priv);if (IS_ENABLED (CONFIG_IEEE802154_CA8210_DEBUGFS )) { cascoda_api_upstream = ca8210_test_int_driver_write; -ca8210_test_interface_init (priv); + ret =ca8210_test_interface_init (priv); +if (ret) { +dev_crit (&spi_device->dev,"ca8210_test_interface_init failed\n" ); + goto error; + } }else { cascoda_api_upstream =NULL ; }
drivers/net/wireless/intel/iwlwifi/dvm/rs.c +5 -2
@@ -130,7 +130,7 @@ static int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)return idx; } -return -1 ; +return IWL_RATE_INVALID ; } static void rs_rate_scale_perform(struct iwl_priv *priv,
@@ -3151,7 +3151,10 @@ static ssize_t rs_sta_dbgfs_scale_table_read(struct file *file,for (i =0 ; i <LINK_QUAL_MAX_RETRY_NUM ; i++) { index =iwl_hwrate_to_plcp_idx (le32_to_cpu (lq_sta->lq.rs_table[i].rate_n_flags)); -if (is_legacy (tbl->lq_type)) { +if (index ==IWL_RATE_INVALID ) { + desc +=sprintf (buff + desc," rate[%d] 0x%X invalid rate\n" , + i,le32_to_cpu (lq_sta->lq.rs_table[i].rate_n_flags)); + }else if (is_legacy (tbl->lq_type)) { desc +=sprintf (buff+desc," rate[%d] 0x%X %smbps\n" , i,le32_to_cpu (lq_sta->lq.rs_table[i].rate_n_flags), iwl_rate_mcs[index].mbps);
drivers/net/wireless/intel/iwlwifi/mvm/rs.c +6 -3
@@ -1120,10 +1120,13 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta, rate->bw =RATE_MCS_CHAN_WIDTH_20 ; -WARN_ON_ONCE (rate->index <IWL_RATE_MCS_0_INDEX || - rate->index >IWL_RATE_MCS_9_INDEX ); +if (WARN_ON_ONCE (rate->index <IWL_RATE_MCS_0_INDEX )) + rate->index = rs_ht_to_legacy[IWL_RATE_MCS_0_INDEX ]; +else if (WARN_ON_ONCE (rate->index >IWL_RATE_MCS_9_INDEX )) + rate->index = rs_ht_to_legacy[IWL_RATE_MCS_9_INDEX ]; +else + rate->index = rs_ht_to_legacy[rate->index]; - rate->index = rs_ht_to_legacy[rate->index]; rate->ldpc = false; }else {/* Downgrade to SISO with same MCS if in MIMO */
drivers/nvme/host/core.c +1 -4
@@ -2132,7 +2132,7 @@ static void nvme_update_disk_info(struct gendisk *disk, capacity =0 ; } -set_capacity_revalidate_and_notify (disk, capacity, false); +set_capacity_and_notify (disk, capacity);nvme_config_discard (disk, ns);nvme_config_write_zeroes (disk->queue, ns->ctrl);
@@ -2213,7 +2213,6 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id)blk_stack_limits (&ns->head->disk->queue->limits, &ns->queue->limits,0 );blk_queue_update_readahead (ns->head->disk->queue); -nvme_update_bdev_size (ns->head->disk); blk_mq_unfreeze_queue(ns->head->disk->queue); }#endif
@@ -4095,8 +4094,6 @@ static void nvme_validate_ns(struct nvme_ns *ns, struct nvme_ns_ids *ids)*/ if (ret >0 && (ret &NVME_SC_DNR ))nvme_ns_remove (ns); -else -revalidate_disk_size (ns->disk, true); }static void nvme_validate_or_alloc_ns (struct nvme_ctrl *ctrl,unsigned nsid)
drivers/nvme/target/io-cmd-bdev.c +1 -1
@@ -36,7 +36,7 @@ void nvmet_bdev_set_limits(struct block_device *bdev, struct nvme_id_ns *id)*/ id->nsfeat |=1 <<4 ;/* NPWG = Namespace Preferred Write Granularity. 0's based */ - id->npwg = lpp0b; + id->npwg =to0based (bdev_io_min (bdev) /bdev_logical_block_size (bdev));/* NPWA = Namespace Preferred Write Alignment. 0's based */ id->npwa = id->npwg;/* NPDG = Namespace Preferred Deallocate Granularity. 0's based */
drivers/pci/controller/pci-host-common.c +4 -0
@@ -71,6 +71,10 @@ int pci_host_common_probe(struct platform_device *pdev)if (IS_ERR (cfg))return PTR_ERR (cfg); +/* Do not reassign resources if probe only */ +if (!pci_has_flag (PCI_PROBE_ONLY )) +pci_add_flags (PCI_REASSIGN_ALL_BUS ); + bridge->sysdata = cfg; bridge->ops = (struct pci_ops *)&ops->pci_ops;
drivers/pci/probe.c +11 -9
@@ -3018,18 +3018,20 @@ int pci_host_probe(struct pci_host_bridge *bridge) bus = bridge->bus; -/* If we must preserve the resource configuration, claim now */ -if (bridge->preserve_config) -pci_bus_claim_resources (bus); -/* -* Assign whatever was left unassigned. If we didn't claim above, -* this will reassign everything. +* We insert PCI resources into the iomem_resource and +* ioport_resource trees in either pci_bus_claim_resources() +* or pci_bus_assign_resources(). */ -pci_assign_unassigned_root_bus_resources (bus); +if (pci_has_flag (PCI_PROBE_ONLY )) { +pci_bus_claim_resources (bus); + }else { +pci_bus_size_bridges (bus); +pci_bus_assign_resources (bus); -list_for_each_entry (child, &bus->children, node) -pcie_bus_configure_settings (child); +list_for_each_entry (child, &bus->children, node) +pcie_bus_configure_settings (child); + }pci_bus_add_devices (bus);return 0 ;
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c +43 -10
99 lines not on this page · raw message
drivers/phy/broadcom/phy-brcm-usb-init.h +0 -1
@@ -61,7 +61,6 @@ struct brcm_usb_init_params {const struct brcm_usb_init_ops *ops;struct regmap *syscon_piarbctl;bool wake_enabled; -bool suspend_with_clocks; };void brcm_usb_dvr_init_7445 (struct brcm_usb_init_params *params);
drivers/phy/broadcom/phy-brcm-usb.c +5 -3
@@ -585,7 +585,7 @@ static int brcm_usb_phy_suspend(struct device *dev)* and newer XHCI->2.0-clks/3.0-clks. */ -if (!priv->ini.suspend_with_clocks) { +if (!priv->ini.wake_enabled) {if (priv->phys[BRCM_USB_PHY_3_0 ].inited)clk_disable_unprepare (priv->usb_30_clk); if (priv->phys[BRCM_USB_PHY_2_0].inited ||
@@ -602,8 +602,10 @@ static int brcm_usb_phy_resume(struct device *dev) {struct brcm_usb_phy_data *priv =dev_get_drvdata (dev); -clk_prepare_enable (priv->usb_20_clk); -clk_prepare_enable (priv->usb_30_clk); +if (!priv->ini.wake_enabled) { +clk_prepare_enable (priv->usb_20_clk); +clk_prepare_enable (priv->usb_30_clk); + }brcm_usb_init_ipp (&priv->ini);/*
drivers/scsi/scsi_transport_iscsi.c +3 -1
@@ -4076,7 +4076,7 @@ iscsi_if_rx(struct sk_buff *skb) } do { /* - * special case for GET_STATS: + * special case for GET_STATS, GET_CHAP and GET_HOST_STATS: * on success - sending reply and stats from * inside of if_recv_msg(), * on error - fall through.
@@ -4085,6 +4085,8 @@ iscsi_if_rx(struct sk_buff *skb)break ;if (ev->type ==ISCSI_UEVENT_GET_CHAP && !err)break ; +if (ev->type ==ISCSI_UEVENT_GET_HOST_STATS && !err) +break ; err =iscsi_if_send_reply (portid, nlh->nlmsg_type, ev,sizeof (*ev));if (err == -EAGAIN && --retries <0 ) {
drivers/scsi/sd.c +3 -6
@@ -1767,10 +1767,8 @@ static int sd_sync_cache(struct scsi_disk *sdkp, struct scsi_sense_hdr *sshdr)static void sd_rescan (struct device *dev) {struct scsi_disk *sdkp =dev_get_drvdata (dev); -int ret; - ret =sd_revalidate_disk (sdkp->disk); -revalidate_disk_size (sdkp->disk, ret ==0 ); +sd_revalidate_disk (sdkp->disk); } static int sd_ioctl(struct block_device *bdev, fmode_t mode,
@@ -3294,8 +3292,7 @@ static int sd_revalidate_disk(struct gendisk *disk) sdkp->first_scan =0 ; -set_capacity_revalidate_and_notify (disk, -logical_to_sectors (sdp, sdkp->capacity), false); +set_capacity_and_notify (disk,logical_to_sectors (sdp, sdkp->capacity));sd_config_write_same (sdkp);kfree (buffer);
@@ -3305,7 +3302,7 @@ static int sd_revalidate_disk(struct gendisk *disk)* capacity to 0. */ if (sd_zbc_revalidate_zones (sdkp)) -set_capacity_revalidate_and_notify (disk,0 , false); +set_capacity_and_notify (disk,0 ); out:return 0 ;
drivers/scsi/sg.c +1 -1
@@ -390,7 +390,6 @@ sg_release(struct inode *inode, struct file *filp)mutex_lock (&sdp->open_rel_lock);scsi_autopm_put_device (sdp->device); -kref_put (&sfp->f_ref, sg_remove_sfp); sdp->open_cnt--;/* possibly many open()s waiting on exlude clearing, start many;
@@ -402,6 +401,7 @@ sg_release(struct inode *inode, struct file *filp)wake_up_interruptible (&sdp->open_wait); }mutex_unlock (&sdp->open_rel_lock); +kref_put (&sfp->f_ref, sg_remove_sfp);return 0 ; }
drivers/staging/iio/frequency/ad9832.c +1 -1
@@ -158,7 +158,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,static int ad9832_write_phase (struct ad9832_state *st,unsigned long addr,unsigned long phase) { -if (phase >BIT (AD9832_PHASE_BITS )) +if (phase >=BIT (AD9832_PHASE_BITS ))return -EINVAL ; st->phase_data[0] = cpu_to_be16((AD9832_CMD_PHA8BITSW << CMD_SHIFT) |
drivers/staging/iio/frequency/ad9834.c +1 -1
@@ -132,7 +132,7 @@ static int ad9834_write_frequency(struct ad9834_state *st,static int ad9834_write_phase (struct ad9834_state *st,unsigned long addr,unsigned long phase) { -if (phase >BIT (AD9834_PHASE_BITS )) +if (phase >=BIT (AD9834_PHASE_BITS ))return -EINVAL ; st->data =cpu_to_be16 (addr | phase);
drivers/usb/class/usblp.c +4 -3
@@ -1337,11 +1337,12 @@ static int usblp_set_protocol(struct usblp *usblp, int protocol)if (protocol <USBLP_FIRST_PROTOCOL || protocol >USBLP_LAST_PROTOCOL )return -EINVAL ; + alts = usblp->protocol[protocol].alt_setting; +if (alts <0 ) +return -EINVAL ; +/* Don't unnecessarily set the interface if there's a single alt. */ if (usblp->intf->num_altsetting >1 ) { - alts = usblp->protocol[protocol].alt_setting; -if (alts <0 ) -return -EINVAL ; r =usb_set_interface (usblp->dev, usblp->ifnum, alts);if (r <0 ) { printk(KERN_ERR "usblp: can't set desired altsetting %d on interface %d\n",
drivers/usb/core/hub.c +4 -2
@@ -2604,13 +2604,13 @@ int usb_new_device(struct usb_device *udev) err =sysfs_create_link (&udev->dev.kobj, &port_dev->dev.kobj,"port" );if (err) - goto fail; + goto out_del_dev; err =sysfs_create_link (&port_dev->dev.kobj, &udev->dev.kobj,"device" );if (err) {sysfs_remove_link (&udev->dev.kobj,"port" ); - goto fail; + goto out_del_dev; }if (!test_and_set_bit (port1, hub->child_usage_bits))
@@ -2622,6 +2622,8 @@ int usb_new_device(struct usb_device *udev)pm_runtime_put_sync_autosuspend (&udev->dev);return err; +out_del_dev: +device_del (&udev->dev); fail:usb_set_device_state (udev,USB_STATE_NOTATTACHED );pm_runtime_disable (&udev->dev);
drivers/usb/core/port.c +4 -3
@@ -294,10 +294,11 @@ static int usb_port_runtime_suspend(struct device *dev)static void usb_port_shutdown (struct device *dev) {struct usb_port *port_dev =to_usb_port (dev); +struct usb_device *udev = port_dev->child; -if (port_dev->child) { -usb_disable_usb2_hardware_lpm (port_dev->child); -usb_unlocked_disable_lpm (port_dev->child); +if (udev && !udev->port_is_suspended) { +usb_disable_usb2_hardware_lpm (udev); +usb_unlocked_disable_lpm (udev); } }
drivers/usb/dwc3/core.h +1 -0
@@ -422,6 +422,7 @@#define DWC3_DCTL_TRGTULST_SS_INACT (DWC3_DCTL_TRGTULST(6))/* These apply for core versions 1.94a and later */ +#define DWC3_DCTL_NYET_THRES_MASK (0xf << 20)#define DWC3_DCTL_NYET_THRES (n) (((n) & 0xf) << 20)#define DWC3_DCTL_KEEP_CONNECT BIT(19)
drivers/usb/dwc3/gadget.c +3 -1
@@ -3519,8 +3519,10 @@ static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) WARN_ONCE(DWC3_VER_IS_PRIOR(DWC3, 240A) && dwc->has_lpm_erratum,"LPM Erratum not available on dwc3 revisions < 2.40a\n" ); - if (dwc->has_lpm_erratum && !DWC3_VER_IS_PRIOR(DWC3, 240A)) + if (dwc->has_lpm_erratum && !DWC3_VER_IS_PRIOR(DWC3, 240A)) { + reg &= ~DWC3_DCTL_NYET_THRES_MASK ; reg |=DWC3_DCTL_NYET_THRES (dwc->lpm_nyet_threshold); + }dwc3_gadget_dctl_write_safe (dwc, reg); }else {
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -1856,7 +1856,7 @@ static int functionfs_bind(struct ffs_data *ffs, struct usb_composite_dev *cdev)ENTER (); -if (WARN_ON (ffs->state !=FFS_ACTIVE +if ((ffs->state !=FFS_ACTIVE ||test_and_set_bit (FFS_FL_BOUND , &ffs->flags)))return -EBADFD ;
drivers/usb/host/xhci-pci.c +1 -3
@@ -746,11 +746,9 @@ static struct pci_driver xhci_pci_driver = {/* suspend and resume implemented later */ .shutdown = usb_hcd_pci_shutdown, -#ifdef CONFIG_PM .driver = { - .pm = &usb_hcd_pci_pm_ops + .pm = pm_ptr(&usb_hcd_pci_pm_ops), }, -#endif };static int __init xhci_pci_init (void )
drivers/usb/serial/cp210x.c +1 -0
@@ -227,6 +227,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */ { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ + { USB_DEVICE(0x1B93, 0x1013) }, /* Phoenix Contact UPS Device */ { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */ { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
drivers/usb/serial/option.c +3 -1
@@ -621,7 +621,7 @@ static void option_instat_callback(struct urb *urb);/* MeiG Smart Technology products */ #define MEIGSMART_VENDOR_ID 0x2dee -/* MeiG Smart SRM825L based on Qualcomm 315 */ +/* MeiG Smart SRM815/SRM825L based on Qualcomm 315 */ #define MEIGSMART_PRODUCT_SRM825L 0x4d22/* MeiG Smart SLM320 based on UNISOC UIS8910 */ #define MEIGSMART_PRODUCT_SLM320 0x4d41
@@ -2405,6 +2405,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM770A, 0xff, 0, 0) }, + { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0, 0) }, { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) }, { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) }, { USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) },
@@ -2412,6 +2413,7 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(1) }, { USB_DEVICE_INTERFACE_CLASS(0x1bbb, 0x0640, 0xff), /* TCL IK512 ECM */ .driver_info = NCTRL(3) }, + { USB_DEVICE_INTERFACE_CLASS(0x2949, 0x8700, 0xff) }, /* Neoway N723-EA */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/usb/serial/quatech2.c +1 -1
@@ -540,7 +540,7 @@ static void qt2_process_read_urb(struct urb *urb) newport = *(ch +3 ); -if (newport > serial->num_ports) { +if (newport >= serial->num_ports) {dev_err (&port->dev,"%s - port change to invalid port: %i\n" , __func__, newport);
drivers/usb/storage/unusual_devs.h +7 -0
@@ -255,6 +255,13 @@ UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110, USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_MAX_SECTORS_64 ), +/* Added by Lubomir Rintel <[email protected]>, a very fine chap */ +UNUSUAL_DEV( 0x0421, 0x06c2, 0x0000, 0x0406, + "Nokia", + "Nokia 208", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_MAX_SECTORS_64 ), +#ifdef NO_SDDR09 UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, "Microtech",
drivers/vfio/platform/vfio_platform_common.c +10 -0
@@ -405,6 +405,11 @@ static ssize_t vfio_platform_read_mmio(struct vfio_platform_region *reg, {unsigned int done =0 ; +if (off >= reg->size) +return -EINVAL ; + + count =min_t (size_t, count, reg->size - off); +if (!reg->ioaddr) { reg->ioaddr =ioremap (reg->addr, reg->size);
@@ -482,6 +487,11 @@ static ssize_t vfio_platform_write_mmio(struct vfio_platform_region *reg, {unsigned int done =0 ; +if (off >= reg->size) +return -EINVAL ; + + count =min_t (size_t, count, reg->size - off); +if (!reg->ioaddr) { reg->ioaddr =ioremap (reg->addr, reg->size);
fs/afs/afs.h +1 -1
@@ -10,7 +10,7 @@#include <linux/in.h> -#define AFS_MAXCELLNAME 256/* Maximum length of a cell name */ +#define AFS_MAXCELLNAME 253/* Maximum length of a cell name (DNS limited) */ #define AFS_MAXVOLNAME 64/* Maximum length of a volume name */ #define AFS_MAXNSERVERS 8/* Maximum servers in a basic volume record */ #define AFS_NMAXNSERVERS 13/* Maximum servers in a N/U-class volume record */
fs/afs/afs_vl.h +1 -0
@@ -13,6 +13,7 @@#define AFS_VL_PORT 7003/* volume location service port */ #define VL_SERVICE 52/* RxRPC service ID for the Volume Location service */ #define YFS_VL_SERVICE 2503/* Service ID for AuriStor upgraded VL service */ +#define YFS_VL_MAXCELLNAME 256/* Maximum length of a cell name in YFS protocol */ enum AFSVL_Operations {VLGETENTRYBYID =503 ,/* AFS Get VLDB entry by ID */
fs/afs/vl_alias.c +6 -2
@@ -302,6 +302,7 @@ static char *afs_vl_get_cell_name(struct afs_cell *cell, struct key *key)static int yfs_check_canonical_cell_name (struct afs_cell *cell,struct key *key) {struct afs_cell *master; +size_t name_len;char *cell_name; cell_name =afs_vl_get_cell_name (cell, key);
@@ -313,8 +314,11 @@ static int yfs_check_canonical_cell_name(struct afs_cell *cell, struct key *key)return 0 ; } - master =afs_lookup_cell (cell->net, cell_name,strlen (cell_name), -NULL , false); + name_len =strlen (cell_name); +if (!name_len || name_len >AFS_MAXCELLNAME ) + master =ERR_PTR (-EOPNOTSUPP ); +else + master =afs_lookup_cell (cell->net, cell_name, name_len,NULL , false);kfree (cell_name);if (IS_ERR (master))return PTR_ERR (master);
fs/afs/vlclient.c +1 -1
@@ -670,7 +670,7 @@ static int afs_deliver_yfsvl_get_cell_name(struct afs_call *call)return ret; namesz =ntohl (call->tmp); -if (namesz >AFS_MAXCELLNAME ) +if (namesz >YFS_VL_MAXCELLNAME )return afs_protocol_error (call, afs_eproto_cellname_len); paddedsz = (namesz +3 ) & ~3 ; call->count = namesz;
fs/ceph/mds_client.c +4 -5
@@ -2451,12 +2451,11 @@ char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *pbase,if (pos <0 ) {/* -* A rename didn't occur, but somehow we didn't end up where -* we thought we would. Throw a warning and try again. +* The path is longer than PATH_MAX and this function +* cannot ever succeed. Creating paths that long is +* possible with Ceph, but Linux cannot use them. */ -pr_warn ("build_path did not end path lookup where " -"expected, pos is %d\n" , pos); - goto retry; +return ERR_PTR (-ENAMETOOLONG ); } *pbase = base;
fs/exfat/dir.c +2 -1
@@ -125,7 +125,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent type =exfat_get_entry_type (ep);if (type ==TYPE_UNUSED ) {brelse (bh); -break ; + goto out; }if (type !=TYPE_FILE && type !=TYPE_DIR ) {
@@ -185,6 +185,7 @@ static int exfat_readdir(struct inode *inode, loff_t *cpos, struct exfat_dir_ent } } +out: dir_entry->namebuf.lfn[0 ] ='\0' ; *cpos =EXFAT_DEN_TO_B (dentry);return 0 ;
fs/file.c +1 -0
@@ -21,6 +21,7 @@#include <linux/rcupdate.h> #include <linux/close_range.h> #include <net/sock.h> +#include <linux/init_task.h> #include "internal.h"
fs/gfs2/file.c +1 -0
@@ -271,6 +271,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask, error =filemap_fdatawait (inode->i_mapping);if (error) goto out; +truncate_inode_pages (inode->i_mapping,0 );if (new_flags &GFS2_DIF_JDATA )gfs2_ordered_del_inode (ip); }
fs/hfs/super.c +3 -1
@@ -418,11 +418,13 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) goto bail_no_root; res =hfs_cat_find_brec (sb,HFS_ROOT_CNID , &fd);if (!res) { -if (fd.entrylength >sizeof (rec) || fd.entrylength <0 ) { +if (fd.entrylength !=sizeof (rec.dir)) { res = -EIO ; goto bail_hfs_find; }hfs_bnode_read (fd.bnode, &rec, fd.entryoffset, fd.entrylength); +if (rec.type !=HFS_CDR_DIR ) + res = -EIO ; }if (res) goto bail_hfs_find;
fs/jbd2/commit.c +2 -2
@@ -823,9 +823,9 @@ void jbd2_journal_commit_transaction(journal_t *journal)/* * If the journal is not located on the file system device, * then we must flush the file system device before we issue -* the commit record +* the commit record and update the journal tail sequence. */ -if (commit_transaction->t_need_data_flush && +if ((commit_transaction->t_need_data_flush || update_tail) && (journal->j_fs_dev != journal->j_dev) && (journal->j_flags &JBD2_BARRIER ))blkdev_issue_flush (journal->j_fs_dev,GFP_NOFS );
fs/nfsd/filecache.c +10 -8
@@ -218,6 +218,7 @@ nfsd_file_alloc(struct net *net, struct inode *inode, unsigned char need,return NULL ;INIT_LIST_HEAD (&nf->nf_lru); +INIT_LIST_HEAD (&nf->nf_gc); nf->nf_birthtime =ktime_get (); nf->nf_file =NULL ; nf->nf_cred =get_current_cred ();
@@ -395,8 +396,8 @@ nfsd_file_dispose_list(struct list_head *dispose)struct nfsd_file *nf;while (!list_empty (dispose)) { - nf = list_first_entry(dispose, struct nfsd_file, nf_lru); -list_del_init (&nf->nf_lru); + nf = list_first_entry(dispose, struct nfsd_file, nf_gc); +list_del_init (&nf->nf_gc);nfsd_file_free (nf); } }
@@ -413,12 +414,12 @@ nfsd_file_dispose_list_delayed(struct list_head *dispose) {while (!list_empty (dispose)) {struct nfsd_file *nf =list_first_entry (dispose, - struct nfsd_file, nf_lru); + struct nfsd_file, nf_gc);struct nfsd_net *nn =net_generic (nf->nf_net, nfsd_net_id);struct nfsd_fcache_disposal *l = nn->fcache_disposal;spin_lock (&l->lock); -list_move_tail (&nf->nf_lru, &l->freeme); +list_move_tail (&nf->nf_gc, &l->freeme);spin_unlock (&l->lock);queue_work (nfsd_filecache_wq, &l->work); }
@@ -475,7 +476,8 @@ nfsd_file_lru_cb(struct list_head *item, struct list_lru_one *lru,/* Refcount went to zero. Unhash it and queue it to the dispose list */ nfsd_file_unhash (nf); -list_lru_isolate_move (lru, &nf->nf_lru, head); +list_lru_isolate (lru, &nf->nf_lru); +list_add (&nf->nf_gc, head);this_cpu_inc (nfsd_file_evictions);trace_nfsd_file_gc_disposed (nf);return LRU_REMOVED ;
@@ -554,7 +556,7 @@ nfsd_file_cond_queue(struct nfsd_file *nf, struct list_head *dispose)/* If refcount goes to 0, then put on the dispose list */ if (refcount_sub_and_test (decrement, &nf->nf_ref)) { -list_add (&nf->nf_lru, dispose); +list_add (&nf->nf_gc, dispose);trace_nfsd_file_closing (nf); } }
@@ -630,8 +632,8 @@ nfsd_file_close_inode_sync(struct inode *inode)nfsd_file_queue_for_close (inode, &dispose);while (!list_empty (&dispose)) { - nf = list_first_entry(&dispose, struct nfsd_file, nf_lru); -list_del_init (&nf->nf_lru); + nf = list_first_entry(&dispose, struct nfsd_file, nf_gc); +list_del_init (&nf->nf_gc);nfsd_file_free (nf); }flush_delayed_fput ();
fs/nfsd/filecache.h +1 -0
@@ -44,6 +44,7 @@ struct nfsd_file {struct nfsd_file_mark *nf_mark;struct list_head nf_lru; +struct list_head nf_gc;struct rcu_head nf_rcu;ktime_t nf_birthtime; };
fs/ocfs2/quota_global.c +1 -1
@@ -881,7 +881,7 @@ static int ocfs2_get_next_id(struct super_block *sb, struct kqid *qid)int status =0 ;trace_ocfs2_get_next_id (from_kqid (&init_user_ns, *qid), type); -if (!sb_has_quota_loaded (sb, type)) { +if (!sb_has_quota_active (sb, type)) { status = -ESRCH ; goto out; }
fs/ocfs2/quota_local.c +4 -6
@@ -815,7 +815,7 @@ static int ocfs2_local_free_info(struct super_block *sb, int type)struct ocfs2_quota_chunk *chunk;struct ocfs2_local_disk_chunk *dchunk;int mark_clean =1 , len; -int status; +int status =0 ;iput (oinfo->dqi_gqinode);ocfs2_simple_drop_lockres (OCFS2_SB (sb), &oinfo->dqi_gqlock);
@@ -857,17 +857,15 @@ static int ocfs2_local_free_info(struct super_block *sb, int type) oinfo->dqi_libh, olq_update_info, info); -if (status <0 ) { +if (status <0 )mlog_errno (status); - goto out; - } - out:ocfs2_inode_unlock (sb_dqopt (sb)->files[type],1 );brelse (oinfo->dqi_libh);brelse (oinfo->dqi_lqi_bh);kfree (oinfo); -return 0 ; + info->dqi_priv =NULL ; +return status; }static void olq_set_dquot (struct buffer_head *bh,void *private)
fs/proc/vmcore.c +2 -0
@@ -396,6 +396,8 @@ static ssize_t __read_vmcore(char *buffer, size_t buflen, loff_t *fpos,if (buflen ==0 )return acc; } + +cond_resched (); }return acc;
include/drm/drm_mipi_dsi.h +4 -0
@@ -224,9 +224,13 @@ struct mipi_dsi_device * mipi_dsi_device_register_full(struct mipi_dsi_host *host, const struct mipi_dsi_device_info *info);void mipi_dsi_device_unregister (struct mipi_dsi_device *dsi); +struct mipi_dsi_device * +devm_mipi_dsi_device_register_full (struct device *dev,struct mipi_dsi_host *host, +const struct mipi_dsi_device_info *info);struct mipi_dsi_device *of_find_mipi_dsi_device_by_node (struct device_node *np);int mipi_dsi_attach (struct mipi_dsi_device *dsi);int mipi_dsi_detach (struct mipi_dsi_device *dsi); +int devm_mipi_dsi_attach (struct device *dev,struct mipi_dsi_device *dsi);int mipi_dsi_shutdown_peripheral (struct mipi_dsi_device *dsi);int mipi_dsi_turn_on_peripheral (struct mipi_dsi_device *dsi); int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi,
include/linux/blk-cgroup.h +5 -1
@@ -428,10 +428,14 @@ static inline void blkcg_pin_online(struct blkcg *blkcg)static inline void blkcg_unpin_online (struct blkcg *blkcg) {do { +struct blkcg *parent; +if (!refcount_dec_and_test (&blkcg->online_pin))break ; + + parent =blkcg_parent (blkcg);blkcg_destroy_blkgs (blkcg); - blkcg =blkcg_parent (blkcg); + blkcg = parent; }while (blkcg); }
include/linux/genhd.h +1 -2
@@ -315,8 +315,7 @@ static inline int get_disk_ro(struct gendisk *disk)extern void disk_block_events (struct gendisk *disk);extern void disk_unblock_events (struct gendisk *disk);extern void disk_flush_events (struct gendisk *disk,unsigned int mask); -bool set_capacity_revalidate_and_notify (struct gendisk *disk,sector_t size, -bool update_bdev); +bool set_capacity_and_notify (struct gendisk *disk,sector_t size);/* drivers/char/random.c */ extern void add_disk_randomness(struct gendisk *disk) __latent_entropy;
include/linux/hrtimer.h +1 -0
@@ -527,6 +527,7 @@ extern void __init hrtimers_init(void);extern void sysrq_timer_list_show (void );int hrtimers_prepare_cpu (unsigned int cpu); +int hrtimers_cpu_starting (unsigned int cpu);#ifdef CONFIG_HOTPLUG_CPU int hrtimers_cpu_dying (unsigned int cpu);#else
include/linux/mlx5/device.h +2 -0
@@ -1418,6 +1418,8 @@ static inline u16 mlx5_to_sw_pkey_sz(int pkey_sz)return MLX5_MIN_PKEY_TABLE_SIZE << pkey_sz; } +#define MLX5_RDMA_RX_NUM_COUNTERS_PRIOS 2 +#define MLX5_RDMA_TX_NUM_COUNTERS_PRIOS 1#define MLX5_BY_PASS_NUM_REGULAR_PRIOS 16#define MLX5_BY_PASS_NUM_DONT_TRAP_PRIOS 16#define MLX5_BY_PASS_NUM_MULTICAST_PRIOS 1
include/linux/mlx5/fs.h +2 -0
@@ -80,6 +80,8 @@ enum mlx5_flow_namespace_type {MLX5_FLOW_NAMESPACE_RDMA_RX ,MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL ,MLX5_FLOW_NAMESPACE_RDMA_TX , +MLX5_FLOW_NAMESPACE_RDMA_RX_COUNTERS , + MLX5_FLOW_NAMESPACE_RDMA_TX_COUNTERS, }; enum {
include/linux/poll.h +9 -1
@@ -43,8 +43,16 @@ typedef struct poll_table_struct {static inline void poll_wait (struct file * filp,wait_queue_head_t * wait_address,poll_table *p) { -if (p && p->_qproc && wait_address) +if (p && p->_qproc && wait_address) { p->_qproc (filp, wait_address, p); +/* +* This memory barrier is paired in the wq_has_sleeper(). +* See the comment above prepare_to_wait(), we need to +* ensure that subsequent tests in this thread can't be +* reordered with __add_wait_queue() in _qproc() paths. +*/ +smp_mb (); + } }/*
include/linux/seccomp.h +1 -1
@@ -68,10 +68,10 @@ struct seccomp_data;#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER static inline int secure_computing (void ) {return 0 ; } -static inline int __secure_computing (const struct seccomp_data *sd) {return 0 ; }#else static inline void secure_computing_strict (int this_syscall) {return ; }#endif +static inline int __secure_computing (const struct seccomp_data *sd) {return 0 ; }static inline long prctl_get_seccomp (void ) {
include/linux/usb.h +1 -2
@@ -695,13 +695,12 @@ struct usb_device {unsigned long active_duration; -#ifdef CONFIG_PM unsigned long connect_time; unsigned do_remote_wakeup:1; unsigned reset_resume:1; unsigned port_is_suspended:1; -#endif +struct wusb_dev *wusb_dev;int slot_id;struct usb2_lpm_parameters l1_params;
include/linux/usb/hcd.h +0 -2
@@ -489,9 +489,7 @@ extern void usb_hcd_pci_shutdown(struct pci_dev *dev);extern int usb_hcd_amd_remote_wakeup_quirk (struct pci_dev *dev); -#ifdef CONFIG_PM extern const struct dev_pm_ops usb_hcd_pci_pm_ops; -#endif #endif /* CONFIG_USB_PCI */ /* pci-ish (pdev null is ok) buffer alloc/mapping support */
include/net/inet_connection_sock.h +1 -1
@@ -282,7 +282,7 @@ static inline int inet_csk_reqsk_queue_len(const struct sock *sk)static inline int inet_csk_reqsk_queue_is_full (const struct sock *sk) { -return inet_csk_reqsk_queue_len (sk) >= sk->sk_max_ack_backlog; +return inet_csk_reqsk_queue_len (sk) >READ_ONCE (sk->sk_max_ack_backlog); }bool inet_csk_reqsk_queue_drop (struct sock *sk,struct request_sock *req);
include/net/net_namespace.h +3 -0
@@ -393,6 +393,9 @@ struct pernet_operations {void (*pre_exit)(struct net *net);void (*exit)(struct net *net);void (*exit_batch)(struct list_head *net_exit_list); +/* Following method is called with RTNL held. */ +void (*exit_batch_rtnl)(struct list_head *net_exit_list, +struct list_head *dev_kill_list);unsigned int *id;size_t size; };
include/net/netfilter/nf_tables.h +2 -0
@@ -734,6 +734,8 @@ void *nft_set_elem_init(const struct nft_set *set,const struct nft_set_ext_tmpl *tmpl, const u32 *key, const u32 *key_end, const u32 *data, u64 timeout, u64 expiration, gfp_t gfp); +int nft_set_elem_expr_clone (const struct nft_ctx *ctx,struct nft_set *set, +struct nft_expr **pexpr);void nft_set_elem_destroy (const struct nft_set *set,void *elem,bool destroy_expr); void nf_tables_set_elem_destroy(const struct nft_ctx *ctx,
kernel/cpu.c +1 -1
@@ -1664,7 +1664,7 @@ static struct cpuhp_step cpuhp_hp_states[] = { }, [CPUHP_AP_HRTIMERS_DYING] = { .name = "hrtimers:dying", - .startup.single = NULL, + .startup.single = hrtimers_cpu_starting, .teardown.single = hrtimers_cpu_dying, },
kernel/gen_kheaders.sh +1 -0
@@ -84,6 +84,7 @@ find $cpio_dir -type f -print0 | # Create archive and try to normalize metadata for reproducibility. tar "${KBUILD_BUILD_TIMESTAMP:+--mtime=$KBUILD_BUILD_TIMESTAMP}" \ + --exclude=".__afs*" --exclude=".nfs*" \ --owner=0 --group=0 --sort=name --numeric-owner --mode=u=rw,go=r,a+X \ -I $XZ -cf $tarfile -C $cpio_dir/ . > /dev/null
kernel/time/hrtimer.c +10 -1
@@ -2074,6 +2074,15 @@ int hrtimers_prepare_cpu(unsigned int cpu) } cpu_base->cpu = cpu; +hrtimer_cpu_base_init_expiry_lock (cpu_base); +return 0 ; +} + +int hrtimers_cpu_starting (unsigned int cpu) +{ +struct hrtimer_cpu_base *cpu_base =this_cpu_ptr (&hrtimer_bases); + +/* Clear out any left over state from a CPU down operation */ cpu_base->active_bases =0 ; cpu_base->hres_active =0 ; cpu_base->hang_detected =0 ;
@@ -2082,7 +2091,6 @@ int hrtimers_prepare_cpu(unsigned int cpu) cpu_base->expires_next =KTIME_MAX ; cpu_base->softirq_expires_next =KTIME_MAX ; cpu_base->online =1 ; -hrtimer_cpu_base_init_expiry_lock (cpu_base);return 0 ; }
@@ -2160,6 +2168,7 @@ int hrtimers_cpu_dying(unsigned int dying_cpu)void __init hrtimers_init (void ) {hrtimers_prepare_cpu (smp_processor_id ()); +hrtimers_cpu_starting (smp_processor_id ());open_softirq (HRTIMER_SOFTIRQ , hrtimer_run_softirq); }
mm/vmalloc.c +2 -1
@@ -2269,7 +2269,8 @@ static void __vunmap(const void *addr, int deallocate_pages)BUG_ON (!page);__free_pages (page,0 ); } -atomic_long_sub (area->nr_pages, &nr_vmalloc_pages); +if (!(area->flags &VM_MAP_PUT_PAGES )) +atomic_long_sub (area->nr_pages, &nr_vmalloc_pages);kvfree (area->pages); }
net/802/psnap.c +2 -2
@@ -55,11 +55,11 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, goto drop;rcu_read_lock (); - proto =find_snap_client (skb_transport_header (skb)); + proto =find_snap_client (skb->data);if (proto) {/* Pass the frame on. */ - skb->transport_header +=5 ;skb_pull_rcsum (skb,5 ); +skb_reset_transport_header (skb); rc = proto->rcvfunc (skb, dev, &snap_packet_type, orig_dev); }rcu_read_unlock ();
net/bluetooth/rfcomm/sock.c +5 -9
@@ -631,7 +631,7 @@ static int rfcomm_sock_setsockopt_old(struct socket *sock, int optname,switch (optname) {case RFCOMM_LM : -if (copy_from_sockptr (&opt, optval,sizeof (u32))) { +if (bt_copy_from_sockptr (&opt,sizeof (opt), optval, optlen)) { err = -EFAULT ;break ; }
@@ -666,7 +666,6 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname,struct sock *sk = sock->sk;struct bt_security sec;int err =0 ; -size_t len;u32 opt;BT_DBG ("sk %p" , sk);
@@ -688,11 +687,9 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname, sec.level =BT_SECURITY_LOW ; - len = min_t(unsigned int, sizeof(sec), optlen); -if (copy_from_sockptr (&sec, optval, len)) { - err = -EFAULT ; + err =bt_copy_from_sockptr (&sec,sizeof (sec), optval, optlen); +if (err)break ; - }if (sec.level >BT_SECURITY_HIGH ) { err = -EINVAL ;
@@ -708,10 +705,9 @@ static int rfcomm_sock_setsockopt(struct socket *sock, int level, int optname,break ; } -if (copy_from_sockptr (&opt, optval,sizeof (u32))) { - err = -EFAULT ; + err =bt_copy_from_sockptr (&opt,sizeof (opt), optval, optlen); +if (err)break ; - }if (opt)set_bit (BT_SK_DEFER_SETUP , &bt_sk (sk)->flags);
net/core/filter.c +18 -12
@@ -10016,6 +10016,7 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,bool is_sockarray = map->map_type ==BPF_MAP_TYPE_REUSEPORT_SOCKARRAY ;struct sock_reuseport *reuse;struct sock *selected_sk; +int err; selected_sk = map->ops->map_lookup_elem (map, key);if (!selected_sk)
@@ -10023,10 +10024,6 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern, reuse =rcu_dereference (selected_sk->sk_reuseport_cb);if (!reuse) { -/* Lookup in sock_map can return TCP ESTABLISHED sockets. */ -if (sk_is_refcounted (selected_sk)) -sock_put (selected_sk); -/* reuseport_array has only sk with non NULL sk_reuseport_cb. * The only (!reuse) case here is - the sk has already been * unhashed (e.g. by close()), so treat it as -ENOENT.
@@ -10034,24 +10031,33 @@ BPF_CALL_4(sk_select_reuseport, struct sk_reuseport_kern *, reuse_kern,* Other maps (e.g. sock_map) do not provide this guarantee and * the sk may never be in the reuseport group to begin with. */ -return is_sockarray ? -ENOENT : -EINVAL ; + err = is_sockarray ? -ENOENT : -EINVAL ; + goto error; }if (unlikely (reuse->reuseport_id != reuse_kern->reuseport_id)) {struct sock *sk = reuse_kern->sk; -if (sk->sk_protocol != selected_sk->sk_protocol) -return -EPROTOTYPE ; -else if (sk->sk_family != selected_sk->sk_family) -return -EAFNOSUPPORT ; - -/* Catch all. Likely bound to a different sockaddr. */ -return -EBADFD ; +if (sk->sk_protocol != selected_sk->sk_protocol) { + err = -EPROTOTYPE ; + }else if (sk->sk_family != selected_sk->sk_family) { + err = -EAFNOSUPPORT ; + }else { +/* Catch all. Likely bound to a different sockaddr. */ + err = -EBADFD ; + } + goto error; } reuse_kern->selected_sk = selected_sk;return 0 ; +error: +/* Lookup in sock_map can return TCP ESTABLISHED sockets. */ +if (sk_is_refcounted (selected_sk)) +sock_put (selected_sk); + +return err; }static const struct bpf_func_proto sk_select_reuseport_proto = {
net/core/net_namespace.c +54 -29
172 lines not on this page · raw message
net/dccp/ipv6.c +1 -1
@@ -602,7 +602,7 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)by tcp. Feel free to propose better solution. --ANK (980728) */ -if (np->rxopt.all) +if (np->rxopt.all && sk->sk_state !=DCCP_LISTEN ) opt_skb =skb_clone_and_charge_r (skb, sk);if (sk->sk_state ==DCCP_OPEN ) {/* Fast path */
net/ipv4/fou.c +1 -1
@@ -453,7 +453,7 @@ static struct sk_buff *gue_gro_receive(struct sock *sk, offloads =NAPI_GRO_CB (skb)->is_ipv6 ? inet6_offloads : inet_offloads; ops =rcu_dereference (offloads[proto]); -if (WARN_ON_ONCE (!ops || !ops->callbacks.gro_receive)) +if (!ops || !ops->callbacks.gro_receive) goto out; pp =call_gro_receive (ops->callbacks.gro_receive, head, skb);
net/ipv4/ip_tunnel.c +1 -1
@@ -218,7 +218,7 @@ static struct ip_tunnel *ip_tunnel_find(struct ip_tunnel_net *itn,struct ip_tunnel *t =NULL ;struct hlist_head *head =ip_bucket (itn, parms); -hlist_for_each_entry_rcu (t, head, hash_node) { +hlist_for_each_entry_rcu (t, head, hash_node,lockdep_rtnl_is_held ()) { if (local == t->parms.iph.saddr && remote == t->parms.iph.daddr && link == t->parms.link &&
net/ipv6/route.c +1 -1
@@ -174,7 +174,7 @@ static void rt6_uncached_list_flush_dev(struct net *net, struct net_device *dev)struct inet6_dev *rt_idev = rt->rt6i_idev;struct net_device *rt_dev = rt->dst.dev; -if (rt_idev->dev == dev) { +if (rt_idev && rt_idev->dev == dev) { rt->rt6i_idev =in6_dev_get (loopback_dev);in6_dev_put (rt_idev); }
net/ipv6/tcp_ipv6.c +1 -3
@@ -1484,7 +1484,7 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)by tcp. Feel free to propose better solution. --ANK (980728) */ -if (np->rxopt.all) +if (np->rxopt.all && sk->sk_state !=TCP_LISTEN ) opt_skb =skb_clone_and_charge_r (skb, sk);if (sk->sk_state ==TCP_ESTABLISHED ) {/* Fast path */
@@ -1521,8 +1521,6 @@ static int tcp_v6_do_rcv(struct sock *sk, struct sk_buff *skb)if (nsk != sk) {if (tcp_child_process (sk, nsk, skb)) goto reset; -if (opt_skb) -__kfree_skb (opt_skb);return 0 ; } }else
net/mac802154/iface.c +4 -0
@@ -688,6 +688,10 @@ void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata)ASSERT_RTNL ();mutex_lock (&sdata->local->iflist_mtx); +if (list_empty (&sdata->local->interfaces)) { +mutex_unlock (&sdata->local->iflist_mtx); +return ; + }list_del_rcu (&sdata->list);mutex_unlock (&sdata->local->iflist_mtx);
net/netfilter/nf_conntrack_core.c +4 -1
@@ -2435,12 +2435,15 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)struct hlist_nulls_head *hash;unsigned int nr_slots, i; -if (*sizep > (UINT_MAX /sizeof (struct hlist_nulls_head ))) +if (*sizep > (INT_MAX /sizeof (struct hlist_nulls_head )))return NULL ;BUILD_BUG_ON (sizeof (struct hlist_nulls_head ) !=sizeof (struct hlist_head )); nr_slots = *sizep =roundup (*sizep,PAGE_SIZE /sizeof (struct hlist_nulls_head )); +if (nr_slots > (INT_MAX /sizeof (struct hlist_nulls_head ))) +return NULL ; + hash =kvcalloc (nr_slots,sizeof (struct hlist_nulls_head ),GFP_KERNEL );if (hash && nulls)
net/netfilter/nf_tables_api.c +34 -4
@@ -5548,6 +5548,29 @@ static int nft_set_elem_expr_setup(struct nft_ctx *ctx,return 0 ; } +int nft_set_elem_expr_clone (const struct nft_ctx *ctx,struct nft_set *set, +struct nft_expr **pexpr) +{ +struct nft_expr *expr; +int err; + + expr =kzalloc (set->expr->ops->size,GFP_KERNEL ); +if (!expr) + goto err_expr; + + err =nft_expr_clone (expr, set->expr,GFP_KERNEL ); +if (err <0 ) { +kfree (expr); + goto err_expr; + } + *pexpr = expr; + +return 0 ; + +err_expr: +return -ENOMEM ; +} +static int nft_add_set_elem (struct nft_ctx *ctx,struct nft_set *set,const struct nlattr *attr,u32 nlmsg_flags) {
@@ -6983,6 +7006,7 @@ static void nft_unregister_flowtable_hook(struct net *net, }static void __nft_unregister_flowtable_net_hooks (struct net *net, +struct nft_flowtable *flowtable,struct list_head *hook_list,bool release_netdev) {
@@ -6990,6 +7014,8 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net,list_for_each_entry_safe (hook, next, hook_list, list) {nf_unregister_net_hook (net, &hook->ops); + flowtable->data.type->setup (&flowtable->data, hook->ops.dev, +FLOW_BLOCK_UNBIND );if (release_netdev) {list_del (&hook->list);kfree_rcu (hook, rcu);
@@ -6998,9 +7024,10 @@ static void __nft_unregister_flowtable_net_hooks(struct net *net, }static void nft_unregister_flowtable_net_hooks (struct net *net, +struct nft_flowtable *flowtable,struct list_head *hook_list) { -__nft_unregister_flowtable_net_hooks (net, hook_list, false); +__nft_unregister_flowtable_net_hooks (net, flowtable, hook_list, false); } static int nft_register_flowtable_net_hooks(struct net *net,
@@ -7622,8 +7649,6 @@ static void nf_tables_flowtable_destroy(struct nft_flowtable *flowtable) flowtable->data.type->free (&flowtable->data);list_for_each_entry_safe (hook, next, &flowtable->hook_list, list) { - flowtable->data.type->setup (&flowtable->data, hook->ops.dev, -FLOW_BLOCK_UNBIND );list_del_rcu (&hook->list);kfree_rcu (hook, rcu); }
@@ -8764,6 +8789,7 @@ static int nf_tables_commit(struct net *net, struct sk_buff *skb) &nft_trans_flowtable_hooks (trans), NFT_MSG_DELFLOWTABLE);nft_unregister_flowtable_net_hooks (net, +nft_trans_flowtable (trans), &nft_trans_flowtable_hooks (trans)); }else {list_del_rcu (&nft_trans_flowtable (trans)->list);
@@ -8772,6 +8798,7 @@ static int nf_tables_commit(struct net *net, struct sk_buff *skb) &nft_trans_flowtable (trans)->hook_list, NFT_MSG_DELFLOWTABLE);nft_unregister_flowtable_net_hooks (net, +nft_trans_flowtable (trans), &nft_trans_flowtable (trans)->hook_list); }break ;
@@ -8991,11 +9018,13 @@ static int __nf_tables_abort(struct net *net, enum nfnl_abort_action action)case NFT_MSG_NEWFLOWTABLE :if (nft_trans_flowtable_update (trans)) {nft_unregister_flowtable_net_hooks (net, +nft_trans_flowtable (trans), &nft_trans_flowtable_hooks (trans)); }else {nft_use_dec_restore (&trans->ctx.table->use);list_del_rcu (&nft_trans_flowtable (trans)->list);nft_unregister_flowtable_net_hooks (net, +nft_trans_flowtable (trans), &nft_trans_flowtable (trans)->hook_list); }break ;
@@ -9559,7 +9588,8 @@ static void __nft_release_hook(struct net *net, struct nft_table *table)list_for_each_entry (chain, &table->chains, list)__nf_tables_unregister_hook (net, table, chain, true);list_for_each_entry (flowtable, &table->flowtables, list) -__nft_unregister_flowtable_net_hooks (net, &flowtable->hook_list, +__nft_unregister_flowtable_net_hooks (net, flowtable, + &flowtable->hook_list, true); }
net/netfilter/nft_dynset.c +6 -1
@@ -192,6 +192,10 @@ static int nft_dynset_init(const struct nft_ctx *ctx, err = -EOPNOTSUPP ; goto err_expr_free; } + }else if (set->expr) { + err =nft_set_elem_expr_clone (ctx, set, &priv->expr); +if (err <0 ) +return err; }nft_set_ext_prepare (&priv->tmpl);
@@ -272,7 +276,8 @@ static int nft_dynset_dump(struct sk_buff *skb, const struct nft_expr *expr) nf_jiffies64_to_msecs(priv->timeout), NFTA_DYNSET_PAD)) goto nla_put_failure; -if (priv->expr &&nft_expr_dump (skb,NFTA_DYNSET_EXPR , priv->expr)) +if (!priv->set->expr && priv->expr && +nft_expr_dump (skb,NFTA_DYNSET_EXPR , priv->expr)) goto nla_put_failure;if (nla_put_be32 (skb,NFTA_DYNSET_FLAGS ,htonl (flags))) goto nla_put_failure;
net/sched/cls_flow.c +2 -1
@@ -354,7 +354,8 @@ static const struct nla_policy flow_policy[TCA_FLOW_MAX + 1] = { [TCA_FLOW_KEYS] = { .type = NLA_U32 }, [TCA_FLOW_MODE] = { .type = NLA_U32 }, [TCA_FLOW_BASECLASS] = { .type = NLA_U32 }, - [TCA_FLOW_RSHIFT] = { .type = NLA_U32 }, + [TCA_FLOW_RSHIFT ] =NLA_POLICY_MAX (NLA_U32 , + 31 /* BITS_PER_U32 - 1 */), [TCA_FLOW_ADDEND] = { .type = NLA_U32 }, [TCA_FLOW_MASK] = { .type = NLA_U32 }, [TCA_FLOW_XOR] = { .type = NLA_U32 },
net/sched/sch_ets.c +2 -0
@@ -91,6 +91,8 @@ ets_class_from_arg(struct Qdisc *sch, unsigned long arg) {struct ets_sched *q =qdisc_priv (sch); +if (arg ==0 || arg > q->nbands) +return NULL ;return &q->classes[arg -1 ]; }
net/sctp/sysctl.c +5 -4
@@ -350,7 +350,8 @@ static struct ctl_table sctp_net_table[] = {static int proc_sctp_do_hmac_alg (struct ctl_table *ctl,int write,void *buffer,size_t *lenp,loff_t *ppos) { -struct net *net = current->nsproxy->net_ns; + struct net *net = container_of(ctl->data, struct net, + sctp.sctp_hmac_alg);struct ctl_table tbl;bool changed = false;char *none ="none" ;
@@ -395,7 +396,7 @@ static int proc_sctp_do_hmac_alg(struct ctl_table *ctl, int write,static int proc_sctp_do_rto_min (struct ctl_table *ctl,int write,void *buffer,size_t *lenp,loff_t *ppos) { -struct net *net = current->nsproxy->net_ns; + struct net *net = container_of(ctl->data, struct net, sctp.rto_min);unsigned int min = *(unsigned int *) ctl->extra1;unsigned int max = *(unsigned int *) ctl->extra2;struct ctl_table tbl;
@@ -423,7 +424,7 @@ static int proc_sctp_do_rto_min(struct ctl_table *ctl, int write,static int proc_sctp_do_rto_max (struct ctl_table *ctl,int write,void *buffer,size_t *lenp,loff_t *ppos) { -struct net *net = current->nsproxy->net_ns; + struct net *net = container_of(ctl->data, struct net, sctp.rto_max);unsigned int min = *(unsigned int *) ctl->extra1;unsigned int max = *(unsigned int *) ctl->extra2;struct ctl_table tbl;
@@ -461,7 +462,7 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,static int proc_sctp_do_auth (struct ctl_table *ctl,int write,void *buffer,size_t *lenp,loff_t *ppos) { -struct net *net = current->nsproxy->net_ns; + struct net *net = container_of(ctl->data, struct net, sctp.auth_enable);struct ctl_table tbl;int new_value, ret;
net/tls/tls_sw.c +1 -1
@@ -428,7 +428,7 @@ int tls_tx_records(struct sock *sk, int flags) tx_err:if (rc <0 && rc != -EAGAIN ) -tls_err_abort (sk, -EBADMSG ); +tls_err_abort (sk, rc);return rc; }
net/vmw_vsock/af_vsock.c +15 -0
@@ -464,6 +464,15 @@ int vsock_assign_transport(struct vsock_sock *vsk, struct vsock_sock *psk)*/ vsk->transport->release (vsk);vsock_deassign_transport (vsk); + +/* transport's release() and destruct() can touch some socket +* state, since we are reassigning the socket to a new transport +* during vsock_connect(), let's reset these fields to have a +* clean state. +*/ +sock_reset_flag (sk,SOCK_DONE ); + sk->sk_state =TCP_CLOSE ; + vsk->peer_shutdown =0 ; }/* We increase the module refcnt to prevent the transport unloading
@@ -828,12 +837,18 @@ EXPORT_SYMBOL_GPL(vsock_create_connected);s64 vsock_stream_has_data (struct vsock_sock *vsk) { +if (WARN_ON (!vsk->transport)) +return 0 ; +return vsk->transport->stream_has_data (vsk); }EXPORT_SYMBOL_GPL (vsock_stream_has_data);s64 vsock_stream_has_space (struct vsock_sock *vsk) { +if (WARN_ON (!vsk->transport)) +return 0 ; +return vsk->transport->stream_has_space (vsk); }EXPORT_SYMBOL_GPL (vsock_stream_has_space);
net/vmw_vsock/virtio_transport_common.c +26 -10
@@ -26,6 +26,9 @@/* Threshold for detecting small packets to copy */ #define GOOD_COPY_LEN 128 +static void virtio_transport_cancel_close_work (struct vsock_sock *vsk, +bool cancel_timeout); +static const struct virtio_transport *virtio_transport_get_ops (struct vsock_sock *vsk) {
@@ -686,6 +689,8 @@ void virtio_transport_destruct(struct vsock_sock *vsk) {struct virtio_vsock_sock *vvs = vsk->trans; +virtio_transport_cancel_close_work (vsk, true); +kfree (vvs); vsk->trans =NULL ; }
@@ -775,17 +780,11 @@ static void virtio_transport_wait_close(struct sock *sk, long timeout) } } -static void virtio_transport_do_close (struct vsock_sock *vsk, -bool cancel_timeout) +static void virtio_transport_cancel_close_work (struct vsock_sock *vsk, +bool cancel_timeout) {struct sock *sk =sk_vsock (vsk); -sock_set_flag (sk,SOCK_DONE ); - vsk->peer_shutdown =SHUTDOWN_MASK ; -if (vsock_stream_has_data (vsk) <=0 ) - sk->sk_state =TCP_CLOSING ; - sk->sk_state_change (sk); -if (vsk->close_work_scheduled && (!cancel_timeout ||cancel_delayed_work (&vsk->close_work))) { vsk->close_work_scheduled = false;
@@ -797,6 +796,20 @@ static void virtio_transport_do_close(struct vsock_sock *vsk, } } +static void virtio_transport_do_close (struct vsock_sock *vsk, +bool cancel_timeout) +{ +struct sock *sk =sk_vsock (vsk); + +sock_set_flag (sk,SOCK_DONE ); + vsk->peer_shutdown =SHUTDOWN_MASK ; +if (vsock_stream_has_data (vsk) <=0 ) + sk->sk_state =TCP_CLOSING ; + sk->sk_state_change (sk); + +virtio_transport_cancel_close_work (vsk, cancel_timeout); +} +static void virtio_transport_close_timeout (struct work_struct *work) { struct vsock_sock *vsk =
@@ -1158,8 +1171,11 @@ void virtio_transport_recv_pkt(struct virtio_transport *t,lock_sock (sk); -/* Check if sk has been closed before lock_sock */ -if (sock_flag (sk,SOCK_DONE )) { +/* Check if sk has been closed or assigned to another transport before +* lock_sock (note: listener sockets are not assigned to any transport) +*/ +if (sock_flag (sk,SOCK_DONE ) || + (sk->sk_state !=TCP_LISTEN && vsk->transport != &t->transport)) { (void )virtio_transport_reset_no_sock (t, pkt);release_sock (sk);sock_put (sk);
scripts/sorttable.h +7 -3
@@ -103,7 +103,7 @@ static inline unsigned long orc_ip(const int *ip)static int orc_sort_cmp (const void *_a,const void *_b) { -struct orc_entry *orc_a; +struct orc_entry *orc_a, *orc_b;const int *a = g_orc_ip_table + *(int *)_a;const int *b = g_orc_ip_table + *(int *)_b;unsigned long a_val =orc_ip (a);
@@ -120,8 +120,12 @@ static int orc_sort_cmp(const void *_a, const void *_b)* These terminator entries exist to handle any gaps created by * whitelisted .o files which didn't get objtool generation. */ - orc_a = g_orc_table + (a - g_orc_ip_table); -return orc_a->sp_reg ==ORC_REG_UNDEFINED && !orc_a->end ?-1 :1 ; + orc_a = g_orc_table + (a - g_orc_ip_table); + orc_b = g_orc_table + (b - g_orc_ip_table); +if (orc_a->sp_reg ==ORC_REG_UNDEFINED && !orc_a->end && + orc_b->sp_reg ==ORC_REG_UNDEFINED && !orc_b->end) +return 0 ; +return orc_a->sp_reg ==ORC_REG_UNDEFINED && !orc_a->end ?-1 :1 ; }static void *sort_orctable (void *arg)
sound/soc/codecs/Kconfig +1 -0
@@ -1647,6 +1647,7 @@ config SND_SOC_WM8993 config SND_SOC_WM8994 tristate + depends on MFD_WM8994 config SND_SOC_WM8995 tristate
sound/soc/mediatek/common/mtk-afe-platform-driver.c +2 -2
@@ -120,8 +120,8 @@ int mtk_afe_pcm_new(struct snd_soc_component *component,struct mtk_base_afe *afe =snd_soc_component_get_drvdata (component); size = afe->mtk_afe_hardware->buffer_bytes_max; -snd_pcm_set_managed_buffer_all (pcm,SNDRV_DMA_TYPE_DEV , - afe->dev, size, size); +snd_pcm_set_managed_buffer_all (pcm,SNDRV_DMA_TYPE_DEV , afe->dev,0 , size); +return 0 ; }EXPORT_SYMBOL_GPL (mtk_afe_pcm_new);
sound/soc/samsung/Kconfig +4 -2
@@ -214,8 +214,9 @@ config SND_SOC_SAMSUNG_TM2_WM5110 config SND_SOC_SAMSUNG_ARIES_WM8994 tristate "SoC I2S Audio support for WM8994 on Aries" - depends on SND_SOC_SAMSUNG && MFD_WM8994 && IIO && EXTCON + depends on SND_SOC_SAMSUNG && I2C && IIO && EXTCON select SND_SOC_BT_SCO + select MFD_WM8994 select SND_SOC_WM8994 select SND_SAMSUNG_I2S help
@@ -227,8 +228,9 @@ config SND_SOC_SAMSUNG_ARIES_WM8994 config SND_SOC_SAMSUNG_MIDAS_WM1811 tristate "SoC I2S Audio support for Midas boards" - depends on SND_SOC_SAMSUNG + depends on SND_SOC_SAMSUNG && I2C select SND_SAMSUNG_I2S + select MFD_WM8994 select SND_SOC_WM8994 help Say Y if you want to add support for SoC audio on the Midas boards.
Is there something wrong with v5.10.234 patch 664760c49d98 ("xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals")?
In reply to Greg Kroah-HartmanHi, Greg,
The stable patch 664760c49d98 ("xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals") in linux-5.10.y, is different with the mainline patch. In the following code.
mainline:
-#ifdef CONFIG_PM
- xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend; - xhci_pci_hc_driver.pci_resume = xhci_pci_resume; - xhci_pci_hc_driver.pci_poweroff_late = xhci_pci_poweroff_late; - xhci_pci_hc_driver.shutdown = xhci_pci_shutdown; -#endif + xhci_pci_hc_driver.pci_suspend = pm_ptr(xhci_pci_suspend); + xhci_pci_hc_driver.pci_resume = pm_ptr(xhci_pci_resume); + xhci_pci_hc_driver.pci_poweroff_late = pm_ptr(xhci_pci_poweroff_late); + xhci_pci_hc_driver.shutdown = pm_ptr(xhci_pci_shutdown);
linux-5.10.y:
-#ifdef CONFIG_PM
xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend; xhci_pci_hc_driver.pci_resume = xhci_pci_resume; xhci_pci_hc_driver.shutdown = xhci_pci_shutdown;
-#endif
xhci_pci_shutdown() in mainline is wrapped with pm_ptr(), which is NULL if CONFIG_PM is not enabled, but for linux-5.10.y, xhci_pci_shutdown() it will not be converted to a NULL pointer. The .shutdown() function seems has been used in usb_hcd_platform_shutdown() in usb platfrom device shutdown routine:
drivers/usb/host/ehci-atmel.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-brcm.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-exynos.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-fsl.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-grlib.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-mxc.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-npcm7xx.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-omap.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-orion.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-platform.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-ppc-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-spear.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-st.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-xilinx-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-at91.c: usb_hcd_platform_shutdown(pdev); drivers/usb/host/ohci-at91.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-da8xx.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-omap.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-platform.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-ppc-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-pxa27x.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-s3c2410.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-sm501.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-st.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-tmio.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/xhci-plat.c: .shutdown = usb_hcd_platform_shutdown,
For the mainline patch seems does not want to call xhci_pci_shutdown() when CONFIG_PM is diabled, is there something wrong with the stable patch?
Re: Is there something wrong with v5.10.234 patch 664760c49d98 ("xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals")?
Sorry for make noise. Please ignore this messgae.
The latter patch c762b76981fc ("Partial revert of xhci: use pm_ptr() instead #ifdef for CONFIG_PM conditionals") patial revert the patch, So, there is no such problem with the patch.
Thanks,
Zekunk
Quoted 52 lines · Zhang Zekun
Hi, Greg,
The stable patch664760c49d98("xhci: usepm_ptr()instead of #ifdef forCONFIG_PMconditionals") in linux-5.10.y, is different with the mainline patch. In the following code.mainline:
(quoted diff) +4
-6-#ifdef CONFIG_PM - xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend; - xhci_pci_hc_driver.pci_resume = xhci_pci_resume; - xhci_pci_hc_driver.pci_poweroff_late = xhci_pci_poweroff_late; - xhci_pci_hc_driver.shutdown = xhci_pci_shutdown; -#endif + xhci_pci_hc_driver.pci_suspend = pm_ptr(xhci_pci_suspend); + xhci_pci_hc_driver.pci_resume = pm_ptr(xhci_pci_resume); + xhci_pci_hc_driver.pci_poweroff_late = pm_ptr(xhci_pci_poweroff_late); + xhci_pci_hc_driver.shutdown = pm_ptr(xhci_pci_shutdown);linux-5.10.y:
(quoted diff) +0
-2-#ifdef CONFIG_PM xhci_pci_hc_driver.pci_suspend = xhci_pci_suspend; xhci_pci_hc_driver.pci_resume = xhci_pci_resume; xhci_pci_hc_driver.shutdown = xhci_pci_shutdown; -#endif
xhci_pci_shutdown()in mainline is wrapped withpm_ptr(), which is NULL ifCONFIG_PMis not enabled, but for linux-5.10.y,xhci_pci_shutdown()it will not be converted to a NULL pointer. The .shutdown() function seems has been used inusb_hcd_platform_shutdown()in usb platfrom device shutdown routine:drivers/usb/host/ehci-atmel.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-brcm.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-exynos.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-fsl.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-grlib.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-mxc.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-npcm7xx.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-omap.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-orion.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-platform.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-ppc-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-spear.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-st.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ehci-xilinx-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-at91.c: usb_hcd_platform_shutdown(pdev); drivers/usb/host/ohci-at91.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-da8xx.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-omap.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-platform.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-ppc-of.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-pxa27x.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-s3c2410.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-sm501.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-st.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/ohci-tmio.c: .shutdown = usb_hcd_platform_shutdown, drivers/usb/host/xhci-plat.c: .shutdown = usb_hcd_platform_shutdown,For the mainline patch seems does not want to call
xhci_pci_shutdown()whenCONFIG_PMis diabled, is there something wrong with the stable patch?