linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Fix error type of mmap_offset
@ 2019-12-27 11:36 Jiewei Ke
  2020-01-03 23:45 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Jiewei Ke @ 2019-12-27 11:36 UTC (permalink / raw)
  To: linux-rdma; +Cc: monis, dledford, jgg, Jiewei Ke

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


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

end of thread, other threads:[~2020-01-03 23:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 11:36 [PATCH] RDMA/rxe: Fix error type of mmap_offset Jiewei Ke
2020-01-03 23:45 ` Jason Gunthorpe

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).