[SCSI] iscsi_tcp: fix locking around iscsi sk user data
authorMike Christie <michaelc@cs.wisc.edu>
Fri, 24 Jun 2011 20:11:54 +0000 (15:11 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Wed, 29 Jun 2011 21:43:08 +0000 (16:43 -0500)
commit03adb5f91280b433c3685d0ee86b2e1424af3d88
treea3c034aa17d24d0355c5117a7781e473910c640c
parentf457a46f179df41b0f6d80dee33b6e629945f276
[SCSI] iscsi_tcp: fix locking around iscsi sk user data

iscsi_sw_tcp_conn_restore_callbacks could have set
the sk_user_data field to NULL then iscsi_sw_tcp_data_ready
could read that and try to access the NULL pointer. This
adds some checks for NULL sk_user_data in the sk
callback functions and it uses the sk_callback_lock to
set/get that sk_user_data field.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/iscsi_tcp.c