]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix invalid iterator dereference in Client::trim_caps() 749/head
authorYan, Zheng <zheng.z.yan@intel.com>
Sun, 20 Oct 2013 09:08:42 +0000 (17:08 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sun, 20 Oct 2013 13:34:02 +0000 (21:34 +0800)
commit34d09417b76eb38a4be52b0c90551239af99a839
tree2c036585e584b688038023b2de4bc338054288ee
parent4d3502ba9b310cddcd8325da4b08adee26587143
client: fix invalid iterator dereference in Client::trim_caps()

trimming inode drops a reference to the inode's parent, it may cause
the inode's parent also be trimmed. If the cap iterator 'p' happens to
point to the inode's parent and the inode's parent is trimmed, the cap
iterator 'p' become invalid.

Fix the issue by delaying removing cap from the seesion cap list.
(similar to what the kclient does)

Fixes #6599
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/client/Client.cc
src/client/MetaSession.h