]> git.baikalelectronics.ru Git - kernel.git/commit
libata: fix off-by-one error in ata_tf_read_block()
authorTejun Heo <htejun@gmail.com>
Sun, 16 Aug 2009 12:21:21 +0000 (21:21 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 9 Sep 2009 01:18:03 +0000 (21:18 -0400)
commitf60f5ea6e37ff1ebbaf28cac5a83d57e0aef41c4
tree056d44a2b81151a42f4ac31df1ae9f90483e220f
parentf26f0bfba0ce04206d1d462c43c5ed1ed39f514c
libata: fix off-by-one error in ata_tf_read_block()

ata_tf_read_block() has off-by-one error when converting CHS address
to LBA.  The bug isn't very visible because ata_tf_read_block() is
used only when generating sense data for a failed RW command and CHS
addressing isn't used too often these days.

This problem was spotted by Atsushi Nemoto.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c