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>] [day] [month] [year] [list]
Message-Id: <1340407990-5122-1-git-send-email-msb@chromium.org>
Date:	Fri, 22 Jun 2012 16:33:10 -0700
From:	Mandeep Singh Baines <msb@...omium.org>
To:	linux-kernel@...r.kernel.org
Cc:	Mandeep Singh Baines <msb@...omium.org>,
	dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org,
	Jens Axboe <axboe@...nel.dk>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Cong Wang <amwang@...hat.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	Rob Clark <rob.clark@...aro.org>,
	Sumit Semwal <sumit.semwal@...aro.org>,
	Inki Dae <inki.dae@...sung.com>,
	Dave Airlie <airlied@...hat.com>,
	Sonny Rao <sonnyrao@...omium.org>,
	Olof Johansson <olofj@...omium.org>
Subject: [PATCH] lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table

We are seeing a lot of sg_alloc_table allocation failures using the
new drm prime infrastructure. We isolated the cause to code in
__sg_alloc_table that was re-writing the gfp_flags.

There is a comment in the code that suggest that there is an
assumption about the allocation coming from a memory pool. This was
likely true when sg lists were primarily used for disk I/O.

Change-Id: I459169f56e4a9aa859661b22ec9d4e6925f99e85
Signed-off-by: Mandeep Singh Baines <msb@...omium.org>
Cc: dri-devel@...ts.freedesktop.org
Cc: linaro-mm-sig@...ts.linaro.org
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Paul Gortmaker <paul.gortmaker@...driver.com>
Cc: Cong Wang <amwang@...hat.com>
Cc: Daniel Vetter <daniel.vetter@...ll.ch>
Cc: Rob Clark <rob.clark@...aro.org>
Cc: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Inki Dae <inki.dae@...sung.com>
Cc: Dave Airlie <airlied@...hat.com>
Cc: Sonny Rao <sonnyrao@...omium.org>
Cc: Olof Johansson <olofj@...omium.org>
---
 lib/scatterlist.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 6096e89..d09bdd8 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -279,14 +279,6 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents,
 		if (!left)
 			sg_mark_end(&sg[sg_size - 1]);
 
-		/*
-		 * only really needed for mempool backed sg allocations (like
-		 * SCSI), a possible improvement here would be to pass the
-		 * table pointer into the allocator and let that clear these
-		 * flags
-		 */
-		gfp_mask &= ~__GFP_WAIT;
-		gfp_mask |= __GFP_HIGH;
 		prv = sg;
 	} while (left);
 
-- 
1.7.7.3

--
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