summaryrefslogtreecommitdiff
path: root/virt/kvm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-03-25 14:12:34 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2021-03-25 18:57:42 -0400
commit7f6c411c9b50cfab41cc798e003eff27608c7016 (patch)
tree8a3be5560a83e11bc07774673eb180354c31f86a /virt/kvm
parenta38fd8748464831584a19438cbb3082b5a2dab15 (diff)
hostfs: fix memory handling in follow_link()
1) argument should not be freed in any case - the caller already has it as ->s_fs_info (and uses it a lot afterwards) 2) allocate readlink buffer with kmalloc() - the caller has no way to tell if it's got that (on absolute symlink) or a result of kasprintf(). Sure, for SLAB and SLUB kfree() works on results of kmem_cache_alloc(), but that's not documented anywhere, might change in the future *and* is already not true for SLOB. Fixes: 52b209f7b848 ("get rid of hostfs_read_inode()") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'virt/kvm')
0 files changed, 0 insertions, 0 deletions