Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100399
b: refs/heads/master
c: 9d31952
h: refs/heads/master
i:
  100397: 4b4d2ce
  100395: 200212c
  100391: c98df66
  100383: 28cf387
v: v3
  • Loading branch information
Jonathan Corbet committed Jul 2, 2008
1 parent 1463852 commit 7f8bf2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 743115ee05f09f356d86763316acf627a7f5a6b3
refs/heads/master: 9d319522576ce0b2fd023a965445f9c3739ee6f1
11 changes: 7 additions & 4 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,18 +782,21 @@ static int tun_chr_fasync(int fd, struct file *file, int on)

DBG(KERN_INFO "%s: tun_chr_fasync %d\n", tun->dev->name, on);

lock_kernel();
if ((ret = fasync_helper(fd, file, on, &tun->fasync)) < 0)
return ret;
goto out;

if (on) {
ret = __f_setown(file, task_pid(current), PIDTYPE_PID, 0);
if (ret)
return ret;
goto out;
tun->flags |= TUN_FASYNC;
} else
tun->flags &= ~TUN_FASYNC;

return 0;
ret = 0;
out:
unlock_kernel();
return ret;
}

static int tun_chr_open(struct inode *inode, struct file * file)
Expand Down

0 comments on commit 7f8bf2f

Please sign in to comment.