1. 31 Jul, 2018 20 commits
  2. 27 Jul, 2018 3 commits
  3. 26 Jul, 2018 14 commits
  4. 25 Jul, 2018 3 commits
    • Varsha Rao's avatar
      IB/core: Remove extra parentheses · 076dd53b
      Varsha Rao authored
      Remove unnecessary parentheses to fix the clang warning of extraneous
      parentheses.
      Signed-off-by: default avatarVarsha Rao <rvarsha016@gmail.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      076dd53b
    • Bart Van Assche's avatar
      RDMA/ocrdma: Suppress a compiler warning · 9491a1ed
      Bart Van Assche authored
      This patch avoids that the following compiler warning is reported when
      building with gcc 8 and W=1:
      
      In function 'ocrdma_mbx_get_ctrl_attribs',
          inlined from 'ocrdma_init_hw' at drivers/infiniband/hw/ocrdma/ocrdma_hw.c:3224:11:
      drivers/infiniband/hw/ocrdma/ocrdma_hw.c:1368:3: warning: 'strncpy' output may be truncated copying 31 bytes from a string of length 31 [-Wstringop-truncation]
         strncpy(dev->model_number,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
          hba_attribs->controller_model_number, 31);
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Acked-by: default avatarSelvin Xavier <selvin.xavier@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      9491a1ed
    • Jason Gunthorpe's avatar
      IB/uverbs: Fix locking around struct ib_uverbs_file ucontext · 22fa27fb
      Jason Gunthorpe authored
      We have a parallel unlocked reader and writer with ib_uverbs_get_context()
      vs everything else, and nothing guarantees this works properly.
      
      Audit and fix all of the places that access ucontext to use one of the
      following locking schemes:
      - Call ib_uverbs_get_ucontext() under SRCU and check for failure
      - Access the ucontext through an struct ib_uobject context member
        while holding a READ or WRITE lock on the uobject.
        This value cannot be NULL and has no race.
      - Hold the ucontext_lock and check for ufile->ucontext !NULL
      
      This also re-implements ib_uverbs_get_ucontext() in a way that is safe
      against concurrent ib_uverbs_get_context() and disassociation.
      
      As a side effect, every access to ucontext in the commands is via
      ib_uverbs_get_context() with an error check, or via the uobject, so there
      is no longer any need for the core code to check ucontext on every command
      call. These checks are also removed.
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      22fa27fb