diff options
author | Yihao Wu <wuyihao@linux.alibaba.com> | 2019-05-22 01:57:10 +0800 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-05-30 15:36:24 -0400 |
commit | 52b042ab9948cc367b61f9ca9c18603aa7813c3a (patch) | |
tree | 30972007c92d57b1a71c049bfffe840f0a1946a2 /Kconfig | |
parent | 7987b694ade8cc465ce10fb3dceaa614f13ceaf3 (diff) | |
download | linux-52b042ab9948cc367b61f9ca9c18603aa7813c3a.tar.bz2 |
NFSv4.1: Again fix a race where CB_NOTIFY_LOCK fails to wake a waiter
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 commit replaces schedule_timeout() with wait_woken() and
default_wake_function() with woken_wake_function() in function
nfs4_retry_setlk() and nfs4_wake_lock_waiter(). wait_woken() uses
memory barriers in its implementation to avoid potential race condition
when putting a process into sleeping state and then waking it up.
Fixes: a1d617d8f134 ("nfs: allow blocking locks to be awoken by lock callbacks")
Cc: stable@vger.kernel.org #4.9+
Signed-off-by: Yihao Wu <wuyihao@linux.alibaba.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions