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] [day] [month] [year] [list]
Message-ID: <BYAPR11MB26323F02BC8A654C9DD4F431FF4E0@BYAPR11MB2632.namprd11.prod.outlook.com>
Date:   Fri, 31 Jul 2020 08:10:43 +0000
From:   "Zhang, Qiang" <Qiang.Zhang@...driver.com>
To:     David Rientjes <rientjes@...gle.com>
CC:     "cl@...ux.com" <cl@...ux.com>,
        "penberg@...nel.org" <penberg@...nel.org>,
        "iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: 回复: [PATCH v3] mm/slab.c: add node spinlock protect in __cache_free_alien



________________________________________
发件人: Zhang, Qiang <Qiang.Zhang@...driver.com>
发送时间: 2020年7月31日 9:27
收件人: David Rientjes
抄送: cl@...ux.com; penberg@...nel.org; iamjoonsoo.kim@....com; akpm@...ux-foundation.org; linux-mm@...ck.org; linux-kernel@...r.kernel.org
主题: 回复: [PATCH v3] mm/slab.c: add node spinlock protect in __cache_free_alien



________________________________________
发件人: David Rientjes <rientjes@...gle.com>
发送时间: 2020年7月31日 7:45
收件人: Zhang, Qiang
抄送: cl@...ux.com; penberg@...nel.org; iamjoonsoo.kim@....com; akpm@...ux-foundation.org; linux-mm@...ck.org; linux-kernel@...r.kernel.org
主题: Re: [PATCH v3] mm/slab.c: add node spinlock protect in __cache_free_alien

On Thu, 30 Jul 2020, qiang.zhang@...driver.com wrote:

> From: Zhang Qiang <qiang.zhang@...driver.com>
>
> for example:
>                               node0
>       cpu0                                            cpu1
> slab_dead_cpu
>    >mutex_lock(&slab_mutex)
>      >cpuup_canceled                            slab_dead_cpu
>        >mask = cpumask_of_node(node)               >mutex_lock(&slab_mutex)
>        >n = get_node(cachep0, node0)
>        >spin_lock_irq(n&->list_lock)
>        >if (!cpumask_empty(mask)) == true
>               >spin_unlock_irq(&n->list_lock)
>       >goto free_slab
>        ....
>    >mutex_unlock(&slab_mutex)
>
> ....                                             >cpuup_canceled
>                                                    >mask = cpumask_of_node(node)
> kmem_cache_free(cachep0 )                          >n = get_node(cachep0, node0)
>  >__cache_free_alien(cachep0 )                             >spin_lock_irq(n&->list_lock)
>    >n = get_node(cachep0, node0)                   >if (!cpumask_empty(mask)) == false
>    >if (n->alien && n->alien[page_node])           >alien = n->alien
>      >alien = n->alien[page_node]                  >n->alien = NULL
>      >....                                         >spin_unlock_irq(&n->list_lock)
>                                                    >....
>

>As mentioned in the review of v1 of this patch, we likely want to do a fix
>for cpuup_canceled() instead.

>I see, you mean  do fix in "cpuup_canceled" func?

 I'm very sorry, due to cpu_down receive gobal  "cpu_hotplug_lock" write lock  protect. multiple cpu offline is serial,the scenario I described above does not exist.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ