On Friday 28 June 2024 11:58:29 GMT-7 Bartosz Golaszewski wrote: > + <!-- > + Used: > + > + True if line is busy. > + > + Line can be used by gpio-manager, another user-space process, a > kernel + driver or is hogged. The exact reason a line is busy cannot > be determined + from user-space unless it's known to be managed by > gpio-manager (see: + the Managed property of this interface). > + --> > + <property name='Used' type='b' access='read'/> What's the point of this property? It looks racy, as the user (whichever it is) can stop using it soon after a true read, or the line can become used right after a false read? The latter could lead to TOCTOU problems. Wouldn't it be better to force users to RequestLine and get an error if the line is busy? Because if it wasn't busy, now the calling application knows nothing else can grab it. Speaking of, RequestLine should document the errors it may return. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering