From: Dave Jones <davej@redhat.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Miller <davem@davemloft.net>,
linux-kernel@vger.kernel.org, jbaron@redhat.com
Subject: Re: frequent slab corruption (since a long time)
Date: Thu, 3 Aug 2006 13:56:13 -0400 [thread overview]
Message-ID: <20060803175613.GK22448@redhat.com> (raw)
In-Reply-To: <1154626843.23655.101.camel@localhost.localdomain>
On Thu, Aug 03, 2006 at 06:40:42PM +0100, Alan Cox wrote:
> Ar Mer, 2006-08-02 am 15:49 -0700, ysgrifennodd David Miller:
> > > None of the code manipulating tty->count seems to be under
> > > the tty_mutex. Should it be ?
> > > Or is this protected through some other means?
> >
> > It is in the primary code paths at least, all callers of init_dev()
> > (which increments tty->count) grab the mutex and also release_dev()
> > grabs the mutex around tty->count manipulations.
>
> I've been auditing tty code and its joyously bad but only in harmless
> places so far except for one.
>
> init_dev (and caller) relies on tty_mutex to ensure that the
> driver->ttys list is protected from things going away.
>
> release_mem() removes stuff from the said list and frees memory. It is
> not always called under tty_mutex and that appears very dubious to me at
> the moment although tty->closing and the BKL *might* be sufficient.
Against my better judgment I was poring over that code until the wee
hours last night, and one thing crossed my mind re: the assumptions made
about the BKL in that subsystem. Now that the BKL is preemtible, do
any of those assumptions break ?
Dave
--
http://www.codemonkey.org.uk
next prev parent reply other threads:[~2006-08-03 17:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 2:16 frequent slab corruption (since a long time) Dave Jones
2006-08-02 2:34 ` Roland Dreier
2006-08-02 3:37 ` Andi Kleen
2006-08-02 4:22 ` Dave Jones
2006-08-02 4:35 ` Andi Kleen
2006-08-02 4:46 ` Dave Jones
2006-08-02 5:05 ` David Miller
2006-08-02 5:31 ` David Miller
2006-08-02 22:23 ` Dave Jones
2006-08-02 22:49 ` David Miller
2006-08-03 17:40 ` Alan Cox
2006-08-03 17:56 ` Dave Jones [this message]
2006-08-03 20:48 ` Alan Cox
2006-08-02 23:14 ` Alan Cox
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=20060803175613.GK22448@redhat.com \
--to=davej@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=jbaron@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.