public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Bennett <Matt.Bennett@alliedtelesis.co.nz>
To: "nuclearcat@nuclearcat.com" <nuclearcat@nuclearcat.com>
Cc: "core@irc.lg.ua" <core@irc.lg.ua>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"paulus@samba.org" <paulus@samba.org>,
	"g.nault@alphalink.fr" <g.nault@alphalink.fr>
Subject: Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()
Date: Thu, 22 Oct 2015 00:14:57 +0000	[thread overview]
Message-ID: <1445472897.4157.38.camel@mattb-dl> (raw)
In-Reply-To: <85baa6ab4293c475d0b4b26192694239@visp.net.lb>

On Tue, 2015-10-13 at 05:13 +0300, Denys Fedoryshchenko wrote:
> On 2015-10-07 15:12, Guillaume Nault wrote:
> > On Mon, Oct 05, 2015 at 02:08:44PM +0200, Guillaume Nault wrote:
> >>  	if (po) {
> >>  		struct sock *sk = sk_pppox(po);
> >> 
> >> -		bh_lock_sock(sk);
> >> -
> >> -		/* If the user has locked the socket, just ignore
> >> -		 * the packet.  With the way two rcv protocols hook into
> >> -		 * one socket family type, we cannot (easily) distinguish
> >> -		 * what kind of SKB it is during backlog rcv.
> >> -		 */
> >> -		if (sock_owned_by_user(sk) == 0) {
> >> -			/* We're no longer connect at the PPPOE layer,
> >> -			 * and must wait for ppp channel to disconnect us.
> >> -			 */
> >> -			sk->sk_state = PPPOX_ZOMBIE;
> >> -		}
> >> -
> >> -		bh_unlock_sock(sk);
> >>  		if (!schedule_work(&po->proto.pppoe.padt_work))
> >>  			sock_put(sk);
> >>  	}
> >> 
> > Finally, I think I'll keep this approach for net-next, to completely
> > remove PPPOX_ZOMBIE.
> > For now, let's just avoid any assumption about the relationship between
> > the PPPOX_ZOMBIE state and the value of po->pppoe_dev, as suggested by
> > Matt.
> > 
> > Denys, can you let me know if your issue goes away with the following
> > patch?
> > ---
> > diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
> > index 2ed7506..5e0b432 100644
> > --- a/drivers/net/ppp/pppoe.c
> > +++ b/drivers/net/ppp/pppoe.c
> > @@ -589,7 +589,7 @@ static int pppoe_release(struct socket *sock)
> > 
> >  	po = pppox_sk(sk);
> > 
> > -	if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND | PPPOX_ZOMBIE)) {
> > +	if (po->pppoe_dev) {
> >  		dev_put(po->pppoe_dev);
> >  		po->pppoe_dev = NULL;
> >  	}
> I just got OK to upgrade server yesterday, for now around 12 hours 
> working fine. I need 1-2 more days, and maybe will upgrade few more 
> servers to say for sure, if it is ok or not.
> Sorry for delay, just it is production servers and at current situation 
> they cannot tolerate significant downtime.
> 
Any update on whether this issue is fixed with the suggested patch?
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2015-10-22  0:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30  9:45 [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev() Guillaume Nault
2015-10-02  8:01 ` Denys Fedoryshchenko
2015-10-02 17:54   ` Guillaume Nault
2015-10-04 16:08     ` Denys Fedoryshchenko
2015-10-05  4:08       ` Matt Bennett
2015-10-05 12:24         ` Guillaume Nault
2015-10-06  0:26           ` Matt Bennett
2015-10-06  4:46             ` Matt Bennett
2015-10-06  9:46               ` Guillaume Nault
2015-10-06 21:12                 ` Matt Bennett
2015-10-07 10:32                   ` Guillaume Nault
2015-10-06  8:50             ` Guillaume Nault
2015-10-05 12:08       ` Guillaume Nault
2015-10-07 12:12         ` Guillaume Nault
2015-10-13  2:13           ` Denys Fedoryshchenko
2015-10-13  7:24             ` Guillaume Nault
2015-10-22  0:14             ` Matt Bennett [this message]
2015-10-22  0:53               ` Denys Fedoryshchenko
2015-10-22 14:49                 ` Guillaume Nault
2015-10-05 10:05 ` David Miller

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=1445472897.4157.38.camel@mattb-dl \
    --to=matt.bennett@alliedtelesis.co.nz \
    --cc=core@irc.lg.ua \
    --cc=davem@davemloft.net \
    --cc=g.nault@alphalink.fr \
    --cc=netdev@vger.kernel.org \
    --cc=nuclearcat@nuclearcat.com \
    --cc=paulus@samba.org \
    /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