linux/drivers
Leon Romanovsky 739cfa3451 net/mlx5: Make ASO poll CQ usable in atomic context
Poll CQ functions shouldn't sleep as they are called in atomic context.
The following splat appears once the mlx5_aso_poll_cq() is used in such
flow.

 BUG: scheduling while atomic: swapper/17/0/0x00000100
 Modules linked in: sch_ingress openvswitch nsh mlx5_vdpa vringh vhost_iotlb vdpa mlx5_ib mlx5_core xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm ib_uverbs ib_core fuse [last unloaded: mlx5_core]
 CPU: 17 PID: 0 Comm: swapper/17 Tainted: G        W          6.0.0-rc2+ #13
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
 Call Trace:
  <IRQ>
  dump_stack_lvl+0x34/0x44
  __schedule_bug.cold+0x47/0x53
  __schedule+0x4b6/0x670
  ? hrtimer_start_range_ns+0x28d/0x360
  schedule+0x50/0x90
  schedule_hrtimeout_range_clock+0x98/0x120
  ? __hrtimer_init+0xb0/0xb0
  usleep_range_state+0x60/0x90
  mlx5_aso_poll_cq+0xad/0x190 [mlx5_core]
  mlx5e_ipsec_aso_update_curlft+0x81/0xb0 [mlx5_core]
  xfrm_timer_handler+0x6b/0x360
  ? xfrm_find_acq_byseq+0x50/0x50
  __hrtimer_run_queues+0x139/0x290
  hrtimer_run_softirq+0x7d/0xe0
  __do_softirq+0xc7/0x272
  irq_exit_rcu+0x87/0xb0
  sysvec_apic_timer_interrupt+0x72/0x90
  </IRQ>
  <TASK>
  asm_sysvec_apic_timer_interrupt+0x16/0x20
 RIP: 0010:default_idle+0x18/0x20
 Code: ae 7d ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 8b 05 b5 30 0d 01 85 c0 7e 07 0f 00 2d 0a e3 53 00 fb f4 <c3> 0f 1f 80 00 00 00 00 0f 1f 44 00 00 65 48 8b 04 25 80 ad 01 00
 RSP: 0018:ffff888100883ee0 EFLAGS: 00000242
 RAX: 0000000000000001 RBX: ffff888100849580 RCX: 4000000000000000
 RDX: 0000000000000001 RSI: 0000000000000083 RDI: 000000000008863c
 RBP: 0000000000000011 R08: 00000064e6977fa9 R09: 0000000000000001
 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
  default_idle_call+0x37/0xb0
  do_idle+0x1cd/0x1e0
  cpu_startup_entry+0x19/0x20
  start_secondary+0xfe/0x120
  secondary_startup_64_no_verify+0xcd/0xdb
  </TASK>
 softirq: huh, entered softirq 8 HRTIMER 00000000a97c08cb with preempt_count 00000100, exited with 00000000?

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-10-12 09:16:05 +01:00
..
accessibility
acpi ACPI updates for 6.1-rc1 2022-10-03 13:19:53 -07:00
amba
android
ata Thermal control updates for 6.1-rc1 2022-10-03 15:33:38 -07:00
atm
auxdisplay
base Power management updates for 6.1-rc1 2022-10-03 13:26:47 -07:00
bcma
block Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
bluetooth Bluetooth: hci_{ldisc,serdev}: check percpu_init_rwsem() failure 2022-09-19 10:33:39 -07:00
bus bus: mhi: host: pci_generic: Add a secondary AT port to Telit FN990 2022-09-20 16:07:12 -07:00
cdrom
char
clk ACPI updates for 6.1-rc1 2022-10-03 13:19:53 -07:00
clocksource
comedi
connector
counter counter: 104-quad-8: Fix skipped IRQ lines during events configuration 2022-09-22 14:26:37 +02:00
cpufreq Power management updates for 6.1-rc1 2022-10-03 13:26:47 -07:00
cpuidle
crypto virtio-crypto: fix memory-leak 2022-09-27 18:30:48 -04:00
cxl
dax devdax: Fix soft-reservation memory description 2022-09-24 18:05:53 -07:00
dca
devfreq PM / devfreq: rockchip-dfi: Fix an error message 2022-09-26 03:59:43 +09:00
dio
dma
dma-buf
edac Merge branches 'edac-drivers' and 'edac-misc' into edac-updates-for-v6.1 2022-10-04 10:00:25 +02:00
eisa
extcon
firewire
firmware Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
fpga fpga: m10bmc-sec: Fix possible memory leak of flash_buf 2022-09-19 12:58:19 +08:00
fsi
gnss
gpio gpio: mvebu: Fix check for pwm support on non-A8K platforms 2022-09-26 09:20:09 +02:00
gpu Merge tag 'amd-drm-fixes-6.0-2022-09-30-1' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes 2022-09-30 23:10:55 +02:00
greybus
hid
hsi
hte
hv Merge branch 'acpi-dev' 2022-09-30 20:05:16 +02:00
hwmon Thermal control updates for 6.1-rc1 2022-10-03 15:33:38 -07:00
hwspinlock
hwtracing
i2c ACPI updates for 6.1-rc1 2022-10-03 13:19:53 -07:00
i3c
idle intel_idle: Add AlderLake-N support 2022-09-21 20:33:49 +02:00
iio Thermal control updates for 6.1-rc1 2022-10-03 15:33:38 -07:00
infiniband Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2022-09-28 19:20:49 -07:00
input Thermal control updates for 6.1-rc1 2022-10-03 15:33:38 -07:00
interconnect
iommu iommu/vt-d: Check correct capability for sagaw determination 2022-09-21 10:22:54 +02:00
ipack
irqchip irqchip/loongson-pch-lpc: Add dependence on LoongArch 2022-09-16 09:25:51 +01:00
isdn mISDN: hfcpci: Fix use-after-free bug in hfcpci_softirq 2022-10-09 19:11:54 +01:00
leds
macintosh
mailbox
mcb
md dlm for 6.1 2022-10-03 20:11:59 -07:00
media media fixes for v6.0-rc8 2022-10-01 09:27:18 -07:00
memory
memstick
message
mfd
misc hardening updates for v6.1-rc1 2022-10-03 17:24:22 -07:00
mmc mmc: hsq: Fix data stomping during mmc recovery 2022-09-27 12:38:29 +02:00
most
mtd
mux
net net/mlx5: Make ASO poll CQ usable in atomic context 2022-10-12 09:16:05 +01:00
nfc
ntb
nubus
nvdimm Merge branch 'for-6.0/dax' into libnvdimm-fixes 2022-09-24 18:14:12 -07:00
nvme block-6.0-2022-09-29 2022-09-30 09:33:33 -07:00
nvmem
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-22 13:02:10 -07:00
opp
parisc
parport
pci
pcmcia
peci
perf ACPI updates for 6.1-rc1 2022-10-03 13:19:53 -07:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
pinctrl Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-22 13:02:10 -07:00
platform Merge branch 'acpi-dev' 2022-09-30 20:05:16 +02:00
pnp PNPBIOS: remove unused pnpid32_to_pnpid() declaration 2022-09-24 18:07:42 +02:00
power
powercap powercap: intel_rapl: Use standard Energy Unit for SPR Dram RAPL domain 2022-09-24 19:32:46 +02:00
pps
ps3
ptp ] ptp: ocp: remove symlink for second GNSS 2022-10-10 08:37:24 +01:00
pwm
rapidio
ras
regulator Thermal control updates for 6.1-rc1 2022-10-03 15:33:38 -07:00
remoteproc
reset reset: npcm: fix iprst2 and iprst4 setting 2022-09-22 17:48:35 +02:00
rpmsg
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
sbus
scsi ATA fixes for 6.0-rc7 2022-09-29 05:40:59 -07:00
sh
siox
slimbus
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
soundwire
spi Merge branch 'acpi-uid' 2022-10-03 20:09:22 +02:00
spmi
ssb
staging Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
target
tc
tee
thermal Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
thunderbolt Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
tty serial: sifive: enable clocks for UART when probed 2022-09-22 16:38:18 +02:00
ufs
uio
usb ACPI updates for 6.1-rc1 2022-10-03 13:19:53 -07:00
vdpa Networking changes for 6.1. 2022-10-04 13:38:03 -07:00
vfio
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-10-03 17:44:18 -07:00
video
virt
virtio
vlynq
w1
watchdog
xen xen: branch for v6.0-rc7 2022-09-23 08:31:24 -07:00
zorro
Kconfig
Makefile