Skip to contentSkip to conversation

libfc: dereferencing ERR_PTR in fc_tm_done()

PATCH New Dan Carpenter 1 participant 1 message Dec 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libfc: dereferencing ERR_PTR in fc_tm_done()

If we goto out, then it tries to call kfree_skb() on an ERR_PTR which will oops. Just return directly.

drivers/scsi/libfc/fc_fcp.c +1 -1
index 5962d1a..a918807 100644
@@ -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))