X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=security%2Fcommoncap.c;h=bacc1111d871bc257c5f86bbf206430f64cb8d79;hb=b1b6b5a30dce872f500dc43f067cba8e7f86fc7d;hp=59bf3c1674c8b4dbb960b5ac851b3d3afc78c1f9;hpb=376566ca87257b9116ac5205f0efaa3c0f29103b;p=linux-2.6-microblaze.git diff --git a/security/commoncap.c b/security/commoncap.c index 59bf3c1674c8..bacc1111d871 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -473,7 +473,7 @@ static bool validheader(size_t size, const struct vfs_cap_data *cap) * * If all is ok, we return the new size, on error return < 0. */ -int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size) +int cap_convert_nscap(struct dentry *dentry, const void **ivalue, size_t size) { struct vfs_ns_cap_data *nscap; uid_t nsrootid; @@ -516,7 +516,6 @@ int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size) nscap->magic_etc = cpu_to_le32(nsmagic); memcpy(&nscap->data, &cap->data, sizeof(__le32) * 2 * VFS_CAP_U32); - kvfree(*ivalue); *ivalue = nscap; return newsize; }