aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe.c
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2011-07-27 18:10:39 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-28 04:10:35 -0400
commit324f667833d7ddd9501ed8c0e3ec5754ddb1b695 (patch)
tree1dbc7ce23d6c8f3c13f6c977d572be90fb95051b /drivers/scsi/fcoe/fcoe.c
parent6f06e3a7b2f2d840d42a0c2b9906f444e8f2eba6 (diff)
[SCSI] libfc, fcoe: ignore rx frame with wrong xid info
Drop the rx frame having xid with wrong cpu info or received with xid not matching to our xid. Not dropping such frame is causing panic as that causes accessing data struct beyond their bounds. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r--drivers/scsi/fcoe/fcoe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index f7547fb000c0..945df21ac017 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1373,6 +1373,10 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
1373 } else 1373 } else
1374 cpu = smp_processor_id(); 1374 cpu = smp_processor_id();
1375 } 1375 }
1376
1377 if (cpu >= nr_cpu_ids)
1378 goto err;
1379
1376 fps = &per_cpu(fcoe_percpu, cpu); 1380 fps = &per_cpu(fcoe_percpu, cpu);
1377 spin_lock_bh(&fps->fcoe_rx_list.lock); 1381 spin_lock_bh(&fps->fcoe_rx_list.lock);
1378 if (unlikely(!fps->thread)) { 1382 if (unlikely(!fps->thread)) {