mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7e43cd66d3
commit
fed396a585
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue