]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: megaraid_sas: reduce size of fusion_context and use kmalloc for allocation
authorSumit Saxena <sumit.saxena@broadcom.com>
Thu, 1 Mar 2018 11:18:16 +0000 (06:18 -0500)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 8 Mar 2018 02:44:07 +0000 (18:44 -0800)
commit9a7a01dd90e105eb1ddaa8a4af12b4f230d2cd14
tree98c7e4a4b377f34b9765e8de823d614d74c62b0a
parent71012eb979bafff1ea5ebaa635a118a3628eb494
scsi: megaraid_sas: reduce size of fusion_context and use kmalloc for allocation

fusion_context structure is very large around 180kB and most of the size
is contributed by log_to_span array. Move log_to_span out of fusion
context and have separate allocation for log_to_span. And use kmalloc to
allocate fusion_context.  Currently kmemleak reports 1000s of false
positives for fusion->cmd_list[]. kmemleak does not track page
allocation for fusion_context. This change will also fix the false
positives reported by kmemleak.

Ref: https://marc.info/?l=linux-scsi&m=150545293900917

Rebased for UEK kernel.

Reported-by: Shu Wang <shuwang@redhat.com>
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Orabug: 27625001
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas.h
drivers/scsi/megaraid/megaraid_sas_fusion.c
drivers/scsi/megaraid/megaraid_sas_fusion.h