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 50EC026ED46; Sat, 12 Sep 2026 19:48:24 +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=1789242505; cv=none; b=t4dd2CwgvouFllPZ4fM52cyMRcX6D+xo+P6U5cWHQ+UeKNLJZswrCzeZA3LHNjjevz8gpc0wKcASRYsd5N4hOilX91ELRH3oDEkaCZVo49t/wYmJn43TOk7ltI9CcUroIblXhWBOLmgdm6z3xnJR+AvvvmwnXk9DeBfHyzzkc18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789242505; c=relaxed/simple; bh=7dRpuTqZSy0HcRQrSkgjIDR/0ma8tfOuPKklLOSoETg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tcIUbwH6IRC1QMDIIctsVzUnsIkmpU604+wUzjGIcONw9jFBVRzkd3BJFcP71TI95qtmaQlryASmIZZmfvimALlL1Gs1MktdsFtuSCX/p+L45f1MEMpSClMWvd0TIVaA9NIgsrmyqVrw31XEs/5//aZWB4ouHhLGVkx7aYPOZv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=X6hnfLej; 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="X6hnfLej" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B084C1F000FF; Sat, 12 Sep 2026 19:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789242504; bh=AxM4EvcWJB9lS17bcJ114cqrkGfEdv9qk11xeGdCotM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=X6hnfLejIcwiWPi1JQ2ltPYe/Ui81NZxFgBgDse8QbTS09VHq1gKmwrtl4poUw6IV E2ZBQmm8cZTLXVP8QqWoNOds9IKjb8reNgRyhDAErk4RUZUna+ehQyF6BD5HZrQ+RJ Y7r0IqgoEZbNoEjjjd069JJLTiTDPJA/Nvs7N4ts= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Ayush Mukkanwar , Sasha Levin Subject: [PATCH 5.10 385/798] staging: octeon: add missing tasklet_kill in cvm_oct_tx_shutdown Date: Sat, 12 Sep 2026 09:00:13 +0200 Message-ID: <20260912065525.975488378@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065516.948645775@linuxfoundation.org> References: <20260912065516.948645775@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 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ayush Mukkanwar [ Upstream commit b9af44b0d20b2247c4eb0ea5cfca907d643eea50 ] The TX cleanup tasklet can be scheduled by the watchdog IRQ handler to execute cvm_oct_tx_do_cleanup. There can be a pending tasklet in the queue which might run after the cvm_oct_remove() frees net_device structures, causing a use-after-free in cvm_oct_tx_do_cleanup() as it iterates cvm_oct_device[] which is an array of netdevice pointers. Add tasklet_kill() after free_irq() to ensure the tasklet is no longer scheduled or running before teardown proceeds. Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner") 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-1-ayushmukkanwar@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/octeon/ethernet-tx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index 9c71ad5af7b98..26876cd6a9b42 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -714,4 +714,6 @@ void cvm_oct_tx_shutdown(void) { /* Free the interrupt handler */ free_irq(OCTEON_IRQ_TIMER1, cvm_oct_device); + + tasklet_kill(&cvm_oct_tx_cleanup_tasklet); } -- 2.53.0