public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
Cc: Simon Wunderlich <simon@open-mesh.com>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: remove obsolete deleted attribute for gateway node
Date: Wed, 24 Jun 2015 19:00:18 +0200	[thread overview]
Message-ID: <558AE222.4050806@meshcoding.com> (raw)
In-Reply-To: <1435150249-25322-1-git-send-email-sw@simonwunderlich.de>

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



On 24/06/15 14:50, Simon Wunderlich wrote:
> @@ -537,9 +529,15 @@ void batadv_gw_node_update(struct batadv_priv *bat_priv,
>  		/* Note: We don't need a NULL check here, since curr_gw never
>  		 * gets dereferenced.
>  		 */
> +		spin_lock_bh(&bat_priv->gw.list_lock);
> +		hlist_del_rcu(&gw_node->list);
> +		spin_unlock_bh(&bat_priv->gw.list_lock);
> +

have you verified that we can't get to this point through two threads
and enter the same problem that Sven and Marek have been discussing and
fixing in these days: removing an element from a list twice

If this is possible, you should check that this element is in the list
before deleting it.

Cheers,

-- 
Antonio Quartulli


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-06-24 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 12:50 [B.A.T.M.A.N.] [PATCH] batman-adv: remove obsolete deleted attribute for gateway node Simon Wunderlich
2015-06-24 17:00 ` Antonio Quartulli [this message]
2015-06-25 12:00   ` Simon Wunderlich

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=558AE222.4050806@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --cc=simon@open-mesh.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