develoment workflow: how to avoid duplicate work ?

Hugo Lefeuvre hle at owl.eu.com
Sun Jun 3 18:25:56 EDT 2018


> > 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
-------------- 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/20180603/c78b5c5e/attachment.sig>


More information about the Kernelnewbies mailing list