Received: by 10.192.165.148 with SMTP id m20csp795582imm; Fri, 27 Apr 2018 07:39:00 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpDziS479K3E8A4Qqn7MXLgf8w/fFSx4Ey1K9i18KdwDAs9rwS75kCTtW7OQmga0mjvoTCM X-Received: by 10.98.3.3 with SMTP id 3mr2431780pfd.255.1524839940605; Fri, 27 Apr 2018 07:39:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524839940; cv=none; d=google.com; s=arc-20160816; b=a5NnK8uSSYLkyftB22q7zkjYJbCY3k+e/0kAjUdLaT/PPc5IJOKi+ljmEPokT7hsEN I5CySyPOSYimgEva3KnAPfnfoFDY3PVzJss+ckPkArYcw+wsunMFU0AtFtEpTXmAryLp xvzzx0kPwSolSmIKweLmtXacdRcpXN4oq1AvZzZpvz7qfOhVEJDXtz61bPsMiOhJDtOE W8kX0xBHDUdOCrgp1Xc94jPAI+4j00D7VHxUe7KBn+pDpm8qXIPn2wm22DA60Qof7JDu S3oc+QuplmhEhrlo+/ooa8gerjrt9gXNlEhZuGi8oVDpAqKHIyFCBVlPHAjvjetaGOTy Hd7A== 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=sBDo3btuUOxf4wZG/Rqiu/Ang8loVQwliyUoiSQi5/I=; b=c9/Rci0wELuuvkEhLMK9TKa4Lm47HAn+VdjtY4YAR+YTA3PAv2aC+hOYS9fkLj5lv5 FGZD7TrTszL4ZmyeSUDblcCQI1IiagjtRfn/ZVdTPnN3pPoo1POequ1+FZDm3aDVTH+c B5ifHrlmH5lgeRpsqmm+MkwLDyD/X0MoMemkHYPUYxsoPGBdFcoMWWRR8tN261JJtk7R BMcM1iVfktadJ2zDJMbgZHXHjPntuoo2XWXLR81s4eYhqXBQRo5EV7h4RO/CFcatgMUH 8BjfTZ0jRnHtbHGYSTq2IrxYr5erGH4h/J1eiGIARHTxMKub3T1/rf9QRvCD6scPYto1 v/3Q== 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 q4-v6si1327156plr.407.2018.04.27.07.38.46; Fri, 27 Apr 2018 07:39:00 -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 S934663AbeD0OJY (ORCPT + 99 others); Fri, 27 Apr 2018 10:09:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934654AbeD0OJV (ORCPT ); Fri, 27 Apr 2018 10:09:21 -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 E832E21864; Fri, 27 Apr 2018 14:09:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E832E21864 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.14 77/80] s390/cio: update chpid descriptor after resource accessibility event Date: Fri, 27 Apr 2018 15:59:10 +0200 Message-Id: <20180427135736.924594134@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427135732.928644313@linuxfoundation.org> References: <20180427135732.928644313@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.14-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) {