From: Simon Horman <horms@kernel.org>
To: Wojciech Drewek <wojciech.drewek@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] ice: Fix NULL pointer dereference in switchdev
Date: Mon, 4 Nov 2024 11:46:19 +0000 [thread overview]
Message-ID: <20241104114619.GB2118587@kernel.org> (raw)
In-Reply-To: <20241029094259.77738-1-wojciech.drewek@intel.com>
On Tue, Oct 29, 2024 at 10:42:59AM +0100, Wojciech Drewek wrote:
> Commit ("virtchnl: support queue rate limit and quanta size
It would be nice to include 12 characters of sha1 hash immediately
after "Commit".
> configuration") introduced new virtchnl ops:
> - get_qos_caps
> - cfg_q_bw
> - cfg_q_quanta
>
> New ops were added to ice_virtchnl_dflt_ops 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>
It seems that the cited commit is present in net-next but not Linus's tree.
But, regardless, I think a Fixes tag is warranted.
>
> 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>
The fix itself looks good to me, thanks.
Reviewed-by: Simon Horman <horms@kernel.org>
...
next prev parent reply other threads:[~2024-11-04 11:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 9:42 [PATCH net-next] ice: Fix NULL pointer dereference in switchdev Wojciech Drewek
2024-11-04 11:46 ` Simon Horman [this message]
2024-11-07 12:08 ` [Intel-wired-lan] " Buvaneswaran, Sujai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241104114619.GB2118587@kernel.org \
--to=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=wojciech.drewek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).