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] [thread-next>] [day] [month] [year] [list]
Message-ID: <4062df04-e605-60c1-0cab-2d519efdc4b1@ti.com>
Date:   Mon, 5 Mar 2018 10:58:57 +0200
From:   Tero Kristo <t-kristo@...com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Vladimir Zapolskiy <vz@...ia.com>,
        Kamil Konieczny <k.konieczny@...tner.samsung.com>,
        <linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null
 request

On 01/03/18 22:50, Krzysztof Kozlowski wrote:
> ahash_request 'req' argument passed by the caller
> omap_sham_handle_queue() cannot be NULL here because it is obtained from
> non-NULL pointer via container_of().
> 
> This fixes smatch warning:
>      drivers/crypto/omap-sham.c:812 omap_sham_prepare_request() warn: variable dereferenced before check 'req' (see line 805)
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>

Acked-by: Tero Kristo <t-kristo@...com>

> ---
>   drivers/crypto/omap-sham.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 86b89ace836f..7650b1b449bb 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -809,9 +809,6 @@ static int omap_sham_prepare_request(struct ahash_request *req, bool update)
>   	bool final = rctx->flags & BIT(FLAGS_FINUP);
>   	int xmit_len, hash_later;
>   
> -	if (!req)
> -		return 0;
> -
>   	bs = get_block_size(rctx);
>   
>   	if (update)
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ