RDMA/rxe: Fix error type of mmap_offset
Subsystems (2)
PATCH 1/1 RDMA/rxe: Fix error type of mmap_offset
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 <[email protected]>
--- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/sw/rxe/rxe_verbs.h +1 -1
@@ -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 ];
Signature · 1 line
2.11.0
Jason Gunthorpe
AppliedQuoted 8 lines · Jiewei Ke
The type of
mmap_offsetshould 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 <[email protected]>--- drivers/infiniband/sw/rxe/rxe_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason