]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf
authorIgor Pylypiv <ipylypiv@google.com>
Tue, 2 Jul 2024 02:47:35 +0000 (02:47 +0000)
committerNiklas Cassel <cassel@kernel.org>
Wed, 3 Jul 2024 08:51:41 +0000 (10:51 +0200)
commit816be86c7993d3c5832c3017c0056297e86f978c
tree140505fb977f8bbd4f06df542aec378d1f006eb9
parent18676c6aab0863618eb35443e7b8615eea3535a9
ata: libata-scsi: Check ATA_QCFLAG_RTF_FILLED before using result_tf

qc->result_tf contents are only valid when the ATA_QCFLAG_RTF_FILLED flag
is set. The ATA_QCFLAG_RTF_FILLED flag should be always set for commands
that failed or for commands that have the ATA_QCFLAG_RESULT_TF flag set.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Link: https://lore.kernel.org/r/20240702024735.1152293-8-ipylypiv@google.com
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-scsi.c