From: "eagle.rtlinux" <eagle.rtlinux@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: infinipath@intel.com, roland@kernel.org, sean.hefty@intel.com,
hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org,
eagle.rtlinux@gmail.com
Subject: [PATCH] Infiniband coding mistake fixed.
Date: Mon, 15 Sep 2014 21:22:20 +0800 [thread overview]
Message-ID: <5416E80C.7010705@gmail.com> (raw)
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
reply other threads:[~2014-09-15 13:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5416E80C.7010705@gmail.com \
--to=eagle.rtlinux@gmail.com \
--cc=hal.rosenstock@gmail.com \
--cc=infinipath@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=roland@kernel.org \
--cc=sean.hefty@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox