From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fabian Hugelshofer <hugelshofer2006@gmx.ch>
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: Re: Conntrack Events Performance - Multipart Messages?
Date: Fri, 25 Jul 2008 11:32:46 +0200 [thread overview]
Message-ID: <48899DBE.5080005@netfilter.org> (raw)
In-Reply-To: <1216905683.31465.10.camel@pumper.lan.luxnet.ch>
Fabian Hugelshofer wrote:
> @@ -384,8 +378,11 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 pid, u32 seq,
> nest_parms = nla_nest_start(skb, CTA_TUPLE_REPLY | NLA_F_NESTED);
> if (!nest_parms)
> goto nla_put_failure;
> - if (ctnetlink_dump_tuples(skb, tuple(ct, IP_CT_DIR_REPLY)) < 0)
> + rcu_read_lock();
> + if (ctnetlink_dump_tuples(skb, tuple(ct, IP_CT_DIR_REPLY)) < 0) {
> + rcu_read_unlock();
> goto nla_put_failure;
^^^
Would it look nicer if you add a new label 'nla_put_failure_unlock'?
nla_put_failure_unlock:
read_rcu_unlock();
nlmsg_failure:
nla_put_failure:
nlmsg_trim(skb, b);
return -1;
Or much simpler, just call read_rcu_unlock() before the first
nla_nest_start() so that this results in much smaller patch:
nlmsg_failure:
nla_put_failure:
read_rcu_unlock(); <---
nlmsg_trim(skb, b);
return -1;
BTW, please, add a short description to your patches and the
'Signed-off-by' field.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-07-25 9:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 16:42 Conntrack Events Performance - Multipart Messages? Fabian Hugelshofer
2008-07-17 9:16 ` Patrick McHardy
2008-07-17 10:03 ` Pablo Neira Ayuso
2008-07-17 14:34 ` Fabian Hugelshofer
2008-07-17 15:15 ` Fabian Hugelshofer
2008-07-18 15:56 ` Fabian Hugelshofer
2008-07-18 2:11 ` Patrick McHardy
2008-07-21 15:51 ` Fabian Hugelshofer
2008-07-21 15:59 ` Patrick McHardy
2008-07-21 17:49 ` Fabian Hugelshofer
2008-07-23 14:32 ` Fabian Hugelshofer
2008-07-23 14:38 ` Patrick McHardy
2008-07-23 16:12 ` Fabian Hugelshofer
2008-07-23 17:01 ` Patrick McHardy
2008-07-23 17:07 ` Patrick McHardy
2008-07-23 17:30 ` Fabian Hugelshofer
2008-07-23 17:32 ` Patrick McHardy
2008-07-23 17:38 ` Fabian Hugelshofer
2008-07-23 17:40 ` Patrick McHardy
2008-07-23 17:15 ` Fabian Hugelshofer
2008-07-23 17:20 ` Patrick McHardy
2008-07-24 13:21 ` Fabian Hugelshofer
2008-07-25 8:51 ` Fabian Hugelshofer
2008-07-25 9:32 ` Pablo Neira Ayuso [this message]
2008-07-25 11:15 ` Pablo Neira Ayuso
2008-07-27 17:23 ` Fabian Hugelshofer
2008-07-28 18:31 ` Pablo Neira Ayuso
2008-07-28 23:12 ` Fabian Hugelshofer
2008-07-29 17:11 ` Pablo Neira Ayuso
2008-07-25 8:44 ` Fabian Hugelshofer
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=48899DBE.5080005@netfilter.org \
--to=pablo@netfilter.org \
--cc=hugelshofer2006@gmx.ch \
--cc=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.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.