]> git.proxmox.com Git - mirror_spl-debian.git/commit
Fix kmem:slab_overcommit regression test locking
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Dec 2009 20:46:11 +0000 (12:46 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Dec 2009 20:46:11 +0000 (12:46 -0800)
commit641bebe35f0675489357fd2db5d20e1bfc055648
treec827bda35e078b0cd338b8e2726bf6795e15b058
parent3a03ce5cbf61def830905dfab0f43d5b6074f921
Fix kmem:slab_overcommit regression test locking

This regression test could crash in splat_kmem_cache_test_reclaim()
due to a race between the slab relclaim and the normal exiting of
the thread.  Specifically, the kct structure could be free'd by
the thread performing the allocations while the reclaim function
was also working on that's threads kct structure.  The simplest
fix is to extend the kcp->kcp_lock over the reclaim to prevent
the kct from being freed.  A better fix would be to ref count
these structures, but since is just a regression this locking
change is enough.  Surprisingly this was only observed commonly
under RHEL5.4 but all platform could have hit this.
module/splat/splat-kmem.c