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]
Date:   Tue, 6 Jun 2017 17:56:01 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     zhong jiang <zhongjiang@...wei.com>
Cc:     Michal Hocko <mhocko@...nel.org>, Vlastimil Babka <vbabka@...e.cz>,
        David Rientjes <rientjes@...gle.com>,
        Hugh Dickins <hughd@...gle.com>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Xishi Qiu <qiuxishi@...wei.com>
Subject: Re: double call identical release when there is a race hitting

I can't answer authoritatively, but

On 06/06, zhong jiang wrote:
>
> Hi
>
> when I review the code, I find the following scenario will lead to a race ,
> but I am not sure whether the real issue will hit or not.
>
> cpu1                                                                      cpu2
> exit_mmap                                               mmu_notifier_unregister
>    __mmu_notifier_release                                 srcu_read_lock
>             srcu_read_lock
>             mm->ops->release(mn, mm)                 mm->ops->release(mn,mm)
>            srcu_read_unlock                                         srcu_read_unlock
>
>
> obviously,  the specified mm will call identical release function when
> the related condition satisfy.  is it right?

I think you are right, this is possible, perhaps the comments should mention
this explicitly.

See the changelog in d34883d4e35c0a994e91dd847a82b4c9e0c31d83 "mm: mmu_notifier:
re-fix freed page still mapped in secondary MMU":

	"multiple ->release() callouts", we needn't care it too much ...

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ