]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Validate fault injection opcode user input
authorKaike Wan <kaike.wan@intel.com>
Fri, 7 Jun 2019 12:25:25 +0000 (08:25 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Jun 2019 20:06:37 +0000 (17:06 -0300)
commit12e585482417d9386114cd26aeb7de36c9168819
tree4cb3055c9b4d42d9155f80a993805848ed6aa563
parent3eca66e94acbfb78f14c6c84ee9de16875040762
IB/hfi1: Validate fault injection opcode user input

The opcode range for fault injection from user should be validated before
it is applied to the fault->opcodes[] bitmap to avoid out-of-bound
error.

Cc: <stable@vger.kernel.org>
Fixes: fe31f19846dd ("IB/hfi1: Rework fault injection machinery")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/fault.c