net/smc: check port_idx of ib event
authorKarsten Graul <kgraul@linux.ibm.com>
Tue, 12 Feb 2019 15:29:55 +0000 (16:29 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 16:59:45 +0000 (11:59 -0500)
commit81cf6430526531bc688d4c3d09506dba7b456fb1
tree6b89cc72f2966ac3da29473f69f461772e94bf34
parente78b2622266ce962b18efad8f29acdc6052db010
net/smc: check port_idx of ib event

For robustness protect of higher port numbers than expected to avoid
setting bits behind our port_event_mask. In case of an DEVICE_FATAL
event all ports must be checked. The IB_EVENT_GID_CHANGE event is
provided in the global event handler, so handle it there. And handle a
QP_FATAL event instead of an DEVICE_FATAL event in the qp handler.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/smc_ib.c