lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 15 Jun 2014 17:28:21 -0700 (PDT)
From:	Hugh Dickins <hughd@...gle.com>
To:	Fabian Frederick <fabf@...net.be>
cc:	linux-kernel@...r.kernel.org, Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH 1/1] block/bio.c: use GFP_NOFS

On Sat, 14 Jun 2014, Fabian Frederick wrote:

> Use GFP_NOFS instead of its definition.
> 
> Cc: Jens Axboe <axboe@...nel.dk>
> Signed-off-by: Fabian Frederick <fabf@...net.be>
> ---
>  block/bio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/bio.c b/block/bio.c
> index 8c2e55e..ec5d172 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -211,7 +211,7 @@ fallback:
>  		bvl = mempool_alloc(pool, gfp_mask);
>  	} else {
>  		struct biovec_slab *bvs = bvec_slabs + *idx;
> -		gfp_t __gfp_mask = gfp_mask & ~(__GFP_WAIT | __GFP_IO);
> +		gfp_t __gfp_mask = gfp_mask & ~GFP_NOFS;
>  
>  		/*
>  		 * Make this allocation restricted and don't dump info on
> -- 
> 1.8.4.5

Please no.  The original was fine, this just makes it harder to read.

GFP_NOFS is a useful and widely used combination of flags for passing
down to the page allocator; but it is merely obscure when used as you
have for masking bits off.

(But I confess to hypocrisy in finding "& ~GFP_KERNEL" useful myself
in the past somewhere.)

Hugh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ