Received: by 10.192.165.148 with SMTP id m20csp844231imm; Fri, 27 Apr 2018 08:23:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpHJgCfIvXnMZOXd+ifgZUje53nDlm2+8pW3VSRGQhIvgFGIBJruhcYJQIRfWumHpCGT2s7 X-Received: by 2002:a17:902:57d8:: with SMTP id g24-v6mr2700632plj.337.1524842629822; Fri, 27 Apr 2018 08:23:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524842629; cv=none; d=google.com; s=arc-20160816; b=rO+q3RFf1SJ2uoWs4z4Jx8tu2Qc3ho8q7aGOkXw8ud0yJAczuFI9EYuUoH6wCWE3yZ oJTWGeHko5rZ0+7KnJ3UkhDf6xfBo1CuS/eBw/+iJoy5sa961OrqAq/XBnoZ+P0c6cbV 9tIih7JHZuxzxy67b/ypDPYzI2a/JTIZBdD3xIDudQW1VZyKyB4vEkR3yX+F1VQVEcq6 B9fjKDB6CQhoLUIH3iB7AQBV9BEHEnoXuSClT4qvWRUwISj8HuzVAguvH5IzuZHzse3y H76XqCKHwVVGZSyCddRqVbX7MViKbrUIQW3rvtnPmBZaeH61xhCoUG6lngHW5O1vGwTq ZUfA== 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=DhnfcmE0mBUE1ZGvJFClK/CgR0gk3CBmrSx718Moz3k=; b=MDlHwcKZM5Q3pEE/jsOH51otbC0YX3Q5v4lmMme2i5FvmXH8QMmT7KDcjdU8Sz1cxH elcDsE3wDiQEJM+wgbj+bh3+DMH4nvOgvp+Zrj13h4wcF1a2BU45ECVvTf1wkPdB5THp jQJBVZTgayDVe2gIL19WpPJ2+GVEr/Ld9ru7Zle8HigyoR5fPHalO2no9E8jZWrS8huz IX0H598rX9ni84RKk4lf35udKhzUx2ZvUOLhrTA15nEhOv5WBcUn9sLc/eEBoWD3Z7DK vcPMHv2FlcnD/GzbXc7eJonKIDR17B8lO3MF2OlKzKCkP5XpA4cEYxeG3NbQGXX3NhkJ st1w== 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 e15-v6si1447815pli.163.2018.04.27.08.23.35; Fri, 27 Apr 2018 08:23:49 -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 S933487AbeD0PWP (ORCPT + 99 others); Fri, 27 Apr 2018 11:22:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:49326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933098AbeD0OCk (ORCPT ); Fri, 27 Apr 2018 10:02:40 -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 0CAAB21897; Fri, 27 Apr 2018 14:02:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CAAB21897 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.4 49/50] s390/cio: update chpid descriptor after resource accessibility event Date: Fri, 27 Apr 2018 15:58:51 +0200 Message-Id: <20180427135658.563557072@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135655.623669681@linuxfoundation.org> References: <20180427135655.623669681@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: 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) {