netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: LNML <netdev@vger.kernel.org>, Paul Mackerras <paulus@samba.org>,
	David Miller <davem@davemloft.net>,
	linux-ppp@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-2.6] net, ppp: Report correct error code if unit allocation failed
Date: Wed, 24 Nov 2010 19:25:18 +0300	[thread overview]
Message-ID: <20101124162518.GA6450@lenovo> (raw)
In-Reply-To: <20101124124901.GA9268@ff.dom.local>

On Wed, Nov 24, 2010 at 12:49:01PM +0000, Jarek Poplawski wrote:
> On 2010-11-23 22:43, Cyrill Gorcunov wrote:
> > Allocating unit from ird might return several error codes
> > not only -EAGAIN, so it should not be changed and returned
> > precisely. Same time unit release procedure should be invoked
> > only if device is unregistering.
> 
> IMHO this unit release fix should be in a separate patch.
> 

 I thought about it, but still think it should be addressed at
same patch. Though if a separate would be preferred still --
I've no problem in making two patches instead.

> ...
> > @@ -2668,10 +2668,10 @@ static void ppp_shutdown_interface(struc
> >  		ppp->closing = 1;
> >  		ppp_unlock(ppp);
> >  		unregister_netdev(ppp->dev);
> > +		unit_put(&pn->units_idr, ppp->file.index);
> >  	} else
> >  		ppp_unlock(ppp);
> >  
> > -	unit_put(&pn->units_idr, ppp->file.index);
> >  	ppp->file.dead = 1;
> >  	ppp->owner = NULL;
> >  	wake_up_interruptible(&ppp->file.rwait);
> 
> Btw, it seems these last 3 lines could be moved similarly.

yup, at least ppp->file.dead and ppp->owner for sure, I wanted
make this patch 'unit' orientedc and do not touch anything aside,
it should be a separate change.

> 
> Jarek P.
>

Thanks for comments Jarek!
 
  Cyrill

  reply	other threads:[~2010-11-24 16:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 21:43 [PATCH net-2.6] net, ppp: Report correct error code if unit allocation failed Cyrill Gorcunov
2010-11-24 12:49 ` Jarek Poplawski
2010-11-24 16:25   ` Cyrill Gorcunov [this message]
2010-11-28 19:33 ` 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=20101124162518.GA6450@lenovo \
    --to=gorcunov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jarkao2@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).