From: David Miller <davem@davemloft.net>
To: xemul@openvz.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] scm: fix scm_fp_list->list initialization made in wrong place
Date: Fri, 14 Nov 2008 14:52:18 -0800 (PST) [thread overview]
Message-ID: <20081114.145218.125819122.davem@davemloft.net> (raw)
In-Reply-To: <491D8C1A.5060003@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 14 Nov 2008 17:32:58 +0300
> This is the next page of the scm recursion story (the commit
> f8d570a4 net: Fix recursive descent in __scm_destroy()).
>
> In function scm_fp_dup(), the INIT_LIST_HEAD(&fpl->list) of newly
> created fpl is done *before* the subsequent memcpy from the old
> structure and thus the freshly initialized list is overwritten.
>
> But that's OK, since this initialization is not required at all,
> since the fpl->list is list_add-ed at the destruction time in any
> case (and is unused in other code), so I propose to drop both
> initializations, rather than moving it after the memcpy.
>
> Please, correct me if I miss something significant.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Yep, this is totally correct.
Linus even noticed this in my original patch but kept them there
because they seemed harmless to him.
Patch applied to net-2.6, thanks!
prev parent reply other threads:[~2008-11-14 22:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-14 14:32 [PATCH] scm: fix scm_fp_list->list initialization made in wrong place Pavel Emelyanov
2008-11-14 22:52 ` David Miller [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=20081114.145218.125819122.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.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;
as well as URLs for NNTP newsgroup(s).