public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy TARREAU <willy@w.ods.org>
To: "jürgen baumann" <jbaumann@is-kassel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.33pre1 kernel/sysctl.c missing spin_unlock()
Date: Thu, 5 Jan 2006 23:07:19 +0100	[thread overview]
Message-ID: <20060105220719.GA618@w.ods.org> (raw)
In-Reply-To: <43BD3AB7.9020003@is-kassel.org>

On Thu, Jan 05, 2006 at 04:26:47PM +0100, jürgen baumann wrote:
> possibly fixed yet, but maybe not:
> 
> in above patch there was a spinlock(&sysctl_lock) added in 
> function do_register_sysctl_table(), but no corresponding 
> spin_unlock() before return.
> 
> after starting the new kernel (unfortunately with further 
> patches), it hangs on trying to start the kswapd-thread.
> 
> after inserting the spin_unlock() all run fine.

Can you be more specific ? First, there's no function named
like this in 2.4.33-pre1. The most approaching change I can
find lies in kernel/sysctl.c:register_sysctl_table() and this
one uses valid locking :

struct ctl_table_header *register_sysctl_table(ctl_table * table, 
                                               int insert_at_head)
{
        struct ctl_table_header *tmp;
        tmp = kmalloc(sizeof(struct ctl_table_header), GFP_KERNEL);
        if (!tmp)
                return NULL;
        tmp->ctl_table = table;
        INIT_LIST_HEAD(&tmp->ctl_entry);
        tmp->used = 0;
        tmp->unregistering = NULL;
===>    spin_lock(&sysctl_lock);
        if (insert_at_head)
                list_add(&tmp->ctl_entry, &root_table_header.ctl_entry);
        else
                list_add_tail(&tmp->ctl_entry, &root_table_header.ctl_entry);
===>    spin_unlock(&sysctl_lock);
#ifdef CONFIG_PROC_FS
        register_proc_table(table, proc_sys_root, tmp);
#endif
        return tmp;
}

So possibly you found one real bug, but please tell us where you
had to patch !

Thanks in advance,
Willy


      reply	other threads:[~2006-01-05 22:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-05 15:26 2.4.33pre1 kernel/sysctl.c missing spin_unlock() jürgen baumann
2006-01-05 22:07 ` Willy TARREAU [this message]

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=20060105220719.GA618@w.ods.org \
    --to=willy@w.ods.org \
    --cc=jbaumann@is-kassel.org \
    --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