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:   Wed, 7 Mar 2018 09:37:37 +0100
From:   Christian Gromm <christian.gromm@...rochip.com>
To:     Quytelda Kahja <quytelda@...alin.org>,
        <gregkh@...uxfoundation.org>, <dan.carpenter@...cle.com>
CC:     <devel@...verdev.osuosl.org>, <chris@...ineersdelight.de>,
        <linux-kernel@...r.kernel.org>, <Michael.Fabry@...rochip.com>
Subject: Re: [PATCH] staging: most: Remove unnecessary usage of BUG_ON().

On 07.03.2018 02:31, Quytelda Kahja wrote:
> There is no need for the calls to BUG_ON() in this driver, which are
> used to check if mbo or mbo->context are NULL; mbo is never NULL, and
> if mbo->context is NULL it would have already been dereferenced and
> oopsed before reaching the BUG_ON().
> 
> Signed-off-by: Quytelda Kahja <quytelda@...alin.org>
Acked-by: Christian Gromm <christian.gromm@...rochip.com>
> ---
>   drivers/staging/most/core.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
> index 0ab2de5ecf18..3afc25a61643 100644
> --- a/drivers/staging/most/core.c
> +++ b/drivers/staging/most/core.c
> @@ -915,7 +915,6 @@ static void arm_mbo(struct mbo *mbo)
>   	unsigned long flags;
>   	struct most_channel *c;
>   
> -	BUG_ON((!mbo) || (!mbo->context));
>   	c = mbo->context;
>   
>   	if (c->is_poisoned) {
> @@ -1018,8 +1017,6 @@ static void most_write_completion(struct mbo *mbo)
>   {
>   	struct most_channel *c;
>   
> -	BUG_ON((!mbo) || (!mbo->context));
> -
>   	c = mbo->context;
>   	if (mbo->status == MBO_E_INVAL)
>   		pr_info("WARN: Tx MBO status: invalid\n");
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ