diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/pipe.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -863,6 +863,9 @@ pipe_rdwr_open(struct inode *inode, struct file *filp) { int ret = -ENOENT; + if (!(filp->f_mode & (FMODE_READ|FMODE_WRITE))) + return -EINVAL; + mutex_lock(&inode->i_mutex); if (inode->i_pipe) { |