SCSI tape crashes (was Re: BUG() in asm/pci.h:142 with 2.4.13)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 3 lines
Can people try out this patch? I believe this will fix the bug.
+ tb->sg[0].page = NULL;
if (tb->sg[segs].address == NULL) {
For the sake of making this clear to other kernel hackers (I got bitten by it too) - starting with 2.4.13 you must zero out the fields of struct scatterlist that you are not using. i.e. it is no longer sufficient to simply set sg.address and sg.length, because junk might still be present in the new sg.page field, and pci_map_*() will BUG() if both sg.address and sg.page are non-zero.
Regards,
Dan
Quoted 10 lines · Dan Maas
Quoted 3 lines
Can people try out this patch? I believe this will fix the bug.
+ tb->sg[0].page = NULL;
if (tb->sg[segs].address == NULL) {For the sake of making this clear to other kernel hackers (I got bitten by it too) - starting with 2.4.13 you must zero out the fields of struct scatterlist that you are not using. i.e. it is no longer sufficient to simply set sg.address and sg.length, because junk might still be present in the new sg.page field, and pci_map_*() will
BUG()if both sg.address and sg.page are non-zero.
True, perhaps we should add a init_sg or something like that.
Signature · 1 line
Jens Axboe
Re: SCSI tape crashes
Quoted 15 lines · David S. Miller
From: Jens Axboe <[email protected]>
Date: Wed, 31 Oct 2001 09:46:50 +0100How is this different from my
init_sgproposal? :-). The above looks fine to me, I just think it is important that we take care of this.My impression was that you wanted to do something like:
sgl = kmalloc(); init_sg(sgl, nents); for_each_ent() { ... existing code .. }
Quoted 2 lines
If what you really meant was semantically identicaly to what I have proposed, I'm completely in agreement with it. Please submit patches.
Yep, init_sg_entry is probably a better name... I'll hack up and submit soonish.
Signature · 1 line
Jens Axboe