An error occurred while fetching folder content.
unfuck sysfs_mount()
Al Viro authored
commit 7b745a4e

 upstream.

new_sb is left uninitialized in case of early failures in kernfs_mount_ns(),
and while IS_ERR(root) is true in all such cases, using IS_ERR(root) || !new_sb
is not a solution - IS_ERR(root) is true in some cases when new_sb is true.

Make sure new_sb is initialized (and matches the reality) in all cases and
fix the condition for dropping kobj reference - we want it done precisely
in those situations where the reference has not been transferred into a new
super_block instance.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@canonical.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
68fed072
Name Last commit Last update
..
9p 9P: Cast to loff_t before multiplying
adfs fs/adfs: super: fix use-after-free bug
affs fs/affs: release old buffer head on error path
afs afs: Fix some tracing details
autofs4 autofs: fix a leak in autofs_expire_indirect()
befs License cleanup: add SPDX GPL-2.0 license identifier to files with no license
bfs bfs: add sanity check at bfs_fill_super()
btrfs btrfs: return value from btrfs_mark_extent_written() in case of error
cachefiles cachefiles: Handle readpage error correctly
ceph ceph: fix fscache invalidation
cifs SMB3: incorrect file id in requests compounded with open
coda coda: add error handling for fget
configfs configfs: fix a use-after-free in __configfs_open_file
cramfs Cramfs: fix abad comparison when wrap-arounds occur
crypto fscrypt: return -EXDEV for incompatible rename or link into encrypted dir
debugfs debugfs: fix use-after-free on symlink traversal
devpts fs/devpts: always delete dcache dentry-s in dput()
dlm fs: dlm: fix debugfs dump
ecryptfs Revert "ecryptfs: replace BUG_ON with error handling code"
efivarfs efivarfs: revert "fix memory leak in efivarfs_create()"
efs License cleanup: add SPDX GPL-2.0 license identifier to files with no license
exofs exofs_mount(): fix leaks on failure exits
exportfs exportfs: fix 'passing zero to ERR_PTR()' warning
ext2 ext2: fix missing percpu_counter_inc
ext4 ext4: fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed
f2fs
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2
jffs2
jfs
kernfs
lockd
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
orangefs
overlayfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
dax.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c