Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

infernalis: objecter: potential null pointer access when do pool_snap_list. #6840

Merged
merged 2 commits into from Feb 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/osdc/Objecter.cc
Expand Up @@ -1312,6 +1312,8 @@ int Objecter::pool_snap_list(int64_t poolid, vector<uint64_t> *snaps)
RWLock::RLocker rl(rwlock);

const pg_pool_t *pi = osdmap->get_pg_pool(poolid);
if (!pi)
return -ENOENT;
for (map<snapid_t,pool_snap_info_t>::const_iterator p = pi->snaps.begin();
p != pi->snaps.end();
++p) {
Expand Down Expand Up @@ -2662,10 +2664,7 @@ int Objecter::_calc_target(op_target_t *t, epoch_t *last_force_resend, bool any
int Objecter::_map_session(op_target_t *target, OSDSession **s,
RWLock::Context& lc)
{
int r = _calc_target(target);
if (r < 0) {
return r;
}
_calc_target(target);
return _get_session(target->osd, s, lc);
}

Expand Down