public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Infiniband coding mistake fixed.
@ 2014-09-15 13:22 eagle.rtlinux
  0 siblings, 0 replies; only message 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] only message in thread

only message in thread, other threads:[~2014-09-15 13:23 UTC | newest]

Thread overview: (only message) (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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox