Received: by 10.192.165.148 with SMTP id m20csp820917imm; Fri, 27 Apr 2018 08:03:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpIqvP1kklmWQU5AymGAE2sPV3S5IRQPPeo1VGZ5ZyJHCjWcJobYGA2r+EjnAH96kA7WrbB X-Received: by 2002:a63:7f58:: with SMTP id p24-v6mr2420486pgn.290.1524841390903; Fri, 27 Apr 2018 08:03:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524841390; cv=none; d=google.com; s=arc-20160816; b=BWazncIW/DZNvxIwJoWx7SEgHwh/EZDoOBdXY6z7zS+C6Me/AUtv27fTnESGqrvhjp pWW6QUSk2OEkswVj/QBWKDSal9I9p6UGtHCkb2M/YcvtT/YkMZTfk+YsH5Zs95x7fCV6 o/7ikUc9lT2lPcnHngqVNwNppOksmWeGpa9yQ6zUjk3NoeebawtsJw3DYEqdeQBiSQmY oV0SUegaBpYR8kBWXSLQs+fOfnoscDDYQHbHHIVHVVkV8nhhYT2fKbCC+QZurCVez1qR z4a56GHJr+vXJMCeXIjLqwynucr+T7aMf+rrWqX8LbtX8rAo3RJJUMP4KbaJkeblWZrq hvCQ== 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:dmarc-filter :arc-authentication-results; bh=IQ/g7fetFyfX8mnC5ztb4Y/BNNjlgYwK65pjBWViFJs=; b=XQvfofsOUWvBi0Jw7C+3m46hfI3uN34oGFwq1DF4CMx2hSl4Ml7A3FXMG+QWj5QaUJ hW3VYTXLKC7jkrE4USnN07Dbfafd5z5Wxlj96DqPzoSpdW8J0YyTqbpEz0ZDUABIc4MG DuBRjHlLPxuFus8kdGHjLu4qqPdwdZWeiUhHB1DfQJhbred0Y/qcXT/eLboLT4QpcJv0 03VhcmOPfTtlznKLmvwjpMfAiMiz1nAvKQPNmKi9pk1ZhqHrb809kLJHfXfqdT5V+Sol SoaK5y//gH6MZj/REvbRPOMon80culYy0lSqOHkIciJKsHsgQLqZ4IW9AsZPfPDSPtXs klZQ== 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 a9-v6si1314263pgf.259.2018.04.27.08.02.56; Fri, 27 Apr 2018 08:03:10 -0700 (PDT) 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 S933946AbeD0OFf (ORCPT + 99 others); Fri, 27 Apr 2018 10:05:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:51704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933932AbeD0OFb (ORCPT ); Fri, 27 Apr 2018 10:05:31 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D901C21890; Fri, 27 Apr 2018 14:05:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D901C21890 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sebastian Ott , Peter Oberparleiter , Martin Schwidefsky Subject: [PATCH 4.9 71/74] s390/cio: update chpid descriptor after resource accessibility event Date: Fri, 27 Apr 2018 15:59:01 +0200 Message-Id: <20180427135712.884420018@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135709.899303463@linuxfoundation.org> References: <20180427135709.899303463@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sebastian Ott commit af2e460ade0b0180d0f3812ca4f4f59cc9597f3e upstream. Channel path descriptors have been seen as something stable (as long as the chpid is configured). Recent tests have shown that the descriptor can also be altered when the link state of a channel path changes. Thus it is necessary to update the descriptor during handling of resource accessibility events. Cc: Signed-off-by: Sebastian Ott Reviewed-by: Peter Oberparleiter Signed-off-by: Martin Schwidefsky Signed-off-by: Greg Kroah-Hartman --- drivers/s390/cio/chsc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -451,6 +451,7 @@ static void chsc_process_sei_link_incide static void chsc_process_sei_res_acc(struct chsc_sei_nt0_area *sei_area) { + struct channel_path *chp; struct chp_link link; struct chp_id chpid; int status; @@ -463,10 +464,17 @@ static void chsc_process_sei_res_acc(str chpid.id = sei_area->rsid; /* allocate a new channel path structure, if needed */ status = chp_get_status(chpid); - if (status < 0) - chp_new(chpid); - else if (!status) + if (!status) return; + + if (status < 0) { + chp_new(chpid); + } else { + chp = chpid_to_chp(chpid); + mutex_lock(&chp->lock); + chp_update_desc(chp); + mutex_unlock(&chp->lock); + } memset(&link, 0, sizeof(struct chp_link)); link.chpid = chpid; if ((sei_area->vf & 0xc0) != 0) {