diff options
author | kib <kib@FreeBSD.org> | 2008-11-16 15:45:41 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2008-11-16 15:45:41 +0000 |
commit | f5d16a4d6617f527e4a33953e48f82272ee8d572 (patch) | |
tree | 2b67d2722e9a117876eddf97f798a65247e3b9b5 | |
parent | dc9c7a01f603ba4ee1c58ac4433a0362c52c0286 (diff) | |
download | FreeBSD-src-f5d16a4d6617f527e4a33953e48f82272ee8d572.zip FreeBSD-src-f5d16a4d6617f527e4a33953e48f82272ee8d572.tar.gz |
In the robust futexes list head, futex_offset shall be signed,
and glibc actually supplies negative offsets. Change l_ulong to l_long.
Submitted by: dchagin
-rw-r--r-- | sys/amd64/linux32/linux.h | 2 | ||||
-rw-r--r-- | sys/compat/linux/linux_futex.c | 4 | ||||
-rw-r--r-- | sys/i386/linux/linux.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 2354864..60598a0 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -892,7 +892,7 @@ struct linux_robust_list { struct linux_robust_list_head { struct linux_robust_list list; - l_ulong futex_offset; + l_long futex_offset; l_uintptr_t pending_list; }; diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index c279276..b19d290 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -652,7 +652,7 @@ release_futexes(struct proc *p) struct linux_robust_list *entry, *next_entry, *pending; unsigned int limit = 2048, pi, next_pi, pip; struct linux_emuldata *em; - l_ulong futex_offset; + l_long futex_offset; int rc; em = em_find(p, EMUL_DONTLOCK); @@ -664,7 +664,7 @@ release_futexes(struct proc *p) if (fetch_robust_entry(&entry, PTRIN(&head->list.next), &pi)) return; - if (copyin(&head->futex_offset, &futex_offset, sizeof(l_ulong))) + if (copyin(&head->futex_offset, &futex_offset, sizeof(futex_offset))) return; if (fetch_robust_entry(&pending, PTRIN(&head->pending_list), &pip)) diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 6b11e84..fc47a07 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -862,7 +862,7 @@ struct linux_robust_list { struct linux_robust_list_head { struct linux_robust_list list; - l_ulong futex_offset; + l_long futex_offset; struct linux_robust_list *pending_list; }; |