mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniele Orlandi <daniele@orlandi.com>
To: linux-kernel@vger.kernel.org
Subject: proto_unregister sleeps while atomic
Date: Wed, 7 Sep 2005 00:26:34 +0200	[thread overview]
Message-ID: <200509070026.34999.daniele@orlandi.com> (raw)


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

             reply	other threads:[~2005-09-06 22:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06 22:26 Daniele Orlandi [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200509070026.34999.daniele@orlandi.com \
    --to=daniele@orlandi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®