Page MenuHomeFreeBSD

ufshci: free the taskqueue on detach
ClosedPublic

Authored by jaeyoon on Aug 5 2026, 8:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 18, 10:30 AM
Unknown Object (File)
Thu, Sep 17, 3:19 PM
Unknown Object (File)
Thu, Sep 17, 10:51 AM
Unknown Object (File)
Sun, Sep 13, 4:54 PM
Unknown Object (File)
Sun, Sep 13, 12:48 PM
Unknown Object (File)
Fri, Sep 11, 5:46 AM
Unknown Object (File)
Thu, Sep 10, 8:55 PM
Unknown Object (File)
Thu, Sep 10, 5:40 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 75388
Build 72271: arc lint + arc unit

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.Aug 7 2026, 7:56 PM
This revision was automatically updated to reflect the committed changes.