All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: module unload deadlock
Date: Wed, 18 Feb 2004 18:57:15 +0100	[thread overview]
Message-ID: <20040218175715.GG4478@dualathlon.random> (raw)
In-Reply-To: <20040218173740.GB31035@parcelfarce.linux.theplanet.co.uk>

On Wed, Feb 18, 2004 at 05:37:41PM +0000, viro@parcelfarce.linux.theplanet.co.uk wrote:
> On Wed, Feb 18, 2004 at 06:24:46PM +0100, Andrea Arcangeli wrote:
> > The one you propose (of parport_pc keeping track of the ports by itself)
> > is a different model, currently it's the highlevel that keeps track of
> > the ports and each lowlevel registers the lowlevel ports in the
> > highlevel list of ports. It doesn't mean the current model is wrong. You
> > may not like it and you may find it less efficient, or less clean, or
> > whatever, but the current model is definitely legitimate (the parport
> > code has the troubles you found in the sharing code locking, but this
> > registration model you're complaining about now is legitimate instead).
> 
> RTFS.  And realize that parport_enumerate() exports the damn list with no
> protection whatsoever.  It is broken and it always had been broken.

it has not always had been broken, it was was serialized by the BKL when
I worked on that code the last time ;) (so it wasn't broken in 2.2, just nobody
fixed the locking when the kernel kept evolving)

the smp safety is broken, but the model is not obviously broken as you
claim. the locking of the list could be fixed simply with a
parport_lock spinlock or semaphore or whatever like that, you may prefer
to fix it differently keeping the list local in the lowlevel and
protected it to a private lock to parport_pc instead of making it
visible and exporting hte lock too, I'm just saying that part of the
code was legitimate at least in 2.2.

      reply	other threads:[~2004-02-18 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-17 17:26 module unload deadlock Andrea Arcangeli
2004-02-18  3:29 ` Rusty Russell
2004-02-18  4:35   ` viro
2004-02-18 15:40     ` Andrea Arcangeli
2004-02-18 16:46       ` viro
2004-02-18 17:24         ` Andrea Arcangeli
2004-02-18 17:37           ` viro
2004-02-18 17:57             ` Andrea Arcangeli [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=20040218175715.GG4478@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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.