]> git.baikalelectronics.ru Git - kernel.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>
Fri, 30 Aug 2013 15:56:42 +0000 (11:56 -0400)
commit0fa477d64ac0dc9740c4f46261fd9e4d3641dd8a
treeb76b78391f9e86d558f44640000e0589b5076431
parentc3bd87ca65c2a2d1d5ea046a9b44b941df371348
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