From: Simon Wunderlich <simon@open-mesh.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@meshcoding.com>
Subject: Re: [B.A.T.M.A.N.] [PATCH] batman-adv: remove obsolete deleted attribute for gateway node
Date: Thu, 25 Jun 2015 14:00:31 +0200 [thread overview]
Message-ID: <2302094.zTNhOhfvN8@prime> (raw)
In-Reply-To: <558AE222.4050806@meshcoding.com>
On Wednesday 24 June 2015 19:00:18 Antonio Quartulli wrote:
> 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.
That's an excellent point, I didn't check that. It also appears a little
complicated, so I'll add some more protection at this point and resend v2.
Thank you!
Simon
prev parent reply other threads:[~2015-06-25 12: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
2015-06-25 12:00 ` Simon Wunderlich [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=2302094.zTNhOhfvN8@prime \
--to=simon@open-mesh.com \
--cc=antonio@meshcoding.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.