[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MP-safe DAD timer destruction with callout_stop
On Jan 12, 11:27am, campbell+netbsd-tech-kern%mumble.net@localhost (Taylor R Campbell) wrote:
-- Subject: Re: MP-safe DAD timer destruction with callout_stop
| > 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.)
| We already have way too many states that callouts can be in. I don't
| see why we need a new one, for this or any application -- this is the
| standard pattern of prevent new references, wait for existing ones to
| drain, and then free.
Fine, then I will not change and fix the kevent race specifically.
Main Index |
Thread Index |