linux/fs/debugfs
Daniel Borkmann 0ee9608c89 debugfs: fix refcount imbalance in start_creating
In debugfs' start_creating(), we pin the file system to safely access
its root. When we failed to create a file, we unpin the file system via
failed_creating() to release the mount count and eventually the reference
of the vfsmount.

However, when we run into an error during lookup_one_len() when still
in start_creating(), we only release the parent's mutex but not so the
reference on the mount. Looks like it was done in the past, but after
splitting portions of __create_file() into start_creating() and
end_creating() via 190afd81e4 ("debugfs: split the beginning and the
end of __create_file() off"), this seemed missed. Noticed during code
review.

Fixes: 190afd81e4 ("debugfs: split the beginning and the end of __create_file() off")
Cc: stable@vger.kernel.org # v4.0+
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-11-11 02:04:44 -05:00
..
Makefile
file.c debugfs: Add debugfs_create_ulong() 2015-10-18 10:14:39 -07:00
inode.c debugfs: fix refcount imbalance in start_creating 2015-11-11 02:04:44 -05:00