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: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] Missing list checks for *list_add*
Date: Sun, 26 Jul 2015 02:41:58 +0200	[thread overview]
Message-ID: <2843280.OVBCaG5TZN@sven-edge> (raw)
In-Reply-To: <1898798.WP4bC1arXA@bentobox>

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

On Friday 26 June 2015 16:45:01 Sven Eckelmann wrote:
> Hi,
> 
> Simon debugged the refcnt problem and submitted some patches to fix them. I
> had a brief look and noticed that there are possible more problems similar
> to the *list_del* ones - just with *list_add*. Basically some functions use
> some kind of get function, notice that the element does not exist and then
> create a new one to add to the list. Only the "list_add" is protected. The
> result may be that an element in twice in a list when only a single
> occurrence is allowed.
> 
> The problem I saw is batadv_gw_node_update. It first calls
> batadv_gw_node_get to check if an object with this value already exists and
> then uses batadv_gw_node_add to add a node (which may already be added
> between these two calls). So it has to be made sure that nothing modifies
> the list between these two calls).
> 
> Similar looking functions are for example:
> 
>  * batadv_tvlv_handler_register
>  * batadv_nc_get_nc_node
>  * batadv_softif_create_vlan
>  * batadv_tt_global_orig_entry_add

*push*

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

      reply	other threads:[~2015-07-26  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26 14:45 [B.A.T.M.A.N.] Missing list checks for *list_add* Sven Eckelmann
2015-07-26  0:41 ` Sven Eckelmann [this message]

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=2843280.OVBCaG5TZN@sven-edge \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /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