IB/hfi1: Stricter bounds checking of MAD trap index
authorKamenee Arumugame <kamenee.arumugam@intel.com>
Sun, 13 Aug 2017 15:08:46 +0000 (08:08 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 22 Aug 2017 18:22:37 +0000 (14:22 -0400)
commitec0d8b8a63ee760bca1bccc6769d6210e05ded29
tree29e222aa1b4d09dedeea1692298674285d91dfec
parent76ae6222a4a37098610c0601a814c9caba94ba0b
IB/hfi1: Stricter bounds checking of MAD trap index

The macro size is valid. This change makes it less ambiguous.
Bounds check trap type for better security.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Kamenee Arumugam <kamenee.arumugam@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/mad.c
include/rdma/rdma_vt.h