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

    Initialise scatter/gather list in sg driver
    
    After turning on DEBUG_SG I hit a fail:
    
    kernel BUG at include/linux/scatterlist.h:50!
    
        sg_build_indirect
        sg_build_reserve
        sg_open
        chrdev_open
        __dentry_open
        do_filp_open
        do_sys_open
    
    We should initialise the sg list when we allocate it in sg_build_sgat.
    
    Signed-off-by: Anton Blanchard <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 drivers/scsi/sg.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index b5fa4f0..f1871ea 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1652,6 +1652,7 @@ sg_build_sgat(Sg_scatter_hold * schp, const Sg_fd * sfp, 
int tablesize)
        schp->buffer = kzalloc(sg_bufflen, gfp_flags);
        if (!schp->buffer)
                return -ENOMEM;
+       sg_init_table(schp->buffer, tablesize);
        schp->sglist_len = sg_bufflen;
        return tablesize;       /* number of scat_gath elements allocated */
 }
-
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