mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
Fix for race, when sysfs work can be destroyed just after sysfs_work_lock released. Noticed by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -432,10 +432,10 @@ int scst_sysfs_queue_wait_work(struct scst_sysfs_work_item *work)
|
||||
|
||||
active_sysfs_works++;
|
||||
|
||||
spin_unlock(&sysfs_work_lock);
|
||||
|
||||
kref_get(&work->sysfs_work_kref);
|
||||
|
||||
spin_unlock(&sysfs_work_lock);
|
||||
|
||||
wake_up(&sysfs_work_waitQ);
|
||||
|
||||
while (1) {
|
||||
|
||||
Reference in New Issue
Block a user