Received: by 10.223.185.116 with SMTP id b49csp1139491wrg; Fri, 23 Feb 2018 12:38:09 -0800 (PST) X-Google-Smtp-Source: AH8x227pqEBPSuG3yJAztY2aI4/zypvzkGjxfQO83+F4Q2te+Vpt5R5FhrxKLTukzBbNvuth8Hbn X-Received: by 10.99.117.26 with SMTP id q26mr2456777pgc.46.1519418289364; Fri, 23 Feb 2018 12:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418289; cv=none; d=google.com; s=arc-20160816; b=mjp5msHwIF/xOBGR3QYD8+Yx2HMnJNfNuhWwz4fu7OLX/e6P7SzE+Rnrwxr1t461Ja 9AQDpI0UOIUvzLwKbrNbmMYR3CLXPM1sMinn67vKr4A5QqjN7vJDYvXBkqVc+LG5Lbly EEzJ4t/t3w4VSfvN+HG5a+yH5VwD8DbIYnOLJ+YsnRNTB83umBrVrtwL6Ck5gbuZwDEk tj2ALGQn0REJ2G4EXddcW3md8dGGkvg63qRczhf5E/UyYWJAp/rDrCAhXqa9nq/QlCAQ uEHbChhyXr8WRXLZerGDO2RUVQ4E/9KA8k39H9Ez/mgXLwXkb7E6UP84Z2n5f1VF1gct kphw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=MSomPkusWW+yfVHgmrU2xPDM4UiUyUGrOWb2BvR3y2M=; b=v/gfn34Nhqj6ngMi40LLQCZcpwKqD8r3rsvFmcEAj2o+2NuFTwxNTKQyL2ZDQ03g4v 4rU7qk6YgHUGDl3b7ydhzJ4VbxpBYoAHcorcOcRWmjGKRBfksGb6o7fJBnZxt2F3hZ8F j4kGMXUohUSOWxxKARgq2xZfW4Mgnd+RxVaJnOom6xaozpQUV/oNpTdM/E6qL0chyzUj pazr+Y/67WRPF+NdGdlMJaDs80EC0MbHFTX0Ik4KCOmAWkkJX3+ZIueqQhNyHRRALpyz BexRFJxogUaVKbSspxTL7QqUehJr3mbKxI+7Ghm5Ar1AchXrNSMV56gb2cVyaoM8zTu3 6HSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b11-v6si2289893plk.189.2018.02.23.12.37.55; Fri, 23 Feb 2018 12:38:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753979AbeBWUhS (ORCPT + 99 others); Fri, 23 Feb 2018 15:37:18 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36978 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753573AbeBWSef (ORCPT ); Fri, 23 Feb 2018 13:34:35 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id AACD911D8; Fri, 23 Feb 2018 18:34:33 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Haberland , Jan Hoeppner , Martin Schwidefsky , Sasha Levin Subject: [PATCH 4.4 044/193] s390/dasd: prevent prefix I/O error Date: Fri, 23 Feb 2018 19:24:37 +0100 Message-Id: <20180223170332.924158651@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Haberland [ Upstream commit da340f921d3454f1521671c7a5a43ad3331fbe50 ] Prevent that a prefix flag is set based on invalid configuration data. The validity.verify_base flag should only be set for alias devices. Usually the unit address type is either one of base, PAV alias or HyperPAV alias. But in cases where the unit address type is not set or any other value the validity.verify_base flag might be set as well. This would lead to follow on errors. Explicitly check for alias devices and set the validity flag only for them. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Martin Schwidefsky Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/s390/block/dasd_eckd.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -518,10 +518,12 @@ static int prefix_LRE(struct ccw1 *ccw, pfxdata->validity.define_extent = 1; /* private uid is kept up to date, conf_data may be outdated */ - if (startpriv->uid.type != UA_BASE_DEVICE) { + if (startpriv->uid.type == UA_BASE_PAV_ALIAS) pfxdata->validity.verify_base = 1; - if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) - pfxdata->validity.hyper_pav = 1; + + if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) { + pfxdata->validity.verify_base = 1; + pfxdata->validity.hyper_pav = 1; } /* define extend data (mostly)*/ @@ -3002,10 +3004,12 @@ static int prepare_itcw(struct itcw *itc pfxdata.validity.define_extent = 1; /* private uid is kept up to date, conf_data may be outdated */ - if (startpriv->uid.type != UA_BASE_DEVICE) { + if (startpriv->uid.type == UA_BASE_PAV_ALIAS) + pfxdata.validity.verify_base = 1; + + if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) { pfxdata.validity.verify_base = 1; - if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) - pfxdata.validity.hyper_pav = 1; + pfxdata.validity.hyper_pav = 1; } switch (cmd) {