On Thu, Oct 23, 2025 at 11:51:31AM -0300, Jason Gunthorpe wrote:
On Thu, Oct 23, 2025 at 10:22:01PM +0800, Tzung-Bi Shih wrote:
I was misunderstanding about the "sync" we were discussing for misc_deregister_sync(). The "sync", is analogous to synchronize_srcu() of revocable_provider_revoke() in the revocable version [1], doesn't wait for closing all opened files.
Yes, and my remark is we don't need to obfuscate simple locks in core kernel code.
{sigh}
Yes, that's not the goal here at all.
I've refrained from jumping in as I think we are thinking of different stuff here, probably talking past each other in places.
The original goal of having "revocable" is still needed, despite you feeling that cdev can live without it (I strongly disagree with that, and the v4l, gpio, i2c, and other subsystem developers have feelings along those lines as backed up by the many talks over the years about this.)
The use of it in the Rust code already is kind of proof of this, it enables driver authors to not have to worry about a ton of real-world issues they would have to otherwise. Which is why I suggested copying that pattern into C to help us out here.
Anyway...
I've been traveling a ton, and it's not going to let up soon, but I'll try to dig into this more later next week, or on the next 12+ hour flight that I'll be just after that, to give a more detailed review and response, sorry I've not been able to do so yet.
thanks,
greg k-h