]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: fix a race on port dismantle and possible skb leaks
authorEric Dumazet <edumazet@google.com>
Thu, 23 Oct 2014 02:43:46 +0000 (19:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 25 Oct 2014 20:24:02 +0000 (16:24 -0400)
commitfd7f08ae7994a76636939572e84af67b7e140e58
treec01cf2481fea951491b25a4cedab5de305a1fcb6
parent1d1b886cd2c06381d645da8dae53113a663367d7
macvlan: fix a race on port dismantle and possible skb leaks

We need to cancel the work queue after rcu grace period,
otherwise it can be rescheduled by incoming packets.

We need to purge queue if some skbs are still in it.

We can use __skb_queue_head_init() variant in
macvlan_process_broadcast()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 57d86229cc905 ("macvlan: Move broadcasts into a work queue")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c