Re: 2.6.8-rc2-mm1

From: Peter Osterlund
Date: Wed Jul 28 2004 - 14:39:04 EST


Andrew Morton <akpm@xxxxxxxx> writes:

> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.8-rc2/2.6.8-rc2-mm1/
[...]
> Changes since 2.6.8-rc1-mm1:
[...]
> +control-pktcdvd-with-an-auxiliary-character-device.patch
> +control-pktcdvd-with-an-auxiliary-character-device-fix.patch
>
> CDRW/DVDRW packet writing updates

The control-pktcdvd-with-an-auxiliary-character-device patch
introduced a door locking bug.

pktsetup, mount, umount -> door remains locked.

The problem is that pktsetup opens the cdrom device in non-blocking
mode, which doesn't lock the door. mount then opens the cdrom device
again in blocking mode, which does lock the door. umount closes the
blocking mode open, but the door remains locked, because
cdrom.c:cdrom_release() only unlocks the door on the last release, it
doesn't care that the only remaining open is non-blocking.

Signed-off-by: Peter Osterlund <petero2@xxxxxxxxx>
---

linux-petero/drivers/block/pktcdvd.c | 2 ++
1 files changed, 2 insertions(+)

diff -puN drivers/block/pktcdvd.c~packet-door-unlock drivers/block/pktcdvd.c
--- linux/drivers/block/pktcdvd.c~packet-door-unlock 2004-07-26 17:36:21.425126472 +0200
+++ linux-petero/drivers/block/pktcdvd.c 2004-07-26 17:36:21.442123888 +0200
@@ -1981,6 +1981,8 @@ static void pkt_release_dev(struct pktcd
if (flush && pkt_flush_cache(pd))
DPRINTK("pktcdvd: %s not flushing cache\n", pd->name);

+ pkt_lock_door(pd, 0);
+
q = bdev_get_queue(pd->bdev);
pkt_set_speed(pd, 0xffff, 0xffff);
spin_lock_irq(q->queue_lock);
_

--
Peter Osterlund - petero2@xxxxxxxxx
http://w1.894.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/