[PATCH] random poolsize sysctl fix

Linux Kernel Mailing List <[email protected]> Fri, 20 May 2005 10:47:50 +0000
Newsgroups gmane.linux.kernel.commits.2-4
Message-ID <[email protected]>
ChangeSet 1.1524, 2005/05/20 07:47:50-03:00, [email protected]

	[PATCH] random poolsize sysctl fix
	
	SWSoft Linux kernel Team has discovered that your patch
	http://linux.bkbits.net:8080/linux-2.4/gnupatch@41e2c4fetTJmVti-Xxql21xXjfbpag
	which should fix a random poolsize sysctl handler integer overflow, is
	wrong.
	You have changed a variable definition in function proc_do_poolsize(),
	but you had to fix an another function, poolsize_strategy()



 random.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff -Nru a/drivers/char/random.c b/drivers/char/random.c
--- a/drivers/char/random.c	2005-05-20 10:05:11 -07:00
+++ b/drivers/char/random.c	2005-05-20 10:05:11 -07:00
@@ -1771,7 +1771,7 @@
 static int proc_do_poolsize(ctl_table *table, int write, struct file *filp,
 			    void *buffer, size_t *lenp)
 {
-	unsigned int	ret;
+	int	ret;
 
 	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
 
@@ -1787,7 +1787,7 @@
 			     void *oldval, size_t *oldlenp,
 			     void *newval, size_t newlen, void **context)
 {
-	int	len;
+	unsigned int	len;
 	
 	sysctl_poolsize = random_state->poolinfo.POOLBYTES;