IB/hfi1: Add error checking for buffer overrun in OPA aggregate
authorNeel Desai <neel.desai@intel.com>
Tue, 30 May 2017 00:20:27 +0000 (17:20 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 27 Jun 2017 20:58:12 +0000 (16:58 -0400)
commitf1685179820bb7f9d9c4f5d0ac9bfb269529a919
treee9076276c786da39f2923315a0c0eb95875be61d
parent52d86e72c515ebd4fb0d329470aa50698e28fb36
IB/hfi1: Add error checking for buffer overrun in OPA aggregate

Improve safety of code by checking the size of the data buffer and
prevent buffer overrun

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: Brian Welty <brian.welty@intel.com>
Signed-off-by: Neel Desai <neel.desai@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