On Monday, 6 September 2021 14:59:12 CEST Ryan Cai wrote:
I am Ryan Cai, coming from HK. Recently, I am looking at batmand, which is really cool. However, I found some potential improper locking bugs due to the unreleased locks like here, https://github.com/open-mesh-mirror/batmand/blob/df6fcb8706d325b3fd4c7000493e64d57c852755/posix/unix_socket.c#L261-L284, the lock could not correctly be released when the middle break statement is executed. The bug pattern also exists in [1]. Could you confirme these? I would love to create PR for these.
[...]
[1] https://github.com/open-mesh-mirror/batmand/blob/df6fcb8706d325b3fd4c7000493... https://github.com/open-mesh-mirror/batmand/blob/df6fcb8706d325b3fd4c7000493...
Please contact the maintainer Elektra and the mailing list about it [1].
Btw. I don't see how the break inside the loop should affect the unlocking. The pthread_mutex_unlock comes after the loop and not as part of the loop.
And we are also not doing any work via Github. Please use the normal contribution [2] procedure and don't open PRs on random github repositories.
Kind regards, Sven
[1] https://www.open-mesh.org/projects/open-mesh/wiki/MailingList [2] https://www.open-mesh.org/projects/open-mesh/wiki/Contribute
b.a.t.m.a.n@lists.open-mesh.org