Bug#545229: linux-image-2.6.30-1-parisc: panic on boot
Package: linux-image-2.6.30-1-parisc
Version: 2.6.30-6
Severity: critical
Tags: patch
Justification: breaks the whole system
-- Package-specific info:
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (650, 'testing'), (500, 'stable')
Architecture: hppa (parisc)
Kernel: Linux 2.6.26-2-parisc
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash
Versions of packages linux-image-2.6.30-1-parisc depends on:
ii debconf [debconf-2.0] 1.5.27 Debian configuration management sy
ii initramfs-tools [linux-initra 0.93.4 tools for generating an initramfs
ii module-init-tools 3.10-3 tools for managing Linux kernel mo
linux-image-2.6.30-1-parisc recommends no packages.
Versions of packages linux-image-2.6.30-1-parisc suggests:
pn linux-doc-2.6.30 <none> (no description available)
ii palo 1.16+nmu1 Linux boot loader for parisc/hppa
-- debconf information:
linux-image-2.6.30-1-parisc/postinst/kimage-is-a-directory:
linux-image-2.6.30-1-parisc/postinst/old-initrd-link-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/preinst/lilo-has-ramdisk:
linux-image-2.6.30-1-parisc/preinst/abort-overwrite-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/postinst/old-system-map-link-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/preinst/failed-to-move-modules-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/prerm/removing-running-kernel-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/postinst/bootloader-test-error-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/postinst/create-kimage-link-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/postinst/depmod-error-initrd-2.6.30-1-parisc: false
shared/kernel-image/really-run-bootloader: true
linux-image-2.6.30-1-parisc/preinst/lilo-initrd-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/postinst/old-dir-initrd-link-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/preinst/elilo-initrd-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/preinst/overwriting-modules-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/preinst/abort-install-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/postinst/bootloader-error-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/preinst/bootloader-initrd-2.6.30-1-parisc: true
linux-image-2.6.30-1-parisc/postinst/depmod-error-2.6.30-1-parisc: false
linux-image-2.6.30-1-parisc/preinst/initrd-2.6.30-1-parisc:
linux-image-2.6.30-1-parisc/prerm/would-invalidate-boot-loader-2.6.30-1-parisc: true
---
All current debian 2.6.30-1 kernels panic on boot on parisc systems when
loading the initial modules.
Problem is actually caused by binutils outputting duplicate .text
section names. However, this trips a panic on boot because kernel/modules.c
has insufficient error checking for this case
Patches to fix this are
>From 1b364bf438cf337a3818aee77d68c0713f3e1fc4 Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Wed, 26 Aug 2009 22:04:12 +0930
Subject: module: workaround duplicate section names
and to fix up that patch
>From ea6bff368548d79529421a9dc0710fc5330eb504 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 28 Aug 2009 10:44:56 +0200
Subject: modules: Fix build error in the !CONFIG_KALLSYMS case
>From 1b364bf438cf337a3818aee77d68c0713f3e1fc4 Mon Sep 17 00:00:00 2001
From: James Bottomley <James.Bottomley@HansenPartnership.com>
Date: Wed, 26 Aug 2009 22:04:12 +0930
Subject: module: workaround duplicate section names
The root cause is a duplicate section name (.text); is this legal?
[ Amerigo Wang: "AFAIK, yes." ]
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
[ This patch leaves other problems, particularly the sections directory,
but recent parisc toolchains seem to produce these modules and this
prevents a crash and is a minimal change -- RR ]
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
kernel/module.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/module.c b/kernel/module.c
index 07c80e6..eccb561 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2355,7 +2355,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);
--
1.6.0.2
Reply to: