aboutsummaryrefslogtreecommitdiffstats
path: root/package/ebtables
Commit message (Expand)AuthorAgeFilesLines
* fix ebtables compileFelix Fietkau2009-05-041-0/+2
* get rid of $Id$ - it has never helped us and it has broken too many patches ;)Felix Fietkau2009-04-171-1/+0
* ebtables-utils: create $(1)/usr/sbin/ dir before files are installed into itAndy Boyett2008-10-031-0/+1
* Split ebtables into ebtables and ebtables-utils, bump release numberFlorian Fainelli2008-10-011-1/+14
* Fix location to the ebtables modules (#3855)Florian Fainelli2008-09-271-1/+2
* ebtables: useless without kmod-eptablesGabor Juhos2008-08-061-0/+1
* ebtables: Update to 2.0.8-2Andy Boyett2008-06-222-18/+12
* bump package versions after updatesFelix Fietkau2007-09-071-1/+1
* ebtables: fix use of cflagsFelix Fietkau2007-07-311-0/+3
* refresh all package patches in the buildroot using quiltFelix Fietkau2007-06-041-3/+4
* add file type autodetection for the unpack command and nuke PKG_CAT:= in lots...Felix Fietkau2007-03-161-1/+0
* fix ebtables compileFelix Fietkau2006-12-141-0/+12
* replace lots of manual install commands with INSTALL_* variablesFelix Fietkau2006-11-231-9/+9
* finally move buildroot-ng to trunkFelix Fietkau2016-03-201-0/+43
} /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
From b95f457bb7ba38f03a71b474e35f53670322f0db Mon Sep 17 00:00:00 2001
From: Camelia Groza <camelia.groza@nxp.com>
Date: Mon, 15 Jan 2018 17:41:01 +0200
Subject: [PATCH] sdk_dpaa: update buffer recycling conditions

Guarantee there is enough space inside the skb's headroom to store the
skb back-pointer before recycling the buffer. The back-pointer is stored
right before the buffer's start.

Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
 drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_sg.c
@@ -350,7 +350,13 @@ bool dpa_buf_is_recyclable(struct sk_buf
 	/* left align to the nearest cacheline */
 	new = (unsigned char *)((unsigned long)new & ~(SMP_CACHE_BYTES - 1));
 
-	if (likely(new >= skb->head &&
+	/* Make sure there is enough space to store the skb back-pointer in
+	 * the headroom, right before the start of the buffer.
+	 *
+	 * Guarantee that both maximum size and maximum data offsets aren't
+	 * crossed.
+	 */
+	if (likely(new >= (skb->head + sizeof(void *)) &&
 		   new >= (skb->data - DPA_MAX_FD_OFFSET) &&
 		   skb_end_pointer(skb) - new <= DPA_RECYCLE_MAX_SIZE)) {
 		*new_buf_start = new;