From: Florian Westphal <fw@strlen.de>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, wujiafu@gmail.com
Subject: Re: [PATCH nf] netfilter: x_tables: speed up jump target validation
Date: Wed, 13 Jul 2016 01:12:14 +0200 [thread overview]
Message-ID: <20160712231214.GA16108@breakpoint.cc> (raw)
In-Reply-To: <1468341323-15047-1-git-send-email-fw@strlen.de>
Florian Westphal <fw@strlen.de> wrote:
> + offsets = xt_alloc_entry_offsets(newinfo->number);
> + if (!offsets)
> + return -ENOMEM;
> i = 0;
> /* Walk through entries, checking offsets. */
> xt_entry_foreach(iter, entry0, newinfo->size) {
> @@ -717,15 +711,18 @@ translate_table(struct net *net, struct xt_table_info *newinfo, void *entry0,
> repl->underflow,
> repl->valid_hooks);
> if (ret != 0)
> - return ret;
> + goto out_free;
> + if (offsets && i < repl->num_entries)
> + offsets[i] = (void *)iter - entry0;
> ++i;
Ahem. This superflous "offsets &&" hunk is a left-over of the old
version that did not -ENOMEM on xt_alloc_entry_offsets error.
I will submit a v2 tomorrow that removes this part.
prev parent reply other threads:[~2016-07-12 23:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-12 16:35 [PATCH nf] netfilter: x_tables: speed up jump target validation Florian Westphal
2016-07-12 20:57 ` Jeff Wu
2016-07-12 22:49 ` Jeff Wu
2016-07-12 23:12 ` Florian Westphal [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=20160712231214.GA16108@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=wujiafu@gmail.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;
as well as URLs for NNTP newsgroup(s).