tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MP-safe DAD timer destruction with callout_stop
On Fri, Jan 12, 2018 at 8:27 PM, Taylor R Campbell
<campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
>> Date: Fri, 12 Jan 2018 04:33:06 +0000 (UTC)
>> From: christos%astron.com@localhost (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
Home |
Main Index |
Thread Index |
Old Index