From: <gregkh@linuxfoundation.org>
To: nbd@openwrt.org, amit.pundir@linaro.org, davem@davemloft.net,
gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "bgmac: add check for oversized packets" has been added to the 3.18-stable tree
Date: Fri, 07 Jul 2017 11:09:51 +0200 [thread overview]
Message-ID: <149941859161196@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
bgmac: add check for oversized packets
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
bgmac-add-check-for-oversized-packets.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 6a6c708469c9e10fd87adcc3abff164270538d62 Mon Sep 17 00:00:00 2001
From: Felix Fietkau <nbd@openwrt.org>
Date: Tue, 14 Apr 2015 12:07:58 +0200
Subject: bgmac: add check for oversized packets
From: Felix Fietkau <nbd@openwrt.org>
commit 6a6c708469c9e10fd87adcc3abff164270538d62 upstream.
In very rare cases, the MAC can catch an internal buffer that is bigger
than it's supposed to be. Instead of crashing the kernel, simply pass
the buffer back to the hardware
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/broadcom/bgmac.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -373,6 +373,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);
+ put_page(virt_to_head_page(buf));
+ break;
+ }
+
/* Omit CRC. */
len -= ETH_FCS_LEN;
Patches currently in stable-queue which might be from nbd@openwrt.org are
queue-3.18/bgmac-reset-enable-ethernet-core-before-using-it.patch
queue-3.18/bgmac-add-check-for-oversized-packets.patch
reply other threads:[~2017-07-07 9:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=149941859161196@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amit.pundir@linaro.org \
--cc=davem@davemloft.net \
--cc=nbd@openwrt.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox