]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/e1000/e1000_main.c
e1000: add missing length check to e1000 receive routine
[net-next-2.6.git] / drivers / net / e1000 / e1000_main.c
index b1419e21b46b44b930c2ec974952ed2509363e09..fffb006b7d95c968d168eb81d2cab697e05ee455 100644 (file)
@@ -4027,8 +4027,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
                                 PCI_DMA_FROMDEVICE);
 
                length = le16_to_cpu(rx_desc->length);
-
-               if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
+               /* !EOP means multiple descriptors were used to store a single
+                * packet, also make sure the frame isn't just CRC only */
+               if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) {
                        /* All receives must fit into a single buffer */
                        E1000_DBG("%s: Receive packet consumed multiple"
                                  " buffers\n", netdev->name);