aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel/irq.c')
-rw-r--r--arch/um/kernel/irq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 598d7b3d9355..efde1f16c603 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -21,6 +21,8 @@
21#include <irq_user.h> 21#include <irq_user.h>
22 22
23 23
24extern void free_irqs(void);
25
24/* When epoll triggers we do not know why it did so 26/* When epoll triggers we do not know why it did so
25 * we can also have different IRQs for read and write. 27 * we can also have different IRQs for read and write.
26 * This is why we keep a small irq_fd array for each fd - 28 * This is why we keep a small irq_fd array for each fd -
@@ -100,6 +102,8 @@ void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
100 } 102 }
101 } 103 }
102 } 104 }
105
106 free_irqs();
103} 107}
104 108
105static int assign_epoll_events_to_irq(struct irq_entry *irq_entry) 109static int assign_epoll_events_to_irq(struct irq_entry *irq_entry)
@@ -380,10 +384,8 @@ EXPORT_SYMBOL(deactivate_fd);
380 */ 384 */
381int deactivate_all_fds(void) 385int deactivate_all_fds(void)
382{ 386{
383 unsigned long flags;
384 struct irq_entry *to_free; 387 struct irq_entry *to_free;
385 388
386 spin_lock_irqsave(&irq_lock, flags);
387 /* 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
388 * only way of making sure we are safe to dispose 390 * only way of making sure we are safe to dispose
389 * of all IRQ handlers 391 * of all IRQ handlers
@@ -399,8 +401,7 @@ int deactivate_all_fds(void)
399 ); 401 );
400 to_free = to_free->next; 402 to_free = to_free->next;
401 } 403 }
402 garbage_collect_irq_entries(); 404 /* don't garbage collect - we can no longer call kfree() here */
403 spin_unlock_irqrestore(&irq_lock, flags);
404 os_close_epoll_fd(); 405 os_close_epoll_fd();
405 return 0; 406 return 0;
406} 407}