diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-23 10:40:26 -0500 |
---|---|---|
committer | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-01-23 10:40:29 -0500 |
commit | 179cb81aa1e9dc5444f678a6dd4dbb90c60322e1 (patch) | |
tree | b8f4c37049a357ba16fd94360ae3d4c2c8661810 /arch/s390/kernel | |
parent | f9a2f797fcde5a4aa818bd3ca8584fd1197e9c15 (diff) |
[S390] etr/stp: fix possible deadlock
Precreate stop_machine threads in case the machine supports ETR/STP.
Otherwise we might deadlock if a time sync operation gets scheduled
and the creation of stop_machine threads would cause disk I/O.
This is just the minimal fix.
The real fix would be to only precreate stop_machine threads if
ETR/STP is actually used. But that would be a rather large and
complicated patch.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/time.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index d649600df5b9..fc468cae4460 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -399,8 +399,10 @@ static struct workqueue_struct *time_sync_wq; | |||
399 | 399 | ||
400 | static void __init time_init_wq(void) | 400 | static void __init time_init_wq(void) |
401 | { | 401 | { |
402 | if (!time_sync_wq) | 402 | if (time_sync_wq) |
403 | time_sync_wq = create_singlethread_workqueue("timesync"); | 403 | return; |
404 | time_sync_wq = create_singlethread_workqueue("timesync"); | ||
405 | stop_machine_create(); | ||
404 | } | 406 | } |
405 | 407 | ||
406 | /* | 408 | /* |