[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220101215810.13260-5-richard@nod.at>
Date: Sat, 1 Jan 2022 22:58:10 +0100
From: Richard Weinberger <richard@....at>
To: linux-um@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, johannes.berg@...el.com,
anton.ivanov@...bridgegreys.com,
Richard Weinberger <richard@....at>
Subject: [PATCH 4/4] um: irq: Restore O_ASYNC upon exit
Just like with O_NONBLOCK, make sure UML clears O_ASYNC
upon exit when it set it.
Signed-off-by: Richard Weinberger <richard@....at>
---
arch/um/kernel/irq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index a8873d9bc28b..e020bdccfa23 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -342,6 +342,7 @@ static void free_irq_by_irq_and_dev(unsigned int irq, void *dev)
continue;
os_del_epoll_fd(entry->fd);
+ os_clear_fd_async(entry->fd);
reg->events = 0;
update_or_free_irq_entry(entry);
goto out;
@@ -396,8 +397,10 @@ int deactivate_all_fds(void)
os_set_ioignore();
/* we can no longer call kfree() here so just deactivate */
- list_for_each_entry(entry, &active_fds, list)
+ list_for_each_entry(entry, &active_fds, list) {
os_del_epoll_fd(entry->fd);
+ os_clear_fd_async(entry->fd);
+ }
os_close_epoll_fd();
return 0;
}
--
2.26.2
Powered by blists - more mailing lists