From 10998483979d9b2d2297e57ee9430b69522849b3 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 11 Dec 2015 01:51:31 +0000 Subject: [PATCH] scst: small addition to r6724 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6728 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 512d0bae1..6bd731c80 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -647,8 +647,13 @@ again: /* * Testing tgt->sysfs_sess_list below without holding scst_mutex - * is safe because 'tgt' won't disappear until scst_free_tgt() is - * called below and because the mutex_lock(&scst_mutex) call below + * is safe, because: + * + * - On the init path no attempts to create new sessions for this + * target can be done in a race with this function (see above) + * + * - On the shutdown path 'tgt' won't disappear until scst_free_tgt() + * is called below and because the mutex_lock(&scst_mutex) call below * waits until scst_free_session() has finished accessing the 'tgt' * object. */