]> git.baikalelectronics.ru Git - kernel.git/commit
s390/crypto: fix possible sleep during spinlock aquired
authorHarald Freudenberger <freude@linux.ibm.com>
Mon, 27 May 2019 13:24:20 +0000 (15:24 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 29 May 2019 19:13:10 +0000 (21:13 +0200)
commit7764ab3b946ef09c411918711db2a438da6075a6
tree51e5dafe573a32bfd593cfb4dd7f3608fe73ee56
parent60182d6f5e284f2cf80903d140b62684586637fe
s390/crypto: fix possible sleep during spinlock aquired

This patch fixes a complain about possible sleep during
spinlock aquired
"BUG: sleeping function called from invalid context at
include/crypto/algapi.h:426"
for the ctr(aes) and ctr(des) s390 specific ciphers.

Instead of using a spinlock this patch introduces a mutex
which is save to be held in sleeping context. Please note
a deadlock is not possible as mutex_trylock() is used.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reported-by: Julian Wiedmann <jwi@linux.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/crypto/aes_s390.c
arch/s390/crypto/des_s390.c