From: Andrew Morton Signed-off-by: Andrew Morton --- kernel/sched.c | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff -puN kernel/sched.c~sched2-sched-domain-sysctl-tidy kernel/sched.c --- devel/kernel/sched.c~sched2-sched-domain-sysctl-tidy 2006-03-11 02:50:35.000000000 -0800 +++ devel-akpm/kernel/sched.c 2006-03-11 02:50:35.000000000 -0800 @@ -4839,15 +4839,6 @@ static struct ctl_table sd_ctl_root[] = {0,}, }; -static char *sched_strdup(char *str) -{ - int n = strlen(str)+1; - char *s = kmalloc(n, GFP_KERNEL); - if (!s) - return NULL; - return strcpy(s, str); -} - static struct ctl_table *sd_alloc_ctl_entry(int n) { struct ctl_table *entry = @@ -4918,7 +4909,7 @@ static ctl_table *sd_alloc_ctl_cpu_table for_each_domain(cpu, sd) { snprintf(buf, 32, "domain%d", i); entry->ctl_name = i + 1; - entry->procname = sched_strdup(buf); + entry->procname = kstrdup(buf, GFP_KERNEL); entry->mode = 0755; entry->child = sd_alloc_ctl_domain_table(sd); entry++; @@ -4939,7 +4930,7 @@ static void init_sched_domain_sysctl(voi for (i = 0; i < cpu_num; i++, entry++) { snprintf(buf, 32, "cpu%d", i); entry->ctl_name = i + 1; - entry->procname = sched_strdup(buf); + entry->procname = kstrdup(buf, GFP_KERNEL); entry->mode = 0755; entry->child = sd_alloc_ctl_cpu_table(i); } _