diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-06-15 21:43:07 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-15 21:43:07 -0700 |
commit | fed396a585d8e1870b326f2e8e1888a72957abb8 (patch) | |
tree | b2a291facdc6a259e1851db9a120d05bf5422795 | |
parent | 7e43cd66d36e8f0900e87d9d287c9ee649cbdd07 (diff) | |
download | kernel_samsung_aries-fed396a585d8e1870b326f2e8e1888a72957abb8.zip kernel_samsung_aries-fed396a585d8e1870b326f2e8e1888a72957abb8.tar.gz kernel_samsung_aries-fed396a585d8e1870b326f2e8e1888a72957abb8.tar.bz2 |
bridge: Fix OOM crash in deliver_clone
The bridge multicast patches introduced an OOM crash in the forward
path, when deliver_clone fails to clone the skb.
Reported-by: Mark Wagner <mwagner@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/bridge/br_forward.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index a98ef13..a4e72a8 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c @@ -140,10 +140,10 @@ static int deliver_clone(const struct net_bridge_port *prev, void (*__packet_hook)(const struct net_bridge_port *p, struct sk_buff *skb)) { + struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; + skb = skb_clone(skb, GFP_ATOMIC); if (!skb) { - struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; - dev->stats.tx_dropped++; return -ENOMEM; } |