From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DB121922FD for ; Mon, 29 Sep 2025 11:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759145154; cv=none; b=TM0Z0STKVH+97J1vzihfCO8LYMopEtG0ukQepH/ethboamWI1FgK73xfsp/cumsK4KDP6IVDp4J7YLkOd/5KyHmWy6lckpUpLek0ZeNiVo2UqruLBgew2Qm04mcHqABc0X5SkNL+0NAxCkLzO4M4JMgWEp1dedXh9BWlui5Ml6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759145154; c=relaxed/simple; bh=tAbkgC5CWWlc445dY9TTNJrc0geT8s5lhTemEnWE210=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=lyG2G94zJ4NfKqCdLhG1StpXsbXA30oUwxd+34WHspVz6eTDS0q4cZiNOqlu9cNNLYOSLPgsMDcmYfzfktjpJoXShu76JJi0xuYj9RptN6nRjsUiMmT0jqFIgeFH/KRRKslSCOlst8CDwBG6g/I24JFzC+D5y5LLeG7i3pe9UOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=klEjr5Z2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="klEjr5Z2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4C19C4CEF4; Mon, 29 Sep 2025 11:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759145153; bh=tAbkgC5CWWlc445dY9TTNJrc0geT8s5lhTemEnWE210=; h=Subject:To:Cc:From:Date:From; b=klEjr5Z2CKQgds49Z+w4c1xf+y9JgLzFwmzl+xkibPOoBkhaz8J0c8DC+JKBfPHIi +KL7rOTmsziRGRYgT6qU2LcNVsvhFVv1Y2YLG8P5ZKe0uBq7Rt1HBrco7WEG/Mzhk9 539ebq7IFoxk9CMMjlN/cagVot7Ljiwg4NxBcAMY= Subject: FAILED: patch "[PATCH] i40e: fix idx validation in config queues msg" failed to apply to 5.4-stable tree To: lukasz.czapnik@intel.com,aleksandr.loktionov@intel.com,anthony.l.nguyen@intel.com,horms@kernel.org,nellorex.kamakshi@intel.com,przemyslaw.kitszel@intel.com Cc: From: Date: Mon, 29 Sep 2025 13:25:38 +0200 Message-ID: <2025092937-trash-dainty-32e4@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y git checkout FETCH_HEAD git cherry-pick -x f1ad24c5abe1eaef69158bac1405a74b3c365115 # git commit -s git send-email --to '' --in-reply-to '2025092937-trash-dainty-32e4@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From f1ad24c5abe1eaef69158bac1405a74b3c365115 Mon Sep 17 00:00:00 2001 From: Lukasz Czapnik Date: Wed, 13 Aug 2025 12:45:13 +0200 Subject: [PATCH] i40e: fix idx validation in config queues msg Ensure idx is within range of active/initialized TCs when iterating over vf->ch[idx] in i40e_vc_config_queues_msg(). Fixes: c27eac48160d ("i40e: Enable ADq and create queue channel/s on VF") Cc: stable@vger.kernel.org Signed-off-by: Lukasz Czapnik Reviewed-by: Aleksandr Loktionov Signed-off-by: Przemek Kitszel Reviewed-by: Simon Horman Tested-by: Kamakshi Nellore (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 1c4f86221255..b6db4d78c02d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -2395,7 +2395,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg) } if (vf->adq_enabled) { - if (idx >= ARRAY_SIZE(vf->ch)) { + if (idx >= vf->num_tc) { aq_ret = -ENODEV; goto error_param; } @@ -2416,7 +2416,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg) * to its appropriate VSIs based on TC mapping */ if (vf->adq_enabled) { - if (idx >= ARRAY_SIZE(vf->ch)) { + if (idx >= vf->num_tc) { aq_ret = -ENODEV; goto error_param; }