From: Simon Horman <horms@kernel.org>
To: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
netdev@vger.kernel.org
Subject: Re: [PATCH iwl-next 1/2] iavf: log PF diagnostic message on cloud filter add failure
Date: Tue, 26 May 2026 20:40:50 +0100 [thread overview]
Message-ID: <20260526194050.GC2256768@horms.kernel.org> (raw)
In-Reply-To: <20260522025702.1764129-2-aleksandr.loktionov@intel.com>
On Fri, May 22, 2026 at 04:57:01AM +0200, Aleksandr Loktionov wrote:
> When the PF rejects a cloud filter add request it may include a
> diagnostic string in the virtchnl response. Use dev_info() to log it
> so operators can diagnose offload failures without enabling verbose
> tracing.
>
> Use %.*s with an explicit length bound to avoid reading past the end of
> the message buffer when the PF fills all 4096 bytes and leaves no NUL
> terminator. Add the missing cloud_filter_list_lock around both the
> VIRTCHNL_OP_ADD_CLOUD_FILTER and VIRTCHNL_OP_DEL_CLOUD_FILTER error
> paths to close a pre-existing race against iavf_add_cloud_filter() and
> iavf_del_cloud_filter(). Apply the same %.*s fix to the equivalent
> VIRTCHNL_OP_ADD_FDIR_FILTER error path which carried the same bug.
This seems to be doing several things. So I would suggest it warrants
being split into several patches.
And, if they are fixes, some consideration should be given
to targeting iwl and including Fixes tags in the patches.
Partially flagged by: https://netdev-ai.bots.linux.dev/sashiko/
Also, the locking fix here is made to the error path,
but not the non-error path (v_retval == 0) where
the VIRTCHNL_OP_ADD_CLOUD_FILTER and VIRTCHNL_OP_DEL_CLOUD_FILTER cases
traverse and update cloud_filter_list.
Flagged by https://sashiko.dev/
> Suggested-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> ---
> drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
...
> @@ -2434,8 +2443,10 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
> v_retval));
> iavf_print_fdir_fltr(adapter, fdir);
> if (msglen)
> - dev_err(&adapter->pdev->dev,
> - "%s\n", msg);
> + dev_info(&adapter->pdev->dev,
> + "%.*s\n",
> + (int)msglen,
> + (const char *)msg);
As well as addressing the length of msg, ad described in the commit
message, this also changes the priority of the message from err to info.
This seems to be a separate change that is not mentioned in the commit
message.
Also flagged by: https://sashiko.dev/
> list_del(&fdir->list);
> iavf_dec_fdir_active_fltr(adapter, fdir);
> kfree(fdir);
next prev parent reply other threads:[~2026-05-26 19:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 2:57 [PATCH iwl-next 0/2] iavf: two small logging improvements Aleksandr Loktionov
2026-05-22 2:57 ` [PATCH iwl-next 1/2] iavf: log PF diagnostic message on cloud filter add failure Aleksandr Loktionov
2026-05-26 19:40 ` Simon Horman [this message]
2026-05-22 2:57 ` [PATCH iwl-next 2/2] iavf: log primary MAC address confirmed by PF Aleksandr Loktionov
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=20260526194050.GC2256768@horms.kernel.org \
--to=horms@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/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