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: <aIbV+WbhFMDamaiW@bhairav-test.ee.iitb.ac.in>
Date: Mon, 28 Jul 2025 07:14:25 +0530
From: Akhilesh Patil <akhilesh@...iitb.ac.in>
To: gregkh@...uxfoundation.org, jirislaby@...nel.org,
	andriy.shevchenko@...ux.intel.com, john.ogness@...utronix.de,
	pmladek@...e.com, johan@...nel.org, namcao@...utronix.de,
	timur@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
	linuxppc-dev@...ts.ozlabs.org, akhileshpatilvnit@...il.com,
	skhan@...uxfoundation.org
Subject: [PATCH] tty: serial: ucc_uart: use WARN_ON() instead of BUG()

Replace BUG() with WARN_ON() as recommended in
Documentation/process/deprecated.rst
Fix system entering into unstable/break/undebuggable state due to use
of BUG(). Follow strict suggestions as per [1] [2].

Link: https://lore.kernel.org/lkml/CA+55aFy6jNLsywVYdGp83AMrXBo_P-pkjkphPGrO=82SPKCpLQ@mail.gmail.com/ [1]
Link: https://lore.kernel.org/lkml/CAHk-=whDHsbK3HTOpTF=ue_o04onRwTEaK_ZoJp_fjbqq4+=Jw@mail.gmail.com/ [2]
Signed-off-by: Akhilesh Patil <akhilesh@...iitb.ac.in>
---
 drivers/tty/serial/ucc_uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 0613f8c11ab1..6214ab1b67cb 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -223,7 +223,7 @@ static inline dma_addr_t cpu2qe_addr(void *addr, struct uart_qe_port *qe_port)
 
 	/* something nasty happened */
 	printk(KERN_ERR "%s: addr=%p\n", __func__, addr);
-	BUG();
+	WARN_ON(1);
 	return 0;
 }
 
@@ -242,7 +242,7 @@ static inline void *qe2cpu_addr(dma_addr_t addr, struct uart_qe_port *qe_port)
 
 	/* something nasty happened */
 	printk(KERN_ERR "%s: addr=%llx\n", __func__, (u64)addr);
-	BUG();
+	WARN_ON(1);
 	return NULL;
 }
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ