tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: callout_stop => callout_halt



On Wed, Nov 12, 2014 at 12:59 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
> On Wed, Nov 12, 2014 at 2:49 AM, Taylor R Campbell
> <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
>>    Date: Wed, 12 Nov 2014 01:03:48 +0900
>>    From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
>>
>>    In order to call callout_destroy for a callout
>>    safely, we have to ensure no instance of the callout
>>    is running. To do so, we should use callout_halt not
>>    callout_stop, IIUC. However, there are several
>>    callout_stop(); callout_destroy() sequences.
>>    Should we replace such callout_stop with callout_halt?
>>
>> Yes.
>
> Thanks. I'll prepare a patch for sweeping them out.

http://www.netbsd.org/~ozaki-r/callout_halt.diff

Here is a patch that includes only ones that require interlock
and rearrangements. Others can be fixed by simply replacing
callout_stop with callout_halt (already committed).

Is the patch okay to commit?

  ozaki-r

>
>>
>> We should also add a usb_rem_task_sync for the same purpose.
>
> Someone please :)
>
>   ozaki-r


Home | Main Index | Thread Index | Old Index