aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2011-12-20 06:57:45 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 17:24:36 -0800
commitdbbef3cbdef5e2363caeb343efa68650f20d7bfc (patch)
tree1bfe1b45cc725adec9ba7c10565ff43dc1880032 /drivers
parent58a902db8896b6bb4c779a223f6e8e7b289cdcc9 (diff)
downloadkernel_samsung_smdk4412-dbbef3cbdef5e2363caeb343efa68650f20d7bfc.zip
kernel_samsung_smdk4412-dbbef3cbdef5e2363caeb343efa68650f20d7bfc.tar.gz
kernel_samsung_smdk4412-dbbef3cbdef5e2363caeb343efa68650f20d7bfc.tar.bz2
nfs: fix regression in handling of context= option in NFSv4
commit 8a0d551a59ac92d8ff048d6cb29d3a02073e81e8 upstream. Setting the security context of a NFSv4 mount via the context= mount option is currently broken. The NFSv4 codepath allocates a parsed options struct, and then parses the mount options to fill it. It eventually calls nfs4_remote_mount which calls security_init_mnt_opts. That clobbers the lsm_opts struct that was populated earlier. This bug also looks like it causes a small memory leak on each v4 mount where context= is used. Fix this by moving the initialization of the lsm_opts into nfs_alloc_parsed_mount_data. Also, add a destructor for nfs_parsed_mount_data to make it easier to free all of the allocations hanging off of it, and to ensure that the security_free_mnt_opts is called whenever security_init_mnt_opts is. I believe this regression was introduced quite some time ago, probably by commit c02d7adf. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions