From nobody Tue Nov 12 18:57:39 2024 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 4Xnwdw1TF6z5cxDm; Tue, 12 Nov 2024 18:57:40 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xnwdw0ggXz3yg2; Tue, 12 Nov 2024 18:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731437860; 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=YjbTG7sbOdlgJSRmCX/PJYWZ0eKo/UwiSsgbbUKTHCY=; b=IgDVzLiViCQeyRuLWnEy+0iIDmcT0Bg8uKd2dTCn4IPCNRPInIIOMeUOyWvX7H2cJXi7Pc 84fujqiGC+hqfMd4aah+VvmS4+bk0LB5mNF2QCBBGv0i5+MfspHMY5DYXvvEOAJz7BkZpT GOvIVy4DgLzd7WW77HsGRUFRBkTCFQ0cbAPLMTcoaushR/ZHeBcCAp4yq+YjxeVvyEID9U 4WzbQ4sMm+0hRcVKf0hvnP2Fky3Y5/eYTP543PdZNU4u+peUsRmHqi5nLCgNuDtT4abFuy QpZQnebeOCh5KROPTgvJO4RfIp6bgjzKnahGDwVBHzlfAjDWNn52HTgENns0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731437860; 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=YjbTG7sbOdlgJSRmCX/PJYWZ0eKo/UwiSsgbbUKTHCY=; b=gPag2nQotyRXOXpyS9fDRC1iqoJxbxfYGwhwWVHNmmsAhjMjNyCXDe6NzYyi2w95bwXGLe 4ml2DdTUQBLR4IITJILzI4oKSDjsSKOykL0Ihka/1EMrLadfPTZWAKl26mdGwHYssclpQp 9czLhR1ncXhViLj7uPLLnWa6p5TUowsGugJkTDcA5+n+QNtxaxR+1PhW0HbGFx9r0i964X 0tVU6XGitH+BwwAcGFJ53jGqm4TRQ5QQiBV2vO6FtfsqVrEd+2QtYbtWbBEU0aJeTedKI2 tsDr0gEpQpicff/8toWESko2x40kR4Gn+y6PMojbBZ8kLCP0YJS6nYetgZZYhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731437860; a=rsa-sha256; cv=none; b=wRF5FO9huL6YgBiRujUTlJj1g9D2w4aBLrQWlfJHpaDtoJsBYHNqcwsXf7rxqLrP/SMdK5 njTP/3WCGBGw5sGAsw6tXDl3dK7eAlXR1D8+CTTg18J03ZWIx4q2rCy1Nb06DBkmP+eox2 la3VtZ423ln3Vgh7FGEVrP1VEnkFGIKRyethViC6+tGcrJN7AV39FrCetiXjH16of90AzN atWM1zJwbe41jZwD59FdkqnGF0UIDInYweaNcIp0SwDV1P9JdXlEu2ygRl3whRt68PbxoX QLmHwPPQpDm95MyfyBRSw/+LPqZywHe82KeZEvPmj9zar+xjo8aCaghocDOZ0g== 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 4Xnwdw0GklzMqF; Tue, 12 Nov 2024 18:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ACIvdic099949; Tue, 12 Nov 2024 18:57:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ACIvdWW099946; Tue, 12 Nov 2024 18:57:39 GMT (envelope-from git) Date: Tue, 12 Nov 2024 18:57:39 GMT Message-Id: <202411121857.4ACIvdWW099946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: a0618fbe19df - main - Revert "ipfilter: Avoid stopping with a lock held" 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0618fbe19dfedcdf01b4c232fe6669ae19505c4 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a0618fbe19dfedcdf01b4c232fe6669ae19505c4 commit a0618fbe19dfedcdf01b4c232fe6669ae19505c4 Author: Jose Luis Duran AuthorDate: 2024-11-12 18:51:45 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-12 18:53:39 +0000 Revert "ipfilter: Avoid stopping with a lock held" The timeout function still tries to acquire the rwlock, and now it deadlocks, since the callout framework will have already acquired it. This reverts commit 1fa6daaafd74c1a457dcfe26e0a5943b5441dc9d. PR: 282478 Reported by: markj Approved by: emaste (mentor) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 23514907f86e..84fac0205ffc 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -178,7 +178,7 @@ ipf_timer_func(void *arg) ipf_slowtimer(softc); if (softc->ipf_running == -1 || softc->ipf_running == 1) { - callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); @@ -218,7 +218,7 @@ ipfattach(ipf_main_softc_t *softc) softc->ipf_slow_ch = timeout(ipf_timer_func, softc, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT); #endif - callout_init_rw(&softc->ipf_slow_ch, &softc->ipf_global.ipf_lk, CALLOUT_SHAREDLOCK); + callout_init(&softc->ipf_slow_ch, 1); callout_reset(&softc->ipf_slow_ch, (hz / IPF_HZ_DIVIDE) * IPF_HZ_MULT, ipf_timer_func, softc); return (0);