Commit:     7b995651e373d6424f81db23f2ec503306dfd7f0
Parent:     f697c3e8b35c18b2698d64137c0fa84b0cdb3d10
Author:     Herbert Xu <[EMAIL PROTECTED]>
AuthorDate: Sun Oct 14 00:39:01 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Oct 15 12:26:27 2007 -0700

    [BRIDGE]: Unshare skb upon entry
    Due to the special location of the bridging hook, it should never see a
    shared packet anyway (certainly not with any in-kernel code).  So it
    makes sense to unshare the skb there if necessary as that will greatly
    simplify the code below it (in particular, netfilter).
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
 net/bridge/br_input.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 3a8a015..f8e0a2f 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -126,6 +126,10 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, 
struct sk_buff *skb)
        if (!is_valid_ether_addr(eth_hdr(skb)->h_source))
                goto drop;
+       skb = skb_share_check(skb, GFP_ATOMIC);
+       if (!skb)
+               return NULL;
        if (unlikely(is_link_local(dest))) {
                /* Pause frames shouldn't be passed up by driver anyway */
                if (skb->protocol == htons(ETH_P_PAUSE))
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to