lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPshTCi0=pyw-s+9EQOtv7TKr13bL+Obv5QBMNB+RHEWE_FVEg@mail.gmail.com>
Date:	Tue, 23 Apr 2013 00:23:08 -0700
From:	Jerry Chu <hkchu@...gle.com>
To:	Jason Wang <jasowang@...hat.com>
Cc:	David Miller <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	linux-kernel@...r.kernel.org, Wei Yongjun <weiyj.lk@...il.com>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] tuntap: correct the return value in tun_set_iff()

On Mon, Apr 22, 2013 at 11:40 PM, Jason Wang <jasowang@...hat.com> wrote:
> commit (3be8fbab tuntap: fix error return code in tun_set_iff()) breaks the
> creation of multiqueue tuntap since it forbids to create more than one queues
> for a multiqueue tuntap device. We need return 0 instead -EBUSY here since we
> don't want to re-initialize the device when one or more queues has been already
> attached. Add a comment and correct the return value to zero.
>
> Reported-by: Jerry Chu <hkchu@...gle.com>
> Cc: Jerry Chu <hkchu@...gle.com>
> Cc: Wei Yongjun <weiyj.lk@...il.com>
> Cc: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Jason Wang <jasowang@...hat.com>
> ---
>  drivers/net/tun.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 729ed53..3a8977e 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1594,7 +1594,10 @@ 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 -EBUSY;
> +                       /* One or more queue has already been attached, no need
> +                        * to initialize the device again.
> +                        */
> +                       return 0;
>         }
>         else {
>                 char *name;
> --
> 1.7.1
>

Acked-by:  Jerry Chu <hkchu@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ