]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Fix afs_xattr_get_yfs() to not try freeing an error value
authorDavid Howells <dhowells@redhat.com>
Sun, 12 May 2019 07:31:23 +0000 (08:31 +0100)
committerDavid Howells <dhowells@redhat.com>
Wed, 15 May 2019 16:35:53 +0000 (17:35 +0100)
commit15ff6f86fb373464fc170a087e52287baa0adeba
tree48752e7b9ff1ec36c9baeadc7e4f11ebf16addf7
parenta9f2e703d6ce3e87f00921a9ec79f5143476338d
afs: Fix afs_xattr_get_yfs() to not try freeing an error value

afs_xattr_get_yfs() tries to free yacl, which may hold an error value (say
if yfs_fs_fetch_opaque_acl() failed and returned an error).

Fix this by allocating yacl up front (since it's a fixed-length struct,
unlike afs_acl) and passing it in to the RPC function.  This also allows
the flags to be placed in the object rather than passing them through to
the RPC function.

Fixes: c38d02aafce8 ("afs: Get YFS ACLs and information through xattrs")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/internal.h
fs/afs/xattr.c
fs/afs/yfsclient.c