summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2020-08-24 10:58:12 +0200
committerDavid Howells <dhowells@redhat.com>2020-10-27 23:05:56 +0100
commit248c944e2159de4868bef558feea40214aaf8464 (patch)
treeac60c074fc3ae494173904f93d9992fd070636fc /fs
parentafs: Fix tracing deref-before-check (diff)
downloadlinux-248c944e2159de4868bef558feea40214aaf8464.tar.xz
linux-248c944e2159de4868bef558feea40214aaf8464.zip
afs: Fix a use after free in afs_xattr_get_acl()
The "op" pointer is freed earlier when we call afs_put_operation(). Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: Colin Ian King <colin.king@canonical.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/afs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c
index 84f3c4f57531..38884d6c57cd 100644
--- a/fs/afs/xattr.c
+++ b/fs/afs/xattr.c
@@ -85,7 +85,7 @@ static int afs_xattr_get_acl(const struct xattr_handler *handler,
if (acl->size <= size)
memcpy(buffer, acl->data, acl->size);
else
- op->error = -ERANGE;
+ ret = -ERANGE;
}
}