From patchwork Wed May 13 16:22:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Heimes X-Patchwork-Id: 1289481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Mg2F3XwWz9sRY; Thu, 14 May 2020 02:23:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jYu9q-000594-37; Wed, 13 May 2020 16:22:58 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jYu9n-00058y-TX for kernel-team@lists.ubuntu.com; Wed, 13 May 2020 16:22:55 +0000 Received: from 2.general.fheimes.uk.vpn ([10.172.194.67] helo=T570.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jYu9n-0000Yr-Jf for kernel-team@lists.ubuntu.com; Wed, 13 May 2020 16:22:55 +0000 From: frank.heimes@canonical.com To: kernel-team@lists.ubuntu.com Subject: [SRU][B][PATCH 0/2] zpcictl --reset - contribution for kernel (LP: 1870320) Date: Wed, 13 May 2020 18:22:13 +0200 Message-Id: <20200513162215.233019-1-frank.heimes@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Buglink: https://bugs.launchpad.net/bugs/1870320 SRU Justification: [Impact] * With zpci_disable() working, 'lockdep' detected a potential deadlock (in the s390x zPCI subsystem). * The deadlock is between recovering a PCI function via the /sys/bus/pci/devices//recover attribute vs powering it off via /sys/bus/pci/slots//power. [Fix] * Backport 1: https://launchpadlibrarian.net/479554961/0001-s390-pci-Recover-handle-in-clp_set_pci_fn.patch * Backport 2: https://launchpadlibrarian.net/478714295/0001-s390-pci-Fix-possible-deadlock-in-recover_store.patch [Test Case] * It's best to (re-)test using the kernel's locking validator, also known as 'lockdep'. * Since this potential deadlock was identified by lockdep. [Regression Potential] * The regression potential can be considered as moderate, since: * It is purely s390x specific code (arch/s390/include/asm/pci.h and arch/s390/pci/{pci.c,pci_clp.c,pci_sysfs.c}). * It only affects the zPCI, the s390x specific PCI code layer. * PCI cards available for s390x are optional cards (RoCE and zEDC) and not very wide-spread. * The states between such a deadlock can happen (recover and power off) are non standard and usually undesired states. * The patches are upstream accepted since 5.6 and already landed in eoan and focal. [Other Info] * Patches 17cdec960cf7 "s390/pci: Recover handle in clp_set_pci_fn()" and 576c75e36c68 "s390/pci: Fix possible deadlock in recover_store()" are upstream accepted since kernel 5.6, but they don't apply cleanly on bionic master-next, hence backports are needed: * 0001-s390-pci-Recover-handle-in-clp_set_pci_fn.patch is a backport of 17cdec960cf776b20b1fb08c622221babe591d51 17cdec960cf7 "s390/pci: Recover handle in clp_set_pci_fn()" * 0001-s390-pci-Fix-possible-deadlock-in-recover_store.patch is a backport of 576c75e36c689bec6a940e807bae27291ab0c0de 576c75e36c68 "s390/pci: Fix possible deadlock in recover_store()" * Both patches/commits already landed in focal (with LP 1863768) and in eoan (with LP 1868324). Niklas Schnelle (2): s390/pci: Recover handle in clp_set_pci_fn() s390/pci: Fix possible deadlock in recover_store() arch/s390/include/asm/pci.h | 2 +- arch/s390/pci/pci.c | 2 +- arch/s390/pci/pci_clp.c | 46 ++++++++++++++------------- arch/s390/pci/pci_sysfs.c | 63 ++++++++++++++++++++++++------------- 4 files changed, 69 insertions(+), 44 deletions(-) Acked-by: Sultan Alsawaf Acked-by: Kleber Sacilotto de Souza