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 41A1536921B; Sat, 12 Sep 2026 09:52:59 +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=1789206780; cv=none; b=SyFwOm4YKHtz68zCP4TddEJu4TVknLUCH1K8amXlbVR5ZWyIdBcVXU03JaIAPd5NPjW7jbXXHBU5uDDC1zMMdUJ+UjrDkR8BLDL7evMxOSjk+Ov3TUmNaJv+qaU1wHUh1ttcH+fYpzJY2u3aveyUXB6IV3/jGSsOEt9yyhlQODQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789206780; c=relaxed/simple; bh=1DR1VO/GhUMT1A4wBv07uQij0JREPrmxoWN6lVmMaaM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MQAtiAPdmPvElc0Mt4dw4m+W6edqFlDnr6/ibeyckUwesARX83lGsII7rRIgYVTZ9OAebsuvTp0XssVF4KZ9Fq0rEx0+mw/dsEQvyP5JJFQieuuOCwgMl0xigvNxTnBzdifMEyrbcE1pDu/LPkrNqpo5RH65yDd5r2x3pJy3meQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=p6m9tRPc; 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="p6m9tRPc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFC9B1F000FF; Sat, 12 Sep 2026 09:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789206779; bh=SC/dhnUXT9aQd5nUiw+ETSomr9FT/R+Qj6pfAX/W1h4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=p6m9tRPc6sKB9FcnUSt89fj7dHWGrdPedqj9pAoqu9HHj630pAx74hQdGxT3Vc5xR LW2+CIYJ0GIxrYZmnmfmzZaGOuHv60EyFKxnmDDBPtye7EoStsOJ7lceenichi4jmZ FoQPJcaWDVeruG2NiiobBHpFwPu5Zuw9lwQxRk2U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Ayush Mukkanwar , Sasha Levin Subject: [PATCH 6.18 0234/1518] staging: octeon: add missing napi_disable in cvm_oct_rx_shutdown Date: Sat, 12 Sep 2026 08:40:03 +0200 Message-ID: <20260912065628.778733722@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065623.398859879@linuxfoundation.org> References: <20260912065623.398859879@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ayush Mukkanwar [ Upstream commit c0a9a8586a63fda49e61a6b83360feac2a60d898 ] cvm_oct_rx_shutdown calls free_irq and netif_napi_del without disabling the napi instance first. As the free_irq only waits for completion of hard interrupt handlers, the napi poll function could still be active. If cvm_oct_remove proceeds to free the plat structure (which holds the NAPI instances), the active poll function will access freed memory, resulting in a use-after-free crash. Fixes: 3368c784bcf7 ("Staging: Octeon Ethernet: Convert to NAPI.") Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20260511150931.93382-1-ayushmukkanwar%40gmail.com Signed-off-by: Ayush Mukkanwar Link: https://patch.msgid.link/20260615172734.42038-2-ayushmukkanwar@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/octeon/ethernet-rx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/octeon/ethernet-rx.c b/drivers/staging/octeon/ethernet-rx.c index cd36b5ba6f6c2..3e9d58d321560 100644 --- a/drivers/staging/octeon/ethernet-rx.c +++ b/drivers/staging/octeon/ethernet-rx.c @@ -535,6 +535,8 @@ void cvm_oct_rx_shutdown(struct platform_device *pdev) else cvmx_write_csr(CVMX_POW_WQ_INT_THRX(i), 0); + napi_disable(&plat->rx_group[i].napi); + /* Free the interrupt handler */ free_irq(plat->rx_group[i].irq, &plat->rx_group[i].napi); -- 2.53.0