tech-kern archive

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

Re: usb_rem_task_wait




> On Jun 30, 2018, at 11:58 PM, Taylor R Campbell <campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
> 
> The attached patch implements usb_rem_task_wait and uses it in various
> drivers' detach routines so that they have a chance of guaranteeing
> not to leave pending tasks floating around using memory after free.
> Also changes various callout_stops near usb_rem_task to callout_halt
> if they seemed relevant in 30sec of analysis.
> 
> Compile-tested only so far.  Run-testers invited.  Comments?
> <usbtaskwait.patch>

This looks good.

I've been thinking about this interface a bit... it would be handy to have a version of it for some non-usb stuff I have in the hopper.  Should it be generalized and moved to sys/kern?

-- thorpej



Home | Main Index | Thread Index | Old Index