]> git.baikalelectronics.ru Git - kernel.git/commit
IB/qib: Fix qib_mr structure
authorIra Weiny <ira.weiny@intel.com>
Mon, 30 Nov 2015 14:34:26 +0000 (09:34 -0500)
committerDoug Ledford <dledford@redhat.com>
Mon, 7 Dec 2015 21:22:14 +0000 (16:22 -0500)
commit5b43e8fda1357927593d9050d6c58f19244d0582
tree0c9098dac9e97066899c74ca10eb61dbe1da1ca4
parent90b965f5f1bd8085fe2b7b65a002cde58a4b9162
IB/qib: Fix qib_mr structure

struct qib_mr requires the mr member be the last because struct
qib_mregion contains a dynamic array at the end.  The additions
of members should have been placed before this structure as the
comment noted.

Failure to do so was causing random memory corruption.  Reproducing
this bug was easy to do by running the client and server of
ib_write_bw -s 8 -n 5 on the same node.

This BUG() was tripped in a slab debug kernel:

kernel BUG at mm/slab.c:2572!

Fixes: cea071ed1b10 ("IB/qib: Support the new memory registration API")
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib_verbs.h