Bug 1420462 - thin-pool target usage leaves kmemleak reported leaks
Summary: thin-pool target usage leaves kmemleak reported leaks
Keywords:
Status: ASSIGNED
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: device-mapper
Version: 2.02.169
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Mike Snitzer
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-08 17:52 UTC by Zdenek Kabelac
Modified: 2019-10-07 10:07 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
rule-engine: lvm-technical-solution?


Attachments (Terms of Use)

Description Zdenek Kabelac 2017-02-08 17:52:36 UTC
Description of problem:

No sure how real this issue is - but with lvm2 test suite run we kmemleak couple of this elements per each run.

unreferenced object 0xffff8bbcbad71f00 (size 256):
  comm "kworker/u4:2", pid 5875, jiffies 4298404175 (age 413.812s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [<ffffffff8b9471ca>] kmemleak_alloc+0x4a/0xa0
    [<ffffffff8b28be2e>] kmem_cache_alloc+0x14e/0x2e0
    [<ffffffff8b21529d>] mempool_alloc_slab+0x1d/0x30
    [<ffffffff8b215019>] mempool_alloc+0x79/0x1e0
    [<ffffffff8b4572e7>] bio_alloc_bioset+0xa7/0x270
    [<ffffffffc02ec48a>] process_prepared_discard_passdown_pt1+0x7a/0x180 [dm_thin_pool]
    [<ffffffffc02eb38c>] process_discard_cell_passdown+0x15c/0x1e0 [dm_thin_pool]
    [<ffffffffc02e9821>] process_discard_bio+0xc1/0xf0 [dm_thin_pool]
    [<ffffffffc02ee7a1>] do_worker+0x781/0x900 [dm_thin_pool]
    [<ffffffff8b0d4d80>] process_one_work+0x260/0x750
    [<ffffffff8b0d52be>] worker_thread+0x4e/0x4a0
    [<ffffffff8b0dcacc>] kthread+0x12c/0x150
    [<ffffffff8b956fc1>] ret_from_fork+0x31/0x40
    [<ffffffffffffffff>] 0xffffffffffffffff


Version-Release number of selected component (if applicable):
Kernel  4.10-rc6

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Zdenek Kabelac 2017-04-18 07:59:23 UTC
Patch suggested with:

https://www.redhat.com/archives/dm-devel/2017-April/msg00286.html
(with full headers)

--
 drivers/md/dm-thin.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 2b266a2..5742e5e 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1069,6 +1069,7 @@ static void passdown_endio(struct bio *bio)
 	 * to unmap (we ignore err).
 	 */
 	queue_passdown_pt2(bio->bi_private);
+	bio_put(bio);
 }


Note You need to log in before you can comment on or make changes to this bug.