]> git.hungrycats.org Git - linux/commit
SCSI: sd: handle bad lba in sense information
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 2 Feb 2008 22:06:23 +0000 (16:06 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Feb 2008 00:18:34 +0000 (16:18 -0800)
commitc5ae77d37bde1e9b2db48026f6a483a7fd08c076
tree2c0ceb0e564f3fb2b97f9c8f2c9c47aabea3221a
parent0a2395cc34d5d170a6597c41435de9199f187437
SCSI: sd: handle bad lba in sense information

patch 366c246de9cec909c5eba4f784c92d1e75b4dc38 in mainline.

Some devices report medium error locations incorrectly.  Add guards to
make sure the reported bad lba is actually in the request that caused
it.  Additionally remove the large case statment for sector sizes and
replace it with the proper u64 divisions.

Tested-by: Mike Snitzer <snitzer@gmail.com>
Cc: Stable Tree <stable@kernel.org>
Cc: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/sd.c