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 5AB313AE18C; Tue, 13 Oct 2026 11:48:13 +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=1791892094; cv=none; b=ZKD2sGM7FBRbUKHTEvN68FiWaQl7UrCs0FSd2ed1No+nTsmG24WjjftpLzECInCi+kkNcw2zlIFyxtgH90eG1j5WUHU8GIZXCXxmIVtWRJ6W2AuoLA3l8tZpuLNP3Pwqda7DqKUu7bxqA7BBcD6CjPC0NA/MTqSTLkr/B9xmU0Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791892094; c=relaxed/simple; bh=rjazGmFkqU8qIeak1vctPzOen65bKGWDKCtpGYWBkvE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VE99xFkqJbYsae831+YhQ2Hm5eliDQZ0u6zM7zazNfJFT4Rs/4KEkKfMAjXYhWEVD+rf6VbSzlm9WkLr0OU1j2a1p+WcD70bWrlrVvFr0kDenw7sSJ9heZlrSEwJbGHEeHIMc9pGhgwpMVBA3BYa63IoSl3FMF3iVTp1E9cXWWU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vggE77Sz; 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="vggE77Sz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B5EB1F000FF; Tue, 13 Oct 2026 11:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791892093; bh=tuG2FjmpDWDwyEc9ZG7Vf3n1S1ieBh185cJQNq01K3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vggE77Sza/H8v6JI6LA2wsBkwt3shif00jUlNcb/aQbfkPrcsRTDhJxNAMy/d0aSA sz4inwIzHxQsgPujt+svz7utoJDS742YiLxfpw9UHlo9/Ups5cG81p+E/qnrz5tXP3 3u1HoaXCtICHlAp4pHPWLKsqT7q+4oNgefFghSDQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Harshitha Ramamurthy , Jordan Rhee , Joshua Washington , Jakub Kicinski Subject: [PATCH 7.2 057/281] gve: fix napi_disable deadlock when attempting to disable XSK pools Date: Tue, 13 Oct 2026 13:36:13 +0200 Message-ID: <20261013112856.436393055@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261013112855.045212108@linuxfoundation.org> References: <20261013112855.045212108@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 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joshua Washington commit 0cb6939a4dfefa822007b7a71986e06bc4f61f54 upstream. When disabling XSK pools, GVE calls the unlocked versions of napi_disable and napi_enable. However, the netdev lock has already been acquired before ndo_bpf is called because GVE supports queue management ops. Calling the unlocked versions of napi_disable/enable results in a deadlock when attempting to disable XSK pools, as the thread attempts to re-acquire a lock it already holds. Update the NAPI calls to use the locked versions. This issue was found in production. Fixes: 606048cbd834 ("net: designate XSK pool pointers in queues as "ops protected"") Cc: stable@vger.kernel.org Reviewed-by: Harshitha Ramamurthy Reviewed-by: Jordan Rhee Signed-off-by: Joshua Washington Link: https://patch.msgid.link/20260930214735.3288780-4-joshwash@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/google/gve/gve_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/google/gve/gve_main.c +++ b/drivers/net/ethernet/google/gve/gve_main.c @@ -1708,17 +1708,17 @@ static int gve_xsk_pool_disable(struct n } napi_rx = &priv->ntfy_blocks[priv->rx[qid].ntfy_id].napi; - napi_disable(napi_rx); /* make sure current rx poll is done */ + napi_disable_locked(napi_rx); /* make sure current rx poll is done */ tx_qid = gve_xdp_tx_queue_id(priv, qid); napi_tx = &priv->ntfy_blocks[priv->tx[tx_qid].ntfy_id].napi; - napi_disable(napi_tx); /* make sure current tx poll is done */ + napi_disable_locked(napi_tx); /* make sure current tx poll is done */ gve_unreg_xsk_pool(priv, qid); smp_mb(); /* Make sure it is visible to the workers on datapath */ - napi_enable(napi_rx); - napi_enable(napi_tx); + napi_enable_locked(napi_rx); + napi_enable_locked(napi_tx); if (gve_is_gqi(priv)) { if (gve_rx_work_pending(&priv->rx[qid])) napi_schedule(napi_rx);