]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: Locker: fix a NULL deref in _update_cap_fields 2681/head
authorGreg Farnum <greg@inktank.com>
Thu, 9 Oct 2014 22:12:19 +0000 (15:12 -0700)
committerGreg Farnum <greg@inktank.com>
Thu, 9 Oct 2014 22:15:15 +0000 (15:15 -0700)
commit2afb6febdd8482b8fec5890d79944d656faf1382
tree2f3e1faf8111a5de0744481d2d0665dbea287599
parentfd20a1d01bde67fb1edc6058e38435af9d5d6abc
mds: Locker: fix a NULL deref in _update_cap_fields

The MClientCaps* is allowed to be NULL, so we can't deref it unless
the dirty param is non-zero. So don't do the ahead-of-time lookup;
just call it explicitly in the if block.

Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 3cd8a7fb9683577a7d6e934f18c29b7e84415be6)
src/mds/Locker.cc