OSDN Git Service

NFS: Use kmemdup_nul() in nfs_readdir_make_qstr()
authorTrond Myklebust <trondmy@gmail.com>
Sun, 2 Feb 2020 22:53:55 +0000 (17:53 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 3 Feb 2020 21:37:45 +0000 (16:37 -0500)
commit3803d6721baff3d5dd6cd6b8c7294e54d124bc41
treed2731a13dcbdc7e284c8838d7b99893ecf10dc6c
parent114de38225d9b300f027e2aec9afbb6e0def154b
NFS: Use kmemdup_nul() in nfs_readdir_make_qstr()

The directory strings stored in the readdir cache may be used with
printk(), so it is better to ensure they are nul-terminated.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c