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: <20171114143200.brmgskoqxjlrhrzx@dhcp22.suse.cz>
Date:   Tue, 14 Nov 2017 15:32:00 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Tejun Heo <tj@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: drop hotplug lock from lru_add_drain_all

On Tue 14-11-17 15:23:47, Michal Hocko wrote:
[...]
> +/*
> + * Doesn't need any cpu hotplug locking because we do rely on per-cpu
> + * kworkers being shut down before our page_alloc_cpu_dead callback is
> + * executed on the offlined cpu
> + */
>  void lru_add_drain_all(void)
>  {
>  	static DEFINE_MUTEX(lock);

Ble the part of the comment didn't go through

diff --git a/mm/swap.c b/mm/swap.c
index 8bfdcab9f83e..1ab8122d2d0c 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -688,6 +688,13 @@ static void lru_add_drain_per_cpu(struct work_struct *dummy)
 
 static DEFINE_PER_CPU(struct work_struct, lru_add_drain_work);
 
+/*
+ * Doesn't need any cpu hotplug locking because we do rely on per-cpu
+ * kworkers being shut down before our page_alloc_cpu_dead callback is
+ * executed on the offlined cpu.
+ * Calling this function with cpu hotplug locks held can actually lead
+ * to obscure indirect dependencies via WQ context.
+ */
 void lru_add_drain_all(void)
 {
 	static DEFINE_MUTEX(lock);
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ