Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=acd054a5ef401e03e0047b487e572442614f81e5
Commit:     acd054a5ef401e03e0047b487e572442614f81e5
Parent:     5336940dd8b11180a0340ba886db62f728377d19
Author:     Anton Blanchard <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 13:59:44 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Mon Oct 29 09:18:03 2007 +0100

    Initialise scatter/gather list in ata_sg_setup
    
    After turning on DEBUG_SG I hit a fail:
    
    kernel BUG at include/linux/scatterlist.h:50!
    
        ata_qc_issue
        ata_scsi_translate
        ipr_queuecommand
        scsi_dispatch_cmd
        scsi_request_fn
        elv_insert
        blk_execute_rq_nowait
        blk_execute_rq
        sg_io
        scsi_cmd_ioctl
        cdrom_ioctl
        sr_block_ioctl
        blkdev_driver_ioctl
        blkdev_ioctl
        block_ioctl
        do_ioctl
        vfs_ioctl
        sys_ioctl
        sg_ioctl_trans
    
    It looks like ata_sg_setup is working on an uninitialised sg table. Call
    sg_init_table to initialise it before use.
    
    Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
    
    Note: this patch will fix it, but you could also get away with just
    doing the sg_init_table() once at qc creation time.
    
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 drivers/ata/libata-core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 081e3df..7ef515b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4689,6 +4689,7 @@ static int ata_sg_setup(struct ata_queued_cmd *qc)
                 * data in this function or read data in ata_sg_clean.
                 */
                offset = lsg->offset + lsg->length - qc->pad_len;
+               sg_init_table(psg, 1);
                sg_set_page(psg, nth_page(sg_page(lsg), offset >> PAGE_SHIFT),
                                qc->pad_len, offset_in_page(offset));
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to