> > So, if pi433_release() and pi433_ioctl() can be concurrently executed > > then this issue might happen. > > But isn't release() called when nothing is referencing the file anymore, > so there should be no other file operation running concurrently? The vfs documentation states: release() is "called when the last reference to an open file is closed". Let's say we have a program with threads T1 and T2. - T1 calls ioctl on a file descriptor FD. - (on another processor) T2 closes FD. Since the last reference to FD was closed by T2, release is called. But while release is being called, the ioctl call from T1 may still be running, right ? -- Hugo Lefeuvre (hle) | www.owl.eu.com 4096/ 9C4F C8BF A4B0 8FC5 48EB 56B8 1962 765B B9A8 BACA
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies