Re: [CFT][PATCH] cdrom-related rmmod races

Christoph Hellwig (hch@caldera.de)
Tue, 23 Oct 2001 15:42:18 +0200


On Tue, Oct 23, 2001 at 07:14:27AM -0400, Alexander Viro wrote:
>
>
> On Tue, 23 Oct 2001, Christoph Hellwig wrote:
>
> > Wouldn't it be easier to add a 'struct module *owner' to struct
> > block_device_operations?
>
> All of them share (in the current tree) block_device_operations -
> cdrom_fops from drivers/cdrom/cdrom.c. What will you put as
> ->owner there?

Of course they would have to have their own block_device_operations as
well - but they could continue to use the common open method.

Also this would allow to get rid of the MOD_{INC,DEC}_USE_COUNT in the
blockdrivers and thus make it easier for driver writers to create races.

Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.
-
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/