Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Oct 2020 19:47:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250701] [tty] [patch] Race condition between tty_wait_background() and doenterpgrp()
Message-ID:  <bug-250701-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250701

            Bug ID: 250701
           Summary: [tty] [patch] Race condition between
                    tty_wait_background() and doenterpgrp()
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: j.piecuch96@gmail.com

Created attachment 219174
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D219174&action=
=3Dedit
Patch: check for process group change in tty_wait_background()

The calling process's process group can change between PROC_UNLOCK(p) and
PGRP_LOCK(pg) in tty_wait_background(), e.g. by a setpgid() call from anoth=
er
process. If that happens, the signal is not sent to the calling process, ev=
en
if the prior checks determine that one should be sent.
The patch checks that the process group hasn't changed after acquiring the =
pgrp
lock, and if it has, it redoes the checks.

--=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-250701-227>