From: Bjørn Mork Date: Wed, 21 Nov 2012 08:54:48 +0000 (+0100) Subject: megaraid_sas: fix memory leak if SGL has zero length entries X-Git-Tag: v3.2.49~14 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0465278f3154d76363fa886c0602b4255100cc05;p=pandora-kernel.git megaraid_sas: fix memory leak if SGL has zero length entries commit 7a6a731bd00ca90d0e250867c3b9c05b5ff0fa49 upstream. commit 98cb7e44 ([SCSI] megaraid_sas: Sanity check user supplied length before passing it to dma_alloc_coherent()) introduced a memory leak. Memory allocated for entries following zero length SGL entries will not be freed. Reference: http://bugs.debian.org/688198 Signed-off-by: Bjørn Mork Acked-by: Adam Radford Signed-off-by: James Bottomley Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed