lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.5 277/542] RDMA/rxe: Fix error type of mmap_offset
    Date
    From: Jiewei Ke <kejiewei.cn@gmail.com>

    [ 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/20191227113613.5020-1-kejiewei.cn@gmail.com
    Signed-off-by: Jiewei Ke <kejiewei.cn@gmail.com>
    Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 95834206c80c3..92de39c4a7c1e 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.20.1
    \
     
     \ /
      Last update: 2020-02-14 19:11    [W:2.233 / U:0.572 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site