public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Masami Hiramatsu <mhiramat@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"systemtap-ml" <systemtap@sources.redhat.com>
Subject: Re: [PATCH] module: fix refptr allocation and release order
Date: Wed, 18 Mar 2009 07:51:55 +1030	[thread overview]
Message-ID: <200903180751.55665.rusty@rustcorp.com.au> (raw)
In-Reply-To: <49BF17F4.7040908@cosmosbay.com>

On Tuesday 17 March 2009 13:54:36 Eric Dumazet wrote:
> Rusty Russell a écrit :
> > From: Masami Hiramatsu <mhiramat@redhat.com>
> > 
> > Impact: fix ref-after-free crash on failed module load
> > 
> > Fix refptr bug: Change refptr allocation and release order not to access a module
> > data structure pointed by 'mod' after freeing mod->module_core.
> > This bug will cause kernel panic(e.g. failed to find undefined symbols).
> > 
> > This bug was reported on systemtap bugzilla.
> > http://sources.redhat.com/bugzilla/show_bug.cgi?id=9927
> > 
> > Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
> > Cc: Eric Dumazet <dada1@cosmosbay.com>
> > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
> 
> 
> My original patch did not have this problem, because I used a local variable
> to hold refptr.
> 
> http://www.archivum.info/linux-kernel@vger.kernel.org/2008-05/msg07400.html
> 
> A simpler patch could just use a local variable again, since we are very
> late in rc phase ?

Right, it was my mistake.  But the extra #ifdef is still ugly: moving the code
is a larger patch, but it's not complicated.

Thanks,
Rusty.

      reply	other threads:[~2009-03-17 21:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17  2:20 [PATCH] module: fix refptr allocation and release order Rusty Russell
2009-03-17  3:24 ` Eric Dumazet
2009-03-17 21:21   ` Rusty Russell [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=200903180751.55665.rusty@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=systemtap@sources.redhat.com \
    --cc=torvalds@linux-foundation.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