Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2721622pxj; Mon, 31 May 2021 09:05:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAyD6ymv+O3Ov8+TffmX5051lBfiV0/+Cm32Vu3zHt2ryGg6e/s0XdfT7nWIMuiD9UMmQt X-Received: by 2002:a92:1909:: with SMTP id 9mr18238536ilz.229.1622477141936; Mon, 31 May 2021 09:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477141; cv=none; d=google.com; s=arc-20160816; b=wfTLHhNaAXGvKt/qHpCVm1x72rnNQAjujxCQmZJiUs4MUyKzw2u7mmiyxGqoxFcdIb QmUKMS+TkQJldZ6Zx4DNj2ZHwje2qEzKaL1ngh/+ufQp9vnwWLg8xua6uCcYYECv4SMk LmwsNcojjjhmwAlmV3ruGaBaXQRKs077BKDqktPRJvFCdkSCCpjatkWVSOVBzTI4FwmB rkB8AeA6n1HsIuAbWVO/18CYenCYSZW0dWszOys0iPIOpOvfE2Yh3Cuoygv4FgwJJFgi mp8YP4eaxUP69/7hYWA8dN/wJeDXYUCa2HCQdThSXjxUyNJ0HWIUVHjlOTo3FHlncIzM gvlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QPQ8MTjIOBsa7wff2ITDMEGIGd9pRbRY7B3PxlcsfBc=; b=Xy7ak1LRjsJykU2La0VEb7KC5fl6I3zxMHYJzoTGrk4blR9C9oSfIxG2BQ8eNxYa2f b/VPtRQ5oOjUapeClVSKAA5phNAIkDOnXt1X5NjSg/fELx+pXNI81CRUNRNpgUmuqYzX 2ioErdZCvHQ5ZhDw3YBLIpAV7UXym5UYDHRUdN1+TXUaxTEgoIhdNp/lubARTr5KMsWy HdROW6hsK6/wJFrY8aJvJpmbFChCRsxNsQTiNhXKr9iEW49vC12q1tl/T9G/PvYB2TAF 1JnCJ6kKEZYas8Ca9Ye6WkwDHDWT+6+h1JAXaHPYHsOU5SgNh6F/Gm4mhFBPm7hazQ1x pp7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cTqJ3M1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si1932611jap.60.2021.05.31.09.05.28; Mon, 31 May 2021 09:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cTqJ3M1k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233289AbhEaQGT (ORCPT + 99 others); Mon, 31 May 2021 12:06:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33264 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232666AbhEaOfh (ORCPT ); Mon, 31 May 2021 10:35:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EECB961434; Mon, 31 May 2021 13:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469073; bh=uZ8RMiPR5Nz4q5T/km5vQvdU10060VwQaBgXOWVR9tc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cTqJ3M1kTGy6nW6RM+nJ6Kj1aqnvnltrE7mqatl1hhKyRO33DenuWEYzWmk+wlNcE 5oFZuYUAjVHJRnnxfVlpVgVgz7uPXbvygwWK9T3OHyk5Gj7OP1WglKVcY5qrv7OkPf Kpf9D/OJDiCou+qljSdzauX8+Yy6J/ifuo3uPmjg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Hoeppner , Stefan Haberland , Cornelia Huck , Jens Axboe Subject: [PATCH 5.12 024/296] s390/dasd: add missing discipline function Date: Mon, 31 May 2021 15:11:19 +0200 Message-Id: <20210531130704.589841236@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Haberland commit c0c8a8397fa8a74d04915f4d3d28cb4a5d401427 upstream. Fix crash with illegal operation exception in dasd_device_tasklet. Commit b72949328869 ("s390/dasd: Prepare for additional path event handling") renamed the verify_path function for ECKD but not for FBA and DIAG. This leads to a panic when the path verification function is called for a FBA or DIAG device. Fix by defining a wrapper function for dasd_generic_verify_path(). Fixes: b72949328869 ("s390/dasd: Prepare for additional path event handling") Cc: #5.11 Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20210525125006.157531-2-sth@linux.ibm.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/s390/block/dasd_diag.c | 8 +++++++- drivers/s390/block/dasd_fba.c | 8 +++++++- drivers/s390/block/dasd_int.h | 1 - 3 files changed, 14 insertions(+), 3 deletions(-) --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c @@ -642,12 +642,18 @@ static void dasd_diag_setup_blk_queue(st blk_queue_segment_boundary(q, PAGE_SIZE - 1); } +static int dasd_diag_pe_handler(struct dasd_device *device, + __u8 tbvpm, __u8 fcsecpm) +{ + return dasd_generic_verify_path(device, tbvpm); +} + static struct dasd_discipline dasd_diag_discipline = { .owner = THIS_MODULE, .name = "DIAG", .ebcname = "DIAG", .check_device = dasd_diag_check_device, - .verify_path = dasd_generic_verify_path, + .pe_handler = dasd_diag_pe_handler, .fill_geometry = dasd_diag_fill_geometry, .setup_blk_queue = dasd_diag_setup_blk_queue, .start_IO = dasd_start_diag, --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c @@ -800,13 +800,19 @@ static void dasd_fba_setup_blk_queue(str blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); } +static int dasd_fba_pe_handler(struct dasd_device *device, + __u8 tbvpm, __u8 fcsecpm) +{ + return dasd_generic_verify_path(device, tbvpm); +} + static struct dasd_discipline dasd_fba_discipline = { .owner = THIS_MODULE, .name = "FBA ", .ebcname = "FBA ", .check_device = dasd_fba_check_characteristics, .do_analysis = dasd_fba_do_analysis, - .verify_path = dasd_generic_verify_path, + .pe_handler = dasd_fba_pe_handler, .setup_blk_queue = dasd_fba_setup_blk_queue, .fill_geometry = dasd_fba_fill_geometry, .start_IO = dasd_start_IO, --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -297,7 +297,6 @@ struct dasd_discipline { * e.g. verify that new path is compatible with the current * configuration. */ - int (*verify_path)(struct dasd_device *, __u8); int (*pe_handler)(struct dasd_device *, __u8, __u8); /*