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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Dec 2009 19:07:47 +0000 (GMT)
From:	Hugh Dickins <hugh.dickins@...cali.co.uk>
To:	Jens Axboe <jens.axboe@...cle.com>
cc:	Christoph Hellwig <hch@...radead.org>, linux-kernel@...r.kernel.org
Subject: [PATCH] block: discard use gfp_mask

blkdev_issue_discard() takes a gfp_mask argument: usually GFP_KERNEL,
but GFP_NOIO from swap and GFP_NOFS from gfs2.  blkdev_issue_discard()
should use that for its alloc_page(), instead of assuming GFP_KERNEL.

Signed-off-by: Hugh Dickins <hugh.dickins@...cali.co.uk>
---

 block/blk-barrier.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 2.6.33-rc2/block/blk-barrier.c	2009-12-03 03:51:21.000000000 +0000
+++ linux/block/blk-barrier.c	2009-12-26 18:28:30.000000000 +0000
@@ -402,7 +402,7 @@ int blkdev_issue_discard(struct block_de
 		 * our current implementations need.  If we'll ever need
 		 * more the interface will need revisiting.
 		 */
-		page = alloc_page(GFP_KERNEL | __GFP_ZERO);
+		page = alloc_page(gfp_mask | __GFP_ZERO);
 		if (!page)
 			goto out_free_bio;
 		if (bio_add_pc_page(q, bio, page, sector_size, 0) < sector_size)
--
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