--- linux-2.3.99-pre6-3/kernel/sysctl.c Sun Apr 16 02:41:30 2000 +++ linux-2.3.99-pre6-3-new/kernel/sysctl.c Sun Apr 16 02:44:12 2000 @@ -320,6 +320,7 @@ kfree(context); if (error != -ENOTDIR) return error; + tmp = tmp->next; } while (tmp != &root_table_header.ctl_entry); return -ENOTDIR; } @@ -365,14 +366,13 @@ void *newval, size_t newlen, ctl_table *table, void **context) { + int n; repeat: if (!nlen) return -ENOTDIR; - + if (get_user(n, name)) + return -EFAULT; for ( ; table->ctl_name; table++) { - int n; - if (get_user(n, name)) - return -EFAULT; if (n == table->ctl_name || table->ctl_name == CTL_ANY) { int error; if (table->child) {