]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: fix uninitialized dentry pointer in ceph_real_mount()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 13 Oct 2016 15:15:37 +0000 (17:15 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 18 Oct 2016 10:10:59 +0000 (12:10 +0200)
commit6a28637998fd2ac93d6f6341042b58fe0a1cfc80
tree1cd859a416764babfed2f248a4edf3d26674d134
parent4b021460720223ef059d4a11956def6ff78dc2cc
ceph: fix uninitialized dentry pointer in ceph_real_mount()

    fs/ceph/super.c: In function ‘ceph_real_mount’:
    fs/ceph/super.c:818: warning: ‘root’ may be used uninitialized in this function

If s_root is already valid, dentry pointer root is never initialized,
and returned by ceph_real_mount(). This will cause a crash later when
the caller dereferences the pointer.

Fixes: 2dcc37d35e7a8988 ("ceph: avoid accessing / when mounting a subpath")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/super.c