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: <20190324121901.GB6569@kroah.com>
Date:   Sun, 24 Mar 2019 13:19:01 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Bharath Vedartham <linux.bhar@...il.com>
Cc:     jfrederich@...il.com, dsd@...top.org, jon.nettleton@...il.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] staging: olpc_dcon: Use WARN_ON instead of BUG_ON

On Sun, Mar 24, 2019 at 05:42:08PM +0530, Bharath Vedartham wrote:
> This is with respect to a checkpatch.pl CHECK: "Avoid crashing the
> kernel. Use WARN_ON instead of BUG_ON". But I maybe wrong here. Is a
> kernel crash desired if olpc_board_at_least(olpc_board(0xc2)) fails,
> will there be inconsistent results if execution continues?
> 
> Signed-off-by: Bharath Vedartham <linux.bhar@...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 6b714f7..900baab7 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)));

Shouldn't you do something to handle this error, if it can actually
happen?  Don't just warn and keep on going, if this was all that was
needed to fix up these types of issues, we could do it all in one simple
search/replace step :)

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ