[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1543559717-27534-1-git-send-email-cheng.lin130@zte.com.cn>
Date: Fri, 30 Nov 2018 14:35:17 +0800
From: Cheng Lin <cheng.lin130@....com.cn>
To: mcgrof@...nel.org
Cc: keescook@...omium.org, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, zhong.weidong@....com.cn,
wang.yi59@....com.cn, Cheng Lin <cheng.lin130@....com.cn>
Subject: [PATCH] proc/sysctl: fix return error for proc_doulongvec_minmax
If the number of input parameters is less than the total
parameters, an INVAL error will be returned.
This patch ensure no error returned in this condition, just
like other interfaces do.
Signed-off-by: Cheng Lin <cheng.lin130@....com.cn>
---
kernel/sysctl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 5fc724e..9ee261f 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2779,6 +2779,8 @@ static int __do_proc_doulongvec_minmax(void *data, struct ctl_table *table, int
bool neg;
left -= proc_skip_spaces(&p);
+ if (!left)
+ break;
err = proc_get_long(&p, &left, &val, &neg,
proc_wspace_sep,
--
1.8.3.1
Powered by blists - more mailing lists