]> granicus.if.org Git - spl/commit
Fix --enable-debug-kmem-tracking option
authorTim Chase <tim@chase2k.com>
Fri, 31 May 2013 02:52:36 +0000 (21:52 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 18 Jun 2013 18:40:33 +0000 (11:40 -0700)
commit5c7a0369e225d306e53bd8011c58fa0f5e827865
tree42693eaddc7a844ecdc5af951338779c8cfcb195
parent99c452bbbaeaa8fae498da1774d81e146bdd45ed
Fix --enable-debug-kmem-tracking option

Re-order initialization in spl_kmem_init to allow for kmem tracing
to work.  The spl_kmem_init function calls taskq_create prior to
initializing the tracking (calling spl_kmem_init_tracking).  Since
taskq_create uses kmem_alloc, NULL dereferences occur because the
global kmem_list hasn't had its next & prev pointers initialized yet.

This commit moves the calls to spl_kmem_init_tracking earlier in the
spl_kmem_init function in order that the subsequent kmem_alloc calls
(by taskq_create) work properly.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #243
module/spl/spl-kmem.c