]> git.baikalelectronics.ru Git - kernel.git/commit
ima: fix freeing ongoing ahash_request
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 2 Jul 2019 08:00:41 +0000 (10:00 +0200)
committerMimi Zohar <zohar@linux.ibm.com>
Mon, 5 Aug 2019 22:40:28 +0000 (18:40 -0400)
commitf5bf6fb5e3b13c2b4684e420ea88a5cd09301b4f
treee48c770e068bf33bc33a8835c496e22494667d5f
parentc50d20d8293af351b597f4ad56fc08de6e8277da
ima: fix freeing ongoing ahash_request

integrity_kernel_read() can fail in which case we forward to call
ahash_request_free() on a currently running request. We have to wait
for its completion before we can free the request.

This was observed by interrupting a "find / -type f -xdev -print0 | xargs -0
cat 1>/dev/null" with ctrl-c on an IMA enabled filesystem.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
security/integrity/ima/ima_crypto.c