aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/irq.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2019-05-24 15:37:00 -0400
committerRichard Weinberger <richard@nod.at>2019-07-02 17:27:05 -0400
commit8eacd6fca4044f470fc2eb0552ce6b8eab977e6c (patch)
tree2cd02a0b1c23e329c6e0e9aec857473335d21ee8 /arch/um/kernel/irq.c
parent56fc187065451ebca74edb30d50de5f10a88339b (diff)
um: Remove locking in deactivate_all_fds()
Not only does the locking contradict the comment, and as the comment says is pointless and actually harmful (all the actual OS threads have exited already), but it also causes crashes when lockdep is enabled, because calling into the spinlock calls into lockdep, which then tries to determine the current task, which no longer exists. Remove the locking to let UML shut down cleanly in case lockdep is enabled. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/irq.c')
-rw-r--r--arch/um/kernel/irq.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index b40dac71e25b..d532377f5808 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -384,10 +384,8 @@ EXPORT_SYMBOL(deactivate_fd);
384 */ 384 */
385int deactivate_all_fds(void) 385int deactivate_all_fds(void)
386{ 386{
387 unsigned long flags;
388 struct irq_entry *to_free; 387 struct irq_entry *to_free;
389 388
390 spin_lock_irqsave(&irq_lock, flags);
391 /* Stop IO. The IRQ loop has no lock so this is our 389 /* Stop IO. The IRQ loop has no lock so this is our
392 * only way of making sure we are safe to dispose 390 * only way of making sure we are safe to dispose
393 * of all IRQ handlers 391 * of all IRQ handlers
@@ -404,7 +402,6 @@ int deactivate_all_fds(void)
404 to_free = to_free->next; 402 to_free = to_free->next;
405 } 403 }
406 garbage_collect_irq_entries(); 404 garbage_collect_irq_entries();
407 spin_unlock_irqrestore(&irq_lock, flags);
408 os_close_epoll_fd(); 405 os_close_epoll_fd();
409 return 0; 406 return 0;
410} 407}