]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: sha512-mb - Protect sha512 mb ctx mgr access
authorTim Chen <tim.c.chen@linux.intel.com>
Wed, 1 Feb 2017 18:45:02 +0000 (10:45 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 11 Feb 2017 09:50:41 +0000 (17:50 +0800)
commit5e63a65e254390f352d7f031afc13b356e544254
treeb9367df4079888e70d00b02f04e530d09c23daee
parentfd0c0c28820097ca2ff3ceae1acf309ac8fb9d7c
crypto: sha512-mb - Protect sha512 mb ctx mgr access

The flusher and regular multi-buffer computation via mcryptd may race with another.
Add here a lock and turn off interrupt to to access multi-buffer
computation state cstate->mgr before a round of computation. This should
prevent the flusher code jumping in.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/sha512-mb/sha512_mb.c