[SCSI] libfc: fix oops in point-to-point mode
authorJoe Eykholt <jeykholt@cisco.com>
Sat, 13 Mar 2010 00:07:46 +0000 (16:07 -0800)
committerJames Bottomley <James.Bottomley@suse.de>
Sun, 11 Apr 2010 14:23:34 +0000 (09:23 -0500)
commit2f2ac4a0df8c4beee6e4057a69fa973b6040a573
tree2ff71d9b1f13ff9cc0ed120725f68f003d7b9ae7
parent4dc7ccf7e9d9bca1989b840be9e8e84911387cf2
[SCSI] libfc: fix oops in point-to-point mode

In point-to-point mode, if the PLOGI to the remote port times
out, it can get deleted by the remote port module.  Since there's
no reference by the local port, lport->ptp_data points to a freed
rport, and when the local port is reset and tries to logout again,
an oops occurs in mutex_lock_nested().

Hold a reference count on the point-to-point rdata.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_lport.c