Skip to content
Commit d136f2ef authored by Alasdair G Kergon's avatar Alasdair G Kergon
Browse files

dm kcopyd: fix job_pool leak



Fix memory leak introduced by commit a6e50b40
(dm snapshot: skip reading origin when overwriting complete chunk).

When allocating a set of jobs from kc->job_pool, job->master_job must be
set (to point to itself) so that the mempool item gets freed when the
master_job completes.

master_job was introduced by commit c6ea41fb
(dm kcopyd: preallocate sub jobs to avoid deadlock)

Reported-by: default avatarMichael Leun <ml@newton.leun.net>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
parent 899e3ee4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment