fwctl_unregister(9)
π NAME π
okay so this is fwctl_unregister(9), straight out of the Kernel API Manual, and it's literally the βunregister a device from the subsystemβ girlie. No cap. π¦
π«Ά SYNOPSIS π«Ά
void fwctl_unregister (struct fwctl_device *fwctl );
π ARGUMENTS π
fwctlβ a previously allocated and registeredfwctl_device. Like, it already had its moment; now we're unregistering it. π
π DESCRIPTION π
This function undoes fwctl_register. That's the whole vibe. On return, no driver ops will be called β not a single one. π
The caller still has to call fwctl_put to actually free the fwctl. Unregister does not free it for you, bestie. π«Ά
Here's the lowkey wild part: unregister will return even if userspace still has file descriptors open. Yep, it just dips. It will call ops->close_uctx on any open FDs, and after return no driver op will be called. The FDs remain open, but all fops will return -ENODEV. So they're still there, just doing the absolute least. π
The design of fwctl allows this sort of disassociation of the driver from the subsystem primarily by keeping memory allocations owned by the core subsystem. That's the main character move. Both the fwctl_device and fwctl_uctx can be freed without requiring a driver callback, and this allows the module to remain unlocked while FDs are open. Iconic behavior, honestly. β¨
π SEE ALSO π
- Kernel file
./drivers/fwctl/main.cβ go read it, iykyk π fwctl_register(9)β the prequel, fr fr πΈ
Signed with so much love by ./drivers/fwctl, October 2026, all about fwctl_unregister(9) ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms