[parisc-linux-cvs] linux-2.6 tausq
Randolph Chung
randolph at tausq.org
Mon Oct 4 14:45:04 MDT 2004
> compat_sys_timer_create: handle the case where timer_event_spec == NULL
> compat_sys_waitid: __user annotation
also contains the change in the next commit. -randolph
Index: kernel/compat.c
===================================================================
RCS file: /var/cvs/linux-2.6/kernel/compat.c,v
retrieving revision 1.16
retrieving revision 1.18
diff -u -p -r1.16 -r1.18
--- kernel/compat.c 30 Sep 2004 19:53:55 -0000 1.16
+++ kernel/compat.c 4 Oct 2004 20:44:11 -0000 1.18
@@ -606,12 +606,18 @@ long compat_sys_timer_create(clockid_t w
compat_timer_t __user * created_timer_id)
{
sigevent_t kevent;
+ mm_segment_t old_fs = get_fs();
+ long ret;
if (timer_event_spec != NULL)
if (compat_copy_sigevent_from_user(&kevent, timer_event_spec) != 0)
return -EFAULT;
- return sys_timer_create(which_clock, &kevent, created_timer_id);
+ set_fs(KERNEL_DS);
+ ret = sys_timer_create(which_clock, timer_event_spec ? (sigevent_t __user *)&kevent : NULL, created_timer_id);
+ set_fs(old_fs);
+
+ return ret;
}
@@ -708,7 +714,7 @@ asmlinkage int compat_sys_waitid(int whi
memset(&ksiginfo, 0, sizeof(ksiginfo));
set_fs(KERNEL_DS);
- ret = sys_waitid(which, pid, &ksiginfo, options, &kru);
+ ret = sys_waitid(which, pid, (siginfo_t __user *)&ksiginfo, options, (struct rusage __user *)&kru);
set_fs(old_fs);
/* If there was an error don't bother copying siginfo */
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
More information about the parisc-linux-cvs
mailing list