Skip to contentSkip to conversation

dm-snap-persistent: chunk_io doesn't call destroy_work_on_stack in 3.10.76

DISCUSSION Akira Hayakawa 2 participants 2 messages May 8, 2015 – May 10, 2015 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi,

I am looking at 3.10.76 kernel and found that chunk_io function of dm-snap-persistent doesn't call destroy_work_on_stack to pair with INIT_WORK_ON_STACK.

        INIT_WORK_ONSTACK(&req.work, do_metadata);
        queue_work(ps->metadata_wq, &req.work);
        flush_workqueue(ps->metadata_wq);
        // I think you need it here
 
        return req.result;

Is it not buggy?

- Akira

#1 lore raw
Quoted 6 lines · Akira Hayakawa

Hi,

I am looking at 3.10.76 kernel and found that chunk_io function of dm-snap-persistent doesn't call destroy_work_on_stack to pair with INIT_WORK_ON_STACK.

Quoted 8 lines
        INIT_WORK_ONSTACK(&req.work, do_metadata);
        queue_work(ps->metadata_wq, &req.work);
        flush_workqueue(ps->metadata_wq);
        // I think you need it here
 
        return req.result;

Is it not buggy?

commit c1a6416021b311fdb5b98e40ed8b29508845ed16

Author: Chuansheng Liu <[email protected]>
Date:   Tue Jan 7 16:56:18 2014 +0800

dm snapshot: call destroy_work_on_stack() to pair with INIT_WORK_ONSTACK()

In case CONFIG_DEBUG_OBJECTS_WORK is defined, it is needed to call destroy_work_on_stack() which frees the debug object to pair with INIT_WORK_ONSTACK().

Thanks
Minfei

Quoted 7 lines

- Akira

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel