Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: davem@davemloft.net, jasowang@redhat.com, mst@redhat.com,
	edumazet@google.com, nhorman@tuxdriver.com,
	yongjun_wei@trendmicro.com.cn, netdev@vger.kernel.org
Subject: Re: [PATCH] tuntap: fix error return code in tun_set_iff()
Date: Fri, 12 Apr 2013 06:49:20 -0700	[thread overview]
Message-ID: <1365774560.4459.26.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAPgLHd9WrbgeYH9pw81kQn9sv=On8e399qAOth6MWprF6PS5pg@mail.gmail.com>

On Fri, 2013-04-12 at 21:17 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/net/tun.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index b7c457a..729ed53 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1594,7 +1594,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
>  
>  		if (tun->flags & TUN_TAP_MQ &&
>  		    (tun->numqueues + tun->numdisabled > 1))
> -			return err;
> +			return -EBUSY;
>  	}
>  	else {
>  		char *name;

Bug added in linux-3.8 , commit 4008e97f866db665 
("tuntap: fix ambigious multiqueue API")

Acked-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2013-04-12 13:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 13:17 [PATCH] tuntap: fix error return code in tun_set_iff() Wei Yongjun
2013-04-12 13:49 ` Eric Dumazet [this message]
2013-04-12 19:00   ` David Miller
2013-04-23  5:37 ` Jerry Chu
2013-04-23  6:19   ` Jason Wang
2013-04-23  6:59     ` Jerry Chu
2013-04-23  7:39       ` Jason Wang

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=1365774560.4459.26.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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