Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5980355ybc; Wed, 27 Nov 2019 12:49:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxe3GxrveAQhLbEfFng/qNdMJXACJvjfBy7JOlqaBSLS+OblqVZz15Fzfw+hvQeh7Dc4Hgr X-Received: by 2002:a17:906:d93b:: with SMTP id rn27mr52457168ejb.184.1574887770575; Wed, 27 Nov 2019 12:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574887770; cv=none; d=google.com; s=arc-20160816; b=Yg+D3JriY/p3meFty4wU57GnDKwb2bxeJdQ7quHWvIX5zWSt9cQ4bJ92KuDiTu5BEV UWLfRrQt7ZhPDkg4unYdWZVe4ScNEMTjW5JDO9T62spKFyvsM9N1i3y6hnX0lehKqU/J 6BZJZzkE2m6XmeHTT+Yxp2vd4/FM5gNet/gFkdPzrDdh79xEy9rtCukCq344CtkV5Cif G2YOFaZAB6LwEbcLZGQBuhm+RcuKL/GukeL+VnVsLEJwCBpKl1x670id9SCdqffPybtp Uqpv1wPHJ1ka9zHldG905DEw2CQmgcXLC/WTqwOil4uygkyGBmkr7tP/Oo8htrDmQke8 cFGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=94HxQd0TDmtTl9bHztCJOVRB0rRY9m489YnvNUXj8OQ=; b=e/cuLfMY9u3AAXpSU5iezgYCZgw1GCsoQ9dahdbU8r3uKz0SKoJUr+WqDw9d5Rp3Mr lNitvsnT/ObZ7QwXgdAUMNNoMt6oK2iltfrvhr0NxjFHa+AZgRsJuF5KFIoxpx4UAA62 xDTSMrtYW57xRVX3N8ej/B4/I9/c/Q2Lwfs9zkYklLRFOxwZElaFr0MMjHUqFBPGXIcU lGYbatQPy4A9kgBwNksto9IhWec5p7k7UL1KHvBBebxoxl3t7w6pKv7MUEC8rj266b1+ nH2IzX2PiE2BOEJzZNbJ6IxdcxTZOubC32R8fOGn00qaqNEhNEkAmViE/Zii0kq/oioa HziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YILtucLq; 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 w10si954202edx.180.2019.11.27.12.49.07; Wed, 27 Nov 2019 12:49:30 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=YILtucLq; 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 S1729934AbfK0Uqw (ORCPT + 99 others); Wed, 27 Nov 2019 15:46:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:59090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727008AbfK0Uqt (ORCPT ); Wed, 27 Nov 2019 15:46:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 A83C42166E; Wed, 27 Nov 2019 20:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574887609; bh=QxKfCyVgcTd31Jg08AbzORDVuP+QIgFWO6/9Nc98H1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YILtucLq5flSU3pOrG1oj6Y6/f7JfTeXZW1JQETA/cSMy3UP/KqdHRJMHmkcZgVNM ZRElP76E5vOyNt4lB1vh/ad7MGj6DycdeleFVz7sxTgkpnjU4spXhJEHKD6HWOzpOW oBvPUO9P8ILME3YLlOACH/NjiHOpeVW+i+oWFdX0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sam Bobroff , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 025/211] powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field Date: Wed, 27 Nov 2019 21:29:18 +0100 Message-Id: <20191127203053.545212723@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203049.431810767@linuxfoundation.org> References: <20191127203049.431810767@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sam Bobroff [ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ] eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it incorrectly removes it from pe->type, instead of pe->state. However, rather than clearing it from the correct field, remove it. Inspection of the code shows that it can't ever have had any effect (even if it had been cleared from the correct field), because the field is never tested after it is cleared by the statement in question. The clear statement was added by commit 807a827d4e74 ("powerpc/eeh: Keep PE during hotplug"), but it didn't explain why it was necessary. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/eeh_pe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index 8545a9523b9bc..7339ca4fdc19e 100644 --- a/arch/powerpc/kernel/eeh_pe.c +++ b/arch/powerpc/kernel/eeh_pe.c @@ -381,7 +381,7 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev) while (parent) { if (!(parent->type & EEH_PE_INVALID)) break; - parent->type &= ~(EEH_PE_INVALID | EEH_PE_KEEP); + parent->type &= ~EEH_PE_INVALID; parent = parent->parent; } -- 2.20.1