]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Prevent a possible oops in the nfs_dirent() tracepoint
authorChuck Lever <chuck.lever@oracle.com>
Fri, 25 Jun 2021 15:12:49 +0000 (11:12 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 7 Jul 2021 00:14:44 +0000 (20:14 -0400)
commit9e24fe9b148a55e6fa853bb78bf10380d38afd0d
tree54c15f34b4c5f4dcf454630185e2f8556b0ddddd
parentd35393e98b1f9ff27d54df6faa7965a5bcf6db0d
NFSD: Prevent a possible oops in the nfs_dirent() tracepoint

The double copy of the string is a mistake, plus __assign_str()
uses strlen(), which is wrong to do on a string that isn't
guaranteed to be NUL-terminated.

Fixes: 01888e035498 ("NFSD: Add a tracepoint to record directory entry encoding")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/trace.h