libata: Avoid overflow in libata when tf->hba_lbal > 127
authorChuck Ebbert <cebbert@redhat.com>
Fri, 21 Nov 2008 23:23:34 +0000 (18:23 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 5 Dec 2008 18:55:20 +0000 (10:55 -0800)
commit0d34e251e22ac0899897842a7495a84fa953ce55
tree7c71e1d4a4da4bd97a27bb6d32ffe28fa6832eb7
parent1276c95fe2a0ac95de7ff511296f01964bd73e38
libata: Avoid overflow in libata when tf->hba_lbal > 127

Combination of these two upstream patches:

ba14a9c291aa867896a90b3571fcc1c3759942ff
libata: Avoid overflow in ata_tf_to_lba48() when tf->hba_lbal > 127

44901a96847b9967c057832b185e2f34ee6a14e5
libata: Avoid overflow in ata_tf_read_block() when tf->hba_lbal > 127

Originally written by Roland Dreier, but backported by Chuck.

Cc: Roland Dreier <rdreier@cisco.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/libata-core.c