Yihao Wu
52b042ab99
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>
2019-05-30 15:36:24 -04:00
..
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:37:52 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-20 09:52:35 -07:00
2019-05-24 17:27:11 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:36:45 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:37:52 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-25 15:03:12 -07:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:27:11 +02:00
2019-05-21 10:50:46 +02:00
2019-05-22 08:31:09 -07:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-12 17:52:13 -04:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:46 +02:00
2019-05-30 15:36:24 -04:00
2019-05-21 10:50:46 +02:00
2019-05-21 11:28:39 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:39:02 +02:00
2019-05-24 17:37:53 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-24 17:39:02 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-23 11:18:18 -07:00
2019-04-04 20:13:59 -04:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-04-02 17:49:58 +02:00
2019-05-14 09:47:48 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-02-01 15:46:24 -08:00
2019-05-21 10:50:45 +02:00
2019-03-07 18:32:01 -08:00
2019-05-21 10:50:45 +02:00
2019-04-08 18:21:02 -05:00
2019-05-21 10:50:45 +02:00
2019-03-08 14:48:40 -08:00
2019-02-28 03:29:26 -05:00
2019-05-24 17:27:11 +02:00
2019-05-24 17:27:11 +02:00
2019-05-21 10:50:45 +02:00
2019-01-21 17:48:13 +01:00
2019-05-21 10:50:45 +02:00
2019-05-24 17:27:11 +02:00
2019-05-21 10:50:45 +02:00
2019-05-07 20:17:51 -07:00
2019-05-16 19:10:37 -07:00
2019-01-03 18:57:57 -08:00
2019-05-07 18:14:36 -07:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-05-07 21:12:44 -07:00
2019-05-21 10:50:45 +02:00
2019-01-30 17:44:07 -05:00
2019-04-30 09:26:13 -06:00
2019-05-07 21:28:04 -07:00
2019-05-09 02:32:50 -04:00
2019-04-09 19:20:57 -04:00
2019-05-21 10:50:45 +02:00
2019-04-14 15:09:40 -07:00
2019-01-30 17:14:50 -05:00
2019-01-30 17:14:50 -05:00
2019-05-21 10:50:45 +02:00
2019-05-06 17:46:52 +03:00
2019-01-03 18:57:57 -08:00
2019-02-07 00:13:27 +01:00
2019-04-08 18:21:02 -05:00
2019-04-08 18:21:02 -05:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-02-01 01:55:45 -05:00
2019-02-07 16:38:35 +01:00
2019-04-28 21:34:21 -04:00
2019-05-14 09:47:50 -07:00
2019-02-07 00:13:27 +01:00
2019-05-14 09:47:45 -07:00
2019-02-07 00:13:27 +01:00
2019-05-21 10:50:45 +02:00