]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tile: fix strncpy_from_user bug
authorChris Metcalf <cmetcalf@tilera.com>
Fri, 9 Aug 2013 20:21:43 +0000 (16:21 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Tue, 13 Aug 2013 20:27:32 +0000 (16:27 -0400)
commitbbe966625180255f697c3af6946098882ce7a5bc
treec71a57a38e69ba9491d9cdf2e4a5f85c8f31ef3a
parentc6069fbec1f55192799cc8722dc69353f64f7852
tile: fix strncpy_from_user bug

In strncpy_from_user_asm, when the destination buffer length was the
same as the actual string length, we were returning the size of the
destination buffer.  But since it's a NUL terminated string, we should
return the length of the string instead.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/lib/usercopy_32.S
arch/tile/lib/usercopy_64.S