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: <20191123135236.johugbmuwpecnhsf@gondor.apana.org.au>
Date:   Sat, 23 Nov 2019 21:52:36 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Chuhong Yuan <hslester96@...il.com>
Cc:     Jamie Iles <jamie@...ieiles.com>,
        "David S . Miller" <davem@...emloft.net>,
        linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] crypto: picoxcell: adjust the position of
 tasklet_init and fix missed tasklet_kill

On Sat, Nov 23, 2019 at 09:48:17PM +0800, Chuhong Yuan wrote:
> Since tasklet is needed to be initialized before registering IRQ
> handler, adjust the position of tasklet_init to fix the wrong order.
> 
> Besides, to fix the missed tasklet_kill, this patch adds a helper
> function and uses devm_add_action_or_reset to kill the tasklet
> automatically.
> 
> Fixes: ce92136843cb ("crypto: picoxcell - add support for the picoxcell crypto engines")
> Signed-off-by: Chuhong Yuan <hslester96@...il.com>
> ---
> Changes in v3:
>   - Use devm_add_action_or_reset to simplify the patch.
> 
>  drivers/crypto/picoxcell_crypto.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)

Thanks for the patch.  It looks much nicer.

> @@ -1655,6 +1660,14 @@ static int spacc_probe(struct platform_device *pdev)
>  		return -ENXIO;
>  	}
>  
> +	tasklet_init(&engine->complete, spacc_spacc_complete,
> +		     (unsigned long)engine);
> +
> +	ret = devm_add_action_or_reset(&pdev->dev, spacc_tasklet_kill,
> +				       &engine->complete);

Minor nit.  You only need devm_add_action as calling tasklet_kill
at this point should be a no-op.

Cheers,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ