1
0
Fork 0
remarkable-linux/fs/configfs
Mike Christie bc87baee19 configfs: fix registered group removal
[ Upstream commit cc57c07343 ]

This patch fixes a bug where configfs_register_group had added
a group in a tree, and userspace has done a rmdir on a dir somewhere
above that group and we hit a kernel crash. The problem is configfs_rmdir
will detach everything under it and unlink groups on the default_groups
list. It will not unlink groups added with configfs_register_group so when
configfs_unregister_group is called to drop its references to the group/items
we crash when we try to access the freed dentrys.

The patch just adds a check for if a rmdir has been done above
us and if so just does the unlink part of unregistration.

Sorry if you are getting this multiple times. I thouhgt I sent
this to some of you and lkml, but I do not see it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-26 08:38:10 +02:00
..
Kconfig configfs: change depends -> select SYSFS 2011-01-16 21:22:29 +00:00
Makefile [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
configfs_internal.h configfs: implement binary attributes 2016-01-04 12:31:46 +01:00
dir.c configfs: fix registered group removal 2018-09-26 08:38:10 +02:00
file.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
inode.c fs: Replace current_fs_time() with current_time() 2016-09-27 21:06:22 -04:00
item.c configfs: Introduce config_item_get_unless_zero() 2017-06-12 13:20:20 +02:00
mount.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
symlink.c configfs: Fix race between create_link and configfs_rmdir 2017-06-12 13:20:10 +02:00