| Submitter | Greg KH |
|---|---|
| Date | Feb. 12, 2013, 8:41 p.m. |
| Message ID | <20130212203858.764747327@linuxfoundation.org> |
| Download | mbox | patch |
| Permalink | /patch/219949/ |
| State | Not Applicable |
| Delegated to: | David Miller |
| Headers | show |
Comments
Patch
--- a/drivers/net/ethernet/calxeda/xgmac.c +++ b/drivers/net/ethernet/calxeda/xgmac.c @@ -547,6 +547,10 @@ static int desc_get_rx_status(struct xgm return -1; } + /* All frames should fit into a single buffer */ + if (!(status & RXDESC_FIRST_SEG) || !(status & RXDESC_LAST_SEG)) + return -1; + /* Check if packet has checksum already */ if ((status & RXDESC_FRAME_TYPE) && (status & RXDESC_EXT_STATUS) && !(ext_status & RXDESC_IP_PAYLOAD_MASK))