Thread (3 messages) read the whole thread 3 messages, 3 authors, 2018-09-18

Re: [PATCH v2 1/4] crypto: s5p-sss: Fix race in error handling

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2018-09-18 07:33:51
Also in: linux-samsung-soc, lkml

On Mon, 17 Sep 2018 at 17:10, Christoph Manszewski
[off-list ref] wrote:
Remove a race condition introduced by error path in functions:
s5p_aes_interrupt and s5p_aes_crypt_start. Setting the busy field of
struct s5p_aes_dev to false made it possible for s5p_tasklet_cb to
change the req field, before s5p_aes_complete was called.

Change the first parameter of s5p_aes_complete to struct
ablkcipher_request. Before spin_unlock, make a copy of the currently
handled request, to ensure s5p_aes_complete function call with the
correct request.

Signed-off-by: Christoph Manszewski <redacted>
---
 drivers/crypto/s5p-sss.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help