[SCSI] libfc: Hold disc mutex while processing gpn ft resp
authorAbhijeet Joglekar <abjoglek@cisco.com>
Tue, 21 Apr 2009 23:26:52 +0000 (16:26 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 27 Apr 2009 15:18:48 +0000 (10:18 -0500)
commit0d228c0f7f9e3ade147e57682915c55b92448230
tree29eb6e1d82a784ebac8daecb656135f8bd4d99bd
parenta53922ddcf69f4bd8aa321b1fb30418df7a86c61
[SCSI] libfc: Hold disc mutex while processing gpn ft resp

gpn_ft_resp processing currently does not hold the discovery lock.
disc_done() thus gets called from gpn_ft_resp or from gpn_ft_parse
without the lock held. This then sets disc->pending to zero or calls
gpn_ft_req() without disc_lock held.

- Hold disc mutex during gpn_ft resp processing
- In disc_done, release the disc mutex while calling lport callback

Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/libfc/fc_disc.c