From: Yihao Wu <wuyihao@linux.alibaba.com>
To: Greg KH <greg@kroah.com>
Cc: linux-nfs@vger.kernel.org, Jeff Layton <jlayton@kernel.org>,
"J. Bruce Fields" <bfields@fieldses.org>,
Joseph Qi <joseph.qi@linux.alibaba.com>,
caspar@linux.alibaba.com
Subject: Re: [PATCH 1/2] NFSv4.1: Again fix a race where CB_NOTIFY_LOCK fails to wake a waiter
Date: Wed, 8 May 2019 17:39:59 +0800 [thread overview]
Message-ID: <2697efa4-2da8-ca0f-3ad4-bdcbbdfd334a@linux.alibaba.com> (raw)
In-Reply-To: <20190508091921.GA1968@kroah.com>
On 2019/5/8 5:19 PM, Greg KH wrote:
> On Wed, May 08, 2019 at 05:13:25PM +0800, Yihao Wu wrote:
>> Commit b7dbcc0e433f ""NFSv4.1: Fix a race where CB_NOTIFY_LOCK fails
>> to wake a waiter" found this bug. However it didn't fix it. This can
>> be fixed by adding memory barrier pair.
>>
>> Specifically, if any CB_NOTIFY_LOCK should be handled between unlocking
>> the wait queue and freezable_schedule_timeout, only two cases are
>> possible. So CB_NOTIFY_LOCK will not be dropped unexpectly.
>>
>> 1. The callback thread marks the NFS client as waked. Then NFS client
>> noticed that itself is waked, so it don't goes to sleep. And it cleans
>> its wake mark.
>>
>> 2. The NFS client noticed that itself is not waked yet, so it goes to
>> sleep. No modification will ever happen to the wake mark in between.
>>
>> Fixes: a1d617d ("nfs: allow blocking locks to be awoken by lock callbacks")
>> Signed-off-by: Yihao Wu <wuyihao@linux.alibaba.com>
>> ---
>> fs/nfs/nfs4proc.c | 21 +++++----------------
>> 1 file changed, 5 insertions(+), 16 deletions(-)
>
> <formletter>
>
> This is not the correct way to submit patches for inclusion in the
> stable kernel tree. Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> for how to do this properly.
>
> </formletter>
>
Thanks for your reply! And I'm sorry about that. I will correct this in
patch v2 and read the rules before sending patches.
Thanks,
Yihao Wu
next prev parent reply other threads:[~2019-05-08 9:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 9:11 [PATCH 0/2] Fix two bugs CB_NOTIFY_LOCK failing to wake a water Yihao Wu
2019-05-08 9:13 ` [PATCH 1/2] NFSv4.1: Again fix a race where CB_NOTIFY_LOCK fails to wake a waiter Yihao Wu
2019-05-08 9:15 ` [PATCH 2/2] NFSv4.1: Fix bug only the first CB_NOTIFY_LOCK is handled Yihao Wu
2019-05-08 9:23 ` Greg KH
2019-05-08 9:19 ` [PATCH 1/2] NFSv4.1: Again fix a race where CB_NOTIFY_LOCK fails to wake a waiter Greg KH
2019-05-08 9:39 ` Yihao Wu [this message]
2019-05-08 12:24 ` Jeff Layton
2019-05-08 18:18 ` Yihao Wu
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=2697efa4-2da8-ca0f-3ad4-bdcbbdfd334a@linux.alibaba.com \
--to=wuyihao@linux.alibaba.com \
--cc=bfields@fieldses.org \
--cc=caspar@linux.alibaba.com \
--cc=greg@kroah.com \
--cc=jlayton@kernel.org \
--cc=joseph.qi@linux.alibaba.com \
--cc=linux-nfs@vger.kernel.org \
/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