]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
krbd: don't segfault if images are unmapped concurrently 11018/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 3 Jun 2016 15:24:48 +0000 (17:24 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 7 Sep 2016 13:10:12 +0000 (15:10 +0200)
commitf337a0720713329b5305ddd9e5c18e8d2b11b475
tree7ef4e61f3c3fc196e84ab5c1933258a5f67f37c6
parent2399d4ae54780cb18c313a8da79b697a70a87146
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>
(cherry picked from commit 2bfecb1c0a0b2a314a5d137e6ca2cccd9ddc9b54)
src/krbd.cc