]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/core: For multicast functions, verify that LIDs are multicast LIDs
authorMichael J. Ruhl <michael.j.ruhl@intel.com>
Sun, 9 Apr 2017 17:15:51 +0000 (10:15 -0700)
committerBrian Maly <brian.maly@oracle.com>
Tue, 2 Oct 2018 21:08:40 +0000 (17:08 -0400)
commit18874f887965aca155216cccc74fbd148fa350bd
tree6d719295e8eab5cea0f3e020e7abd3f106c61d27
parent37d418359f30de0141624cd911cae37e6221cbe8
IB/core: For multicast functions, verify that LIDs are multicast LIDs

The Infiniband spec defines "A multicast address is defined by a
MGID and a MLID" (section 10.5).  Currently the MLID value is not
validated.

Add check to verify that the MLID value is in the correct address
range.

Fixes: 0c33aeedb2cf ("[IB] Add checks to multicast attach and detach")
Cc: stable@vger.kernel.org
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
(cherry picked from commit 8561eae60ff9417a50fa1fb2b83ae950dc5c1e21)

The reason for applying this patch is a bug in ibacm, which goes
undetected without this patch. For further information, see
https://patchwork.kernel.org/patch/10008461/

Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:

   * Had to add the define IB_MULTICAST_LID_BASE in
     include/rdma/ib_verbs.h, due to missing commit b4e64397dabc
     ("IB/rdmavt: Break rdma_vt main include header file up").

Orabug: 28700490

Signed-off-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
---
v2 -> v3:
   * Added Shannon's r-b

v1 -> v2:
   * Adding IB_MULTICAST_LID_BASE to ib_verbs.h
   * A little more verbose commit message

Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/infiniband/core/verbs.c
include/rdma/ib_verbs.h