Netlink protocol table is global for all namespaces. Some netlink protocols
have been virtualized, i.e. they have per/namespace netlink socket. This
difference can easily lead to double free if more than 1 namespace is
started. Count the number of kernel netlink sockets to track that this
table is
Alexey Dobriyan found, that virtualized netlink kernel sockets (fibl
rtnl) are leaked during namespace start/stop loop.
Leaking fix (simple and obvious) reveals that netlink kernel socket
disposal leads to OOPSes:
- nl_table[protocol]-listeners is double freed
- sometimes during namespace stop
Alexey Dobriyan wrote:
On Thu, Jan 17, 2008 at 01:01:11PM +0100, Daniel Lezcano wrote:
Alexey Dobriyan wrote:
On Thu, Jan 17, 2008 at 11:40:42AM +0100, Daniel Lezcano wrote:
Alexey Dobriyan wrote:
commit c064c4811b3e87ff8202f5a966ff4eea0bc54575
Author: Daniel Lezcano [EMAIL PROTECTED]
Date:
On Thu, Jan 17, 2008 at 01:01:11PM +0100, Daniel Lezcano wrote:
Alexey Dobriyan wrote:
On Thu, Jan 17, 2008 at 11:40:42AM +0100, Daniel Lezcano wrote:
Alexey Dobriyan wrote:
commit c064c4811b3e87ff8202f5a966ff4eea0bc54575
Author: Daniel Lezcano [EMAIL PROTECTED]
Date: Thu Jan 10 02:56:03
During network namespace stop process kernel side netlink sockets belonging
to a namespace should be closed. They should not prevent namespace to stop,
so they do not increment namespace usage counter. Though this counter will
be put during last sock_put.
The raplacement of the correct netns for
Create a specific helper for netlink kernel socket disposal. This just
let the code look better and provides a ground for proper disposal inside
a namespace.
Signed-off-by: Denis V. Lunev [EMAIL PROTECTED]
Tested-by: Alexey Dobriyan [EMAIL PROTECTED]
---
drivers/connector/connector.c |
Network namespace allocates 2 kernel netlink sockets, fibnl rtnl. These
sockets should be disposed properly, i.e. by sock_release. Plain sock_put
is not enough.
Signed-off-by: Denis V. Lunev [EMAIL PROTECTED]
Tested-by: Alexey Dobriyan [EMAIL PROTECTED]
---
net/core/rtnetlink.c|2 +-
Applied, thanks.
___
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel
From: Denis V. Lunev [EMAIL PROTECTED]
Date: Fri, 18 Jan 2008 15:51:47 +0300
Alexey Dobriyan found, that virtualized netlink kernel sockets (fibl
rtnl) are leaked during namespace start/stop loop.
Leaking fix (simple and obvious) reveals that netlink kernel socket
disposal leads to OOPSes: