From: Christoph Hellwig <hch@ns.caldera.de>
To: viro@math.psu.edu (Alexander Viro)
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [CFT][PATCH] cdrom-related rmmod races
Date: Tue, 23 Oct 2001 12:57:16 +0200 [thread overview]
Message-ID: <200110231057.f9NAvGI31569@ns.caldera.de> (raw)
In-Reply-To: <Pine.GSO.4.21.0110230640520.7440-100000@weyl.math.psu.edu>
In article <Pine.GSO.4.21.0110230640520.7440-100000@weyl.math.psu.edu> you wrote:
> Folks, patch below should fix the rmmod/open() races for
> cdrom drivers (including pcd and sr). The problem with the current
> code is that they use cdrom_open() as ->open() and bump module
> refcount only in cdrom_device_info->open() callback. cdrom_open()
> blocks before calling it, with obvious results.
> Patch is pretty straightforward - it gives these guys ->open()
> of their own that does MOD_INC_USE_COUNT and calls cdrom_open() - see
> below for examples. Please, give it a try - if there's no complaints it
> goes to Linus.
Wouldn't it be easier to add a 'struct module *owner' to struct
block_device_operations?
Christoph
--
Of course it doesn't work. We've performed a software upgrade.
next prev parent reply other threads:[~2001-10-23 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-23 10:45 Alexander Viro
2001-10-23 10:57 ` Christoph Hellwig [this message]
2001-10-23 11:14 ` Alexander Viro
2001-10-23 13:42 ` Christoph Hellwig
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=200110231057.f9NAvGI31569@ns.caldera.de \
--to=hch@ns.caldera.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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
all inboxes | Powered by JetHome®