]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipconfig: Fix more use after free
authorThierry Reding <treding@nvidia.com>
Tue, 16 Aug 2016 14:45:38 +0000 (16:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Aug 2016 23:33:40 +0000 (19:33 -0400)
commitf8f0b58a3dabc3b9cf0497ff6ea3972228eba99e
tree0448b569f7e458ee980c93c7b2c4afcdc5aa7dbc
parente375ee2ec62fb2521fb0ba5d8d91b39803e8cef0
net: ipconfig: Fix more use after free

While commit 42d000143b2e ("net: ipconfig: fix use after free") avoids
the use after free, the resulting code still ends up calling both the
ic_setup_if() and ic_setup_routes() after calling ic_close_devs(), and
access to the device is still required.

Move the call to ic_close_devs() to the very end of the function.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c