summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-04-04 11:43:57 +0200
committerTejun Heo <tj@kernel.org>2016-04-04 12:07:40 -0400
commitcffd1ee991c566bca937392cfacdafbe3b7b58c6 (patch)
treef4d01350ba01ddcadc90a3bb9508cd9880cc12f4 /drivers/ata/libata.h
parent5e6acd1c8c4dc9a7c16208aeac3de09151ee6233 (diff)
downloadlinux-cffd1ee991c566bca937392cfacdafbe3b7b58c6.tar.bz2
libata: sanitize ata_tf_read_block()
Return U64_MAX if ata_tf_read_block() could not decode the LBA address, and do not set the information sense descriptor in ata_gen_ata_sense() in these cases. tj: s/(u64)-1/U64_MAX/ Signed-off-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r--drivers/ata/libata.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h
index 8cfdd9616d16..507c22f7a63b 100644
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -67,7 +67,8 @@ extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev, int tag);
extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
u64 block, u32 n_block, unsigned int tf_flags,
unsigned int tag);
-extern u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev);
+extern u64 ata_tf_read_block(const struct ata_taskfile *tf,
+ struct ata_device *dev);
extern unsigned ata_exec_internal(struct ata_device *dev,
struct ata_taskfile *tf, const u8 *cdb,
int dma_dir, void *buf, unsigned int buflen,