]> git.baikalelectronics.ru Git - kernel.git/commit
dm integrity: don't store cipher request on the stack
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Jan 2018 14:32:47 +0000 (09:32 -0500)
committerMike Snitzer <snitzer@redhat.com>
Wed, 17 Jan 2018 14:08:57 +0000 (09:08 -0500)
commit65db3011aa1c53088379a90b04cb33ea4dd74fa1
treecac65d1d4f60325acad7923a218f051dec9e3bb6
parent0134f418395ee6cf2606439341adc3ed583a71ef
dm integrity: don't store cipher request on the stack

Some asynchronous cipher implementations may use DMA.  The stack may
be mapped in the vmalloc area that doesn't support DMA.  Therefore,
the cipher request and initialization vector shouldn't be on the
stack.

Fix this by allocating the request and iv with kmalloc.

Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-integrity.c