[Bug 250701] [tty] [patch] Race condition between tty_wait_background() and doenterpgrp()

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 28 22:13:48 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250701

--- Comment #1 from commit-hook at FreeBSD.org ---
A commit references this bug:

Author: kib
Date: Wed Oct 28 22:12:47 UTC 2020
New revision: 367120
URL: https://svnweb.freebsd.org/changeset/base/367120

Log:
  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 another process. If that happens, the signal is not sent to the
  calling process, even if the prior checks determine that one should be
  sent.  Re-check that the process group hasn't changed after acquiring
  the pgrp lock, and if it has, redo the checks.

  PR:   250701
  Submitted by: Jakub Piecuch <j.piecuch96 at gmail.com>
  MFC after:    2 weeks

Changes:
  head/sys/kern/tty.c

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list