IB/iser: Fix possible NULL derefernce ib_conn->device in session_create
authorAriel Nahum <arieln@mellanox.com>
Sun, 7 Dec 2014 14:09:58 +0000 (16:09 +0200)
committerRoland Dreier <roland@purestorage.com>
Tue, 16 Dec 2014 02:11:44 +0000 (18:11 -0800)
commit3f562a0b8f0b47c4315e08bccd6a0b2d7f5aae1b
tree195d4267872b603045b31bd6b2a71496fcc44b53
parent49df2781b101a729e9f46eddc845a587fc5665a8
IB/iser: Fix possible NULL derefernce ib_conn->device in session_create

If rdma_cm error event comes after ep_poll but before conn_bind, we
should protect against dereferncing the device (which may have been
terminated) in session_create and conn_create (already protected)
callbacks.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/ulp/iser/iscsi_iser.c