Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
RDMA/rxe: Fix error type of mmap_offset
Browse files Browse the repository at this point in the history
[ Upstream commit 6ca18d8927d468c763571f78c9a7387a69ffa020 ]

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

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jiewei Ke <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
Jiewei Ke authored and gregkh committed Feb 28, 2020
1 parent 4a718f3 commit f25708d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/sw/rxe/rxe_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ struct rxe_dev {
struct list_head pending_mmaps;

spinlock_t mmap_offset_lock; /* guard mmap_offset */
int mmap_offset;
u64 mmap_offset;

struct rxe_port port;
struct list_head list;
Expand Down

0 comments on commit f25708d

Please sign in to comment.