]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sdp: check if sdp device is actually present in sdp_remove_one
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 30 Aug 2009 14:24:07 +0000 (17:24 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:38 +0000 (05:04 -0700)
commitd53393a044ecd010076eb0be8b1990efb5ffb7a7
treee13060c5638d503a49406b868e53e7b8b17df246
parent9aa170e4ff59c038e70742fbb58af7d7fd7213e4
sdp: check if sdp device is actually present in sdp_remove_one

If sdp fails to initialize at driver startup for any reason,
the device is still registered with the ib_core, but there will be
no client data (i.e., ib_set_client_data() will not be called, and all
kernel resources are de-allocated).

On removal, ib_get_client_data() will return NULL in this case -- and this
must be tested for -- or we will get a kernel Oops for a NULL pointer
dereference.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c