Re: [PATCH] dm-crypt: fix GFP flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 2 Jan 2020, Mikulas Patocka wrote:

> GFP_KERNEL is not supposed to be ored 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.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx	# v5.4+

Also - add these lines:

Fixes: 39d13a1ac41d ("dm crypt: reuse eboiv skcipher for IV generation")
Cc: Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx>

> ---
>  drivers/md/dm-crypt.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/md/dm-crypt.c
> ===================================================================
> --- linux-2.6.orig/drivers/md/dm-crypt.c	2020-01-02 14:16:21.000000000 +0100
> +++ linux-2.6/drivers/md/dm-crypt.c	2020-01-02 14:16:21.000000000 +0100
> @@ -717,7 +717,7 @@ static int crypt_iv_eboiv_gen(struct cry
>  	struct crypto_wait wait;
>  	int err;
>  
> -	req = skcipher_request_alloc(any_tfm(cc), GFP_KERNEL | GFP_NOFS);
> +	req = skcipher_request_alloc(any_tfm(cc), GFP_NOIO);
>  	if (!req)
>  		return -ENOMEM;
>  
> 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux