aboutsummaryrefslogtreecommitdiffstats
path: root/fs/pipe.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-04-05 13:56:44 -0700
committerTodd Poynor <toddpoynor@google.com>2013-04-05 13:56:44 -0700
commit12b868488bc5abfb5fc0910aa34b32d6209073df (patch)
tree5d37b78d71a0070a73fa8bcead7dce040119f554 /fs/pipe.c
parent0bb6ee4f4587d219cfbb328e8a14f608405b52b9 (diff)
parentae7859181482fcfe38d9352bd0932fa45456bdd0 (diff)
downloadkernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.zip
kernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.tar.gz
kernel_samsung_tuna-12b868488bc5abfb5fc0910aa34b32d6209073df.tar.bz2
Merge tag 'v3.0.72' into android-3.0
This is the 3.0.72 stable release
Diffstat (limited to 'fs/pipe.c')
-rw-r--r--fs/pipe.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/pipe.c b/fs/pipe.c
index 0499a96..342aa86 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -859,6 +859,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) {