Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ea312552e94883efc42cfa4651bcf964f3110564 Commit: ea312552e94883efc42cfa4651bcf964f3110564 Parent: 6b7f123f378743d739377871c0cbfbaf28c7d25a Author: FUJITA Tomonori <[EMAIL PROTECTED]> AuthorDate: Mon Aug 6 00:31:24 2007 +0900 Committer: James Bottomley <[EMAIL PROTECTED]> CommitDate: Fri Oct 12 14:38:28 2007 -0400
[SCSI] sg: increase sglist_len of the sg_scatter_hold structure unsigned short is too small for sizeof(struct scatterlist) * min(q->max_hw_segments, q->max_phys_segments). This fixes memory leak with 4096 segments since 16 (likely sg size with x86) * 4096 sets sglist_len to zero. This might not happen without sg chaining support. Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]> Acked-by: Douglas Gilbert <[EMAIL PROTECTED]> Signed-off-by: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/sg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 85d3894..fdc6618 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -114,7 +114,7 @@ static struct class_interface sg_interface = { typedef struct sg_scatter_hold { /* holding area for scsi scatter gather info */ unsigned short k_use_sg; /* Count of kernel scatter-gather pieces */ - unsigned short sglist_len; /* size of malloc'd scatter-gather list ++ */ + unsigned sglist_len; /* size of malloc'd scatter-gather list ++ */ unsigned bufflen; /* Size of (aggregate) data buffer */ unsigned b_malloc_len; /* actual len malloc'ed in buffer */ struct scatterlist *buffer;/* scatter list */ - 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