All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Infiniband coding mistake fixed.
@ 2014-09-15 13:22 ` eagle.rtlinux
  0 siblings, 0 replies; 2+ messages in thread
From: eagle.rtlinux @ 2014-09-15 13:22 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: infinipath-ral2JQCrhuEAvxtiuMwx3w, roland-DgEjT+Ai2ygdnm+yROfE0A,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	eagle.rtlinux-Re5JQEeQqe8AvxtiuMwx3w

hello,

The last parameter of get_user_pages should be a array of pointers to 
vmas corresponding to each page. Through this coding mistake can not 
cause some problem now, it is a potential time bomb.

Signed-off-by: Yang Honggang <eagle.rtlinux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
  drivers/infiniband/hw/qib/qib_user_pages.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c 
b/drivers/infiniband/hw/qib/qib_user_pages.c
index 2bc1d2b..e93d459 100644
--- a/drivers/infiniband/hw/qib/qib_user_pages.c
+++ b/drivers/infiniband/hw/qib/qib_user_pages.c
@@ -69,7 +69,7 @@ static int __qib_get_user_pages(unsigned long 
start_page, size_t num_pages,
          ret = get_user_pages(current, current->mm,
                       start_page + got * PAGE_SIZE,
                       num_pages - got, 1, 1,
-                     p + got, vma);
+                     p + got, vma + got);
          if (ret < 0)
              goto bail_release;
      }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Infiniband coding mistake fixed.
@ 2014-09-15 13:22 ` eagle.rtlinux
  0 siblings, 0 replies; 2+ messages in thread
From: eagle.rtlinux @ 2014-09-15 13:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: infinipath, roland, sean.hefty, hal.rosenstock, linux-rdma,
	eagle.rtlinux

hello,

The last parameter of get_user_pages should be a array of pointers to 
vmas corresponding to each page. Through this coding mistake can not 
cause some problem now, it is a potential time bomb.

Signed-off-by: Yang Honggang <eagle.rtlinux@gmail.com>
---
  drivers/infiniband/hw/qib/qib_user_pages.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/qib/qib_user_pages.c 
b/drivers/infiniband/hw/qib/qib_user_pages.c
index 2bc1d2b..e93d459 100644
--- a/drivers/infiniband/hw/qib/qib_user_pages.c
+++ b/drivers/infiniband/hw/qib/qib_user_pages.c
@@ -69,7 +69,7 @@ static int __qib_get_user_pages(unsigned long 
start_page, size_t num_pages,
          ret = get_user_pages(current, current->mm,
                       start_page + got * PAGE_SIZE,
                       num_pages - got, 1, 1,
-                     p + got, vma);
+                     p + got, vma + got);
          if (ret < 0)
              goto bail_release;
      }
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-15 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 13:22 [PATCH] Infiniband coding mistake fixed eagle.rtlinux
2014-09-15 13:22 ` eagle.rtlinux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.