Date: Wed, 3 Feb 2021 19:47:47 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 14c40d2c292d - main - linux: remove locks around callout_drain in timerfd_close() Message-ID: <202102031947.113Jllbm005991@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=14c40d2c292deff44be5591add7fdad5f9b371aa commit 14c40d2c292deff44be5591add7fdad5f9b371aa Author: shu <ankohuu@outlook.com> AuthorDate: 2021-02-03 19:10:58 +0000 Commit: Edward Tomasz Napierala <trasz@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102031947.113Jllbm005991>