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]
Date:   Tue, 16 Apr 2019 13:43:01 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Madhumitha Prabakaran <madhumithabiw@...il.com>
Cc:     jfrederich@...il.com, dsd@...top.org, jon.nettleton@...il.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: olpc_dcon: Use WARN_ON() instead of BUG_ON()

On Fri, Apr 05, 2019 at 02:28:36PM -0500, Madhumitha Prabakaran wrote:
> Use WARN_ON() instead of BUG_ON(), as the WARN_ON() produces a backtrace
> without crashing the kernel.
> 
> Issue found by checkpatch.pl.
> 
> Signed-off-by: Madhumitha Prabakaran <madhumithabiw@...il.com>
> ---
>  drivers/staging/olpc_dcon/olpc_dcon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
> index 6b714f740ac3..900baab70691 100644
> --- a/drivers/staging/olpc_dcon/olpc_dcon.c
> +++ b/drivers/staging/olpc_dcon/olpc_dcon.c
> @@ -138,7 +138,7 @@ static int dcon_bus_stabilize(struct dcon_priv *dcon, int is_powered_down)
>  	}
>  	if (x < 0) {
>  		pr_err("unable to stabilize dcon's smbus, reasserting power and praying.\n");
> -		BUG_ON(olpc_board_at_least(olpc_board(0xc2)));
> +		WARN_ON(olpc_board_at_least(olpc_board(0xc2)));

If this change was as simple as this, we would have done it already :(

You have to properly handle this error that used to crash the system, by
properly correctly for it and continuing on.  You can't just log it and
keep on going, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ