public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	dledford@redhat.com
Subject: Re: [PATCH] Proposed module init race fix.
Date: Fri, 17 Jan 2003 12:38:27 +1100	[thread overview]
Message-ID: <20030117123827.1abaf413.rusty@rustcorp.com.au> (raw)
In-Reply-To: <3E258DA5.4BB14A41@linux-m68k.org>

On Wed, 15 Jan 2003 17:34:45 +0100
Roman Zippel <zippel@linux-m68k.org> wrote:
> >  void add_disk(struct gendisk *disk)
> >  {
> > +       /* It needs to be accessible so we can read partitions. */
> > +       make_module_live(disk->fops->owner);
> > +
> 
> After this the module can be removed without problems.

Good catch!  The core code should hold a reference during init.  This is
fixed in the new patch.

> >         disk->flags |= GENHD_FL_UP;
> >         blk_register_region(MKDEV(disk->major, disk->first_minor), disk->minors,
> >                         NULL, exact_match, exact_lock, disk);
> 
> blk_register_region() allocates memory, which can fail?

Looks like.  But the semantics are the same as before, for better or worse. 8(

Thanks!
Rusty.
-- 
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy

  reply	other threads:[~2003-01-17  1:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-15  8:24 [PATCH] Proposed module init race fix Rusty Russell
2003-01-15 16:34 ` Roman Zippel
2003-01-17  1:38   ` Rusty Russell [this message]
2003-01-17 15:35     ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2003-01-15  8:46 Adam J. Richter
2003-01-15  9:06 ` Rusty Russell
2003-01-15 14:21 Petr Vandrovec
2003-01-16  1:48 ` Rusty Russell
2003-01-16  2:55   ` Werner Almesberger

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=20030117123827.1abaf413.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=dledford@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=zippel@linux-m68k.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