|
@@ -486,12 +486,14 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
|
|
{
|
|
{
|
|
struct tun_file *tfile = file->private_data;
|
|
struct tun_file *tfile = file->private_data;
|
|
struct tun_struct *tun = __tun_get(tfile);
|
|
struct tun_struct *tun = __tun_get(tfile);
|
|
- struct sock *sk = tun->sk;
|
|
|
|
|
|
+ struct sock *sk;
|
|
unsigned int mask = 0;
|
|
unsigned int mask = 0;
|
|
|
|
|
|
if (!tun)
|
|
if (!tun)
|
|
return POLLERR;
|
|
return POLLERR;
|
|
|
|
|
|
|
|
+ sk = tun->sk;
|
|
|
|
+
|
|
DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
|
|
DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
|
|
|
|
|
|
poll_wait(file, &tun->socket.wait, wait);
|
|
poll_wait(file, &tun->socket.wait, wait);
|