public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Iman Reihanian <reihanianm@gmail.com>
Cc: parthiban.veerasooran@microchip.com,
	christian.gromm@microchip.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org, Iman Reihanian <ireihani@uci.edu>
Subject: Re: [PATCH] staging: most: video: replace BUG_ON with WARN_ON_ONCE
Date: Sun, 8 Mar 2026 19:45:51 +0100	[thread overview]
Message-ID: <2026030816-universe-deodorant-e706@gregkh> (raw)
In-Reply-To: <20260306011740.971756-1-ireihani@uci.edu>

On Thu, Mar 05, 2026 at 05:17:40PM -0800, Iman Reihanian wrote:
> BUG_ON causes a kernel panic if the condition is true, which is
> too severe for this cleanup check on module exit. Replace it with
> WARN_ON_ONCE to emit a warning and allow the system to continue.
> 
> Signed-off-by: Iman Reihanian <ireihani@uci.edu>
> ---
>  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..279ec98aa70e 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_ONCE(!list_empty(&video_devices));

This really doesn't "solve" anything, does it?  If panic-on-warn is
enabled, you still crashed the machine :(

How about fixing the root cause if this could ever happen?

thanks,

greg k-h

      reply	other threads:[~2026-03-08 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06  1:17 [PATCH] staging: most: video: replace BUG_ON with WARN_ON_ONCE Iman Reihanian
2026-03-08 18:45 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026030816-universe-deodorant-e706@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=christian.gromm@microchip.com \
    --cc=ireihani@uci.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=parthiban.veerasooran@microchip.com \
    --cc=reihanianm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox