mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
NFS: Fix an Oops in encode_lookup()
It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
bd89366324
commit
54af3bb543
3 changed files with 24 additions and 10 deletions
|
@ -175,6 +175,9 @@ next_component:
|
|||
path++;
|
||||
name.len = path - (const char *) name.name;
|
||||
|
||||
if (name.len > NFS4_MAXNAMLEN)
|
||||
return -ENAMETOOLONG;
|
||||
|
||||
eat_dot_dir:
|
||||
while (*path == '/')
|
||||
path++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue