

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/sysctl.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff -puN kernel/sysctl.c~add-do_proc_doulonglongvec_minmax-to-sysctl-functions-fix kernel/sysctl.c
--- 25/kernel/sysctl.c~add-do_proc_doulonglongvec_minmax-to-sysctl-functions-fix	2004-11-03 20:25:44.665959824 -0800
+++ 25-akpm/kernel/sysctl.c	2004-11-03 20:25:44.669959216 -0800
@@ -1875,7 +1875,8 @@ static int do_proc_doulonglongvec_minmax
 			}
 			if (*p < '0' || *p > '9')
 				break;
-			val = simple_strtoull(p, &p, 0) * convmul / convdiv ;
+			val = simple_strtoull(p, &p, 0) * convmul;
+			do_div(val, convdiv);
 			len = p-buf;
 			if ((len < left) && *p && !isspace(*p))
 				break;
@@ -1893,11 +1894,13 @@ static int do_proc_doulonglongvec_minmax
 			p = buf;
 			if (!first)
 				*p++ = '\t';
-			sprintf(p, "%llu", convdiv * (*i) / convmul);
+			val = convdiv * (*i);
+			do_div(val, convmul);
+			sprintf(p, "%llu", val);
 			len = strlen(buf);
 			if (len > left)
 				len = left;
-			if(copy_to_user(s, buf, len))
+			if (copy_to_user(s, buf, len))
 				return -EFAULT;
 			left -= len;
 			s += len;
_
