linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiewei Ke <kejiewei.cn@gmail.com>
To: linux-rdma@vger.kernel.org
Cc: monis@mellanox.com, dledford@redhat.com, jgg@ziepe.ca,
	Jiewei Ke <kejiewei.cn@gmail.com>
Subject: [PATCH] RDMA/rxe: Fix error type of mmap_offset
Date: Fri, 27 Dec 2019 19:36:13 +0800	[thread overview]
Message-ID: <20191227113613.5020-1-kejiewei.cn@gmail.com> (raw)

The type of mmap_offset should be u64 instead of int to match the
type of mminfo.offset. If otherwise, after we create several thousands
of CQs, it will run into overflow issue.

Signed-off-by: Jiewei Ke <kejiewei.cn@gmail.com>
---
 drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h b/drivers/infiniband/sw/rxe/rxe_verbs.h
index 95834206c80c..92de39c4a7c1 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
@@ -408,7 +408,7 @@ struct rxe_dev {
 	struct list_head	pending_mmaps;
 
 	spinlock_t		mmap_offset_lock; /* guard mmap_offset */
-	int			mmap_offset;
+	u64			mmap_offset;
 
 	atomic64_t		stats_counters[RXE_NUM_OF_COUNTERS];
 
-- 
2.11.0


             reply	other threads:[~2019-12-27 11:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27 11:36 Jiewei Ke [this message]
2020-01-03 23:45 ` [PATCH] RDMA/rxe: Fix error type of mmap_offset Jason Gunthorpe

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=20191227113613.5020-1-kejiewei.cn@gmail.com \
    --to=kejiewei.cn@gmail.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.org \
    --cc=monis@mellanox.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).