]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SCSI: megaraid_sas: fix memory leak if SGL has zero length entries
authorBjørn Mork <bjorn@mork.no>
Wed, 21 Nov 2012 08:54:48 +0000 (09:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2013 23:18:45 +0000 (16:18 -0700)
commitd45ff5f89c087a667290048c24deaeb27fa43ba0
tree46e4202e003c90407e153ba066c2de019b7310ea
parenta4c38fde90666a77d461fd352914f954232361ab
SCSI: 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 <bjorn@mork.no>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/megaraid/megaraid_sas_base.c