]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: PC partition tables are little endian
authorChristoph Hellwig <hch@lst.de>
Wed, 1 Oct 2014 18:31:01 +0000 (20:31 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:15:54 +0000 (11:15 +0100)
commit6754ec4215fa21b024a3ddef1ae9e0e02b1718df
treef680a5244c9d1e1b63eeb4adf57c57c05a115636
parent088760d527dc31fb7ef08ee49a8a2d73da907010
scsi: PC partition tables are little endian

As sparse correctly pointed out, scsi_partsize should use get_unaligned_le32
to read PC partition tables from disk, as they are little endian.

The result of this bug is that we returned incorrect geometries on big
endian systems when using the scsicam variant.  Which probably doesn't
matter as only old x86 systems every cared about the geometry.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/scsicam.c