Re: [PATCH] protect migration/%d etc from sched_setaffinity

From: Andi Kleen (ak@suse.de)
Date: Thu Jul 31 2003 - 18:17:34 EST


Joe Korty <joe.korty@ccur.com> writes:
>
> diff -Nura linux-2.6.0-test2/include/linux/sched.h.orig linux-2.6.0-test2/include/linux/sched.h
> --- linux-2.6.0-test2/include/linux/sched.h.orig 2003-07-27 12:57:39.000000000 -0400
> +++ linux-2.6.0-test2/include/linux/sched.h 2003-07-31 15:52:25.000000000 -0400
> @@ -488,6 +488,7 @@
> #define PF_LESS_THROTTLE 0x01000000 /* Throttle me less: I clena memory */
> #define PF_SYNCWRITE 0x00200000 /* I am doing a sync write */
> #define PF_READAHEAD 0x00400000 /* I am doing read-ahead */
> +#define PF_CPULOCK 0x00800000 /* lock users out from changing cpus_allowed */

It would be probably better to just check for ->mm == NULL

This should catch all kernel threads that use daemonize

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jul 31 2003 - 22:00:52 EST