OpenCloudOS-Kernel/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
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hostfs.h hostfs: pass 64-bit timestamps to/from user space 2019-12-18 18:07:32 +01: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