diff options
author | glebius <glebius@FreeBSD.org> | 2016-01-11 21:46:37 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2016-01-11 21:46:37 +0000 |
commit | d7f218dabddb221278509b64fbfe6223b81b1058 (patch) | |
tree | 838bd368f55cd2d31ff78ea55037ffe8b35309e9 /sys/compat/linux/linux_futex.c | |
parent | c726cf023367deda48e442a5e909971b55e3b2d8 (diff) | |
download | FreeBSD-src-d7f218dabddb221278509b64fbfe6223b81b1058.zip FreeBSD-src-d7f218dabddb221278509b64fbfe6223b81b1058.tar.gz |
Merge from head r292743, r293627 by dchagin:
------------------------------------------------------------------------
r292743 | dchagin | 2015-12-26 01:04:47 -0800 (сб, 26 дек. 2015) | 5 lines
Do not allow access to emuldata for non Linux processes.
------------------------------------------------------------------------
r293627 | dchagin | 2016-01-09 23:36:43 -0800 (сб, 09 янв. 2016) | 6 lines
Unlock process lock when return error from getrobustlist call and add
an forgotten dtrace probe when return the same error.
Diffstat (limited to 'sys/compat/linux/linux_futex.c')
-rw-r--r-- | sys/compat/linux/linux_futex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 56275d3..4573f73 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -1100,6 +1100,12 @@ linux_get_robust_list(struct thread *td, struct linux_get_robust_list_args *args ESRCH); return (ESRCH); } + if (SV_PROC_ABI(td2->td_proc) != SV_ABI_LINUX) { + LIN_SDT_PROBE1(futex, linux_get_robust_list, return, + EPERM); + PROC_UNLOCK(td2->td_proc); + return (EPERM); + } em = em_find(td2); KASSERT(em != NULL, ("get_robust_list: emuldata notfound.\n")); |