} else goto wait;
}
+ i = verify_area (VERIFY_WRITE,buf,nr);
+ if (i != 0) {
+ ppp->us_rbuff_lock = 0;
+ return i;
+ }
+
/* reset the time of the last read operation */
ppp->ddinfo.nip_rjiffies = jiffies;
current->timeout = 0;
PRINTKN (3,(KERN_DEBUG "ppp_read: sleeping\n"));
interruptible_sleep_on (&ppp->read_wait);
+
+ /* Ensure that the ppp device is still attached. */
+ ppp = ppp_find(tty);
+ if (!ppp || ppp->magic != PPP_MAGIC || !ppp->inuse)
+ return 0;
+
if (current->signal & ~current->blocked)
return -EINTR;
} while (1);
nr = ppp->mtu;
}
+ i = verify_area (VERIFY_READ,buf,nr);
+ if (i != 0)
+ return i;
+
if (ppp_debug >= 3)
ppp_print_buffer ("write frame", buf, nr, USER_DS);
current->timeout = 0;
PRINTKN (3,(KERN_DEBUG "ppp_write: sleeping\n"));
interruptible_sleep_on(&ppp->write_wait);
+
+ /* Ensure that the ppp device is still attached. */
+ ppp = ppp_find(tty);
+ if (!ppp || ppp->magic != PPP_MAGIC || !ppp->inuse)
+ return 0;
+
if (current->signal & ~current->blocked)
return -EINTR;
}
entry->fhandle = *fhandle;
entry->fattr = *fattr;
entry->expiration_date = jiffies + (S_ISDIR(fattr->mode)
- ? NFS_SERVER(dir)->acdirmax : NFS_SERVER(dir)->acregmax);
+ ? NFS_SERVER(dir)->acdirmin : NFS_SERVER(dir)->acregmin);
}
static void nfs_lookup_cache_remove(struct inode *dir, struct inode *inode,
return;
}
ino &= 0x0000ffff;
- if (ino == PROC_PID_INO ||
- (p->dumpable && p->uid == p->euid && p->gid == p->egid)) {
- inode->i_uid = p->uid;
- inode->i_gid = p->gid;
+ if (ino == PROC_PID_INO || p->dumpable) {
+ inode->i_uid = p->euid;
+ inode->i_gid = p->egid;
}
switch (ino) {
case PROC_PID_INO: