From nobody Thu Feb 17 13:46:18 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4468119D5456; Thu, 17 Feb 2022 13:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jzx1k1Rcsz3PZD; Thu, 17 Feb 2022 13:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645105578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ySLReHdIp8hIjZKFjzUWd+fWHKriTwJRXdfGpBhiic=; b=RyhvxLWde2NaS6jaVk9yjCaUr5HLUU4oAJ5Ogec89oWmApfq8B4oIuqyVLtXT5wTro952j H+yPIxED+6R6SvJJd1nVmMk7YwmFPCsN0/jDs5ZKN0gUUpcvOmb/SR+I9sRI7gxyzIpcC5 1z1bgeQgxqumxv8kxb9c/Gn/Z63FuuslhnA0spQ1hgUs8PyO57491mQjt0x9oSB+4mEeD8 m3ctt9aU4BzahQJBdDXzx7Rqdma1XE93Z3ts1rTK8iyshDDw6BdMsZxoNs9lV/etLhSnEM 997ZwlhJzVsod2yyH4MKJeTG8A7jqEM92ySZli2Jn2HJcpTJuVlLUq/gUEg+Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 11AB02E1F; Thu, 17 Feb 2022 13:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21HDkIi2048148; Thu, 17 Feb 2022 13:46:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21HDkIKx048147; Thu, 17 Feb 2022 13:46:18 GMT (envelope-from git) Date: Thu, 17 Feb 2022 13:46:18 GMT Message-Id: <202202171346.21HDkIKx048147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: a95b05950a2f - stable/13 - linux: remove locks around callout_drain in timerfd_close() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a95b05950a2f058a00b1c96a346825622fb976d9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645105578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ySLReHdIp8hIjZKFjzUWd+fWHKriTwJRXdfGpBhiic=; b=k4ohDat8qY9YwSkGJ18zncC0Vkc6ED5DhTmrf4gVYwdF4Nz/+K9sf243o+y0kZRL35Lhyt MnWE2XS25hfRvMv/rgsV1RQR/qeJfKiHxZn+su3S0JUw7+YVbnbUY5rcSTuo6VOEar4Ell 3tBwSgLyAkD1pdIQmP7UEc5lFEcJLQc83o+Wif4UIKpHQjrmoO/NstYWymv9BqmGxuOfoi c6FI4+9EXfw12EWmsC/YhI720navUleQkyBufndnMDtn1uaG2UelforywEQTAHlvaA9ZPt dlZrWRPUQs3m8kzuRtsolZrhW6WJk5I37KzQfPJVAwW1kvEOlTTnaROS1KvvDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645105578; a=rsa-sha256; cv=none; b=kpnzRlYlIGJmWl/2A/qedKhcGTfu+WPAz5TSYdAznRK/0lLxS/JW8VwN7sMpvzaD6x5cpi BUtzAnERh0CpUiPrgDRAH2ITBrxC3Fzs4ekyvYERhckQbWgsNT4tEqWRZqgl+g0YHCDz5l ATH5/MpeOPpnnXXxgFDgBaySAif0VTN48RpIp2InzRekKgAgX3UmWyGh4aVEJTcdq3KQH8 HJp/BOXQRUMEMvNX+g6qQjaP/RvdpV4tQkIbf7rSrd9/tCHw6MMCe0853+Nv99McxM3Hqh 8tHBgSMUSlsC3i5YcjV0/xIkFQYapdt+Lnts70t4tbJlJEIrVuFkAJ9m00QurQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=a95b05950a2f058a00b1c96a346825622fb976d9 commit a95b05950a2f058a00b1c96a346825622fb976d9 Author: shu AuthorDate: 2021-02-03 19:10:58 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-13 23:09:31 +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 (cherry picked from commit 14c40d2c292deff44be5591add7fdad5f9b371aa) --- 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 370bf4d6485f..991af1b539e4 100644 --- a/sys/compat/linux/linux_event.c +++ b/sys/compat/linux/linux_event.c @@ -670,9 +670,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);