From: Brian Gerst <bgerst@didntduck.org>
To: root@chaos.analogic.com
Cc: Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Module open() problems, Linux 2.4.0
Date: Thu, 09 Nov 2000 15:27:37 -0500 [thread overview]
Message-ID: <3A0B08B9.BE18B538@didntduck.org> (raw)
In-Reply-To: <Pine.LNX.3.95.1001109150621.15404A-100000@chaos.analogic.com>
"Richard B. Johnson" wrote:
>
> On Thu, 9 Nov 2000, Brian Gerst wrote:
>
> > "Richard B. Johnson" wrote:
> > >
> > > `lsmod` shows that a device is open twice when using Linux-2.4.0-test9
> > > when, in fact, it has been opened only once.
> > >
>
> > >
> > > When the module is closed, the use-count goes to zero as expected.
> > > However, a single open() causes the use-count to be 2.
> >
> > This is harmless. It is caused by a try_inc_mod_count(module) in the
> > function calling device_open(), which is the proper way for module
> > locking to be handled when not holding the BKL. You can keep the
> > MOD_INC_USE_COUNT in the device driver for compatability with 2.2.
> >
> > Brian Gerst
>
> This may be, as you say, "harmless". It is, however, a bug. The
> reporting must be correct or large complex systems can't be
> developed or maintained.
>
> I had two persons, working nearly a week, trying to find out
> what one of over 200 processes had a device open when only
> one was supposed to have it opened. --Err we have to check
> our work here. The fact that something "works" is not
> sufficient.
It is not a bug. The only values that matter are zero and non-zero. As
long as the refcounting is symmetric, it all comes out in the wash.
Remove the MOD_{INC,DEC}_USE_COUNT from your driver if it bothers you
that much and you don't care about 2.2 compatability.
--
Brian Gerst
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2000-11-09 20:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-09 19:00 Richard B. Johnson
2000-11-09 19:27 ` Brian Gerst
2000-11-09 20:12 ` Richard B. Johnson
2000-11-09 20:22 ` Christoph Hellwig
2000-11-09 20:27 ` Jeff Garzik
2000-11-09 20:57 ` Richard B. Johnson
2000-11-09 21:02 ` Jeff Garzik
2000-11-09 21:05 ` Christoph Hellwig
2000-11-10 0:01 ` Olaf Titz
2000-11-09 20:27 ` Brian Gerst [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=3A0B08B9.BE18B538@didntduck.org \
--to=bgerst@didntduck.org \
--cc=linux-kernel@vger.kernel.org \
--cc=root@chaos.analogic.com \
/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®