From: Erik de Castro Lopo <nospam@mega-nerd.com>
To: linux-kernel@vger.kernel.org
Subject: midi device release function not being called
Date: Sun, 30 Dec 2001 13:07:23 +1100 [thread overview]
Message-ID: <20011230130723.1f27a83f.nospam@mega-nerd.com> (raw)
Hi People,
I'm trying to track down a problem in the es1371 midi driver. The problem
is that when /dev/midi is opened with O_NONBLOCK and the file is closed
when there is still data in the output buffer something in the driver
gets locked up preventing all further opens of the device. The error
returned by open is "Device or resource busy".
Having a look around in the driver I added a printk statement to the
top of the es1371_midi_release() function and found that this function
is never called. I would have expected this to be called in at least
one of the following situations:
- The device is close()ed
- The driver is mod unloaded
Adding a printk statement to the es1371_midi_open() function works as
expected. Is there a reason why the release function is not called?
This is on linux-2.4.16 on an SMP machine. I have also tried 2.2.20 and
found the same problem (file opened O_NONBLOCK and closed with data still
in the output buffer) there.
Can someone please shed some light on this?
Cheers,
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"The whole principle is wrong; it's like demanding that grown men live on
skim milk because the baby can't eat steak."
- author Robert A. Heinlein on censorship.
next reply other threads:[~2001-12-30 2:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-30 2:07 Erik de Castro Lopo [this message]
2001-12-30 10:01 ` Alan Cox
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=20011230130723.1f27a83f.nospam@mega-nerd.com \
--to=nospam@mega-nerd.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome