2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-14 21:54:16 +08:00
linux-next/fs/hostfs
Al Viro 7f6c411c9b 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: 52b209f7b8 ("get rid of hostfs_read_inode()")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2021-03-25 18:57:42 -04:00
..
hostfs_kern.c hostfs: fix memory handling in follow_link() 2021-03-25 18:57:42 -04:00
hostfs_user.c hostfs: rename do_rmdir() to hostfs_do_rmdir() 2018-04-02 20:15:53 +02:00
hostfs.h hostfs: pass 64-bit timestamps to/from user space 2019-12-18 18:07:32 +01:00
Makefile