From: Sasha Levin <sasha.levin@oracle.com>
To: Sasha Levin <sasha.levin@oracle.com>,
ericvh@gmail.com, rminnich@sandia.gov, lucho@ionkov.net
Cc: v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/9p/: don't treat error as status value in file locking
Date: Tue, 05 Aug 2014 20:53:30 -0400 [thread overview]
Message-ID: <53E17C8A.9070204@oracle.com> (raw)
In-Reply-To: <1403480661-32620-1-git-send-email-sasha.levin@oracle.com>
Ping?
On 06/22/2014 07:44 PM, Sasha Levin wrote:
> When trying to lock a file we didn't properly handle the case where a
> failure in p9_client_lock_dotl() occurs and treated the status value
> as valid instead of discarding it due to the error.
>
> This would usually trigger a BUG() since the status value would
> just be stack garbage.
>
> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> ---
> fs/9p/vfs_file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
> index 520c11c..06077f3 100644
> --- a/fs/9p/vfs_file.c
> +++ b/fs/9p/vfs_file.c
> @@ -194,7 +194,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)
> for (;;) {
> res = p9_client_lock_dotl(fid, &flock, &status);
> if (res < 0)
> - break;
> + return res;
>
> if (status != P9_LOCK_BLOCKED)
> break;
>
next prev parent reply other threads:[~2014-08-06 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 23:44 [PATCH] fs/9p/: don't treat error as status value in file locking Sasha Levin
2014-08-06 0:53 ` Sasha Levin [this message]
2014-08-10 7:41 ` [V9fs-developer] " Aneesh Kumar K.V
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=53E17C8A.9070204@oracle.com \
--to=sasha.levin@oracle.com \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=rminnich@sandia.gov \
--cc=v9fs-developer@lists.sourceforge.net \
/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