netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guillaume Nault <g.nault@alphalink.fr>
To: Denys Fedoryshchenko <nuclearcat@nuclearcat.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	netdev-owner@vger.kernel.org
Subject: Re: ppp/pppoe, still panic 4.15.3 in ppp_push
Date: Thu, 1 Mar 2018 21:01:40 +0100	[thread overview]
Message-ID: <20180301200140.GC1413@alphalink.fr> (raw)
In-Reply-To: <20180227185627.GI1322@alphalink.fr>

On Tue, Feb 27, 2018 at 07:56:27PM +0100, Guillaume Nault wrote:
> On Tue, Feb 27, 2018 at 12:58:55PM +0200, Denys Fedoryshchenko wrote:
> > On 2018-02-23 12:07, Guillaume Nault wrote:
> > > On Fri, Feb 23, 2018 at 11:41:43AM +0200, Denys Fedoryshchenko wrote:
> > > > On 2018-02-23 11:38, Guillaume Nault wrote:
> > > > > On Thu, Feb 22, 2018 at 08:51:19PM +0200, Denys Fedoryshchenko wrote:
> > > > > > I'm using accel-ppp that has unit-cache option, i guess for
> > > > > > "reusing" ppp
> > > > > > interfaces (because creating a lot of interfaces on BRAS with 8k
> > > > > > users quite
> > > > > > expensive).
> > > > > > Maybe it is somehow related and can be that scenario causing this bug?
> > > > > >
> > > > > Indeed, it'd be interesting to know if unit-cache is part of the
> > > > > equation (if it's workable for you to disable it).
> > > > Already did that and testing, unfortunately i had to disable KASAN
> > > > and full
> > > > refcount, as performance hit is too heavy for me. I will try to
> > > > enable KASAN
> > > > alone tomorrow.
> > > > 
> > > Don't hesitate to post the result even if you can't afford enabling
> > > KASAN.
> > Till now 4 days and no reboots.
> > 
> That unit-cache information was very useful. I can now reproduce the
> issue and work on a fix.
>
You can try the following patch.

Sorry for the delay, I'm a bit out of time these days.

diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 255a5def56e9..2acf4b0eabd1 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -3161,6 +3161,15 @@ ppp_connect_channel(struct channel *pch, int unit)
 		goto outl;
 
 	ppp_lock(ppp);
+	spin_lock_bh(&pch->downl);
+	if (!pch->chan) {
+		/* Don't connect unregistered channels */
+		ppp_unlock(ppp);
+		spin_unlock_bh(&pch->downl);
+		ret = -ENOTCONN;
+		goto outl;
+	}
+	spin_unlock_bh(&pch->downl);
 	if (pch->file.hdrlen > ppp->file.hdrlen)
 		ppp->file.hdrlen = pch->file.hdrlen;
 	hdrlen = pch->file.hdrlen + 2;	/* for protocol bytes */

  reply	other threads:[~2018-03-01 20:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-14 13:17 ppp/pppoe, still panic 4.15.3 in ppp_push Denys Fedoryshchenko
2018-02-14 16:07 ` Guillaume Nault
2018-02-14 16:29   ` Denys Fedoryshchenko
2018-02-14 16:47     ` Guillaume Nault
2018-02-14 16:49       ` Denys Fedoryshchenko
2018-02-14 17:25         ` Guillaume Nault
2018-02-15 10:19           ` Denys Fedoryshchenko
2018-02-15 15:55             ` Guillaume Nault
2018-02-15 16:01               ` Denys Fedoryshchenko
2018-02-15 19:31                 ` Guillaume Nault
2018-02-15 19:34                   ` Denys Fedoryshchenko
2018-02-15 19:42                     ` Guillaume Nault
2018-02-16 11:13                       ` Denys Fedoryshchenko
2018-02-16 18:48                         ` Guillaume Nault
2018-02-18 10:01                           ` Denys Fedoryshchenko
2018-02-21 18:38                             ` Guillaume Nault
2018-02-20  9:05                           ` Denys Fedoryshchenko
2018-02-21 10:26                           ` Denys Fedoryshchenko
2018-02-21 18:55                             ` Guillaume Nault
2018-02-21 19:30                               ` Denys Fedoryshchenko
2018-02-21 20:04                   ` Cong Wang
2018-02-22 18:30                     ` Guillaume Nault
2018-02-22 18:51                       ` Denys Fedoryshchenko
2018-02-23  9:38                         ` Guillaume Nault
2018-02-23  9:41                           ` Denys Fedoryshchenko
2018-02-23 10:07                             ` Guillaume Nault
2018-02-23 10:54                               ` Denys Fedoryshchenko
2018-02-24 21:22                               ` Denys Fedoryshchenko
2018-02-27 10:58                               ` Denys Fedoryshchenko
2018-02-27 18:56                                 ` Guillaume Nault
2018-03-01 20:01                                   ` Guillaume Nault [this message]
2018-03-01 20:07                                     ` Denys Fedoryshchenko
2018-03-02 17:43                                       ` Guillaume Nault
2018-03-03  9:33                                         ` Denys Fedoryshchenko
2018-03-05 17:22                                           ` Guillaume Nault
2018-02-27 18:54                       ` Guillaume Nault
2018-02-15 19:20         ` Guillaume Nault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180301200140.GC1413@alphalink.fr \
    --to=g.nault@alphalink.fr \
    --cc=netdev-owner@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nuclearcat@nuclearcat.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).