On Fri, Jan 12, 2018 at 8:27 PM, Taylor R Campbell <[email protected]> wrote: >> Date: Fri, 12 Jan 2018 04:33:06 +0000 (UTC) >> From: [email protected] (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
