public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: Ryan Cai <ycaibb@gmail.com>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Some bugs in batmand(Github)
Date: Mon, 06 Sep 2021 15:05:58 +0200	[thread overview]
Message-ID: <22655069.kYlCe6xmuC@ripper> (raw)
In-Reply-To: <B47F117D-81FF-48BA-8AB2-CDBB8A9BB450@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1331 bytes --]

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/df6fcb8706d325b3fd4c7000493e64d57c852755/posix/unix_socket.c#L500
> https://github.com/open-mesh-mirror/batmand/blob/df6fcb8706d325b3fd4c7000493e64d57c852755/posix/unix_socket.c#L565

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

           reply	other threads:[~2021-09-06 13:05 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <B47F117D-81FF-48BA-8AB2-CDBB8A9BB450@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22655069.kYlCe6xmuC@ripper \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=ycaibb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox