develoment workflow: how to avoid duplicate work ?

Hugo Lefeuvre hle at owl.eu.com
Tue Jun 5 10:20:16 EDT 2018


> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20180605/1e927823/attachment-0001.sig>


More information about the Kernelnewbies mailing list