* [patch -next] libfc: dereferencing ERR_PTR in fc_tm_done()
@ 2010-12-21 4:01 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-12-21 4:01 UTC (permalink / raw)
To: Robert Love
Cc: James E.J. Bottomley, devel, linux-scsi, linux-kernel,
kernel-janitors
If we goto out, then it tries to call kfree_skb() on an ERR_PTR which
will oops. Just return directly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index 5962d1a..a918807 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1321,7 +1321,7 @@ static void fc_tm_done(struct fc_seq *seq, struct fc_frame *fp, void *arg)
*
* scsi-eh will escalate for when either happens.
*/
- goto out;
+ return;
}
if (fc_fcp_lock_pkt(fsp))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-12-21 4:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 4:01 [patch -next] libfc: dereferencing ERR_PTR in fc_tm_done() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).