From 1bf8e555bb3466baf775113ab27aa8f05f0e6aa7 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 13 Apr 2015 17:32:33 +0000 Subject: kernel: sync bgmac changes with latest upstream submission Signed-off-by: Felix Fietkau SVN-Revision: 45420 --- .../patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch') diff --git a/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch b/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch index fa45a43686..89e1a32368 100644 --- a/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch +++ b/target/linux/generic/patches-3.18/077-08-bgmac-add-check-for-oversized-packets.patch @@ -11,15 +11,14 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/broadcom/bgmac.c +++ b/drivers/net/ethernet/broadcom/bgmac.c -@@ -422,6 +422,14 @@ static int bgmac_dma_rx_read(struct bgma +@@ -428,6 +428,13 @@ static int bgmac_dma_rx_read(struct bgma break; } + if (len > BGMAC_RX_ALLOC_SIZE) { + bgmac_err(bgmac, "Found oversized packet at slot %d, DMA issue!\n", + ring->start); -+ rx->len = cpu_to_le16(0xdead); -+ rx->flags = cpu_to_le16(0xbeef); ++ kfree(buf); + break; + } + -- cgit v1.2.3