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 A29E23002A6 for ; Mon, 29 Sep 2025 11:25:38 +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=1759145138; cv=none; b=CA+8W1U9xIrWgHFU/SWIkPjq337xRnq1S8wCQZANwTqKwqPAZhPKuJoAXXKiUhB0yimLLqkgywKof7lJa0+MAEdzDHfylCLQEPf8XfkoVqLK9czjRiMuTBNC4eZhCIu2pycColMi24deTS6Di4+PbsFmP0H54cGeF2X4Ntmu//U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759145138; c=relaxed/simple; bh=EEqiY09AMCK6HjnVQEEIeuEjyFH5kR1OOtouic1ztbg=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=OBt66igNOfrPYLVtyFmoVbiR0dmZyS7h5XLVc4UfWHjas3f5BnHNWNhXz8Sz+ExryclY1f5fCXZoOPbbXS3/unGRovjiwuxcFbsCODNcB0y0bER2/NFIf1oI3bo2V0V8rXrjYK9RP5ziFOak1buqmwuGkI8FiV7DnajxS7TUkmA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FUv5zLHI; 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="FUv5zLHI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 165AEC4CEF4; Mon, 29 Sep 2025 11:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759145138; bh=EEqiY09AMCK6HjnVQEEIeuEjyFH5kR1OOtouic1ztbg=; h=Subject:To:Cc:From:Date:From; b=FUv5zLHIB0TGF6oVmxmDlxOewaGjj49dz0t2VQnZhb/2Cxa4NyiK0H9zJ1vDoMDt6 qa0hXRtsEdrcxgUXaI455n09zX7YDl5Fvzv0XiP9ur/V256AZ4+zidaH7zWXw7RTo0 49icXdt0DkogEpndEm9LCD8gdIdZP1PgYYNNh7ts= Subject: FAILED: patch "[PATCH] i40e: fix idx validation in config queues msg" failed to apply to 6.1-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:35 +0200 Message-ID: <2025092935-lethargy-falcon-de3b@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 6.1-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-6.1.y git checkout FETCH_HEAD git cherry-pick -x f1ad24c5abe1eaef69158bac1405a74b3c365115 # git commit -s git send-email --to '' --in-reply-to '2025092935-lethargy-falcon-de3b@gregkh' --subject-prefix 'PATCH 6.1.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; }