#22387: bgmac (Broadcom 47xx) "oversized packet" kernel panic
---------------------+--------------------------------
  Reporter:  cds@…   |      Owner:  developers
      Type:  defect  |     Status:  new
  Priority:  normal  |  Milestone:
 Component:  kernel  |    Version:  Chaos Calmer 15.05
Resolution:          |   Keywords:
---------------------+--------------------------------

Comment (by cds@…):

 I tried booting with the following kernel patch:

 {{{
 --- a/drivers/net/ethernet/broadcom/bgmac.c
 +++ b/drivers/net/ethernet/broadcom/bgmac.c
 @@ -467,19 +467,24 @@ static int bgmac_dma_rx_read(struct bgma
                                 break;
                         }

 +                       /* Omit CRC. */
 +                       len -= ETH_FCS_LEN;
 +
 +                       /* Add in the alignment offsets. */
 +                       len += BGMAC_RX_FRAME_OFFSET +
 BGMAC_RX_BUF_OFFSET;
 +
 +                       /* Check for packets that are too large for the
 skb. */
                         if (len > BGMAC_RX_ALLOC_SIZE) {
 -                               bgmac_err(bgmac, "Found oversized packet
 at slot %d, DMA issue!\n",
 -                                         ring->start);
 +                               bgmac_err(bgmac, "Found oversized (%d)
 packet at slot %d, DMA issue!\n",
 +                                         len, ring->start);
                                 put_page(virt_to_head_page(buf));
                                 break;
                         }

 -                       /* Omit CRC. */
 -                       len -= ETH_FCS_LEN;
 -
 +                       /* Build the skb with the len, which has been
 verified
 +                        * above, and pull up to the alignment offset. */
                         skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
 -                       skb_put(skb, BGMAC_RX_FRAME_OFFSET +
 -                               BGMAC_RX_BUF_OFFSET + len);
 +                       skb_put(skb, len);
                         skb_pull(skb, BGMAC_RX_FRAME_OFFSET +
                                  BGMAC_RX_BUF_OFFSET);
 }}}

 This corrects the arithmetic in bgmac near the site of the panic bug.
 Unfortunately, it does *nothing* to improve the symptoms. Something else
 is going on here and I'm not sure what.

--
Ticket URL: <https://dev.openwrt.org/ticket/22387#comment:2>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to