Andriy Gapon
20e9cab5fa
iscsi: do not hold the global lock while tearing down a session
...
It should be sufficient to hold the lock just for removing the session
from the session list. Everything else should be covered by the session
specific lock.
On top of that, at present we can get a deadlock caused by waiting on
the CAM SIM reference count while holding the global lock. A specific
scenario involving ZFS is this:
- concurrent termination of two sessions, S1 and S2
- session S1 completed all I/Os and sleeps in CAM waiting for device
close by ZFS;
- session S2 is also dead now, but can not forcefully complete
outstanding requests by calling iscsi_session_cleanup() from
iscsi_maintenance_thread_terminate(), since it can't get the same
global sc_lock;
- as soon as there are unfinished requests, ZFS can not do
spa_config_enter() as writer, and so can not close the device for
session S1;
- deadlock.
Reported by: Ben RUBSON <ben.rubson@gmail.com>
Tested by: Ben RUBSON <ben.rubson@gmail.com>
Reviewed by: mav, trasz
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D12652
2017-10-17 15:39:38 +00:00
..
2017-09-08 16:52:59 +00:00
2017-07-01 05:35:29 +00:00
2017-01-27 14:17:48 +00:00
2017-10-10 19:33:24 +00:00
2017-01-30 02:32:33 +00:00
2017-02-19 17:27:58 +00:00
2017-04-14 02:24:02 +00:00
2017-04-14 08:27:42 +00:00
2017-07-09 22:53:24 +00:00
2017-02-19 17:27:58 +00:00
2017-10-02 02:58:28 +00:00
2017-01-28 02:22:15 +00:00
2017-07-10 05:08:01 +00:00
2017-02-20 03:43:12 +00:00
2017-01-16 03:03:47 +00:00
2016-05-03 03:41:25 +00:00
2017-01-28 13:25:06 +00:00
2017-03-03 22:51:04 +00:00
2016-09-24 07:59:54 +00:00
2017-09-14 15:34:45 +00:00
2017-09-14 15:34:45 +00:00
2017-09-08 17:40:29 +00:00
2017-02-20 03:43:12 +00:00
2017-07-14 14:53:13 +00:00
2017-02-17 18:49:18 +00:00
2017-08-09 12:21:17 +00:00
2017-10-12 21:58:51 +00:00
2017-05-29 20:43:00 +00:00
2016-08-09 19:32:06 +00:00
2017-02-15 13:56:04 +00:00
2017-02-20 03:43:12 +00:00
2017-02-20 03:43:12 +00:00
2016-10-25 16:28:30 +00:00
2016-06-01 05:15:11 +00:00
2017-09-27 19:48:34 +00:00
2017-06-27 03:57:31 +00:00
2017-10-05 17:52:38 +00:00
2017-02-20 03:43:12 +00:00
2017-07-06 17:03:22 +00:00
2017-04-06 17:08:59 +00:00
2017-07-19 14:21:29 +00:00
2016-04-26 23:09:47 +00:00
2016-05-03 03:41:25 +00:00
2017-10-09 20:35:31 +00:00
2017-02-23 15:30:21 +00:00
2017-05-19 08:19:39 +00:00
2016-08-01 16:26:08 +00:00
2017-05-06 05:52:01 +00:00
2017-02-25 15:55:46 +00:00
2017-01-05 03:08:57 +00:00
2017-02-20 03:43:12 +00:00
2016-05-03 03:41:25 +00:00
2016-05-22 13:58:32 +00:00
2017-02-20 03:43:12 +00:00
2017-03-19 21:25:27 +00:00
2016-09-06 20:43:26 +00:00
2017-05-17 00:34:34 +00:00
2017-02-20 03:43:12 +00:00
2017-02-20 03:43:12 +00:00
2017-09-13 17:49:23 +00:00
2017-10-09 20:35:31 +00:00
2017-04-27 16:14:32 +00:00
2017-08-08 13:27:32 +00:00
2017-02-20 03:43:12 +00:00
2016-11-17 14:43:13 +00:00
2017-10-12 21:26:52 +00:00
2017-02-16 21:57:13 +00:00
2017-09-26 23:23:58 +00:00
2017-09-27 19:14:00 +00:00
2016-07-10 18:28:15 +00:00
2017-10-05 14:43:30 +00:00
2017-02-20 03:43:12 +00:00
2017-10-01 19:52:47 +00:00
2017-07-10 22:11:30 +00:00
2017-02-16 21:56:51 +00:00
2017-01-04 20:26:42 +00:00
2016-05-03 03:41:25 +00:00
2017-07-27 02:38:53 +00:00
2017-07-23 20:41:58 +00:00
2017-04-06 17:16:41 +00:00
2017-01-28 02:22:15 +00:00
2017-08-19 17:18:27 +00:00
2017-04-20 15:18:15 +00:00
2017-02-28 23:42:47 +00:00
2017-08-09 00:45:25 +00:00
2017-02-20 03:43:12 +00:00
2017-06-11 00:44:19 +00:00
2016-08-12 16:05:53 +00:00
2017-03-07 16:07:52 +00:00
2017-05-06 06:08:44 +00:00
2017-04-14 02:33:26 +00:00
2017-09-13 16:54:27 +00:00
2017-09-10 18:08:25 +00:00
2017-02-06 11:37:20 +00:00
2016-12-29 14:08:24 +00:00
2016-05-03 03:41:25 +00:00
2017-02-10 15:18:41 +00:00
2017-02-20 03:43:12 +00:00
2017-07-06 05:32:22 +00:00
2017-02-10 15:18:41 +00:00
2017-02-10 15:18:41 +00:00
2017-10-13 15:02:29 +00:00
2017-10-11 05:28:51 +00:00
2017-02-28 23:42:47 +00:00
2016-12-26 22:13:43 +00:00
2017-04-02 11:36:25 +00:00
2017-09-10 13:21:54 +00:00
2017-02-16 21:56:57 +00:00
2017-10-09 20:35:31 +00:00
2017-09-17 22:58:13 +00:00
2017-01-04 20:26:42 +00:00
2016-12-27 22:37:24 +00:00
2017-09-14 15:34:45 +00:00
2017-09-14 15:34:45 +00:00
2016-05-03 03:41:25 +00:00
2016-05-19 22:19:35 +00:00
2017-07-10 05:08:01 +00:00
2017-10-17 15:39:38 +00:00
2017-10-09 20:35:31 +00:00
2016-08-25 05:22:53 +00:00
2016-10-30 12:15:33 +00:00
2017-08-23 19:00:06 +00:00
2017-07-06 17:03:22 +00:00
2017-10-09 15:48:56 +00:00
2017-04-02 13:24:58 +00:00
2017-05-17 00:34:34 +00:00
2017-10-11 05:55:52 +00:00
2017-09-27 05:59:54 +00:00
2017-09-13 13:03:29 +00:00
2017-04-14 08:11:50 +00:00
2017-01-28 02:22:15 +00:00
2016-11-15 04:12:19 +00:00
2017-08-03 05:55:01 +00:00
2017-02-20 03:43:12 +00:00
2017-10-09 20:35:31 +00:00
2017-09-12 23:36:58 +00:00
2016-10-01 22:21:10 +00:00
2016-04-29 22:14:11 +00:00
2017-10-04 12:23:34 +00:00
2017-09-08 17:51:19 +00:00
2016-05-03 03:41:25 +00:00
2017-06-11 00:38:16 +00:00
2017-02-16 21:56:32 +00:00
2017-10-14 23:25:44 +00:00
2017-10-10 12:24:52 +00:00
2017-08-08 17:49:57 +00:00
2017-09-15 19:47:44 +00:00
2017-07-09 17:02:47 +00:00
2016-05-03 03:41:25 +00:00
2017-10-01 15:35:21 +00:00
2017-10-01 15:35:21 +00:00
2017-06-30 22:06:24 +00:00
2017-01-23 21:09:27 +00:00
2017-05-17 00:34:34 +00:00
2017-04-14 07:27:23 +00:00
2017-02-19 17:27:58 +00:00
2017-10-09 20:35:31 +00:00
2016-05-12 03:36:49 +00:00
2017-05-17 00:34:34 +00:00
2017-05-04 20:42:31 +00:00
2017-02-20 03:43:12 +00:00
2017-09-28 19:57:46 +00:00
2016-05-03 03:41:25 +00:00
2017-10-09 20:35:31 +00:00
2016-05-03 03:41:25 +00:00
2017-02-28 23:42:47 +00:00
2016-05-03 03:41:25 +00:00
2017-10-01 09:48:31 +00:00
2016-12-10 16:20:39 +00:00
2017-08-04 03:40:01 +00:00
2017-10-15 23:53:55 +00:00
2016-07-24 08:35:45 +00:00
2016-06-03 15:33:21 +00:00
2016-09-22 22:51:11 +00:00
2017-10-04 14:41:45 +00:00
2017-02-26 20:49:35 +00:00
2017-07-29 17:00:23 +00:00
2017-09-27 19:22:10 +00:00
2017-10-09 22:27:38 +00:00
2016-05-03 03:41:25 +00:00
2017-10-09 22:27:38 +00:00
2017-05-17 00:34:34 +00:00
2017-02-16 21:57:08 +00:00
2017-02-20 03:43:12 +00:00
2017-05-17 00:34:34 +00:00
2017-09-18 18:42:28 +00:00
2017-10-06 15:46:11 +00:00
2016-07-21 16:34:56 +00:00
2016-10-17 10:20:38 +00:00
2017-08-24 19:09:42 +00:00
2017-05-17 00:34:34 +00:00
2017-10-11 20:22:01 +00:00
2017-05-17 00:34:34 +00:00
2017-02-26 20:49:35 +00:00
2017-10-07 19:02:03 +00:00
2016-05-03 03:41:25 +00:00
2016-12-31 02:23:15 +00:00
2016-10-27 02:20:13 +00:00
2017-05-17 00:34:34 +00:00
2017-05-06 06:20:34 +00:00
2017-08-28 22:14:16 +00:00
2017-08-18 08:05:33 +00:00
2017-02-20 03:43:12 +00:00
2017-09-24 09:05:35 +00:00
2016-05-03 03:41:25 +00:00
2017-01-27 11:59:02 +00:00
2016-06-04 19:53:47 +00:00
2017-02-19 17:27:58 +00:00
2017-02-28 23:42:47 +00:00
2016-05-03 03:41:25 +00:00
2017-10-01 19:03:21 +00:00
2017-09-28 19:33:36 +00:00
2017-02-20 03:43:12 +00:00
2017-05-23 09:29:05 +00:00
2017-10-16 12:54:53 +00:00
2017-05-17 00:34:34 +00:00
2017-03-09 01:00:27 +00:00
2017-08-07 14:09:57 +00:00
2017-08-25 10:57:17 +00:00
2017-09-24 02:50:59 +00:00
2017-05-17 00:34:34 +00:00
2017-04-06 22:21:49 +00:00
2017-02-19 17:27:58 +00:00
2017-07-01 05:35:29 +00:00
2017-03-01 04:40:57 +00:00
2016-05-03 03:41:25 +00:00
2017-05-17 13:22:13 +00:00
2016-05-03 03:41:25 +00:00
2017-04-14 03:23:03 +00:00
2017-10-10 20:08:30 +00:00
2017-10-15 11:46:11 +00:00
2017-07-29 09:22:48 +00:00
2017-05-25 10:49:56 +00:00
2017-03-31 18:04:34 +00:00
2017-08-18 15:40:40 +00:00
2017-02-20 03:43:12 +00:00
2017-09-06 21:38:07 +00:00
2017-04-20 09:01:31 +00:00
2017-10-09 20:35:31 +00:00
2016-05-02 16:47:28 +00:00
2017-03-15 09:31:58 +00:00
2017-02-26 20:49:35 +00:00
2016-05-02 16:47:28 +00:00
2017-07-01 05:35:29 +00:00
2016-05-03 03:41:25 +00:00
2017-08-11 19:02:11 +00:00
2016-12-18 14:54:20 +00:00
2017-05-17 00:34:34 +00:00