[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160708.234754.1545620882859351577.davem@davemloft.net>
Date: Fri, 08 Jul 2016 23:47:54 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, Matt.Bennett@...iedtelesis.co.nz,
paulus@...ba.org, linux-ppp@...r.kernel.org, g.nault@...halink.fr,
gorcunov@...nvz.org
Subject: Re: [Patch net] ppp: defer netns reference release for ppp channel
From: Cong Wang <xiyou.wangcong@...il.com>
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 <Matt.Bennett@...iedtelesis.co.nz>
> Cc: Paul Mackerras <paulus@...ba.org>
> Cc: linux-ppp@...r.kernel.org
> Cc: Guillaume Nault <g.nault@...halink.fr>
> Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists