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-prev] [day] [month] [year] [list]
Message-ID: <2026020918-cognition-lemon-b050@gregkh>
Date: Mon, 9 Feb 2026 11:33:48 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: Yuvraj Singh Chauhan <ysinghcin@...il.com>
Cc: parthiban.veerasooran@...rochip.com, christian.gromm@...rochip.com,
	linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: most: dim2: replace BUG_ON with WARN_ON_ONCE
 and error handling

On Mon, Feb 09, 2026 at 03:48:29PM +0530, Yuvraj Singh Chauhan wrote:
> Replace BUG_ON() with WARN_ON_ONCE() and proper error handling in the
> DIM2 driver. BUG_ON() crashes the entire kernel, which is excessive for
> conditions that can be handled by returning error codes or exiting the
> function early.

WARN_ON() also crashes the kernel if you have panic-on-warn enabled,
which a few billion Linux systems in the world currently have.

So this isn't a valid change at all, sorry.  If these things can happen,
properly handle the error and recover.  If no recovery is possible, and
by hitting these cases the system is so broken that total loss of all
data and memory is the only valid solution, then BUG_ON() should remain.

hope this helps,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ