]> bbs.cooldavid.org Git - net-next-2.6.git/commit
[SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure
authorBrian King <brking@linux.vnet.ibm.com>
Thu, 22 Jan 2009 21:45:38 +0000 (15:45 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 25 Jan 2009 14:14:53 +0000 (08:14 -0600)
commit64b840dd88eb2054f86c72ed6d989cb8681f0058
treee6088041690abbd2fbf96fc8899dcd0620a60a38
parentf9932deb9900789ee0b5739c118f850d62e3b9b1
[SCSI] ibmvfc: Fix DMA mapping leak on memory allocation failure

There is currently a DMA mapping leak that can occur in the ibmvfc
driver if we fail to allocate a scatterlist. Fix this by unmapping
the scatterlist in the failure path. Additionally, only log an error
for a scatterlist allocation failure if the log level is greater
than the default, since this can occur when running Active Memory
Sharing and this is not considered an error.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/ibmvscsi/ibmvfc.c