linux/drivers
Willem de Bruijn b04c4d9eb4 vrf: revert "vrf: Remove unnecessary RCU-bh critical section"
This reverts commit 504fc6f4f7.

dev_queue_xmit_nit is expected to be called with BH disabled.
__dev_queue_xmit has the following:

        /* Disable soft irqs for various locks below. Also
         * stops preemption for RCU.
         */
        rcu_read_lock_bh();

VRF must follow this invariant. The referenced commit removed this
protection. Which triggered a lockdep warning:

	================================
	WARNING: inconsistent lock state
	6.11.0 #1 Tainted: G        W
	--------------------------------
	inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
	btserver/134819 [HC0[0]:SC0[0]:HE1:SE1] takes:
	ffff8882da30c118 (rlock-AF_PACKET){+.?.}-{2:2}, at: tpacket_rcv+0x863/0x3b30
	{IN-SOFTIRQ-W} state was registered at:
	  lock_acquire+0x19a/0x4f0
	  _raw_spin_lock+0x27/0x40
	  packet_rcv+0xa33/0x1320
	  __netif_receive_skb_core.constprop.0+0xcb0/0x3a90
	  __netif_receive_skb_list_core+0x2c9/0x890
	  netif_receive_skb_list_internal+0x610/0xcc0
          [...]

	other info that might help us debug this:
	 Possible unsafe locking scenario:

	       CPU0
	       ----
	  lock(rlock-AF_PACKET);
	  <Interrupt>
	    lock(rlock-AF_PACKET);

	 *** DEADLOCK ***

	Call Trace:
	 <TASK>
	 dump_stack_lvl+0x73/0xa0
	 mark_lock+0x102e/0x16b0
	 __lock_acquire+0x9ae/0x6170
	 lock_acquire+0x19a/0x4f0
	 _raw_spin_lock+0x27/0x40
	 tpacket_rcv+0x863/0x3b30
	 dev_queue_xmit_nit+0x709/0xa40
	 vrf_finish_direct+0x26e/0x340 [vrf]
	 vrf_l3_out+0x5f4/0xe80 [vrf]
	 __ip_local_out+0x51e/0x7a0
          [...]

Fixes: 504fc6f4f7 ("vrf: Remove unnecessary RCU-bh critical section")
Link: https://lore.kernel.org/netdev/20240925185216.1990381-1-greearb@candelatech.com/
Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Cc: stable@vger.kernel.org
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20240929061839.1175300-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-10-02 17:26:11 -07:00
..
accel dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
accessibility
acpi pci-v6.12-changes 2024-09-23 12:47:06 -07:00
amba ARM: 9416/1: amba: make amba_bustype constant 2024-09-04 15:01:17 +01:00
android binder: modify the comment for binder_proc_unlock 2024-09-11 16:02:45 +02:00
ata ata changes for 6.12 2024-09-19 09:49:10 +02:00
atm
auxdisplay
base Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
bcma PCI: Rename CRS Completion Status to RRS 2024-09-10 19:52:30 -05:00
block for-6.12/block-20240925 2024-09-25 14:56:40 -07:00
bluetooth Bluetooth: btmrvl: Use IRQF_NO_AUTOEN flag in request_irq() 2024-09-27 10:52:19 -04:00
bus Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
cache
cdrom
cdx
char Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
clk The core clk framework is left largely untouched this time around except for 2024-09-23 15:01:48 -07:00
clocksource Updates for x86 timers: 2024-09-17 15:27:01 +02:00
comedi comedi: ni_routing: tools: Check when the file could not be opened 2024-09-11 16:03:28 +02:00
connector
counter
cpufreq In the v6.12 scheduler development cycle we had 63 commits from 18 contributors: 2024-09-19 15:55:58 +02:00
cpuidle pmdomain core: 2024-09-18 10:49:45 +02:00
crypto This push fixes the following issues: 2024-09-24 10:46:54 -07:00
cxl mm: make range-to-target_node lookup facility a part of numa_memblks 2024-09-03 21:15:32 -07:00
dax mm: make range-to-target_node lookup facility a part of numa_memblks 2024-09-03 21:15:32 -07:00
dca
devfreq PM / devfreq: imx-bus: Use of_property_present() 2024-09-05 01:23:56 +09:00
dio
dma dmaengine updates for v6.12 2024-09-23 14:08:08 -07:00
dma-buf drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
dpll
edac - Drop a now obsolete ppc4xx_edac driver 2024-09-16 06:36:37 +02:00
eisa
extcon Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
firewire firewire: core: rename cause flag of tracepoints event 2024-09-12 22:30:38 +09:00
firmware virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
fpga
fsi
gnss
gpio gpio updates for v6.12-rc1 2024-09-18 10:43:07 +02:00
gpu pci-v6.12-changes 2024-09-23 12:47:06 -07:00
greybus greybus: gb-beagleplay: Add firmware upload API 2024-09-12 09:04:09 +02:00
hid HID: hid-goodix: drop unsupported and undocumented DT part 2024-09-25 22:49:49 +02:00
hsi
hte
hv drm next for 6.12-rc1 2024-09-19 10:18:15 +02:00
hwmon platform-drivers-x86 for v6.12-1 2024-09-19 09:16:04 +02:00
hwspinlock
hwtracing
i2c i2c-for-6.12-rc1 2024-09-23 14:34:19 -07:00
i3c i3c: master: svc: Fix use after free vulnerability in svc_i3c_master Driver Due to Race Condition 2024-09-17 16:51:45 +02:00
idle
iio Merge 6.11-rc7 into char-misc-next 2024-09-09 08:36:23 +02:00
infiniband RDMA v6.12 merge window 2024-09-24 11:48:00 -07:00
input Input updates for v6.12-rc0 2024-09-24 12:42:35 -07:00
interconnect
iommu dma-mapping fixes for Linux 6.12 2024-09-24 12:00:37 -07:00
ipack
irqchip Updates for the interrupt subsystem: 2024-09-17 07:09:17 +02:00
isdn treewide: Fix wrong singular form of jiffies in comments 2024-09-08 20:47:40 +02:00
leds
macintosh dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
mailbox
mcb
md Linux 6.11 2024-09-17 08:32:53 -06:00
media media updates for v6.12-rc1 2024-09-23 15:27:58 -07:00
memory
memstick
message
mfd - Added support for the Analog Devices ADP5585 GPIO and PWM functions. 2024-09-23 14:17:08 -07:00
misc Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
mmc dma-mapping updates for linux 6.12 2024-09-19 11:12:49 +02:00
most
mtd Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
mux
net vrf: revert "vrf: Remove unnecessary RCU-bh critical section" 2024-10-02 17:26:11 -07:00
nfc
ntb ntb: Force physically contiguous allocation of rx ring buffers 2024-09-20 10:51:25 -04:00
nubus
nvdimm virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
nvme for-6.12/block-20240925 2024-09-25 14:56:40 -07:00
nvmem Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
of Kbuild updates for v6.12 2024-09-24 13:02:06 -07:00
opp Merge branches 'pm-sleep', 'pm-opp' and 'pm-tools' 2024-09-11 19:02:23 +02:00
parisc parisc: pdc_stable: Constify struct kobj_type 2024-09-09 08:53:17 +02:00
parport
pci pci-v6.12-changes 2024-09-23 12:47:06 -07:00
pcmcia
peci
perf RISC-V Patches for the 6.12 Merge Window, Part 1 2024-09-24 10:59:17 -07:00
phy phy-for-6.12 2024-09-23 14:05:10 -07:00
pinctrl This is the bulk of pin control changes for the v6.12 kernel cycle: 2024-09-23 13:15:23 -07:00
platform platform-drivers-x86 for v6.12-1 2024-09-19 09:16:04 +02:00
pmdomain pmdomain: core: Reduce debug summary table width 2024-09-13 13:41:33 +02:00
pnp
power power sequencing updates for v6.12-rc1 2024-09-18 10:46:27 +02:00
powercap
pps pps: add an error check in parport_attach 2024-09-03 12:33:09 +02:00
ps3
ptp ptp: ptp_ines: Remove setting of RX software timestamp 2024-09-09 17:44:42 -07:00
pwm pwm: stm32: Fix a typo 2024-09-16 15:24:59 +02:00
rapidio
ras
regulator regulator: sm5703: Remove because it is unused and fails to build 2024-09-13 19:08:14 +01:00
remoteproc remoteproc: k3-m4: use the proper dependencies 2024-09-24 12:48:35 -07:00
reset
rpmsg rpmsg: glink: Avoid -Wflex-array-member-not-at-end warnings 2024-09-13 14:09:47 -07:00
rtc RTC for 6.12 2024-09-25 14:38:37 -07:00
s390 s390 updates for 6.12 merge window 2024-09-21 09:02:54 -07:00
sbus
scsi for-6.12/block-20240925 2024-09-25 14:56:40 -07:00
sh
siox
slimbus slimbus: qcom-ngd-ctrl: use 'time_left' variable with wait_for_completion_timeout() 2024-09-03 12:10:38 +02:00
soc soc: driver updates for 6.12 2024-09-17 10:48:09 +02:00
soundwire soundwire updates for 6.12 2024-09-23 14:00:46 -07:00
spi spi: Fixes for v6.12 2024-09-25 14:49:34 -07:00
spmi
ssb
staging Char/Misc and other driver changes for 6.12-rc1 2024-09-26 10:13:08 -07:00
target
tc
tee optee: Fix a NULL vs IS_ERR() check 2024-09-09 12:22:06 +02:00
thermal - Add power domain DT bindings for new Amlogic SoCs (Georges Stark) 2024-09-10 10:54:15 +02:00
thunderbolt thunderbolt: Changes for v6.12 merge window 2024-09-11 15:17:43 +02:00
tty TTY/Serial driver update for 6.12-rc1 2024-09-26 09:59:50 -07:00
ufs Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
uio uio: Constify struct kobj_type 2024-09-11 16:02:54 +02:00
usb TTY/Serial driver update for 6.12-rc1 2024-09-26 09:59:50 -07:00
vdpa virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
vfio VFIO updates for v6.12 2024-09-24 12:07:47 -07:00
vhost virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
video - Added a check for the return value of spi_setup() in the l4f00242t03 driver to catch errors. 2024-09-23 14:29:11 -07:00
virt struct fd layout change (and conversion to accessor helpers) 2024-09-23 09:35:36 -07:00
virtio virtio: features, fixes, cleanups 2024-09-26 08:43:17 -07:00
w1 w1: ds2482: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-09-06 19:18:32 +02:00
watchdog linux-watchdog 6.12-rc1 tag 2024-09-23 13:19:37 -07:00
xen struct fd layout change (and conversion to accessor helpers) 2024-09-23 09:35:36 -07:00
zorro
Kconfig
Makefile leds: Init leds class earlier 2024-09-04 17:24:58 -05:00