aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux32_sysvec.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2008-10-19 10:02:26 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2008-10-19 10:02:26 +0000
commitaa8b201112c871e10cb119d371688098b5395916 (patch)
treeb27837b90bdbe0e63b7ff72ce0c5c2b29bb7cbd5 /sys/amd64/linux32/linux32_sysvec.c
parent4f1fb109f9cb9345a8956524a9eeed749612c8dd (diff)
downloadsrc-aa8b201112c871e10cb119d371688098b5395916.tar.gz
src-aa8b201112c871e10cb119d371688098b5395916.zip
Correctly fill siginfo for the signals delivered by linux tkill/tgkill.
It is required for async cancellation to work. Fix PROC_LOCK leak in linux_tgkill when signal delivery attempt is made to not linux process. Do not call em_find(p, ...) with p unlocked. Move common code for linux_tkill() and linux_tgkill() into linux_do_tkill(). Change linux siginfo_t definition to match actual linux one. Extend uid fields to 4 bytes from 2. The extension does not change structure layout and is binary compatible with previous definition, because i386 is little endian, and each uid field has 2 byte padding after it. Reported by: Nicolas Joly <njoly pasteur fr> Submitted by: dchangin MFC after: 1 month
Notes
Notes: svn path=/head/; revision=184058
Diffstat (limited to 'sys/amd64/linux32/linux32_sysvec.c')
-rw-r--r--sys/amd64/linux32/linux32_sysvec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c
index 6a7aac71927a..e2337007ef5d 100644
--- a/sys/amd64/linux32/linux32_sysvec.c
+++ b/sys/amd64/linux32/linux32_sysvec.c
@@ -334,9 +334,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
frame.sf_ucontext = PTROUT(&fp->sf_sc);
/* Fill in POSIX parts */
- frame.sf_si.lsi_signo = sig;
- frame.sf_si.lsi_code = code;
- frame.sf_si.lsi_addr = PTROUT(ksi->ksi_addr);
+ ksiginfo_to_lsiginfo(ksi, &frame.sf_si, sig);
/*
* Build the signal context to be used by sigreturn.