public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* proto_unregister sleeps while atomic
@ 2005-09-06 22:26 Daniele Orlandi
  2005-09-06 23:02 ` Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Daniele Orlandi @ 2005-09-06 22:26 UTC (permalink / raw)
  To: linux-kernel


I'm looking at proto_unregister() in linux-2.6.13:

Il calls kmem_cache_destroy() while holding proto_list_lock:

void proto_unregister(struct proto *prot)
{
        write_lock(&proto_list_lock);

        if (prot->slab != NULL) {
                kmem_cache_destroy(prot->slab);


However, kmem_cache_destroy() may sleep:

int kmem_cache_destroy (kmem_cache_t * cachep)
{
         int i;
 
         if (!cachep || in_interrupt())
                BUG();
 
         /* Don't let CPUs to come and go */
         lock_cpu_hotplug();

        /* Find the cache in the chain of caches. */
        down(&cache_chain_sem);
        ^^^^^^^^^^^^^^^^^^^^^^^

Am I seeing it right?

Bye,

-- 
  Daniele Orlandi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-07  2:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 22:26 proto_unregister sleeps while atomic Daniele Orlandi
2005-09-06 23:02 ` Patrick McHardy
2005-09-06 23:07   ` David S. Miller
2005-09-06 23:42     ` Patrick McHardy
2005-09-07  2:48       ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox