From: Darrick J. Wong Date: Tue, 1 Feb 2011 02:47:54 +0000 (-0800) Subject: [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption X-Git-Tag: v2.6.38-rc6~32^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a361cc0025614fdd07f5f69aeeaa8075530870bc;p=pandora-kernel.git [SCSI] scsi_debug: Fix 32-bit overflow in do_device_access causing memory corruption If I create a scsi_debug device that is larger than 4GB, the multiplication of (block * scsi_debug_sector_size) can produce a 64-bit value. Unfortunately, the compiler sees two 32-bit quantities and performs a 32-bit multiplication, thus truncating the bits above 2^32. This causes the wrong memory location to be read or written. Change block and rest to be unsigned long long. Signed-off-by: Darrick J. Wong Acked-by: Douglas Gilbert Signed-off-by: James Bottomley --- Reading git-diff-tree failed