Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 348631
b: refs/heads/master
c: 7c0c3b1
h: refs/heads/master
i:
  348629: 634a000
  348627: c9cdb0d
  348623: 9210a0c
v: v3
  • Loading branch information
Jason Wang authored and David S. Miller committed Jan 12, 2013
1 parent 3b8b070 commit 9097cb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8deabd3eebaa96cf8d6e290d67b03f36c7f7a41
refs/heads/master: 7c0c3b1a8a175437991ccc898ed66ec5e4a96208
5 changes: 3 additions & 2 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,6 @@ static int tun_attach(struct tun_struct *tun, struct file *file)
err = -EINVAL;
if (rtnl_dereference(tfile->tun))
goto out;
if (tfile->detached && tun != tfile->detached)
goto out;

err = -EBUSY;
if (!(tun->flags & TUN_TAP_MQ) && tun->numqueues == 1)
Expand Down Expand Up @@ -1543,6 +1541,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
struct net_device *dev;
int err;

if (tfile->detached)
return -EINVAL;

dev = __dev_get_by_name(net, ifr->ifr_name);
if (dev) {
if (ifr->ifr_flags & IFF_TUN_EXCL)
Expand Down

0 comments on commit 9097cb7

Please sign in to comment.