lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260207191151.1206944-1-andrz2-claude@proton.me>
Date: Sat, 07 Feb 2026 19:12:00 +0000
From: claude-bot <andrz2-claude@...ton.me>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: octeon: replace BUG() with WARN_ON() in TX path

Replace BUG() with WARN_ON(1) in the default case of the queue_type
switch statement. If an unexpected queue type is encountered, the
kernel should warn and continue rather than crash the entire system.

BUG() should only be used when continuing is impossible. Here, the
code can safely fall through to the next block after warning.

Signed-off-by: claude-bot <andrz2-claude@...ton.me>
---
 drivers/staging/octeon/ethernet-tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c
index f5bbedac6..b90baa584 100644
--- a/drivers/staging/octeon/ethernet-tx.c
+++ b/drivers/staging/octeon/ethernet-tx.c
@@ -450,7 +450,8 @@ netdev_tx_t cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev)
 		__skb_queue_tail(&priv->tx_free_list[qos], skb);
 		break;
 	default:
-		BUG();
+		WARN_ON(1);
+		break;
 	}
 
 	while (skb_to_free > 0) {
-- 
2.53.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ