lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191127203128.604227621@linuxfoundation.org>
Date:   Wed, 27 Nov 2019 21:30:32 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        stable@...r.kernel.org, David Hildenbrand <david@...hat.com>,
        Pavel Tatashin <pavel.tatashin@...rosoft.com>,
        Rashmica Gupta <rashmica.g@...il.com>,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Balbir Singh <bsingharora@...il.com>,
        Michael Neuling <mikey@...ling.org>,
        Boris Ostrovsky <boris.ostrovsky@...cle.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        John Allen <jallen@...ux.vnet.ibm.com>,
        Jonathan Corbet <corbet@....net>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Juergen Gross <jgross@...e.com>,
        Kate Stewart <kstewart@...uxfoundation.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Len Brown <lenb@...nel.org>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Mathieu Malaterre <malat@...ian.org>,
        Michal Hocko <mhocko@...e.com>,
        Nathan Fontenot <nfont@...ux.vnet.ibm.com>,
        Oscar Salvador <osalvador@...e.de>,
        Philippe Ombredanne <pombredanne@...b.com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Vlastimil Babka <vbabka@...e.cz>,
        YASUAKI ISHIMATSU <yasu.isimatu@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Sasha Levin <sashal@...nel.org>
Subject: [PATCH 4.19 182/306] powerpc/powernv: hold device_hotplug_lock when calling device_online()

From: David Hildenbrand <david@...hat.com>

[ Upstream commit cec1680591d6d5b10ecc10f370210089416e98af ]

device_online() should be called with device_hotplug_lock() held.

Link: http://lkml.kernel.org/r/20180925091457.28651-5-david@redhat.com
Signed-off-by: David Hildenbrand <david@...hat.com>
Reviewed-by: Pavel Tatashin <pavel.tatashin@...rosoft.com>
Reviewed-by: Rashmica Gupta <rashmica.g@...il.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Rashmica Gupta <rashmica.g@...il.com>
Cc: Balbir Singh <bsingharora@...il.com>
Cc: Michael Neuling <mikey@...ling.org>
Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc: Dan Williams <dan.j.williams@...el.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Haiyang Zhang <haiyangz@...rosoft.com>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: John Allen <jallen@...ux.vnet.ibm.com>
Cc: Jonathan Corbet <corbet@....net>
Cc: Joonsoo Kim <iamjoonsoo.kim@....com>
Cc: Juergen Gross <jgross@...e.com>
Cc: Kate Stewart <kstewart@...uxfoundation.org>
Cc: "K. Y. Srinivasan" <kys@...rosoft.com>
Cc: Len Brown <lenb@...nel.org>
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Mathieu Malaterre <malat@...ian.org>
Cc: Michal Hocko <mhocko@...e.com>
Cc: Nathan Fontenot <nfont@...ux.vnet.ibm.com>
Cc: Oscar Salvador <osalvador@...e.de>
Cc: Philippe Ombredanne <pombredanne@...b.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Stephen Hemminger <sthemmin@...rosoft.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Vlastimil Babka <vbabka@...e.cz>
Cc: YASUAKI ISHIMATSU <yasu.isimatu@...il.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
 arch/powerpc/platforms/powernv/memtrace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/platforms/powernv/memtrace.c b/arch/powerpc/platforms/powernv/memtrace.c
index 232bf5987f91d..dd3cc4632b9ae 100644
--- a/arch/powerpc/platforms/powernv/memtrace.c
+++ b/arch/powerpc/platforms/powernv/memtrace.c
@@ -244,9 +244,11 @@ static int memtrace_online(void)
 		 * we need to online the memory ourselves.
 		 */
 		if (!memhp_auto_online) {
+			lock_device_hotplug();
 			walk_memory_range(PFN_DOWN(ent->start),
 					  PFN_UP(ent->start + ent->size - 1),
 					  NULL, online_mem_block);
+			unlock_device_hotplug();
 		}
 
 		/*
-- 
2.20.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ