From: Linus Torvalds Date: Thu, 17 Dec 2009 15:04:56 +0000 (-0800) Subject: x86/ptrace: make genregs[32]_get/set more robust X-Git-Tag: v2.6.27.43~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43e1e809a5b7f9bdc65cfd0bdf45675dc7d40fb4;p=pandora-kernel.git x86/ptrace: make genregs[32]_get/set more robust commit 04a1e62c2cec820501f93526ad1e46073b802dc4 upstream. The loop condition is fragile: we compare an unsigned value to zero, and then decrement it by something larger than one in the loop. All the callers should be passing in appropriately aligned buffer lengths, but it's better to just not rely on it, and have some appropriate defensive loop limits. Acked-by: Roland McGrath Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed