Re: [PATCH/RFC] Deprecate sysctl(2), add sysctl_name

From: Arjan van de Ven (arjanv@redhat.com)
Date: Fri Jul 11 2003 - 05:09:37 EST


> --- linux-2.5/kernel/sysctl.c 2003-07-04 23:52:20.000000000 +0200
> +++ linux-2.5-amd64/kernel/sysctl.c 2003-07-11 03:25:18.000000000 +0200
> @@ -823,7 +838,16 @@
>
> if (copy_from_user(&tmp, args, sizeof(tmp)))
> return -EFAULT;
> -
> +
> + if (tmp.nlen != 2 || tmp.name[0] != CTL_KERN ||
> + tmp.name[1] != KERN_VERSION) {
> + int i;
> + printk(KERN_INFO "%s: numerical sysctl ", current->comm);
> + for (i = 0; i < tmp.nlen; i++)
> + printk("%d ", tmp.name[i]);
> + printk("is obsolete.\n");
> + }
> +
> lock_kernel();

how about rate limiting this ?



-
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 : Tue Jul 15 2003 - 22:00:38 EST