From nobody Fri Aug 26 17:35:55 2022 X-Original-To: bugs@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 4MDn704s3Jz4ZYMx for ; Fri, 26 Aug 2022 17:35:56 +0000 (UTC) (envelope-from bugzilla-noreply@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 4MDn703r72z3Wvk for ; Fri, 26 Aug 2022 17:35:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4MDn702vPYzSyL for ; Fri, 26 Aug 2022 17:35:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 27QHZusC040445 for ; Fri, 26 Aug 2022 17:35:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 27QHZueX040444 for bugs@FreeBSD.org; Fri, 26 Aug 2022 17:35:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265997] compat10 semaphore interface internal race may lead to application hang Date: Fri, 26 Aug 2022 17:35:55 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661535356; 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: in-reply-to:in-reply-to:references:references; bh=tbC9W2GQP2xeQijjvZ+411qhHDEM3r1ad0iaeaUl2nQ=; b=P3dJ9DmkrKmMGQWqXmohUz0L+Tw0u81N4vgPqaZIlLYKFA+uG0URhGaau/wYycYERT7mjS NToT+c0NLQC8myxsjzqBAeZYkJ8DclhHpGwLC2XzhZHAUYa6wKkrusr2EEkZZEVSlbDlVy SKmlaDY7gbUoLXPnaLYT2CL3RHkeTdRrRrAFv86vAID7ITU+jFP11F4KpSlZSo7NXu/RJl D42InNGN1tUi1ywHGsWBREpMELDC5LElH7E3dYkBQIJp547DMj96zzIz3hqn8Q2EM/Kg29 PT04sNbMZaXmWxCpUyEsqInZhEtxdPkHdMDUY9rsaD+KULiDRcmyb5SENfU6kg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661535356; a=rsa-sha256; cv=none; b=KNdaUJ9ui7owebI/UFnwRBKsTC+OWUU1uoo/lscJy6Ioe8RBMJ/TKLbPXwVmABHwxt+hGr yBQq79TX3qoDlugbjz80gw1OYAElsl60TgE2G0P56wU+TXmw2sNrepvz8qATlCeA7fIv4I j6t9CU4IINv6w6jwjECkNCLZ9RY/0fBdRxlG1Kro9WtY08B+JHIGb0cyDudSyVEJGwVjrG bNINkp1BLeomw4N4fp3xwK9biYlBebO52N52e0FwFAAQQVGZnGmKk39/ftY/ph3j1ORkCT voKh3yxR8LYGXHvxLGF5gTptmVN6/9AZWN8+JuNSChdmAXKYozCmPzPLvG5ftg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265997 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D768f6373eb3d60e346d3bfa495e04315a= eed8ff9 commit 768f6373eb3d60e346d3bfa495e04315aeed8ff9 Author: firk AuthorDate: 2022-08-26 08:05:56 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-26 17:34:29 +0000 Fix compat10 semaphore interface race Wrong has-waiters and missing unconditional _count=3D=3D0 check may cau= se infinite waiting with already non-zero count. 1) properly clear _has_waiters flag when waiting failed to start 2) always check _count before start waiting PR: 265997 Reviewed by: kib MFC after: 1 week Differential revision: https://reviews.freebsd.org/D36272 sys/kern/kern_umtx.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=