Thread (6 messages) 6 messages, 4 authors, 2016-07-31

Re: [Patch net] ppp: defer netns reference release for ppp channel

From: David Miller <davem@davemloft.net>
Date: 2016-07-09 03:47:54

From: Cong Wang <redacted>
Date: Tue,  5 Jul 2016 22:12:36 -0700
Matt reported that we have a NULL pointer dereference
in ppp_pernet() from ppp_connect_channel(),
i.e. pch->chan_net is NULL.

This is due to that a parallel ppp_unregister_channel()
could happen while we are in ppp_connect_channel(), during
which pch->chan_net set to NULL. Since we need a reference
to net per channel, it makes sense to sync the refcnt
with the life time of the channel, therefore we should
release this reference when we destroy it.

Fixes: 1f461dcdd296 ("ppp: take reference on channels netns")
Reported-by: Matt Bennett <redacted>
Cc: Paul Mackerras <redacted>
Cc: linux-ppp@vger.kernel.org
Cc: Guillaume Nault <redacted>
Cc: Cyrill Gorcunov <redacted>
Signed-off-by: Cong Wang <redacted>
Applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help