From patchwork Tue Feb 28 21:04:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 733855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3vXrg55mYhz9s7f; Wed, 1 Mar 2017 08:04:33 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical-com.20150623.gappssmtp.com header.i=@canonical-com.20150623.gappssmtp.com header.b="hx0Kxsjp"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ciowe-0007BW-Ld; Tue, 28 Feb 2017 21:04:28 +0000 Received: from mail-it0-f45.google.com ([209.85.214.45]) by huckleberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ciowZ-0007BQ-Sc for kernel-team@lists.ubuntu.com; Tue, 28 Feb 2017 21:04:24 +0000 Received: by mail-it0-f45.google.com with SMTP id y135so18006104itc.1 for ; Tue, 28 Feb 2017 13:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=p60UJWZq1g2AC64lAqeQog/6dFUfLUhwTAzxoFgx9Nk=; b=hx0Kxsjp3Yn3jhKw8v4fuIRiIZ2ZWNPBaC9+2nxQuKyWx2aj5t7smeeUFZo4TigjD1 6Zf8/WHMPbxIaw9Of7US+m3YnIa6vf5wov2xYhz2G6AH2GvR75HLuQrWmBkNrVjAEls4 Tfn140RyVxaBQEShrYsPr0XKyv1dbkcYNOgn6PW7pDq3BiYogOKr97fYbFLpOwyAltVS G22Lzpj+0dlkodQHbCiqkXPAKN7YKh2PV47qpU+TCIPWMValJnFCa9s54UlGVJxNXEOU uz5IT3zP5b/e8S3NnxCVGwCPdE6O01CuABJbZw5Paa8aZQomTmbp1YulHfKBnd2ZnmSh Cv/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=p60UJWZq1g2AC64lAqeQog/6dFUfLUhwTAzxoFgx9Nk=; b=TJ2fqiyYYEYMGJB27tZcMfCNmKNc9AWpv3emp4Dud7BXB8pL4DWQhBDMBU7oyMU1qq vorNpXYgJ6ereEyEmzyXRytI7WEtTPm/5OyQH+2j5tGIcpVMaTbMasO2ZFlUp+XfFJPs fy6tMsA4uG9Qem8TKZVD5OcQWh7FKxW+P3yKx3RwuLPrDKaOAAIBUJjvYcGNknFK1Ovh +XhDLDs0RklGcNy+zM4tgZSZ38Gqm5qjW/XBEjZJBAP/r1T6v7izt5IecL/8YZEcktlg auB/yJU7FApXmbGNru8APBAzcqXmTPGB/bfCMvMIcVga0xgydqVoR1jP/n9OeI3pG9Xi E/2Q== X-Gm-Message-State: AMke39lVY63XNeayD5CB+pLeaEEKkQDy5DGAC8AFojY/6Lvdajv5IXuUYqrUZBOZMwH9eSuq X-Received: by 10.36.213.196 with SMTP id a187mr769804itg.4.1488315862403; Tue, 28 Feb 2017 13:04:22 -0800 (PST) Received: from localhost ([2605:a601:aa7:8220:d525:2d8c:d0b4:d509]) by smtp.gmail.com with ESMTPSA id x127sm1255221itg.26.2017.02.28.13.04.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2017 13:04:21 -0800 (PST) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH][Yakkety SRU] pci/hotplug/pnv-php: Remove WARN_ON() in pnv_php_put_slot() Date: Tue, 28 Feb 2017 15:04:21 -0600 Message-Id: <1488315861-3752-1-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Gavin Shan BugLink: http://bugs.launchpad.net/bugs/1667599 The WARN_ON() causes unnecessary backtrace when putting the parent slot, which is likely to be NULL. WARNING: CPU: 2 PID: 1071 at drivers/pci/hotplug/pnv_php.c:85 \ pnv_php_release+0xcc/0x150 [pnv_php] : Call Trace: [c0000003bc007c10] [d00000000ad613c4] pnv_php_release+0x144/0x150 [pnv_php] [c0000003bc007c40] [c0000000006641d8] pci_hp_deregister+0x238/0x330 [c0000003bc007cd0] [d00000000ad61440] pnv_php_unregister_one+0x70/0xa0 [pnv_php] [c0000003bc007d10] [d00000000ad614c0] pnv_php_unregister+0x50/0x80 [pnv_php] [c0000003bc007d40] [d00000000ad61e84] pnv_php_exit+0x50/0xcb4 [pnv_php] [c0000003bc007d70] [c00000000019499c] SyS_delete_module+0x1fc/0x2a0 [c0000003bc007e30] [c00000000000b184] system_call+0x38/0xe0 Cc: # v4.8+ Fixes: 66725152fb9f ("PCI/hotplug: PowerPC PowerNV PCI hotplug driver") Signed-off-by: Gavin Shan Reviewed-by: Andrew Donnellan Tested-by: Vaibhav Jain Signed-off-by: Michael Ellerman (cherry picked from commit 36c7c9da40c408a71e5e6bfe12e57dcf549a296d) Signed-off-by: Seth Forshee --- drivers/pci/hotplug/pnv_php.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/pnv_php.c b/drivers/pci/hotplug/pnv_php.c index e6245b03f0a1..4308690b2ff3 100644 --- a/drivers/pci/hotplug/pnv_php.c +++ b/drivers/pci/hotplug/pnv_php.c @@ -42,7 +42,7 @@ static void pnv_php_free_slot(struct kref *kref) static inline void pnv_php_put_slot(struct pnv_php_slot *php_slot) { - if (WARN_ON(!php_slot)) + if (!php_slot) return; kref_put(&php_slot->kref, pnv_php_free_slot);