]> www.infradead.org Git - nvme.git/commit
s390/dasd: Fix invalid dereferencing of indirect CCW data pointer
authorStefan Haberland <sth@linux.ibm.com>
Wed, 3 Jul 2024 09:23:12 +0000 (11:23 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 3 Jul 2024 14:27:06 +0000 (16:27 +0200)
commitb3a58f3b90f564f42a5c35778d8c5107b2c2150b
tree75d655b3b6cbc27df1fac36c661fd5297b9f1cd1
parent2ae157ec497d93c639a60e730e21ec9c66fa9a6e
s390/dasd: Fix invalid dereferencing of indirect CCW data pointer

Fix invalid dereferencing of indirect CCW data pointer in
dasd_eckd_dump_sense() that leads to a kernel panic in error cases.

When using indirect addressing for DASD CCWs (IDAW) the CCW CDA pointer
does not contain the data address itself but a pointer to the IDAL.
This needs to be translated from physical to virtual as well before
using it.

This dereferencing is also used for dasd_page_cache and also fixed
although it is very unlikely that this code path ever gets used.

Fixes: c0bd39601c13 ("s390/dasd: use new address translation helpers")
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/block/dasd_eckd.c
drivers/s390/block/dasd_fba.c