summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2020-03-16 17:52:54 +0300
committerIlya Dryomov <idryomov@gmail.com>2020-04-13 09:55:49 +0300
commit952c48b0ed18919bff7528501e9a3fff8a24f8cd (patch)
treecb1c4416ad298503d23abd3298da76bfbf3c5634 /scripts/gdb/linux/utils.py
parent0e4e1de5b63fa423b13593337a27fd2d2b0bcf77 (diff)
downloadlinux-952c48b0ed18919bff7528501e9a3fff8a24f8cd.tar.xz
rbd: call rbd_dev_unprobe() after unwatching and flushing notifies
rbd_dev_unprobe() is supposed to undo most of rbd_dev_image_probe(), including rbd_dev_header_info(), which means that rbd_dev_header_info() isn't supposed to be called after rbd_dev_unprobe(). However, rbd_dev_image_release() calls rbd_dev_unprobe() before rbd_unregister_watch(). This is racy because a header update notify can sneak in: "rbd unmap" thread ceph-watch-notify worker rbd_dev_image_release() rbd_dev_unprobe() free and zero out header rbd_watch_cb() rbd_dev_refresh() rbd_dev_header_info() read in header The same goes for "rbd map" because rbd_dev_image_probe() calls rbd_dev_unprobe() on errors. In both cases this results in a memory leak. Fixes: fd22aef8b47c ("rbd: move rbd_unregister_watch() call into rbd_dev_image_release()") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions