]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
krbd: don't segfault if images are unmapped concurrently 9517/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 3 Jun 2016 15:24:48 +0000 (17:24 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 6 Jun 2016 12:51:45 +0000 (14:51 +0200)
commit2bfecb1c0a0b2a314a5d137e6ca2cccd9ddc9b54
treea7f184d1f979260ec0be72ba2c7d044f2ca8edad
parente4f55f458dee7f3d1631cf77f4d235f491e6d542
krbd: don't segfault if images are unmapped concurrently

"rbd map c" can die from a NULL dereference on any of this_pool,
this_image or this_snap in wait_for_udev_add():

    <image a is mapped>
    rbd map c
                                    rbd map b
                                    rbd unmap a
                                    rbd unmap b

However unlikely, this segfault is triggered by the rbd/concurrent.sh
workunit on a regular basis.

Similarly, "rbd showmapped" can die if an image to be listed is
unmapped.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/krbd.cc