lkml.org 
[lkml]   [2003]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Proposed module init race fix.
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.031 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site