From: Patrick McHardy <kaber@trash.net>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH V2] NETFILTER: replace list_for_each with list_for_each_entry
Date: Wed, 14 Nov 2007 09:37:35 +0100 [thread overview]
Message-ID: <473AB3CF.6010100@trash.net> (raw)
In-Reply-To: <473AA156.9080600@cn.fujitsu.com>
Li Zefan wrote:
> This patch replaces list_for_each with list_for_each_entry, and
> consequently fixes a bug too.
>
> Things like this is wrong:
>
> list_for_each(i, &nf_sockopts) {
> struct nf_sockopt_ops *ops = (struct nf_sockopt_ops *)i;
>
> It makes the assumption that list is the first member of struct
> nf_sockopt_ops, so the ptr casting works. But if one day the structure
> changes, for example, like this:
So far its not a bug, so I've applied it without that description.
Thanks.
> net/netfilter/nf_sockopt.c | 13 ++++---------
And removed that part since you're the third person within two
weeks to send an identical patch :) Please always base your
patches on Linus' latest -git tree or Dave's networking tree
for the next version once it opens.
next prev parent reply other threads:[~2007-11-14 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 2:59 [PATCH] NETFILTER: replace list_for_each with list_for_each_entry Li Zefan
2007-11-14 6:48 ` Li Zefan
2007-11-14 7:18 ` [PATCH V2] " Li Zefan
2007-11-14 8:37 ` Patrick McHardy [this message]
2007-11-14 8:58 ` Li Zefan
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=473AB3CF.6010100@trash.net \
--to=kaber@trash.net \
--cc=lizf@cn.fujitsu.com \
--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.