From: Alan Cox Date: Tue, 27 Oct 2009 15:35:55 +0000 (+0000) Subject: ray_cs: Fix copy_from_user handling X-Git-Tag: v2.6.31.6~74 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bf501c3e8bb75e9f22f79eca39dc6c8ca5a32432;p=karo-tx-linux.git ray_cs: Fix copy_from_user handling commit 575c9ed7798218dc923f319c0d78f0c25ca506b9 upstream. I've not touched the other stuff here but the word "locking" comes to mind. Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 698b11b1cadb..8c67a488f83b 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c @@ -2878,7 +2878,7 @@ static int write_essid(struct file *file, const char __user *buffer, unsigned long count, void *data) { static char proc_essid[33]; - int len = count; + unsigned int len = count; if (len > 32) len = 32;