From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 7771D44AB68; Tue, 21 Jul 2026 21:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784669159; cv=none; b=oR+5TED6CUqwibClyrzj88Blr67jxE0iSuapXWy2Qbx021euvrWLofNafYg3FBR54KlwL8yRer2XtLRACJafK7pIS6dIXVx4GGpmTlqtfbBweXcxTXSMS/6hlaRF8Q5N24CZsCWFmHz1xKfPp+JP8IVkzjcucHpTk564byR/u0I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784669159; c=relaxed/simple; bh=3K8Pm34y74nlC4dX/K2S7qYwE7wxCcsGTr7oa76T80M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GFw4QnKcwt4VB/bQxzLiYwMtPmPFZTtcN+NRsj3oudtQuIlw8PQaaoU7po2VZ9/ts2xbDXN0GV4X3BQ3jWMnzeb0SwUFGgPAFpKwvDywJQG9TXlzpEFHJ9JElchwI1FTCisbAvddga5KksvUrUDSDqWqlSuc96/TtHv2YIz6CHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fnwz7+ay; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Fnwz7+ay" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCFDF1F000E9; Tue, 21 Jul 2026 21:25:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784669158; bh=Vo7MfUaE8Ilx4sMyakDoApcdnKEqHylAd2yBGLrYUVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fnwz7+ayw9r+mK34Z+ps0E8hM5AUN3I7zJbU92C+syAxjf6ssP1AQ4eUE+tAKPvja fWVobGLDMOqkadcZ4ne60S85Lv5fIsGZXWK6FEMl+kmuPDFYOJbHa2s2EAN5nHNxii qO5fxpueQgR2lgIxLNREBMBuaWa+ggh2tcOAQIbc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aditya Garg , Dipayaan Roy , Haiyang Zhang , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 0449/1067] net: mana: initialize gdma queue id to INVALID_QUEUE_ID Date: Tue, 21 Jul 2026 17:17:30 +0200 Message-ID: <20260721152434.663367818@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152424.521567757@linuxfoundation.org> References: <20260721152424.521567757@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Aditya Garg [ Upstream commit 5985474e1cb4034680fac2145497a94b0860be50 ] mana_gd_create_mana_wq_cq() leaves queue->id as 0 (from kzalloc_obj()) until mana_create_wq_obj() assigns the firmware-returned id. If creation fails before that, cleanup calls mana_gd_destroy_cq() with id 0, NULLing gc->cq_table[0] and silently breaking whichever real CQ owns that slot. Initialize queue->id to INVALID_QUEUE_ID right after allocation, matching mana_gd_create_eq(). The existing (id >= max_num_cqs) guard then short-circuits cleanly. Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Signed-off-by: Aditya Garg Reviewed-by: Dipayaan Roy Reviewed-by: Haiyang Zhang Link: https://patch.msgid.link/20260608101345.2267320-2-gargaditya@linux.microsoft.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/microsoft/mana/gdma_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c index 9e55679796d938..014deff90a6c43 100644 --- a/drivers/net/ethernet/microsoft/mana/gdma_main.c +++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c @@ -805,6 +805,8 @@ int mana_gd_create_mana_wq_cq(struct gdma_dev *gd, if (!queue) return -ENOMEM; + queue->id = INVALID_QUEUE_ID; + gmi = &queue->mem_info; err = mana_gd_alloc_memory(gc, spec->queue_size, gmi); if (err) -- 2.53.0