git: 14c40d2c292d - main - linux: remove locks around callout_drain in timerfd_close()
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Feb 3 19:47:52 UTC 2021
The branch main has been updated by trasz:
URL: https://cgit.FreeBSD.org/src/commit/?id=14c40d2c292deff44be5591add7fdad5f9b371aa
commit 14c40d2c292deff44be5591add7fdad5f9b371aa
Author: shu <ankohuu at outlook.com>
AuthorDate: 2021-02-03 19:10:58 +0000
Commit: Edward Tomasz Napierala <trasz at FreeBSD.org>
CommitDate: 2021-02-03 19:47:38 +0000
linux: remove locks around callout_drain in timerfd_close()
The lock around callout_drain() is unnecessary and may cause
deadlock when one closes a timer descriptor during timer execution.
Reviewed By: delphij
Submitted By: ankohuu_outlook.com (Shunchao Hu)
Differential Revision: https://reviews.freebsd.org/D28148
---
sys/compat/linux/linux_event.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c
index 54f6b083adf3..f6cd9304f5cd 100644
--- a/sys/compat/linux/linux_event.c
+++ b/sys/compat/linux/linux_event.c
@@ -736,9 +736,7 @@ timerfd_close(struct file *fp, struct thread *td)
timespecclear(&tfd->tfd_time.it_value);
timespecclear(&tfd->tfd_time.it_interval);
- mtx_lock(&tfd->tfd_lock);
callout_drain(&tfd->tfd_callout);
- mtx_unlock(&tfd->tfd_lock);
seldrain(&tfd->tfd_sel);
knlist_destroy(&tfd->tfd_sel.si_note);
More information about the dev-commits-src-all
mailing list