From: zhong jiang <zhongjiang@huawei.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
David Rientjes <rientjes@google.com>,
Hugh Dickins <hughd@google.com>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Xishi Qiu <qiuxishi@huawei.com>
Subject: Re: double call identical release when there is a race hitting
Date: Wed, 7 Jun 2017 10:20:47 +0800 [thread overview]
Message-ID: <593762FF.10705@huawei.com> (raw)
In-Reply-To: <20170606155600.GA17705@redhat.com>
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>
WARNING: multiple messages have this Message-ID (diff)
From: zhong jiang <zhongjiang@huawei.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Michal Hocko <mhocko@kernel.org>,
Vlastimil Babka <vbabka@suse.cz>,
"David Rientjes" <rientjes@google.com>,
Hugh Dickins <hughd@google.com>,
"Linux Memory Management List" <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Xishi Qiu <qiuxishi@huawei.com>
Subject: Re: double call identical release when there is a race hitting
Date: Wed, 7 Jun 2017 10:20:47 +0800 [thread overview]
Message-ID: <593762FF.10705@huawei.com> (raw)
In-Reply-To: <20170606155600.GA17705@redhat.com>
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
next prev parent reply other threads:[~2017-06-07 2:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 13:39 double call identical release when there is a race hitting zhong jiang
2017-06-06 13:39 ` zhong jiang
2017-06-06 15:56 ` Oleg Nesterov
2017-06-06 15:56 ` Oleg Nesterov
2017-06-07 2:20 ` zhong jiang [this message]
2017-06-07 2:20 ` zhong jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=593762FF.10705@huawei.com \
--to=zhongjiang@huawei.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=oleg@redhat.com \
--cc=qiuxishi@huawei.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.