linux-stable/fs/9p
Dominique Martinet 829567dd91 v9fs_dir_readdir: fix double-free on p9stat_read error
commit 81c99089bc upstream.

p9stat_read will call p9stat_free on error, we should only free the
struct content on success.

There also is no need to "p9stat_init" st as the read function will
zero the whole struct for us anyway, so clean up the code a bit while
we are here.

Link: http://lkml.kernel.org/r/1535410108-20650-1-git-send-email-asmadeus@codewreck.org
Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
Reported-by: syzbot+d4252148d198410b864f@syzkaller.appspotmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-01 09:37:27 +01:00
..
acl.c 9p: fix a potential acl leak 2017-02-22 16:41:27 -08:00
acl.h
cache.c fscache: Pass object size in rather than calling back for it 2018-04-06 14:05:14 +01:00
cache.h fs: 9p: cache.h: Add #define of include guard 2015-11-11 02:19:50 -05:00
fid.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
fid.h 9p: use clone_fid() 2016-08-03 11:12:12 -04:00
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
v9fs.c fs/9p/v9fs.c: fix spelling mistake "Uknown" -> "Unknown" 2018-08-13 09:21:44 +09:00
v9fs.h 9p: Implement show_options 2017-07-11 06:08:58 -04:00
v9fs_vfs.h
vfs_addr.c 9p: set page uptodate when required in write_end() 2017-10-11 09:30:08 -07:00
vfs_dentry.c VFS: normal filesystems (and lustre): d_inode() annotations 2015-04-15 15:06:57 -04:00
vfs_dir.c v9fs_dir_readdir: fix double-free on p9stat_read error 2018-12-01 09:37:27 +01:00
vfs_file.c 9p locks: fix glock.client_id leak in do_lock 2018-11-21 09:19:11 +01:00
vfs_inode.c get rid of 'opened' argument of ->atomic_open() - part 3 2018-07-12 10:04:20 -04:00
vfs_inode_dotl.c get rid of 'opened' argument of ->atomic_open() - part 3 2018-07-12 10:04:20 -04:00
vfs_super.c fs/9p: don't set SB_NOATIME by default 2018-04-05 21:36:22 -07:00
xattr.c fs/9p/xattr.c: catch the error of p9_client_clunk when setting xattr failed 2018-08-13 09:35:16 +09:00
xattr.h 9p: xattr simplifications 2015-11-13 20:34:33 -05:00