From: "Helge Deller" <deller@gmx.de>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: linux-kernel@vger.kernel.org, roland@redhat.com,
linux-parisc@vger.kernel.org
Subject: Re: kernel segv with 2.6.31-rc6 ?
Date: Thu, 20 Aug 2009 13:58:30 +0200 [thread overview]
Message-ID: <20090820115830.123490@gmx.net> (raw)
In-Reply-To: <1250549376.7858.96.camel@mulgrave.site>
> The root cause is a duplicate section name (.text); is this legal?
>
> However, there's a problem with commit
> 6d76013381ed28979cd122eb4b249a88b5e384fa in that if you fail to allocate
> a mod->sect_attrs (in this case it's null because of the duplication),
> it still gets used without checking in add_notes_attrs()
>
> This should fix it
>
> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Thanks!
I tested it, and it does at least fix the kernel crash.
Tested-by: Helge Deller <deller@gmx.de>
> diff --git a/kernel/module.c b/kernel/module.c
> index fd14114..a703c49 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -2353,7 +2353,8 @@ static noinline struct module *load_module(void
> __user *umod,
> if (err < 0)
> goto unlink;
> add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
> - add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
> + if (mod->sect_attrs)
> + add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
>
> /* Get rid of temporary copy */
> vfree(hdr);
>
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
prev parent reply other threads:[~2009-08-20 11:58 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 21:31 kernel segv with 2.6.31-rc6 ? Helge Deller
2009-08-17 22:04 ` James Bottomley
2009-08-17 22:49 ` James Bottomley
2009-08-17 23:54 ` Roland McGrath
2009-08-18 3:18 ` Rusty Russell
2009-08-18 3:55 ` James Bottomley
2009-08-18 5:06 ` Roland McGrath
2009-08-19 0:09 ` James Bottomley
2009-08-19 0:14 ` Roland McGrath
2009-08-19 0:54 ` James Bottomley
2009-08-19 1:31 ` Roland McGrath
2009-08-19 1:38 ` James Bottomley
2009-08-19 18:10 ` Roland McGrath
2009-08-25 7:59 ` Rusty Russell
2009-08-25 19:24 ` Roland McGrath
2009-08-26 12:20 ` Rusty Russell
2009-08-26 17:54 ` Roland McGrath
2009-08-20 11:51 ` Helge Deller
2009-08-20 12:25 ` Helge Deller
2009-08-20 18:55 ` John David Anglin
2009-08-20 21:45 ` Helge Deller
2009-08-20 21:50 ` James Bottomley
2009-08-20 22:07 ` Roland McGrath
2009-08-20 23:01 ` John David Anglin
2009-08-20 23:23 ` Roland McGrath
2009-08-21 0:03 ` John David Anglin
2009-08-25 21:49 ` Mike Frysinger
2009-08-25 7:37 ` Rusty Russell
2009-11-27 22:11 ` Helge Deller
2009-11-30 4:41 ` Roland McGrath
2009-08-20 11:58 ` Helge Deller [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=20090820115830.123490@gmx.net \
--to=deller@gmx.de \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=roland@redhat.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).