From: Peter Osterlund <petero2@telia.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH][CFT] CDRW/DVD packet writing data corruption fix
Date: 15 May 2005 11:03:44 +0200 [thread overview]
Message-ID: <m3wtq0svwv.fsf@telia.com> (raw)
I found a bug in the packet writing driver that could cause data
corruption. The problem arised if the driver got a write request for a
sector in a "zone" it was already working on. In that case it was
supposed to queue the write request until it was done processing
earlier requests for the same zone, and instead work on some other
zone in the mean time. However, if there was no other zone to work on,
the driver would initiate two packet_data objects for the same zone,
causing unpredictable things to happen.
I haven't tested this as much as I want yet, so I don't know if there
are more data corruption bugs in the driver. Test reports would be
appreciated.
Signed-off-by: Peter Osterlund <petero2@telia.com>
---
linux-petero/drivers/block/pktcdvd.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
diff -puN drivers/block/pktcdvd.c~packet-corruption-fix drivers/block/pktcdvd.c
--- linux/drivers/block/pktcdvd.c~packet-corruption-fix 2005-05-15 10:53:00.000000000 +0200
+++ linux-petero/drivers/block/pktcdvd.c 2005-05-15 10:53:00.000000000 +0200
@@ -926,8 +926,10 @@ static int pkt_handle_queue(struct pktcd
bio = node->bio;
zone = ZONE(bio->bi_sector, pd);
list_for_each_entry(p, &pd->cdrw.pkt_active_list, list) {
- if (p->sector == zone)
+ if (p->sector == zone) {
+ bio = NULL;
goto try_next_bio;
+ }
}
break;
try_next_bio:
_
--
Peter Osterlund - petero2@telia.com
http://web.telia.com/~u89404340
reply other threads:[~2005-05-15 9:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3wtq0svwv.fsf@telia.com \
--to=petero2@telia.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