lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1272187206-18534-9-git-send-email-xiaohui.xin@intel.com> Date: Sun, 25 Apr 2010 17:19:56 +0800 From: xiaohui.xin@...el.com To: netdev@...r.kernel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org, mst@...hat.com, mingo@...e.hu, davem@...emloft.net, jdike@...ux.intel.com Cc: Xin Xiaohui <xiaohui.xin@...el.com> Subject: [RFC][PATCH v4 09/18] Don't do skb recycle, if device use external buffer. From: Xin Xiaohui <xiaohui.xin@...el.com> Signed-off-by: Xin Xiaohui <xiaohui.xin@...el.com> Signed-off-by: Zhao Yu <yzhao81@...il.com> Reviewed-by: Jeff Dike <jdike@...ux.intel.com> --- net/core/skbuff.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index ae223d2..169f22c 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -553,6 +553,12 @@ int skb_recycle_check(struct sk_buff *skb, int skb_size) if (skb_shared(skb) || skb_cloned(skb)) return 0; + /* if the device wants to do mediate passthru, the skb may + * get external buffer, so don't recycle + */ + if (dev_is_mpassthru(skb->dev)) + return 0; + skb_release_head_state(skb); shinfo = skb_shinfo(skb); atomic_set(&shinfo->dataref, 1); -- 1.5.4.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists