]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: Fix device ref leak when purging bc_queue
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Apr 2017 12:55:12 +0000 (20:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Apr 2017 14:42:10 +0000 (10:42 -0400)
commit4b1d1bf94b136d2a239d95f477890e3564c37e66
tree85d69a0d169b13b811aa8a7244b1335b9d8d00c8
parentc10cf273ddb7381188fc15cc97e7a60f303ee9a9
macvlan: Fix device ref leak when purging bc_queue

When a parent macvlan device is destroyed we end up purging its
broadcast queue without dropping the device reference count on
the packet source device.  This causes the source device to linger.

This patch drops that reference count.

Fixes: 4e17baffa6e3 ("macvlan: Fix potential use-after free for...")
Reported-by: Joe Ghalam <Joe.Ghalam@dell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c