Re: cannot eject drive using pktcdvd

From: Peter Osterlund
Date: Wed Dec 29 2004 - 18:14:03 EST


Norbert Preining <preining@xxxxxxxx> writes:

> Peter Osterlund wrote:
> > I can't reproduce any of these problems on my laptop. I run FC3 and
> > kernel 2.6.10-rc3-bk6. I tried both with a USB CDRW drive and an IDE
> > DVD+RW drive.
>
> I can reproduce this problem, in fact I experienced it myself and
> disabled udftools.
>
> > More info is needed. What distribution? What kernel? And please
> > provide strace logs from eject when it fails.
>
> kernel: 2.6.10-rc3-mm1
> distribution: debian/sid
...
> open("/dev/hdc", O_RDONLY|O_NONBLOCK) = 3
> ioctl(3, CDROMEJECT, 0xbffffb68) = -1 EIO (Input/output error)

I got a similar problem on FC3, but it doesn't have anything to do
with pktcdvd. The hal daemon is leaking a file descriptor when
checking a data DVD that doesn't contain a file system.

The effect is that /dev/hdc is kept open which makes eject attempts
from non-root users fail.

Here is a patch to fix the leak. I think it will apply also to the hal
cvs tree.

--- hal-0.4.2/hald/linux/block_class_device.c.old 2004-12-29 23:51:17.200288832 +0100
+++ hal-0.4.2/hald/linux/block_class_device.c 2004-12-29 23:51:23.040401000 +0100
@@ -1055,6 +1055,7 @@
if (is_cdrom) {
/* volume_id cannot probe blank/audio discs etc,
* so don't fail for them, just set vid to NULL */
+ volume_id_close (vid);
vid = NULL;
} else {
g_object_unref (child);

--
Peter Osterlund - petero2@xxxxxxxxx
http://web.telia.com/~u89404340
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/