Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e637d553 authored by Robert Jennings's avatar Robert Jennings Committed by James Bottomley
Browse files

[SCSI] ibmvscsi: Correct DMA mapping leak



The ibmvscsi client driver is not unmapping the SCSI command after
encountering a DMA mapping error while trying to map an indirect
scattergather list for the event pool.  This leads to a leak of DMA
entitlement that could result in the device failing future DMA operations
in a CMO environment.

Signed-off-by: default avatarRobert Jennings <rcj@linux.vnet.ibm.com>
Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 4c098bcd
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -432,6 +432,7 @@ static int map_sg_data(struct scsi_cmnd *cmd,
				sdev_printk(KERN_ERR, cmd->device,
				sdev_printk(KERN_ERR, cmd->device,
				            "Can't allocate memory "
				            "Can't allocate memory "
				            "for indirect table\n");
				            "for indirect table\n");
			scsi_dma_unmap(cmd);
			return 0;
			return 0;
		}
		}
	}
	}