Page MenuHomeFreeBSD

ufshci: free the taskqueue on detach
ClosedPublic

Authored by jaeyoon on Wed, Aug 5, 8:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Aug 31, 9:03 AM
Unknown Object (File)
Mon, Aug 31, 9:00 AM
Unknown Object (File)
Thu, Aug 27, 5:02 PM
Unknown Object (File)
Thu, Aug 27, 5:00 PM
Unknown Object (File)
Tue, Aug 25, 6:00 AM
Unknown Object (File)
Thu, Aug 20, 11:31 AM
Unknown Object (File)
Thu, Aug 20, 3:54 AM
Unknown Object (File)
Wed, Aug 19, 8:36 PM
Subscribers
None

Details

Summary

ufshci_ctrlr_destruct() never freed the taskqueue. Every load and
unload cycle leaked the taskqueue and its kernel thread. A task that
was still queued could also run after the module was gone.

Free the taskqueue in destruct. Do it after the interrupt teardown
so nothing enqueues new work. A reset task that is still queued at
this point races the queue teardown. That race is older than this
change. The planned in-flight recovery rework will close it.

Sponsored by: Samsung Electronics

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jaeyoon created this revision.

Not sure you need to set the taskqueue to NULL, but it won't hurt.

This revision is now accepted and ready to land.Fri, Aug 7, 7:56 PM
This revision was automatically updated to reflect the committed changes.