Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Aug 2022 17:35:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 265997] compat10 semaphore interface internal race may lead to application hang
Message-ID:  <bug-265997-227-xOIvtjTFjP@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-265997-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-265997-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <firk@cantconnect.ru>
AuthorDate: 2022-08-26 08:05:56 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265997-227-xOIvtjTFjP>