From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8A8478C9C; Sat, 12 Sep 2026 13:43:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789220639; cv=none; b=sPCQjvN2A2ZJM/vp5xtDDRyHRxx+FLpU+hMQpNaANyKaOrw4KXxqAwpEm7WHBh2bsymUzaC6aCTlS8fX5McufaNobct823O06JZ5hiBBqo5oYweLRrTodVvhIgk/ot/cyVtVZ19TnHKLwyRrlqPb3//Id4aOljn9GPiSUfC+eaQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789220639; c=relaxed/simple; bh=qmHxhWQRN5VKAyLWMRrSOuGWwHzZ1fv892cR8cjR69U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=p5dJ2Nbko25VrK9cQsy0iahuo0fQDP5AKUYlxNhIMNv6Pb2ZuLHemFi4tzuNeY7SiDdyZe7VaZB4RSjScYIMZ8x1Oz+jWXIDkVGkwctHd8ugjs8LBinjdMSrydGyo7X3E0zqiBJUm4mzLWtkf94ww+Yi5wnU69MCV6lyidVFkSo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RmbN59Ze; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RmbN59Ze" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73BAF1F000FF; Sat, 12 Sep 2026 13:43:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789220637; bh=Tx2iv0RrchEaCeqTPUZIne5eCYiiobnPgZ7efSMqjGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RmbN59Ze+Q0xSX+TpHxPgMbNT6SJVb2ytqZ2xqpOCjo87BgsDC6eupMX9cNSjnNFX 3699JbQdk/wutaDf3mnhcrkC8aGF1qeBAs2l5Ds35UTOt/Yog6maXIsMVYyNIQxdVl bv+gDvMI2qgiW09GXjH2UpnSFVoo8vPi6Gw+C28w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jan=20H=C3=B6ppner?= , Stefan Haberland , Jens Axboe Subject: [PATCH 6.6 0219/1424] s390/dasd: Do not complete a failed ESE read as successful Date: Sat, 12 Sep 2026 08:44:11 +0200 Message-ID: <20260912065612.192238570@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Haberland commit cddb447c62466f3076938ce120028d7b591f9f37 upstream. dasd_int_handler() completes an NRF read of an unallocated ESE track by calling ese_read() and unconditionally marking the request DASD_CQR_SUCCESS. dasd_eckd_ese_read() can return an error before it has zeroed the destination buffer: a failed sense-data parse or a current track outside the requested range both return early, leaving the destination pages untouched. The request is still completed successfully, so the block layer is handed stale / uninitialized memory instead of zeros. Check the ese_read() return value and fail the request through the normal error path instead of forcing DASD_CQR_SUCCESS. Fixes: 5e6bdd37c552 ("s390/dasd: fix data corruption for thin provisioned devices") Cc: stable@vger.kernel.org Reviewed-by: Jan Höppner Signed-off-by: Stefan Haberland Link: https://patch.msgid.link/20260805111612.1285190-2-sth@linux.ibm.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/s390/block/dasd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -1737,8 +1737,10 @@ void dasd_int_handler(struct ccw_device return; } if (rq_data_dir(req) == READ) { - device->discipline->ese_read(cqr, irb); - cqr->status = DASD_CQR_SUCCESS; + if (device->discipline->ese_read(cqr, irb)) + cqr->status = DASD_CQR_ERROR; + else + cqr->status = DASD_CQR_SUCCESS; cqr->stopclk = now; dasd_device_clear_timer(device); dasd_schedule_device_bh(device);