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 <[email protected]> > Signed-off-by: Aleksandr Loktionov <[email protected]> > --- > 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);
