From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Sergey Vlasov <vsu@altlinux.ru>
Cc: Andrew Morton <akpm@osdl.org>,
joe.korty@ccur.com, linux-kernel@vger.kernel.org,
drepper@redhat.com, mingo@elte.hu, stable@kernel.org
Subject: Re: lock_kernel called under spinlock in NFS
Date: Sat, 03 Jun 2006 18:10:42 -0400 [thread overview]
Message-ID: <1149372643.17419.5.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20060603223003.5665a426.vsu@altlinux.ru>
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(¤t->fs->lock);
> - return retval;
> + goto out_fail;
> }
>
> int fastcall path_lookup(const char *name, unsigned int flags,
prev parent reply other threads:[~2006-06-03 22:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-01 19:55 Joe Korty
2006-06-01 20:13 ` Trond Myklebust
2006-06-02 20:24 ` Joe Korty
2006-06-02 20:27 ` Trond Myklebust
2006-06-02 20:43 ` Andrew Morton
2006-06-02 21:26 ` Trond Myklebust
2006-06-03 18:30 ` Sergey Vlasov
2006-06-03 22:10 ` Trond Myklebust [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1149372643.17419.5.camel@lade.trondhjem.org \
--to=trond.myklebust@netapp.com \
--cc=akpm@osdl.org \
--cc=drepper@redhat.com \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=stable@kernel.org \
--cc=vsu@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®