public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels.com>
To: ye janboe <janboe.ye@gmail.com>
Cc: davem@davemloft.net, linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Is it possible for addrconf_init_net to kfree no-heap address?
Date: Mon, 23 Aug 2010 11:42:02 +0400	[thread overview]
Message-ID: <4C72264A.3030302@parallels.com> (raw)
In-Reply-To: <AANLkTinxVG=X-ncpF21kxh+XifUOtLHBfsP2FJ-Cgx6U@mail.gmail.com>

On 08/19/2010 08:15 AM, ye janboe wrote:
> hi, Pavel and David
> 
> addrconf_init_net make me a little confused.
> 
> if all and dflt are not allocated by kmemdup and sysctl_register
> failed, this function will try to kfree dftl which points to
> ipv6_devconf_dfl which is not a heap address. AFAIK, kfree will panic
> if the address does not belong to slab page.
> 
> Is there any special reason for these codes?

This situation can only occur for the init namespace, i.e. early at host
boot so the sysctl registration will not fail for sure.

On the other hand, since the ipv6 can be built as module this code can be
executed later run-time ...

Can you send a fixing patch?

> many thanks!
> 


      reply	other threads:[~2010-08-23  8:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19  4:15 Is it possible for addrconf_init_net to kfree no-heap address? ye janboe
2010-08-23  7:42 ` Pavel Emelyanov [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=4C72264A.3030302@parallels.com \
    --to=xemul@parallels.com \
    --cc=davem@davemloft.net \
    --cc=janboe.ye@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox