> > Do you mean that the ioctl/read/write call increments the reference > > count in this case ? It would mean that these syscalls aren't really > > using passed FD but instead create duplicates to make sure the open > > file description won't be freed during their execution, right ? > > One file descriptor is passed around, and each syscall or other code that > needs > to protect it from evaporating out from under it takes a reference.
Thanks. I think I'll have to read the source code to fully understand
what happens. Do you know what piece of code handles this reference
duplication ?
As a conclusion we can assume that ioctl and release never run
concurrently, and as such the lock introduced in my patch is useless.
Concerning the TODO at line 876, I think I've misunderstood it. I'll
think a bit more about it and come back with an updated patch later.
Thanks !
Cheers,
Hugo
--
Hugo Lefeuvre (hle) | www.owl.eu.com
4096/ 9C4F C8BF A4B0 8FC5 48EB 56B8 1962 765B B9A8 BACA
signature.asc
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list [email protected] https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
