From: Dan Carpenter <dan.carpenter@oracle.com>
To: Doug Ledford <dledford@redhat.com>, Christoph Hellwig <hch@lst.de>
Cc: devel@driverdev.osuosl.org, linux-rdma@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Steve Wise <swise@opengridcomputing.com>,
kernel-janitors@vger.kernel.org,
Matan Barak <matanb@mellanox.com>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Geliang Tang <geliangtang@163.com>,
Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>
Subject: [patch] staging: rdma: shift wrapping bug in c2_get_dma_mr()
Date: Fri, 8 Jan 2016 14:49:36 +0300 [thread overview]
Message-ID: <20160108114936.GA3802@mwanda> (raw)
We should be using all 64 bits of page_list[i] instead of just the lower
32.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/staging/rdma/amso1100/c2_provider.c b/drivers/staging/rdma/amso1100/c2_provider.c
index de8d10e..ac6a6ff 100644
--- a/drivers/staging/rdma/amso1100/c2_provider.c
+++ b/drivers/staging/rdma/amso1100/c2_provider.c
@@ -361,7 +361,7 @@ static struct ib_mr *c2_get_dma_mr(struct ib_pd *pd, int acc)
}
for (i = 0; i < pbl_depth; i++)
- page_list[i] = (i << page_shift);
+ page_list[i] = ((u64)i << page_shift);
mr = kmalloc(sizeof(*mr), GFP_KERNEL);
if (!mr) {
next reply other threads:[~2016-01-08 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 11:49 Dan Carpenter [this message]
2016-01-08 13:29 ` [patch] staging: rdma: shift wrapping bug in c2_get_dma_mr() Christoph Hellwig
2016-01-19 18:13 ` Doug Ledford
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=20160108114936.GA3802@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=dledford@redhat.com \
--cc=geliangtang@163.com \
--cc=gregkh@linuxfoundation.org \
--cc=hal.rosenstock@gmail.com \
--cc=hch@lst.de \
--cc=jgunthorpe@obsidianresearch.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matanb@mellanox.com \
--cc=sean.hefty@intel.com \
--cc=swise@opengridcomputing.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;
as well as URLs for NNTP newsgroup(s).