From: Simon Wunderlich <sw@simonwunderlich.de>
To: Sven Eckelmann <sven@narfation.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH v2 2/3] batman-adv: Fix non-atomic bla_claim::backbone_gw access
Date: Fri, 01 Jul 2016 15:34:24 +0200 [thread overview]
Message-ID: <1569263.Zj2Iic9t9P@prime> (raw)
In-Reply-To: <1467310294-5892-1-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 974 bytes --]
On Thursday 30 June 2016 20:11:33 Sven Eckelmann wrote:
> The pointer batadv_bla_claim::backbone_gw can be changed at any time.
> Therefore, access to it must be protected to ensure that two function
> accessing the same backbone_gw are actually accessing the same. This is
> especially important when the crc_lock is used or when the backbone_gw of a
> claim is exchanged.
>
> Not doing so leads to invalid memory access and/or reference leaks.
>
> Fixes: a9ce0dc43e2c ("batman-adv: add basic bridge loop avoidance code")
> Fixes: b307e72d119f ("batman-adv: lock crc access in bridge loop avoidance")
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Technically, you can already add my "Acked-by". However I'd like to suggest
one style change: Could you please rename batadv_bla_claim_backbone_gw into
batadv_bla_claim_get_backbone_gw? I think this would make it clearer what the
function does and also shows get/put pairs clearly in the code.
Thanks!
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-01 13:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 18:10 [B.A.T.M.A.N.] [PATCH v2 1/3] batman-adv: Fix orig_node_vlan leak on orig_node_release Sven Eckelmann
2016-06-30 18:11 ` [B.A.T.M.A.N.] [PATCH v2 2/3] batman-adv: Fix non-atomic bla_claim::backbone_gw access Sven Eckelmann
2016-07-01 13:34 ` Simon Wunderlich [this message]
2016-07-01 13:49 ` [B.A.T.M.A.N.] [PATCH v3 2/4] " Sven Eckelmann
2016-07-01 13:54 ` Simon Wunderlich
2016-07-05 9:26 ` Marek Lindner
2016-06-30 18:11 ` [B.A.T.M.A.N.] [PATCH v2 3/3] batman-adv: Fix reference leak in batadv_find_router Sven Eckelmann
2016-07-01 13:30 ` Simon Wunderlich
2016-07-05 9:31 ` Marek Lindner
2016-06-30 19:41 ` [B.A.T.M.A.N.] [PATCH maint v2 4/4] batman-adv: Free last_bonding_candidate on release of orig_node Sven Eckelmann
2016-07-05 9:34 ` Marek Lindner
2016-07-05 9:18 ` [B.A.T.M.A.N.] [PATCH v2 1/3] batman-adv: Fix orig_node_vlan leak on orig_node_release Marek Lindner
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=1569263.Zj2Iic9t9P@prime \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=sven@narfation.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