dm crypt: fix GFP flags passed to skcipher_request_alloc()
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 2 Jan 2020 13:23:32 +0000 (08:23 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:35:26 +0000 (04:35 -0800)
commitb805ec7d089f20712a1fbb4a96e41c7142b22048
tree380a7ef4801ec0a9c074ef653940009b218d608f
parent1781fa54a4eaf7cf2cd5924c5833f7b06efffae7
dm crypt: fix GFP flags passed to skcipher_request_alloc()

commit 9402e959014a18b4ebf7558733076875808dd66c upstream.

GFP_KERNEL is not supposed to be or'd with GFP_NOFS (the result is
equivalent to GFP_KERNEL). Also, we use GFP_NOIO instead of GFP_NOFS
because we don't want any I/O being submitted in the direct reclaim
path.

Fixes: 39d13a1ac41d ("dm crypt: reuse eboiv skcipher for IV generation")
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-crypt.c