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
..
2024-11-04 14:25:33 +10:00
2024-11-28 09:28:09 -08:00
2024-11-11 17:22:26 -08:00
2024-11-26 18:05:44 -08:00
2024-11-20 12:55:41 -08:00
2024-11-20 15:40:54 -08:00
2024-11-26 14:00:26 -08:00
2024-11-21 08:28:08 -08:00
2024-11-12 15:53:37 +01:00
2024-11-22 00:56:50 +02:00
2024-11-22 17:02:25 -08:00
2024-11-13 13:49:33 +01:00
2024-11-23 10:44:31 -08:00
2024-11-27 11:19:09 -08:00
2024-11-26 18:05:44 -08:00
2024-11-22 12:33:52 -08:00
2024-11-25 18:31:48 -08:00
2024-11-27 13:25:47 -08:00
2024-11-06 13:36:37 -08:00
2024-11-03 08:39:07 -08:00
2024-11-23 10:44:31 -08:00
2024-11-25 17:12:54 -08:00
2024-11-23 16:00:50 -08:00
2024-11-26 18:05:44 -08:00
2024-11-27 13:23:13 -08:00
2024-11-26 14:00:26 -08:00
2024-11-25 09:21:47 -08:00
2024-11-24 07:36:47 -08:00
2024-10-30 16:07:37 -05:00
2024-11-24 16:03:51 +01:00
2024-11-18 14:29:13 +01:00
2024-11-11 15:48:50 +01:00
2024-11-19 12:43:11 -08:00
2024-11-22 20:03:57 -08:00
2024-11-25 10:31:39 -08:00
2024-11-27 14:24:34 -08:00
2024-11-23 16:00:50 -08:00
2024-11-09 09:14:12 -08:00
2024-11-22 16:25:20 -08:00
2024-11-14 22:54:28 +11:00
2024-11-24 13:20:40 -06:00
2024-11-25 18:54:00 -08:00
2024-11-20 14:05:34 -08:00
2024-11-06 20:46:07 -05:00
2024-11-22 16:19:47 -08:00
2024-11-25 15:22:35 -08:00
2024-11-20 12:51:32 -08:00
2024-11-22 17:06:59 -08:00
2024-12-03 10:11:52 -08:00
2024-10-30 16:07:38 -05:00
2024-11-27 13:11:58 -08:00
2024-11-18 16:50:08 -08:00
2024-11-15 14:03:59 -06:00
2024-11-27 14:40:33 -08:00
2024-11-26 18:05:44 -08:00
2024-11-09 14:55:33 +01:00
2024-11-18 18:10:37 -08:00
2024-11-27 13:33:43 -08:00
2024-11-25 17:24:51 -08:00
2024-11-25 10:31:39 -08:00
2024-11-12 19:46:51 +01:00
2024-11-28 09:28:09 -08:00
2024-11-15 00:32:29 +11:00
2024-11-30 13:01:32 -08:00
2024-11-07 12:03:39 +01:00
2024-11-28 09:40:53 -08:00
2024-11-15 20:36:27 -08:00
2024-11-22 17:02:25 -08:00
2024-11-26 18:36:55 -08:00
2024-11-22 16:19:47 -08:00
2024-11-18 17:45:41 -08:00
2024-11-25 18:50:55 -08:00
2024-11-21 08:28:08 -08:00
2024-11-27 13:38:09 -08:00
2024-11-28 10:06:00 -08:00
2024-11-21 08:28:08 -08:00
2024-11-25 18:50:55 -08:00
2024-11-12 15:48:08 +01:00
2024-11-27 14:36:00 -08:00
2024-11-07 16:11:57 +01:00
2024-11-26 18:05:44 -08:00
2024-11-25 18:50:55 -08:00
2024-11-22 16:19:47 -08:00
2024-11-12 18:05:05 -05:00
2024-11-27 12:57:03 -08:00
2024-11-11 10:56:27 -08:00
2024-11-25 12:07:45 -08:00
2024-11-19 12:21:35 -08:00
2024-11-27 13:11:58 -08:00
2024-11-20 15:13:02 -08:00
2024-11-19 15:54:19 -08:00