* [PATCH] fix return of compat_sys_sched_getaffinity
@ 2003-07-06 16:24 rwhron
2003-07-06 16:31 ` Anton Blanchard
0 siblings, 1 reply; 2+ messages in thread
From: rwhron @ 2003-07-06 16:24 UTC (permalink / raw)
To: linux-kernel
-EFAULT return got buggered when compat_sys_sched_getaffinity
was added in 2.5.68.
--- linux-2.5.74/kernel/compat.c.orig 2003-06-22 15:54:17.000000000 -0400
+++ linux-2.5.74/kernel/compat.c 2003-07-06 11:29:33.000000000 -0400
@@ -425,11 +425,9 @@
&kernel_mask);
set_fs(old_fs);
- if (ret > 0) {
+ if (ret > 0)
if (put_user(kernel_mask, user_mask_ptr))
- ret = -EFAULT;
- ret = sizeof(compat_ulong_t);
- }
+ return -EFAULT;
return ret;
}
--
Randy Hron
http://home.earthlink.net/~rwhron/kernel/bigbox.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fix return of compat_sys_sched_getaffinity
2003-07-06 16:24 [PATCH] fix return of compat_sys_sched_getaffinity rwhron
@ 2003-07-06 16:31 ` Anton Blanchard
0 siblings, 0 replies; 2+ messages in thread
From: Anton Blanchard @ 2003-07-06 16:31 UTC (permalink / raw)
To: rwhron; +Cc: linux-kernel
> -EFAULT return got buggered when compat_sys_sched_getaffinity
> was added in 2.5.68.
but getaffinity returns sizeof(compat_ulong_t) on success...
Anton
> --- linux-2.5.74/kernel/compat.c.orig 2003-06-22 15:54:17.000000000 -0400
> +++ linux-2.5.74/kernel/compat.c 2003-07-06 11:29:33.000000000 -0400
> @@ -425,11 +425,9 @@
> &kernel_mask);
> set_fs(old_fs);
>
> - if (ret > 0) {
> + if (ret > 0)
> if (put_user(kernel_mask, user_mask_ptr))
> - ret = -EFAULT;
> - ret = sizeof(compat_ulong_t);
> - }
> + return -EFAULT;
>
> return ret;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-06 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-06 16:24 [PATCH] fix return of compat_sys_sched_getaffinity rwhron
2003-07-06 16:31 ` Anton Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).