* [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit()
@ 2026-04-08 9:00 Gabriel Rondon
2026-04-08 10:48 ` Greg Kroah-Hartman
2026-04-08 11:27 ` Gabriel Rondon
0 siblings, 2 replies; 3+ messages in thread
From: Gabriel Rondon @ 2026-04-08 9:00 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Christian Gromm, Parthiban Veerasooran, linux-staging,
linux-kernel
Replace BUG_ON(!list_empty(&video_devices)) with WARN_ON() in the
module exit function. BUG_ON() is deprecated as it crashes the entire
kernel on assertion failure (see Documentation/process/deprecated.rst).
WARN_ON() logs the unexpected condition without bringing down the
system.
This is the last remaining BUG_ON() in the staging/most subsystem,
following the dim2 series that replaced five BUG_ON() calls.
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
---
drivers/staging/most/video/video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 04351f8ccccf..17cdbea2e55a 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -577,7 +577,7 @@ static void __exit comp_exit(void)
most_deregister_configfs_subsys(&comp);
most_deregister_component(&comp);
- BUG_ON(!list_empty(&video_devices));
+ WARN_ON(!list_empty(&video_devices));
}
module_init(comp_init);
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit()
2026-04-08 9:00 [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit() Gabriel Rondon
@ 2026-04-08 10:48 ` Greg Kroah-Hartman
2026-04-08 11:27 ` Gabriel Rondon
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2026-04-08 10:48 UTC (permalink / raw)
To: Gabriel Rondon
Cc: Christian Gromm, Parthiban Veerasooran, linux-staging,
linux-kernel
On Wed, Apr 08, 2026 at 10:00:24AM +0100, Gabriel Rondon wrote:
> Replace BUG_ON(!list_empty(&video_devices)) with WARN_ON() in the
> module exit function. BUG_ON() is deprecated as it crashes the entire
> kernel on assertion failure (see Documentation/process/deprecated.rst).
> WARN_ON() logs the unexpected condition without bringing down the
> system.
>
> This is the last remaining BUG_ON() in the staging/most subsystem,
> following the dim2 series that replaced five BUG_ON() calls.
>
> Signed-off-by: Gabriel Rondon <grondon@gmail.com>
> ---
> drivers/staging/most/video/video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
> index 04351f8ccccf..17cdbea2e55a 100644
> --- a/drivers/staging/most/video/video.c
> +++ b/drivers/staging/most/video/video.c
> @@ -577,7 +577,7 @@ static void __exit comp_exit(void)
>
> most_deregister_configfs_subsys(&comp);
> most_deregister_component(&comp);
> - BUG_ON(!list_empty(&video_devices));
> + WARN_ON(!list_empty(&video_devices));
WARN_ON() also crashes the system when panic-on-warn is enabled (as it
is in a few billion Linux systems...)
So please handle this properly, don't crash.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit()
2026-04-08 9:00 [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit() Gabriel Rondon
2026-04-08 10:48 ` Greg Kroah-Hartman
@ 2026-04-08 11:27 ` Gabriel Rondon
1 sibling, 0 replies; 3+ messages in thread
From: Gabriel Rondon @ 2026-04-08 11:27 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Christian Gromm, Parthiban Veerasooran, linux-staging,
linux-kernel
On Wed, 8 Apr 2026 12:48:42 +0200, Greg Kroah-Hartman wrote:
> WARN_ON() also crashes the system when panic-on-warn is enabled (as it
> is in a few billion Linux systems...)
>
> So please handle this properly, don't crash.
Good point, will send v2 with pr_warn() instead.
Thanks,
Gabriel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-08 11:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 9:00 [PATCH] staging: most: video: replace BUG_ON() with WARN_ON() in comp_exit() Gabriel Rondon
2026-04-08 10:48 ` Greg Kroah-Hartman
2026-04-08 11:27 ` Gabriel Rondon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox