[to-be-updated] xsk-do-not-use-mmap_sem.patch removed from -mm tree

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

 



The patch titled
     Subject: net/xdp/xdp_umem.c: do not use mmap_sem
has been removed from the -mm tree.  Its filename was
     xsk-do-not-use-mmap_sem.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Subject: net/xdp/xdp_umem.c: do not use mmap_sem

Holding mmap_sem exclusively for a gup() is an overkill.  Lets replace the
call for gup_fast() and let the mm take it if necessary.

Link: http://lkml.kernel.org/r/20190207053740.26915-2-dave@xxxxxxxxxxxx
Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Bjorn Topel <bjorn.topel@xxxxxxxxx>
Cc: Magnus Karlsson <magnus.karlsson@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 net/xdp/xdp_umem.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/net/xdp/xdp_umem.c~xsk-do-not-use-mmap_sem
+++ a/net/xdp/xdp_umem.c
@@ -265,10 +265,8 @@ static int xdp_umem_pin_pages(struct xdp
 	if (!umem->pgs)
 		return -ENOMEM;
 
-	down_write(&current->mm->mmap_sem);
-	npgs = get_user_pages(umem->address, umem->npgs,
-			      gup_flags, &umem->pgs[0], NULL);
-	up_write(&current->mm->mmap_sem);
+	npgs = get_user_pages_fast(umem->address, umem->npgs,
+				   gup_flags, &umem->pgs[0]);
 
 	if (npgs != umem->npgs) {
 		if (npgs >= 0) {
_

Patches currently in -mm which might be from dave@xxxxxxxxxxxx are

mips-c-r4k-do-no-use-mmap_sem-for-gup_fast.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux