]> git.baikalelectronics.ru Git - kernel.git/commit
net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs'
authorFedor Tokarev <ftokarev@gmail.com>
Thu, 15 Oct 2020 13:59:08 +0000 (16:59 +0300)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 2 Dec 2020 19:05:54 +0000 (14:05 -0500)
commit98b46fb84b0f9c87e58fe7f91b0ae7b186c0c265
tree9e46b6f6cd7934cdf2b9db671b8eeb49d6e02855
parent4fbe414dcd6037295f91e7e250bdc4ba75a61bae
net: sunrpc: Fix 'snprintf' return value check in 'do_xprt_debugfs'

'snprintf' returns the number of characters which would have been written
if enough space had been available, excluding the terminating null byte.
Thus, the return value of 'sizeof(buf)' means that the last character
has been dropped.

Signed-off-by: Fedor Tokarev <ftokarev@gmail.com>
Fixes: 7f383e867afb ("SUNRPC: add links for all client xprts to debugfs")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/debugfs.c