]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Address memory leaks in the NFS client mount option parser
authorChuck Lever <chuck.lever@oracle.com>
Wed, 16 Jan 2008 21:38:10 +0000 (16:38 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:06:11 +0000 (02:06 -0500)
commit92463016eacb610742e9b8538301ea9e9c7c6a3c
tree60d34b3f1fa44c42a7fd18867531dc915007dfa0
parent11e1684004a88fb5b54a6720cdee53ea08d137ca
NFS: Address memory leaks in the NFS client mount option parser

David Howells noticed that repeating the same mount option twice during an
NFS mount request can result in orphaned memory in certain cases.

Only the client_address and mount_server.hostname strings are initialized
in the mount parsing loop, so those appear to be the only two pointers that
might be written over by repeating a mount option.  The strings in the
nfs_server section of the nfs_parsed_mount_data structure are set only once
after the options are parsed, thus these are not susceptible to being
overwritten.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/super.c