3.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jason Wang <[email protected]>

[ Upstream commit e8dbad66ef56074eadb41ed5998acd2320447018 ]

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 <[email protected]>
Cc: Jerry Chu <[email protected]>
Cc: Wei Yongjun <[email protected]>
Cc: Eric Dumazet <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Acked-by:  Jerry Chu <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/net/tun.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1600,8 +1600,12 @@ static int tun_set_iff(struct net *net,
                        return err;
 
                if (tun->flags & TUN_TAP_MQ &&
-                   (tun->numqueues + tun->numdisabled > 1))
-                       return -EBUSY;
+                   (tun->numqueues + tun->numdisabled > 1)) {
+                       /* One or more queue has already been attached, no need
+                        * to initialize the device again.
+                        */
+                       return 0;
+               }
        }
        else {
                char *name;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to