scsi: Protect against buffer possible overflow in scsi_set_sense_information
[firefly-linux-kernel-4.4.55.git] / include / scsi / scsi_common.h
index 156d673db900c3c167fa4f836033c7f6ac98a54b..11571b2a831e3e7d223e7dcc17b36146d537e457 100644 (file)
@@ -62,7 +62,7 @@ extern bool scsi_normalize_sense(const u8 *sense_buffer, int sb_len,
                                 struct scsi_sense_hdr *sshdr);
 
 extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq);
-extern void scsi_set_sense_information(u8 *buf, u64 info);
+int scsi_set_sense_information(u8 *buf, int buf_len, u64 info);
 extern const u8 * scsi_sense_desc_find(const u8 * sense_buffer, int sb_len,
                                       int desc_type);