Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1659342

Re: double call identical release when there is a race hitting

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From zhong jiang <zhongjiang@huawei.com>
Newsgroups linux.kernel
Subject Re: double call identical release when there is a race hitting
Date Wed, 07 Jun 2017 04:30:01 +0200
Message-ID <tPyTn-qL-3@gated-at.bofh.it> (permalink)
References <tPn1T-12m-5@gated-at.bofh.it> <tPp3H-2jT-3@gated-at.bofh.it>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
MIME-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7bit
X-Originating-IP [10.177.29.68]
X-Cfilter-Loop Reflected
X-Mirapoint-Virus-Rapid-Raw score=unknown(0), refid=str=0001.0A020206.59376314.00A0,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32
X-Mirapoint-Loop-ID 3d6103fb240909ed47c57f700f74cb2c
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Wed, 7 Jun 2017 10:20:47 +0800
X-Original-Message-ID <593762FF.10705@huawei.com>
X-Original-References <5936B098.6020807@huawei.com> <20170606155600.GA17705@redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1659342

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

double call identical release when there is a race hitting zhong jiang <zhongjiang@huawei.com> - 2017-06-06 15:50 +0200
  Re: double call identical release when there is a race hitting Oleg Nesterov <oleg@redhat.com> - 2017-06-06 18:00 +0200
    Re: double call identical release when there is a race hitting zhong jiang <zhongjiang@huawei.com> - 2017-06-07 04:30 +0200

csiph-web