OpenCloudOS-Kernel/drivers/scsi/libfc
Robert Love efaf5c085d [SCSI] libfc: check for err when recv and state is incorrect
If we've just created an interface and the an rport is
logging in we may have a request on the wire (say PRLI).
If we destroy the interface, we'll go through each rport
on the disc->rports list and set each rport's state to NONE.
Then the lport will reset the EM. The EM reset will send a
CLOSED event to the prli_resp() handler which will notice
that the state != PRLI. In this case it frees the frame
pointer, decrements the refcount and unlocks the rport.

The problem is that there isn't a frame in this case. It's
just a pointer with an embedded error code. The free causes
an Oops.

This patch moves the error checking to be before the state
checking.

Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-03-06 15:44:36 -06:00
..
Makefile [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_disc.c [SCSI] libfc: rename rp to rdata in fc_disc_new_target() 2009-03-06 15:41:37 -06:00
fc_elsct.c [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_exch.c [SCSI] libfc: rport retry on LS_RJT from certain ELS 2009-03-06 15:39:34 -06:00
fc_fcp.c [SCSI] libfc: fixed a read IO data integrity issue when a IO data frame lost 2009-03-06 15:40:06 -06:00
fc_frame.c [SCSI] libfc: A modular Fibre Channel library 2008-12-29 11:24:33 -06:00
fc_lport.c [SCSI] libfc: check for err when recv and state is incorrect 2009-03-06 15:44:36 -06:00
fc_rport.c [SCSI] libfc: check for err when recv and state is incorrect 2009-03-06 15:44:36 -06:00