]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sdp: Prevent kernel crash if device init fails (plus bonus fix)
authorAmir Vadai <amirv@mellanox.co.il>
Tue, 23 Feb 2010 08:02:59 +0000 (10:02 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:48 +0000 (05:04 -0700)
commita09396f2aeb9559894505b881fa0a855e406849a
treeefb53b8d060d06d62e341da9b7bb8b15a78dc0aa
parent4a9664097d47d8b9dbec8097c9e9c488c82cee18
sdp: Prevent kernel crash if device init fails (plus bonus fix)

If sdp_add_device() fails, there is no client data stored in the IB device,
leading to a kernel crash when a connection is being established. Fix this
by rejecting connections when the device is not initialized.

Also, fix a bad goto target in an error case early in sdp_init_qp().

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_cma.c