Paulo Alcantara
a8a518ff3b
cifs: fix potential deadlock in cache_refresh_path()
...
[ Upstream commit 9fb0db40513e27537fde63287aea920b60557a69 ]
Avoid getting DFS referral from an exclusive lock in
cache_refresh_path() because the tcon IPC used for getting the
referral could be disconnected and thus causing a deadlock as shown
below:
task A task B
====== ======
cifs_demultiplex_thread() dfs_cache_find()
cifs_handle_standard() cache_refresh_path()
reconnect_dfs_server() down_write()
dfs_cache_noreq_find() get_dfs_referral()
down_read() <- deadlock smb2_get_dfs_refer()
SMB2_ioctl()
cifs_send_recv()
compound_send_recv()
wait_for_response()
where task A cannot wake up task B because it is blocked on
down_read() due to the exclusive lock held in cache_refresh_path() and
therefore not being able to make progress.
Fixes: c9f711039905 ("cifs: keep referral server sessions alive")
Reviewed-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-01 08:34:24 +01:00
..
2022-07-02 18:52:21 +09:00
2022-05-09 16:21:44 -04:00
2023-02-01 08:34:08 +01:00
2022-12-31 13:33:08 +01:00
2022-07-17 17:31:42 -07:00
2022-08-02 12:34:03 -04:00
2022-05-09 16:21:44 -04:00
2023-01-24 07:24:36 +01:00
2022-09-24 07:00:00 +02:00
2023-01-12 12:02:23 +01:00
2023-02-01 08:34:24 +01:00
2022-08-02 12:34:03 -04:00
2022-12-31 13:32:22 +01:00
2022-08-02 12:34:02 -04:00
2022-10-19 20:54:43 -07:00
2022-12-31 13:31:58 +01:00
2023-01-07 11:11:44 +01:00
2022-10-06 17:31:02 -07:00
2022-10-21 11:09:40 +02:00
2022-05-09 16:21:45 -04:00
2023-02-01 08:34:07 +01:00
2022-10-11 17:42:58 -06:00
2022-08-17 17:25:04 -04:00
2023-01-07 11:11:40 +01:00
2023-01-07 11:12:02 +01:00
2023-01-24 07:24:32 +01:00
2022-10-11 17:42:58 -06:00
2022-08-02 12:34:03 -04:00
2022-12-07 11:49:18 -08:00
2022-11-23 09:10:42 +01:00
2022-12-31 13:32:45 +01:00
2023-01-12 12:02:35 +01:00
2023-01-04 11:28:59 +01:00
2022-09-19 22:46:25 +02:00
2022-05-09 16:21:45 -04:00
2022-12-31 13:33:05 +01:00
2022-10-02 11:42:19 -07:00
2022-10-12 11:00:22 -07:00
2022-10-10 17:53:04 -07:00
2022-09-21 10:38:07 +02:00
2022-12-31 13:32:57 +01:00
2022-11-10 19:03:42 +01:00
2023-01-12 12:02:57 +01:00
2022-12-31 13:32:00 +01:00
2022-09-24 07:00:00 +02:00
2022-11-15 16:56:07 +00:00
2023-01-24 07:24:30 +01:00
2023-02-01 08:34:09 +01:00
2023-01-24 07:24:33 +01:00
2022-10-07 08:28:50 -07:00
2022-10-12 11:00:22 -07:00
2023-01-24 07:24:41 +01:00
2022-12-31 13:31:58 +01:00
2022-05-09 16:21:44 -04:00
2022-03-22 15:57:03 -07:00
2022-12-31 13:33:06 +01:00
2023-01-04 11:29:00 +01:00
2022-11-22 18:50:44 -08:00
2023-01-04 11:28:59 +01:00
2022-05-09 16:21:44 -04:00
2022-09-11 21:55:07 -07:00
2023-01-07 11:11:59 +01:00
2022-10-10 19:45:17 -07:00
2022-12-31 13:33:10 +01:00
2022-05-09 16:21:46 -04:00
2022-10-05 01:55:27 -05:00
2022-10-28 13:37:21 -07:00
2022-04-05 15:39:19 +02:00
2022-12-31 13:32:00 +01:00
2022-09-08 17:10:54 -04:00
2022-10-16 15:27:07 -07:00
2023-01-12 12:02:34 +01:00
2022-09-11 20:26:07 -07:00
2022-05-09 16:21:46 -04:00
2022-10-06 17:36:48 -07:00
2022-10-31 08:58:22 -07:00
2023-01-24 07:24:33 +01:00
2022-09-11 21:55:08 -07:00
2022-08-20 11:34:04 -04:00
2022-08-08 10:39:29 -07:00
2022-09-24 07:00:00 +02:00
2023-01-18 11:58:12 +01:00
2023-01-18 11:58:12 +01:00
2022-04-22 10:57:18 -07:00
2022-12-31 13:32:57 +01:00
2022-10-12 11:00:22 -07:00
2022-12-31 13:32:41 +01:00
2022-10-10 17:53:04 -07:00
2022-08-20 11:34:33 -04:00
2022-09-24 18:14:12 -07:00
2022-10-10 19:45:17 -07:00
2022-09-20 08:24:38 -06:00
2023-01-04 11:28:48 +01:00
2023-01-04 11:28:47 +01:00
2022-10-29 17:49:33 -07:00
2022-06-10 16:10:23 -04:00
2022-09-01 17:36:39 -04:00
2022-08-16 10:59:54 -04:00
2022-10-31 15:30:11 -04:00
2023-01-07 11:11:59 +01:00
2022-11-22 17:00:00 -05:00
2022-05-19 23:25:10 -04:00
2022-10-06 16:49:00 -07:00
2022-10-06 17:31:02 -07:00
2022-04-01 19:35:56 -07:00
2022-09-11 20:26:10 -07:00
2022-10-10 14:21:11 -07:00
2022-06-16 19:58:21 -07:00
2022-12-31 13:31:58 +01:00
2023-01-12 12:02:22 +01:00
2022-09-27 07:11:02 -07:00
2023-01-07 11:12:02 +01:00
2022-07-05 16:18:21 -04:00
2022-08-03 10:35:43 -07:00
2022-11-19 02:22:11 -05:00
2022-08-17 11:27:11 +02:00
2022-08-20 11:34:04 -04:00
2022-10-06 17:13:18 -07:00
2022-08-20 11:34:04 -04:00
2023-01-04 11:29:01 +01:00
2022-10-10 17:53:04 -07:00
2022-06-28 13:58:05 -04:00
2022-11-25 00:52:28 -05:00
2022-08-17 17:25:04 -04:00
2022-08-05 16:32:45 -07:00
2022-05-22 21:03:01 +01:00
2022-08-08 22:37:23 -04:00
2022-09-11 19:47:12 -05:00
2022-10-19 20:54:43 -07:00
2022-04-26 13:36:25 -07:00
2023-01-24 07:24:36 +01:00
2022-12-31 13:31:55 +01:00