Skip to contentSkip to conversation

scsi/fcoe: Fix preempt count leak in fcoe_filter_frames()

PATCH Thomas Gleixner 2 participants 2 messages Nov 11, 2011

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

The error exit path leaks preempt count. Add the missing put_cpu().

drivers/scsi/fcoe/fcoe.c +1 -0
index cefbe44..f3f440c 100644
@@ -1624,6 +1624,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport,
 	stats->InvalidCRCCount++;
 	if (stats->InvalidCRCCount < 5)
 		printk(KERN_WARNING "fcoe: dropping frame with CRC error\n");
+	put_cpu();
 	return -EINVAL;
 }
 
Reviewed-by
#1 lore raw
Quoted 9 lines

The error exit path leaks preempt count. Add the missing put_cpu().

drivers/scsi/fcoe/fcoe.c +0 -0
index cefbe44..f3f440c 100644

drivers/scsi/fcoe/fcoe.c static inline int fcoe_filter_frames(struct · line 1630

Quoted 7 lines
drivers/scsi/fcoe/fcoe.c +1 -0
@@ -1624,6 +1624,7 @@ static inline int fcoe_filter_frames(struct
 fc_lport *lport,
 	stats->InvalidCRCCount++;
 	if (stats->InvalidCRCCount < 5)
 		printk(KERN_WARNING "fcoe: dropping frame with CRC error\n");
+	put_cpu();
 	return -EINVAL;
 }

Thanks,

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html