good comment and thanks //Hillf On Tue, Oct 19, 2010 at 11:00 PM, Zou, Yi <yi.zou@xxxxxxxxx> wrote: >> >> There seems that fp should get freed if exch is unavailable. >> >> Signed-off-by: Hillf Danton <dhillf@xxxxxxxxx> >> --- >> >> --- a/drivers/scsi/libfc/fc_exch.c  Â2010-09-13 07:07:38.000000000 +0800 >> +++ b/drivers/scsi/libfc/fc_exch.c  Â2010-10-19 21:35:08.000000000 +0800 >> @@ -1564,8 +1564,11 @@ static void fc_exch_recv_bls(struct fc_e >>                fc_frame_free(fp); >>            break; >>        case FC_RCTL_BA_ABTS: >> -           fc_exch_recv_abts(ep, fp); >> -           break; >> +           if (ep) { >> +               fc_exch_recv_abts(ep, fp); >> +               break; >> +           } >> +           /* fall thru */ >>        default:            Â/* ignore junk */ >>            fc_frame_free(fp); >>            break; > > No, fc_exch_recv_abts() already checks ep at its very beginning and gets > freed there. > > yi > ÿô.nÇ·®+%˱é¥wÿº{.nÇ·¥{±þÇø¡Ü}©²ÆzÚj:+v¨þø®w¥þàÞ¨è&¢)ß«a¶Úÿûz¹ÞúÝjÿwèf