[prev in list] [next in list] [prev in thread] [next in thread]
List: netbsd-tech-net
Subject: Re: MP-safe DAD timer destruction with callout_stop
From: Ryota Ozaki <ozaki-r () netbsd ! org>
Date: 2018-01-12 17:07:22
Message-ID: CAKrYomgj_LcjNgLwxL5sPVNL=2e15Lv=Noc7Z0eZsXasAWUjuQ () mail ! gmail ! com
[Download RAW message or body]
On Fri, Jan 12, 2018 at 8:27 PM, Taylor R Campbell
<campbell+netbsd-tech-kern@mumble.net> wrote:
>> Date: Fri, 12 Jan 2018 04:33:06 +0000 (UTC)
>> From: christos@astron.com (Christos Zoulas)
>>
>> Even then (with callout_halt) nothing prevents something from
>> calling callout_schedule() or callout_reset() again between
>> that time and callout_destroy()... I have code that adds another
>> flag that stops further callouts from being reschuled. Does this
>> help you?
>
> I don't understand. With Ozaki-san's patch, nd6_dad_stop prevents new
> references to the callout, by removing dp from the dadq. The only
> remaining references should be in the scheduled callout itself, which
> will run at most twice more:
>
> (a) once if it was already scheduled and in the process of firing, and
> (b) once more immediately after because of the callout_reset(0).
>
> The dp is then freed by (b). (Ozaki-san: You should also call
> callout_destroy before kmem_intr_free.)
Sure. I added it: http://www.netbsd.org/~ozaki-r/dad-callout_stop.v3.diff
ozaki-r
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic