From: Marek Lindner <mareklindner@neomailbox.ch>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCH v2] batman-adv: Use kref_get for hard_iface subfunctions
Date: Mon, 11 Apr 2016 21:04:41 +0800 [thread overview]
Message-ID: <4234386.Ftqvtf5DcC@voltaire> (raw)
In-Reply-To: <1460372800-26049-1-git-send-email-sven@narfation.org>
[-- Attachment #1: Type: text/plain, Size: 937 bytes --]
On Monday, April 11, 2016 13:06:40 Sven Eckelmann wrote:
> The callers of the functions using batadv_hard_iface objects already make
> sure that they hold a valid reference. The subfunctions don't have
> to check whether the reference counter is > 0 because this was checked by
> the callers.
>
> The kref_get function instead WARNs (with debug information) when the
> reference counter would still be 0. This makes a bug in batman-adv better
> visible because kref_get_unless_zero would have ignored this problem.
>
> Signed-off-by: Sven Eckelmann <sven@narfation.org>
> ---
> v2:
> - Fix imbalance in batadv_iv_ogm_aggregate_new
> - Adjust commit message
>
> net/batman-adv/bat_iv_ogm.c | 14 +++-----------
> net/batman-adv/hard-interface.c | 7 +++----
> net/batman-adv/originator.c | 30 +++++++-----------------------
> 3 files changed, 13 insertions(+), 38 deletions(-)
Applied in revision 04614cb.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2016-04-11 13:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 11:06 [B.A.T.M.A.N.] [PATCH v2] batman-adv: Use kref_get for hard_iface subfunctions Sven Eckelmann
2016-04-11 13:04 ` Marek Lindner [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=4234386.Ftqvtf5DcC@voltaire \
--to=mareklindner@neomailbox.ch \
--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