Re: [PATCH net v3] ipv4: Fix use-after-free when flushing FIB tables

2017-12-20 Thread David Miller
From: Ido Schimmel Date: Wed, 20 Dec 2017 19:34:19 +0200 > Since commit 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") the > local table uses the same trie allocated for the main table when custom > rules are not in use. > > When a net namespace is dismantled, the

Re: [PATCH net v3] ipv4: Fix use-after-free when flushing FIB tables

2017-12-20 Thread Alexander Duyck
On Wed, Dec 20, 2017 at 9:34 AM, Ido Schimmel wrote: > Since commit 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") the > local table uses the same trie allocated for the main table when custom > rules are not in use. > > When a net namespace is dismantled, the main

[PATCH net v3] ipv4: Fix use-after-free when flushing FIB tables

2017-12-20 Thread Ido Schimmel
Since commit 0ddcf43d5d4a ("ipv4: FIB Local/MAIN table collapse") the local table uses the same trie allocated for the main table when custom rules are not in use. When a net namespace is dismantled, the main table is flushed and freed (via an RCU callback) before the local table. In case the