summaryrefslogtreecommitdiff
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 17:59:15 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 17:59:15 -0800
commit2a7117ac7c120c085c56745f753166b821022858 (patch)
treed858db9ea8ddf2a5e58e44e5687bbd9479f7c5d4 /kernel/sysctl.c
parentc8ebfc888f9ee93f2dc7cd62b3be66263755d99a (diff)
v2.4.1.3 -> v2.4.1.4
- big S/390x 64-bit merge - typos and license name fixes. doc updates. - more include file cleanups (phase out "malloc.h") - even more elevator corner cases.. When not merging, find the best insertion point. - pmac ide update - network fixes (netif_wake_queue on tx timeout) - USB printer select() fix - NFS client missed initialization, deamon fixed client address check
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r--kernel/sysctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 96f46ecb7727..187ea87ea000 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -318,8 +318,10 @@ int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
{
struct list_head *tmp;
- if (nlen == 0 || nlen >= CTL_MAXNAME)
+ if (nlen <= 0 || nlen >= CTL_MAXNAME)
return -ENOTDIR;
+ if ((int) newlen < 0)
+ return -EINVAL;
if (oldval) {
int old_len;
if (!oldlenp || get_user(old_len, oldlenp))