Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2019 14:06:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 231445] [patch] sleepq_catch_signals will still enter sleep after a ptrace attach event
Message-ID:  <bug-231445-227-zLgbHieYTf@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-231445-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-231445-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=3D231445

--- Comment #4 from commit-hook@freebsd.org ---
A commit references this bug:

Author: kib
Date: Wed May 29 14:05:28 UTC 2019
New revision: 348360
URL: https://svnweb.freebsd.org/changeset/base/348360

Log:
  Do not go into sleep in sleepq_catch_signals() when SIGSTOP from
  PT_ATTACH was consumed.

  In particular, do not clear TDP_FSTP in ptracestop() if td_wchan is
  non-NULL. Leave it to sleepq_catch_signal() to clear and convert zero
  return code to EINTR.

  Otherwise, per submitter report, if the PT_ATTACH SIGSTOP was
  delivered right after the thread was added to the sleepqueue but not
  yet really sleep, and cursig() caused debugger attach, the thread
  sleeps instead of returning to the userspace boundary with EINTR.

  PR: 231445
  Reported by:  Efi Weiss <valmarelox@gmail.com>
  Reviewed by:  markj
  Sponsored by: The FreeBSD Foundation
  MFC after:    2 weeks
  Differential revision:        https://reviews.freebsd.org/D20381

Changes:
  head/sys/kern/kern_sig.c
  head/sys/kern/subr_sleepqueue.c

--=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-231445-227-zLgbHieYTf>