* double call identical release when there is a race hitting
@ 2017-06-06 13:39 zhong jiang
2017-06-06 15:56 ` Oleg Nesterov
0 siblings, 1 reply; 3+ messages in thread
From: zhong jiang @ 2017-06-06 13:39 UTC (permalink / raw)
To: Michal Hocko, Vlastimil Babka, David Rientjes, Hugh Dickins,
Oleg Nesterov
Cc: Linux Memory Management List, LKML, Xishi Qiu
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?
Thanks
zhongjiang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: double call identical release when there is a race hitting
2017-06-06 13:39 double call identical release when there is a race hitting zhong jiang
@ 2017-06-06 15:56 ` Oleg Nesterov
2017-06-07 2:20 ` zhong jiang
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2017-06-06 15:56 UTC (permalink / raw)
To: zhong jiang
Cc: Michal Hocko, Vlastimil Babka, David Rientjes, Hugh Dickins,
Linux Memory Management List, LKML, Xishi Qiu
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.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: double call identical release when there is a race hitting
2017-06-06 15:56 ` Oleg Nesterov
@ 2017-06-07 2:20 ` zhong jiang
0 siblings, 0 replies; 3+ messages in thread
From: zhong jiang @ 2017-06-07 2:20 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Michal Hocko, Vlastimil Babka, David Rientjes, Hugh Dickins,
Linux Memory Management List, LKML, Xishi Qiu
On 2017/6/6 23:56, Oleg Nesterov wrote:
> 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.
>
>
> .
>
Thank you for clarification.
yes, I see that the author admit that this is a issue. The patch describe that it is really rare.
Anyway, this issue should be fixed in a separate patch.
but so far the issue still exist unfortunately.
Regards
zhongjiang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-07 2:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-06 13:39 double call identical release when there is a race hitting zhong jiang
2017-06-06 15:56 ` Oleg Nesterov
2017-06-07 2:20 ` zhong jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).