If dm-thin device is created with unknown device id, the code calls
dm_put(pool_md) twice. As a consequence, the reference count underflows
and causes deadlock on device removal.
r = dm_pool_open_thin_device(tc->pool->pmd, tc->dev_id, &tc->td);
if (r) {
@@ -2044,6 +2043,8 @@ static int thin_ctr(struct dm_target *ti
ti->num_discard_requests = 0;
ti->discards_supported = 0;
+ dm_put(pool_md);
+
return 0;
bad_thin_open:
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
08-04-2011, 03:55 PM
Mike Snitzer
dm-thin: Fix deadlock with unknown device id
On Thu, Aug 04 2011 at 11:35am -0400,
Mikulas Patocka <mpatocka@redhat.com> wrote:
> dm-thin: Fix deadlock with unknown device id
>
> If dm-thin device is created with unknown device id, the code calls
> dm_put(pool_md) twice. As a consequence, the reference count underflows
> and causes deadlock on device removal.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
My fault. Thanks Mikulas.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel