Thread (9 messages) flat view 9 messages, 3 authors, 1d ago

Re: [PATCH] net: stmmac: guard FCS stripping against runt frames

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-09-24 02:16:48
Also in: lkml, stable

quoted
@@ -5808,10 +5809,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
 
 		/* ACS is disabled; strip manually. */
 		if (likely(!(status & rx_not_ls))) {
-			if (buf2_len) {
+			if (buf2_len >= ETH_FCS_LEN) {
I do not think this approach is correct since, at least theoretically, the FCS can be
splitted between buf1 and buf2.
We are talking about runt frames here, so less than 64 bytes in
size. Can such a frame be split over two buffers? What is the minimum
size of the first buffer?

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help