Locking around kmem_cache_destroy

Hi There,

I want to make sure that kmem_cache_alloc is not called concurrently with kmem_cache_destroy on module exit and I want be able to use GFP_KERNEL for the kmem_cache_alloc calls.

Would a read/write lock be good fro this purpose or is there another method I should be using?

Regards,
Brendan