Project

General

Profile

Actions

Bug #4912

closed

rbd: fix leak of format 2 snapshot context

Added by Alex Elder almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When rbd_dev_v2_refresh() is called, the rbd device already has a
snapshot context associated with it. But that never gets freed,
the pointer just gets overwritten.

Fix this by dropping the rbd device's reference to the snapshot
context before overwriting the pointer.

Because ceph_put_snap_context() already handles for a null pointer
we don't need to check for that (for the probe case, where no
context has yet been assigned).

Signed-off-by: Alex Elder <>

Actions #1

Updated by Alex Elder almost 11 years ago

  • Status changed from In Progress to Fix Under Review

The following has been posted for review:

[PATCH] rbd: fix leak of format 2 snapshot context

Actions #2

Updated by Alex Elder almost 11 years ago

The following has been committed to the "testing-next"
branch of the ceph-client git repository. I am holding
off committing it to "testing" until after the Linux 3.10
merge window closes, as requested by Stephen Rothwell
(who does linux-next).

49ece554 rbd: fix leak of format 2 snapshot context

(Technically Josh didn't signal he reviewed this. I
pinged him, and will update this issue if he says
he has any problem with it.)

Actions #3

Updated by Alex Elder almost 11 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF