HomeFreeBSD

Properly destroy work items in spl_kmem_cache_destroy()

Description

Properly destroy work items in spl_kmem_cache_destroy()

In a non-debug build the ASSERT() would be optimized away
which could cause pending work items to not be cancelled.

We must also use cancel_delayed_work_sync() rather than just
cancel_delayed_work() to actually wait until work items have
completed. Otherwise they might accidentally access free'd
memory.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes ZFS bugs #279, #62, #363, #418

Details

Provenance
Gunnar Beutner <gunnar@beutner.name>Authored on Oct 11 2011, 4:59 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 11 2011, 4:59 PM
Parents
rG763b2f3b57af: Fixed invalid resource re-use in file_find()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG64c075c3f438: Properly destroy work items in spl_kmem_cache_destroy() (authored by Gunnar Beutner <gunnar@beutner.name>).Oct 11 2011, 4:59 PM