sched: Remove USER_SCHED
Subsystems (2)
PATCH 1/28 sched: Remove USER_SCHED
Commit: 7c9414385ebfdd87cc542d4e7e3bb0dbb2d3ce25 upstream
Author: Dhaval Giani <[email protected]>
AuthorDate: Wed Jan 20 13:26:18 2010 +0100
Remove the USER_SCHED feature. It has been scheduled to be removed in 2.6.34 as per http://marc.info/?l=linux-kernel&m=125728479022976&w=2
[trace from referenced thread]
[1046577.884289] general protection fault: 0000 [#1] SMP [1046577.911332] last sysfs file: /sys/devices/platform/coretemp.7/temp1_input [1046577.938715] CPU 3 [1046577.965814] Modules linked in: ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables coretemp k8temp [1046577.994456] Pid: 38, comm: events/3 Not tainted 2.6.32.27intel #1 X8DT3 [1046578.023166] RIP: 0010:[] [] sched_destroy_group+0x3c/0x10d [1046578.052639] RSP: 0000:ffff88043e5abe10 EFLAGS: 00010097 [1046578.081360] RAX: ffff880139fa5540 RBX: ffff8803d18419c0 RCX: ffff8801d2f8fb78 [1046578.109903] RDX: dead000000200200 RSI: 0000000000000000 RDI: 0000000000000000 [1046578.109905] RBP: 0000000000000246 R08: 0000000000000020 R09: ffffffff816339b8 [1046578.109907] R10: 0000000004e6e5f0 R11: 0000000000000006 R12: ffffffff816339b8 [1046578.109909] R13: ffff8803d63ac4e0 R14: ffff88043e582340 R15: ffffffff8104a216 [1046578.109911] FS: 0000000000000000(0000) GS:ffff880028260000(0000) knlGS:0000000000000000 [1046578.109914] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b [1046578.109915] CR2: 00007f55ab220000 CR3: 00000001e5797000 CR4: 00000000000006e0 [1046578.109917] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1046578.109919] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [1046578.109922] Process events/3 (pid: 38, threadinfo ffff88043e5aa000, task ffff88043e582340) [1046578.109923] Stack: [1046578.109924] ffff8803d63ac498 ffff8803d63ac4d8 ffff8803d63ac440 ffffffff8104a2c3 [1046578.109927] <0> ffff88043e5abef8 ffff880028276040 ffff8803d63ac4d8 ffffffff81050395 [1046578.109929] <0> ffff88043e582340 ffff88043e5826c8 ffff88043e582340 ffff88043e5abfd8 [1046578.109932] Call Trace: [1046578.109938] [] ? cleanup_user_struct+0xad/0xcc [1046578.109942] [] ? worker_thread+0x148/0x1d4 [1046578.109946] [] ? autoremove_wake_function+0x0/0x2e [1046578.109948] [] ? worker_thread+0x0/0x1d4 [1046578.109951] [] ? kthread+0x79/0x81 [1046578.109955] [] ? child_rip+0xa/0x20 [1046578.109957] [] ? kthread+0x0/0x81 [1046578.109959] [] ? child_rip+0x0/0x20 [1046578.109961] Code: 3c 00 4c 8b 25 02 98 3d 00 48 89 c5 83 cf ff eb 5c 48 8b 43 10 48 63 f7 48 8b 04 f0 48 8b 90 80 00 00 00 48 8b 48 78 48 89 51 08 <48> 89 0a 48 b9 00 02 20 00 00 00 ad de 48 89 88 80 00 00 00 48 [1046578.109975] RIP [] sched_destroy_group+0x3c/0x10d [1046578.109979] RSP [1046578.109981] ---[ end trace 5ebc2944b7872d4a ]---
LKML-Reference: <1263990378.24844.3.camel@localhost>
LKML-Reference: http://marc.info/?l=linux-kernel&m=129466345327931
--- include/linux/sched.h | 14 +-- init/Kconfig | 81 +++++-------- kernel/ksysfs.c | 8 -- kernel/sched.c | 108 +---------------- kernel/sys.c | 5 - kernel/user.c | 305 ------------------------------------------------- 6 files changed, 38 insertions(+), 483 deletions(-)
include/linux/sched.h +1 -13
@@ -728,14 +728,6 @@ struct user_struct {uid_t uid;struct user_namespace *user_ns; -#ifdef CONFIG_USER_SCHED -struct task_group *tg; -#ifdef CONFIG_SYSFS -struct kobject kobj; -struct delayed_work work; -#endif -#endif -#ifdef CONFIG_PERF_EVENTS atomic_long_t locked_vm;#endif
@@ -2500,13 +2492,9 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);extern void normalize_rt_tasks (void ); -#ifdef CONFIG_GROUP_SCHED +#ifdef CONFIG_CGROUP_SCHED extern struct task_group init_task_group; -#ifdef CONFIG_USER_SCHED -extern struct task_group root_task_group; -extern void set_tg_uid (struct user_struct *user); -#endif extern struct task_group *sched_create_group (struct task_group *parent);extern void sched_destroy_group (struct task_group *tg);
init/Kconfig +30 -51
93 lines not on this page · raw message
kernel/ksysfs.c +0 -8
@@ -176,16 +176,8 @@ static int __init ksysfs_init(void) goto group_exit; } -/* create the /sys/kernel/uids/ directory */ - error =uids_sysfs_init (); -if (error) - goto notes_exit; -return 0 ; -notes_exit: -if (notes_size >0 ) -sysfs_remove_bin_file (kernel_kobj, ¬es_attr); group_exit:sysfs_remove_group (kernel_kobj, &kernel_attr_group); kset_exit:
kernel/sched.c +7 -101
200 lines not on this page · raw message
kernel/sys.c +0 -5
@@ -567,11 +567,6 @@ static int set_user(struct cred *new)if (!new_user)return -EAGAIN ; -if (!task_can_switch_user (new_user, current)) { -free_uid (new_user); -return -EINVAL ; - } -if (atomic_read (&new_user->processes) >= current->signal->rlim[RLIMIT_NPROC ].rlim_cur && new_user !=INIT_USER ) {
kernel/user.c +0 -305
359 lines not on this page · raw message
Signature · 1 line
1.7.4
Quoted 44 lines · stable-bot for Dhaval Giani
Commit:
7c9414385ebfdd87cc542d4e7e3bb0dbb2d3ce25upstream
Author: Dhaval Giani <[email protected]>
AuthorDate: Wed Jan 20 13:26:18 2010 +0100Remove the
USER_SCHEDfeature. It has been scheduled to be removed in 2.6.34 as per http://marc.info/?l=linux-kernel&m=125728479022976&w=2[trace from referenced thread]
[1046577.884289] general protection fault: 0000 [#1] SMP [1046577.911332] last sysfs file: /sys/devices/platform/coretemp.7/temp1_input [1046577.938715] CPU 3 [1046577.965814] Modules linked in: ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables coretemp k8temp [1046577.994456] Pid: 38, comm: events/3 Not tainted 2.6.32.27intel #1 X8DT3 [1046578.023166] RIP: 0010:[] [] sched_destroy_group+0x3c/0x10d [1046578.052639] RSP: 0000:ffff88043e5abe10 EFLAGS: 00010097 [1046578.081360] RAX: ffff880139fa5540 RBX: ffff8803d18419c0 RCX: ffff8801d2f8fb78 [1046578.109903] RDX: dead000000200200 RSI: 0000000000000000 RDI: 0000000000000000 [1046578.109905] RBP: 0000000000000246 R08: 0000000000000020 R09: ffffffff816339b8 [1046578.109907] R10: 0000000004e6e5f0 R11: 0000000000000006 R12: ffffffff816339b8 [1046578.109909] R13: ffff8803d63ac4e0 R14: ffff88043e582340 R15: ffffffff8104a216 [1046578.109911] FS: 0000000000000000(0000) GS:ffff880028260000(0000) knlGS:0000000000000000 [1046578.109914] CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b [1046578.109915] CR2: 00007f55ab220000 CR3: 00000001e5797000 CR4: 00000000000006e0 [1046578.109917] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1046578.109919] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [1046578.109922] Process events/3 (pid: 38, threadinfo ffff88043e5aa000, task ffff88043e582340) [1046578.109923] Stack: [1046578.109924] ffff8803d63ac498 ffff8803d63ac4d8 ffff8803d63ac440 ffffffff8104a2c3 [1046578.109927] <0> ffff88043e5abef8 ffff880028276040 ffff8803d63ac4d8 ffffffff81050395 [1046578.109929] <0> ffff88043e582340 ffff88043e5826c8 ffff88043e582340 ffff88043e5abfd8 [1046578.109932] Call Trace: [1046578.109938] [] ? cleanup_user_struct+0xad/0xcc [1046578.109942] [] ? worker_thread+0x148/0x1d4 [1046578.109946] [] ? autoremove_wake_function+0x0/0x2e [1046578.109948] [] ? worker_thread+0x0/0x1d4 [1046578.109951] [] ? kthread+0x79/0x81 [1046578.109955] [] ? child_rip+0xa/0x20 [1046578.109957] [] ? kthread+0x0/0x81 [1046578.109959] [] ? child_rip+0x0/0x20 [1046578.109961] Code: 3c 00 4c 8b 25 02 98 3d 00 48 89 c5 83 cf ff eb 5c 48 8b 43 10 48 63 f7 48 8b 04 f0 48 8b 90 80 00 00 00 48 8b 48 78 48 89 51 08 <48> 89 0a 48 b9 00 02 20 00 00 00 ad de 48 89 88 80 00 00 00 48 [1046578.109975] RIP [] sched_destroy_group+0x3c/0x10d [1046578.109979] RSP [1046578.109981] ---[ end trace 5ebc2944b7872d4a ]---
Quoted 7 lines
Signed-off-by Dhaval Giani <[email protected]>Signed-off-by Peter Zijlstra <[email protected]>LKML-Reference: <1263990378.24844.3.camel@localhost>
LKML-Reference: http://marc.info/?l=linux-kernel&m=129466345327931Signed-off-by Ingo Molnar <[email protected]>Signed-off-by Mike Galbraith <[email protected]>Acked-by Peter Zijlstra <[email protected]>
There were a few more patches after this which cleaned up a few things as well. Let me search them out and let you know the commit IDs.
Thanks,
Dhaval
Quoted 4 lines
There were a few more patches after this which cleaned up a few things as well. Let me search them out and let you know the commit IDs.
6427462bfa50f50dc6c088c07037264fcc73eca132bd7eb5a7f4596c8440dd9440322fe9e686634d571428be550fbe37160596995e96ad398873fcbd
Thanks!
Dhaval
[PATCH 29/28] sched: Remove some dead code
Quoted 6 lines · Dhaval Giani
Quoted 4 lines
There were a few more patches after this which cleaned up a few things as well. Let me search them out and let you know the commit IDs.
6427462bfa50f50dc6c088c07037264fcc73eca1
From: Dan Carpenter <[email protected]>
Date: Mon, 15 Mar 2010 11:21:48 +0300
Subject: sched: Remove some dead code
commit 618765801ebc271fe0ba3eca99fcfd62a1f786e1 upstream.
This was left over from "7c9414385e sched: Remove USER_SCHED"
LKML-Reference: <20100315082148.GD18181@bicker>
--- kernel/user.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
kernel/user.c +0 -2
@@ -170,8 +170,6 @@ struct user_struct *alloc_uid(struct user_namespace *ns, uid_t uid)return up; -put_user_ns (new->user_ns); -kmem_cache_free (uid_cachep, new); out_unlock:return NULL ; }
[email protected]
AppliedPatch "sched: Remove some dead code" has been added to the 2.6.32-longterm tree
This is a note to let you know that I've just added the patch titled
sched: Remove some dead code
to the 2.6.32-longterm tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary
The filename of the patch is:
sched-remove-some-dead-code.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the 2.6.32 longterm tree, please let <[email protected]> know about it.
Quoted 1 line
From [email protected] Tue Feb 15 14:39:20 2011
From: Dan Carpenter <[email protected]>
Date: Fri, 11 Feb 2011 07:04:45 +0100
Subject: sched: Remove some dead code
To: Dhaval Giani <[email protected]>
Cc: LKML <[email protected]>, Peter Zijlstra <[email protected]>, Ingo Molnar <[email protected]>, Greg Kroah-Hartman <[email protected]>
Message-ID: <[email protected]>
From: Dan Carpenter <[email protected]>
commit 618765801ebc271fe0ba3eca99fcfd62a1f786e1 upstream.
This was left over from "7c9414385e sched: Remove USER_SCHED"
LKML-Reference: <20100315082148.GD18181@bicker>
--- kernel/user.c | 2 -- 1 file changed, 2 deletions(-)
kernel/user.c +0 -2
@@ -170,8 +170,6 @@ struct user_struct *alloc_uid(struct usereturn up; -put_user_ns (new->user_ns); -kmem_cache_free (uid_cachep, new); out_unlock:return NULL ; }
Patches currently in longterm-queue-2.6.32 which might be from [email protected] are
[PATCH 30/28] kernel/user.c: add lock release annotation on free_user()
In reply to Dhaval GianiQuoted 6 lines · Dhaval Giani
Quoted 4 lines
There were a few more patches after this which cleaned up a few things as well. Let me search them out and let you know the commit IDs.
571428be550fbe37160596995e96ad398873fcbd
From: Namhyung Kim <[email protected]>
Date: Tue, 26 Oct 2010 14:22:43 -0700
Subject: kernel/user.c: add lock release annotation on free_user()
commit 571428be550fbe37160596995e96ad398873fcbd upstream.
free_user() releases uidhash_lock but was missing annotation. Add it. This removes following sparse warnings:
include/linux/spinlock.h:339:9: warning: context imbalance in 'free_user' - unexpected unlock kernel/user.c:120:6: warning: context imbalance in 'free_uid' - wrong count at exit
--- kernel/user.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/user.c +1 -0
@@ -91,6 +91,7 @@ static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)* upon function exit. */ static void free_user (struct user_struct *up,unsigned long flags) + __releases(&uidhash_lock) {uid_hash_remove (up);spin_unlock_irqrestore (&uidhash_lock, flags);
[email protected]
AppliedPatch "kernel/user.c: add lock release annotation on free_user()" has been added to the 2.6.32-longterm tree
This is a note to let you know that I've just added the patch titled
kernel/user.c: add lock release annotation on free_user()
to the 2.6.32-longterm tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary
The filename of the patch is:
kernel-user.c-add-lock-release-annotation-on-free_user.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the 2.6.32 longterm tree, please let <[email protected]> know about it.
Quoted 1 line
From [email protected] Tue Feb 15 14:39:42 2011
From: Namhyung Kim <[email protected]>
From: Mike Galbraith <[email protected]>
Date: Fri, 11 Feb 2011 07:07:01 +0100
Subject: kernel/user.c: add lock release annotation on free_user()
To: Dhaval Giani <[email protected]>
Cc: LKML <[email protected]>, Peter Zijlstra <[email protected]>, Ingo Molnar <[email protected]>, Greg Kroah-Hartman <[email protected]>
Message-ID: <[email protected]>
From: Namhyung Kim <[email protected]>
commit 571428be550fbe37160596995e96ad398873fcbd upstream.
free_user() releases uidhash_lock but was missing annotation. Add it. This removes following sparse warnings:
include/linux/spinlock.h:339:9: warning: context imbalance in 'free_user' - unexpected unlock kernel/user.c:120:6: warning: context imbalance in 'free_uid' - wrong count at exit
--- kernel/user.c | 1 + 1 file changed, 1 insertion(+)
kernel/user.c +1 -0
@@ -91,6 +91,7 @@ static struct user_struct *uid_hash_find* upon function exit. */ static void free_user (struct user_struct *up,unsigned long flags) + __releases(&uidhash_lock) {uid_hash_remove (up);spin_unlock_irqrestore (&uidhash_lock, flags);
Patches currently in longterm-queue-2.6.32 which might be from [email protected] are
Quoted 6 lines · Dhaval Giani
Quoted 4 lines
There were a few more patches after this which cleaned up a few things as well. Let me search them out and let you know the commit IDs.
32bd7eb5a7f4596c8440dd9440322fe9e686634d
This one is already in the series.
-Mike