lkml.org 
[lkml]   [2006]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: lock_kernel called under spinlock in NFS
From
Date
On Sat, 2006-06-03 at 22:30 +0400, Sergey Vlasov wrote:

> 2) The patch above is broken - it needs the fix below (or the fix should
> be folded into the patch directly):

Duh... You're quite right. Sorry about missing that.

Cheers,
Trond

> --------------------------------------------------------------------
>
> Fix do_path_lookup() failure path after locking changes
>
> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
> ---
> fs/namei.c | 13 ++++++-------
> 1 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index a2f79d2..d6e2ee2 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1104,17 +1104,17 @@ static int fastcall do_path_lookup(int d
> file = fget_light(dfd, &fput_needed);
> retval = -EBADF;
> if (!file)
> - goto unlock_fail;
> + goto out_fail;
>
> dentry = file->f_dentry;
>
> retval = -ENOTDIR;
> if (!S_ISDIR(dentry->d_inode->i_mode))
> - goto fput_unlock_fail;
> + goto fput_fail;
>
> retval = file_permission(file, MAY_EXEC);
> if (retval)
> - goto fput_unlock_fail;
> + goto fput_fail;
>
> nd->mnt = mntget(file->f_vfsmnt);
> nd->dentry = dget(dentry);
> @@ -1129,13 +1129,12 @@ out:
> nd->dentry->d_inode))
> audit_inode(name, nd->dentry->d_inode, flags);
> }
> +out_fail:
> return retval;
>
> -fput_unlock_fail:
> +fput_fail:
> fput_light(file, fput_needed);
> -unlock_fail:
> - read_unlock(&current->fs->lock);
> - return retval;
> + goto out_fail;
> }
>
> int fastcall path_lookup(const char *name, unsigned int flags,
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-04 00:13    [from the cache]
©2003-2011 Jasper Spaans