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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170908143833.yisoj3t2yp5httle@mwanda>
Date:   Fri, 8 Sep 2017 17:38:34 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Srishti Sharma <srishtishar@...il.com>
Cc:     gregkh@...uxfoundation.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, outreachy-kernel@...glegroups.com,
        laurent.pinchart@...asonboard.com, mchehab@...nel.org,
        linux-media@...r.kernel.org
Subject: Re: [PATCH] Staging: media: omap4iss: Use WARN_ON() instead of
 BUG_ON().

On Fri, Sep 08, 2017 at 07:38:18PM +0530, Srishti Sharma wrote:
> Use WARN_ON() instead of BUG_ON() to avoid crashing the kernel.
> 
> Signed-off-by: Srishti Sharma <srishtishar@...il.com>
> ---
>  drivers/staging/media/omap4iss/iss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c
> index c26c99fd..b1036ba 100644
> --- a/drivers/staging/media/omap4iss/iss.c
> +++ b/drivers/staging/media/omap4iss/iss.c
> @@ -893,7 +893,7 @@ void omap4iss_put(struct iss_device *iss)
>  		return;
> 
>  	mutex_lock(&iss->iss_mutex);
> -	BUG_ON(iss->ref_count == 0);
> +	WARN_ON(iss->ref_count == 0);

ref_counting bugs often have a security aspect.  BUG_ON() is probably
safer here.  Better to crash than to lose all your bitcoin.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ