linux/drivers
Wojciech Drewek 9ee87d2b21 ice: Fix NULL pointer dereference in switchdev
Commit 608a5c05c3 ("virtchnl: support queue rate limit and quanta
size configuration") introduced new virtchnl ops:
- get_qos_caps
- cfg_q_bw
- cfg_q_quanta

New ops were added to ice_virtchnl_dflt_ops, in
commit 015307754a ("ice: Support VF queue rate limit and quanta
size configuration"), but not to the ice_virtchnl_repr_ops. Because
of that, if we get one of those messages in switchdev mode we end up
with NULL pointer dereference:

[ 1199.794701] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 1199.794804] Workqueue: ice ice_service_task [ice]
[ 1199.794878] RIP: 0010:0x0
[ 1199.795027] Call Trace:
[ 1199.795033]  <TASK>
[ 1199.795039]  ? __die+0x20/0x70
[ 1199.795051]  ? page_fault_oops+0x140/0x520
[ 1199.795064]  ? exc_page_fault+0x7e/0x270
[ 1199.795074]  ? asm_exc_page_fault+0x22/0x30
[ 1199.795086]  ice_vc_process_vf_msg+0x6e5/0xd30 [ice]
[ 1199.795165]  __ice_clean_ctrlq+0x734/0x9d0 [ice]
[ 1199.795207]  ice_service_task+0xccf/0x12b0 [ice]
[ 1199.795248]  process_one_work+0x21a/0x620
[ 1199.795260]  worker_thread+0x18d/0x330
[ 1199.795269]  ? __pfx_worker_thread+0x10/0x10
[ 1199.795279]  kthread+0xec/0x120
[ 1199.795288]  ? __pfx_kthread+0x10/0x10
[ 1199.795296]  ret_from_fork+0x2d/0x50
[ 1199.795305]  ? __pfx_kthread+0x10/0x10
[ 1199.795312]  ret_from_fork_asm+0x1a/0x30
[ 1199.795323]  </TASK>

Fixes: 015307754a ("ice: Support VF queue rate limit and quanta size configuration")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2024-12-03 10:11:52 -08:00
..
accel Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2024-11-04 14:25:33 +10:00
accessibility
acpi power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
amba
android mm/list_lru: simplify the list_lru walk callback function 2024-11-11 17:22:26 -08:00
ata pci-v6.13-changes 2024-11-26 18:05:44 -08:00
atm
auxdisplay auxdisplay for v6.13-1 2024-11-20 12:55:41 -08:00
base soc: driver updates for 6.12 2024-11-20 15:40:54 -08:00
bcma
block Rust changes for v6.13 2024-11-26 14:00:26 -08:00
bluetooth Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
bus bus: Switch back to struct platform_driver::remove() 2024-11-12 15:53:37 +01:00
cache
cdrom
cdx
char tpm: atmel: Drop PPC64 specific MMIO setup 2024-11-22 00:56:50 +02:00
clk The core framework gained a clk provider helper, a clk consumer helper, and 2024-11-22 17:02:25 -08:00
clocksource clocksource/drivers/arm_arch_timer: Use of_property_present() for non-boolean properties 2024-11-13 13:49:33 +01:00
comedi
connector
counter
cpufreq powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
cpuidle RISC-V Paches for the 6.13 Merge Window, Part 1 2024-11-27 11:19:09 -08:00
crypto pci-v6.13-changes 2024-11-26 18:05:44 -08:00
cxl cxl changes for v6.13 2024-11-22 12:33:52 -08:00
dax libnvdimm additions for 6.13 2024-11-25 18:31:48 -08:00
dca
devfreq
dio
dma dmaengine updates for v6.13 2024-11-27 13:25:47 -08:00
dma-buf dma-buf: use atomic64_inc_return() in dma_buf_getfile() 2024-11-06 13:36:37 -08:00
dpll dpll: add clock quality level attribute and op 2024-11-03 08:39:07 -08:00
edac powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
eisa
extcon
firewire firewire updates for v6.13 2024-11-25 17:12:54 -08:00
firmware The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
fpga pci-v6.13-changes 2024-11-26 18:05:44 -08:00
fsi
gnss
gpio gpio fixes for v6.13-rc1 2024-11-27 13:23:13 -08:00
gpu Rust changes for v6.13 2024-11-26 14:00:26 -08:00
greybus
hid Revert "HID: bpf: allow write access to quirks field in struct hid_device" 2024-11-25 09:21:47 -08:00
hsi
hte
hv
hwmon hwmon: (aquacomputer_d5next) Fix length of speed_input array 2024-11-24 07:36:47 -08:00
hwspinlock
hwtracing intel_th: pci: Replace deprecated PCI functions 2024-10-30 16:07:37 -05:00
i2c i2c: designware: determine HS tHIGH and tLOW based on HW parameters 2024-11-24 16:03:51 +01:00
i3c i3c: Use i3cdev->desc->info instead of calling i3c_device_get_info() to avoid deadlock 2024-11-18 14:29:13 +01:00
idle intel_idle: add Granite Rapids Xeon D support 2024-11-11 15:48:50 +01:00
iio Locking changes for v6.13 are: 2024-11-19 12:43:11 -08:00
infiniband RDMA v6.13 merge window pull request 2024-11-22 20:03:57 -08:00
input Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
interconnect
iommu iommufd 6.13 merge window pull #2 2024-11-27 14:24:34 -08:00
ipack
irqchip The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
isdn mISDN: Fix typos 2024-11-09 09:14:12 -08:00
leds - Removed unused local header files from various drivers. 2024-11-22 16:25:20 -08:00
macintosh macintosh: Use common error handling code in via_pmu_led_init() 2024-11-14 22:54:28 +11:00
mailbox mailbox: pcc: Check before sending MCTP PCC response ACK 2024-11-24 13:20:40 -06:00
mcb
md - Dm: remove unused functions and variables 2024-11-25 18:54:00 -08:00
media media updates for v6.13-rc1 2024-11-20 14:05:34 -08:00
memory
memstick
message scsi: fusion: Remove unused variable 'rc' 2024-11-06 20:46:07 -05:00
mfd - Several drivers, including atmel-flexcom/rk8xx-core, palmas, and 2024-11-22 16:19:47 -08:00
misc hardening updates for v6.13-rc1 2024-11-25 15:22:35 -08:00
mmc MMC core: 2024-11-20 12:51:32 -08:00
most
mtd MTD device changes: Aside from the platform_driver::remove() switch, two 2024-11-22 17:06:59 -08:00
mux
net ice: Fix NULL pointer dereference in switchdev 2024-12-03 10:11:52 -08:00
nfc
ntb ntb: idt: Replace deprecated PCI functions 2024-10-30 16:07:38 -05:00
nubus
nvdimm virtio: features, fixes, cleanups 2024-11-27 13:11:58 -08:00
nvme for-6.13/block-20241118 2024-11-18 16:50:08 -08:00
nvmem
of Merge branch 'dt/linus' into dt/next 2024-11-15 14:03:59 -06:00
opp Additional power management updates for 6.13-rc1 2024-11-27 14:40:33 -08:00
parisc
parport
pci pci-v6.13-changes 2024-11-26 18:05:44 -08:00
pcmcia pcmcia: soc_common: Avoid using GPIOF_ACTIVE_LOW 2024-11-09 14:55:33 +01:00
peci
perf arm64 updates for 6.13: 2024-11-18 18:10:37 -08:00
phy phy-for-6.13 2024-11-27 13:33:43 -08:00
pinctrl This is the bulk of the pin control changes for v6.13: 2024-11-25 17:24:51 -08:00
platform Input updates for v6.13-rc0 2024-11-25 10:31:39 -08:00
pmdomain pmdomain: qcom: rpmhpd: Add rpmhpd support for SM8750 2024-11-12 19:46:51 +01:00
pnp
power power supply and reset changes for the 6.13 series 2024-11-28 09:28:09 -08:00
powercap
pps
ps3 ps3: Correct some typos in comments 2024-11-15 00:32:29 +11:00
ptp ptp: Add error handling for adjfine callback in ptp_clock_adjtime 2024-11-30 13:01:32 -08:00
pwm pwm: Assume a disabled PWM to emit a constant inactive output 2024-11-07 12:03:39 +01:00
rapidio
ras
regulator regulator: Fixes for v6.13 2024-11-28 09:40:53 -08:00
remoteproc remoteproc: qcom: wcss: Remove double assignment in q6v5_wcss_probe() 2024-11-15 20:36:27 -08:00
reset The core framework gained a clk provider helper, a clk consumer helper, and 2024-11-22 17:02:25 -08:00
rpmsg rpmsg updates for v6.13 2024-11-26 18:36:55 -08:00
rtc - Several drivers, including atmel-flexcom/rk8xx-core, palmas, and 2024-11-22 16:19:47 -08:00
s390 s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
sbus
scsi SCSI misc on 20241125 2024-11-25 18:50:55 -08:00
sh
siox
slimbus
soc Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
soundwire soundwire updates for 6.13 2024-11-27 13:38:09 -08:00
spi spi: Fixes for v6.13 2024-11-28 10:06:00 -08:00
spmi
ssb
staging Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
target SCSI misc on 20241125 2024-11-25 18:50:55 -08:00
tc TC: Fix the wrong format specifier 2024-11-12 15:48:08 +01:00
tee
thermal Additional thermal control updates for 6.13-rc1 2024-11-27 14:36:00 -08:00
thunderbolt thunderbolt: Fixes for v6.12-rc7 2024-11-07 16:11:57 +01:00
tty pci-v6.13-changes 2024-11-26 18:05:44 -08:00
ufs SCSI misc on 20241125 2024-11-25 18:50:55 -08:00
uio
usb - Several drivers, including atmel-flexcom/rk8xx-core, palmas, and 2024-11-22 16:19:47 -08:00
vdpa vdpa/mlx5: Fix suboptimal range on iotlb iteration 2024-11-12 18:05:05 -05:00
vfio VFIO updates for v6.13 2024-11-27 12:57:03 -08:00
vhost mm: page_frag: avoid caller accessing 'page_frag_cache' directly 2024-11-11 10:56:27 -08:00
video fbdev fixes and updates for 6.13-rc1: 2024-11-25 12:07:45 -08:00
virt - Do the proper memory conversion of guest memory in order to be able to kexec 2024-11-19 12:21:35 -08:00
virtio virtio: features, fixes, cleanups 2024-11-27 13:11:58 -08:00
w1
watchdog asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
xen A set of updates for the interrupt subsystem: 2024-11-19 15:54:19 -08:00
zorro
Kconfig
Makefile