From a259e108a0927ba5b0d914929e81bfa3c857b6b4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 3 Jun 2010 12:35:42 +0200 Subject: [PATCH] --- yaml --- r: 200133 b: refs/heads/master c: 5b54470daded19d83ea2bbf5f6bc12662942cd63 h: refs/heads/master i: 200131: 86508208acdeeb9afe8150dc558ae552700ad00b v: v3 --- [refs] | 2 +- trunk/fs/fcntl.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 6145e700cf8a..43718631f485 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d683a09990ff095a91b6e724ecee0ff8733274a +refs/heads/master: 5b54470daded19d83ea2bbf5f6bc12662942cd63 diff --git a/trunk/fs/fcntl.c b/trunk/fs/fcntl.c index f74d270ba155..51e11bf5708f 100644 --- a/trunk/fs/fcntl.c +++ b/trunk/fs/fcntl.c @@ -274,7 +274,7 @@ static int f_setown_ex(struct file *filp, unsigned long arg) ret = copy_from_user(&owner, owner_p, sizeof(owner)); if (ret) - return ret; + return -EFAULT; switch (owner.type) { case F_OWNER_TID: @@ -332,8 +332,11 @@ static int f_getown_ex(struct file *filp, unsigned long arg) } read_unlock(&filp->f_owner.lock); - if (!ret) + if (!ret) { ret = copy_to_user(owner_p, &owner, sizeof(owner)); + if (ret) + ret = -EFAULT; + } return ret; }