Kernel BUG at page_alloc.c:117!
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello,
I come back to you. The code of the module wdpiano is the next one :
#include <linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/fcntl.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>
#define WDIO 0x443
#define WDIODIS 0x43
static int wdpiano_is_open=0; // le fichier driver n'est pas ouvert
static unsigned char tempo=10; //temporisation de 10 second par défaut
MODULE_PARM(tempo, "b"); MODULE_PARM_DESC(tempo, "time-out period from 1s to 255s (default 10s)"); MODULE_AUTHOR("Massinissa AGOUDJIL RATP(R) <[email protected]>"); MODULE_LICENSE("GPL");
static int wdpiano_open(struct inode *inode, struct file *file) {
if (MINOR(inode->i_rdev)!=WATCHDOG_MINOR) return-ENODEV;
// access exclusive au fichier de driver if (wdpiano_is_open) return -EBUSY;
// Comptage du nombre de chargement MOD_INC_USE_COUNT;
//Initialise le timeout outb_p(tempo,WDIO);
printk("<1>wdpiano: initialised with a time-out of
%ds\n",tempo);
// limiter l'ouverture
wdpiano_is_open=1;
return 0;
}
static int wdpiano_release(struct inode *inode, struct file *file) {
if (MINOR(inode->i_rdev)==WATCHDOG_MINOR) {
#ifndef CONFIG_WATCHDOG_NOWAYOUT
//désactiver le watchdog à la fermeture
inb_p(WDIO);
inb_p(WDIODIS);
#endif
wdpiano_is_open=0; }
MOD_DEC_USE_COUNT;
return 0;
}
static ssize_t wdpiano_write(struct file *file, const char *buf, size_t count, loff_t *ppos) {
if (ppos!=&file->f_pos)
return -ESPIPE;
if (count) {
//reinitialiser le timer du watchdog
inb_p(WDIODIS);
inb_p(WDIO);
return 1; }
return 0;
}
//Un petit message!
static int wdpiano_notify_sys(struct notifier_block *this, unsigned long code,
void *unused) {
if(code==SYS_DOWN || code==SYS_HALT) {
//désactiver le watchdog à la fermeture
inb_p(WDIO);
inb_p(WDIODIS);
}
return NOTIFY_DONE;
}static struct file_operations wdpiano_fops = {
owner: THIS_MODULE,
// read: wdpiano_read, write: wdpiano_write, open: wdpiano_open, release: wdpiano_release,
};
static struct miscdevice wdpiano_dev = {
WATCHDOG_MINOR, //fixer le mineur voir miscdevice.h
et devices.txt
"watchdog", //fixer le nom de fichier d'accee
&wdpiano_fops
};
static struct notifier_block wdpiano_notifier = {
wdpiano_notify_sys,
NULL,
0
};int init_module(void)
{
int retval;
printk("Piano watchdog driver RATP(r) V1.0\n");
wdpiano_dev.fops = &wdpiano_fops;
// Allocation des ressources
register_reboot_notifier(&wdpiano_notifier);
// Enregistrement du module
retval = misc_register(&wdpiano_dev);
/* if (retval)
return retval;*/
return 0;
}
void cleanup_module(void)
{
printk("<1>wdpiano: cleanup_module\n");
// Suppression du module
misc_deregister(&wdpiano_dev);
//liberation des ressources
unregister_reboot_notifier(&wdpiano_notifier);
}
Thank's for your help.
Zine
--- Dirk Henning Gerdes <[email protected]> a écrit :
Quoted 68 lines
Hi Zine!
That is not the point. But I suppose that the module which runs under
2.4.18 won't run under Linux 2.6. Or quite even under 2.4.32.
That could cause some problems, either.
If the vendor would give you a new version compatible to 2.6, you could
update your whole kernel.Am Dienstag, den 06.12.2005, 11:35 +0100 schrieb zine el abidine Hamid:
Quoted 4 lines
Why? Do you think that the problem is the module
wdpiano?It's a small program which modify the Watch-Dog
Timer
Quoted 3 lines
value only...
--- Dirk Henning Gerdes <[email protected]> a
écrit
Quoted 3 lines
:
Quoted 1 line
Probably you can contact the manufactor of the
board
Quoted 2 lines
Quoted 2 lines
to get a driver for
the watchdog, which runs under newerLinux-versions,
Quoted 3 lines
Quoted 3 lines
if you really need
the watchdog
Am Montag, den 05.12.2005, 17:48 +0100 schriebzine
Quoted 3 lines
Quoted 3 lines
el abidine Hamid:
Quoted 2 lines
I don't know if it's helpfull but the output
of
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
ksymoops is :
ksymoops 2.4.4 on i686 2.4.18-3. Options used
-V (default)
-k/proc/ksyms(default)
-l/proc/modules(default)
-o/lib/modules/2.4.18-3/(default) -m/boot/System.map-2.4.18-3(default)Warning: You did not tell me where to find
symbol
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
information. I will
assume that the log matches the kernel andmodules
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
that are running
right now and I'll use the default optionsabove
Quoted 3 lines
Quoted 3 lines
for
Quoted 2 lines
symbol resolution.
If the current kernel and/or modules do notmatch
Quoted 6 lines
Quoted 6 lines
the
Quoted 2 lines
log, you can get
more accurate output by telling me the kernelversion
Quoted 2 lines
and where to find
map, modules, ksyms etc. ksymoops -h explainsthe
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
options.
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Error (
expand_objects): cannotstat(/lib/ext3.o)
Quoted 4 lines
Quoted 4 lines
for
Quoted 3 lines
ext3
ksymoops: No such file or directory Error (expand_objects): cannotstat(/lib/jbd.o)
Quoted 11 lines
Quoted 10 lines
for
Quoted 8 lines
jbd
....
Warning (
compare_maps): parport symbolparport_unregister_portnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
entry
Warning (compare_maps): parport symbolparport_wait_eventnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o
Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
entry
Warning (compare_maps): parport symbolparport_wait_peripheralnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
entry
Warning (compare_maps): parport symbol
parport_writeQuoted 2 lines
not found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o
Quoted 38 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
entry
Warning (map_ksym_to_module): cannot matchloaded
Quoted 1 line
Quoted 1 line
Quoted 1 line
module ext3 to a unique module object. Trace
may
Quoted 3 lines
Quoted 3 lines
not
Quoted 2 lines
be reliable.
Warning (map_ksym_to_module): cannot matchloaded
Quoted 1 line
Quoted 1 line
Quoted 1 line
module jbd to a unique module object. Trace
may
Quoted 3 lines
Quoted 3 lines
not
Quoted 2 lines
be reliable.
Dec 1 14:54:58 Republique_ncl_a kernel:kernel
Quoted 3 lines
Quoted 3 lines
BUG at
Quoted 2 lines
page_alloc.c:117!
Dec 1 14:54:58 Republique_ncl_a kernel:invalid
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
operand: 0000
Dec 1 14:54:58 Republique_ncl_a kernel: CPU:0
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Dec 1 14:54:58 Republique_ncl_a kernel: EIP:0010:[<c01316e7>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a
i386
Quoted 1 line
Quoted 1 line
Quoted 1 line
Dec 1 14:54:58 Republique_ncl_a kernel:EFLAGS:
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
00010282
Dec 1 14:54:58 Republique_ncl_a kernel: eax:00000020
Quoted 2 lines
ebx:
c16502d8ecx: 00000001 edx: 000019Dec 1 14:54:58 Republique_ncl_a kernel: esi:00000000
Quoted 2 lines
edi:
000001d0ebp: 00000000 esp: c1755fDec 1 14:54:58 Republique_ncl_a kernel: ds:
Quoted 35 lines
0018
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
es: 0018 ss: 0018
Dec 1 14:54:58 Republique_ncl_a kernel:Process
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
kswapd (pid: 5, stackpage=c1755000)
Dec 1 14:54:58 Republique_ncl_a kernel:Stack:Quoted 26 lines
Quoted 26 lines
Quoted 1 line
c02250b500000075c013d0e3ddf7e600c16502d8000001d
Quoted 3 lines
Dec 1 14:54:58 Republique_ncl_a kernel:
c16502f4c16502d8c16502d8000001d0000001d0c012ff8
Quoted 3 lines
Dec 1 14:54:58 Republique_ncl_a kernel:00000125
c02c473c00000c24000008480000000fc013038
Quoted 1 line
Dec 1 14:54:58 Republique_ncl_a kernel: CallTrace:
Quoted 2 lines
[<
c013d0e3>]try_to_free_buffers[kernel]0xb3Dec 1 14:54:58 Republique_ncl_a kernel:[<
c013b23a>]Quoted 2 lines
try_to_release_page[kernel]0x3aDec 1 14:54:58 Republique_ncl_a kernel:[<
c012ff8b>]Quoted 2 lines
page_launder_zone[kernel]0x42bDec 1 14:54:58 Republique_ncl_a kernel:[<
c0130388>]Quoted 2 lines
page_launder[kernel]0x168Dec 1 14:54:58 Republique_ncl_a kernel:[<
c0130c12>]Quoted 2 lines
do_try_to_free_pages[kernel]0x12Dec 1 14:54:58 Republique_ncl_a kernel:
=== message truncated ===
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Hi Zine!
I didn't get that you have the source-code of the module. The keyword "tainted" in your lsmod-output shows, that you have a propritary driver loaded in your system. I thought that would be the watchdog-driver. But from the sourcecode you can see, that the driver stands under gpl and won't taint your kernel.
I would strongly suggest to update to 2.4.32 and recompile the watchdog-module. I don't think, that you will find an error in such old code in an acceptable time.
Dirk
Am Mittwoch, den 07.12.2005, 10:40 +0100 schrieb zine el abidine Hamid:
Quoted 381 lines
Hello,
I come back to you. The code of the module wdpiano is the next one :
#include <
linux/config.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/fcntl.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/init.h>#define WDIO
0x443
#define WDIODIS0x43
static int wdpiano_is_open=0; // le fichier driver n'est pas ouvert
static unsigned char tempo=10; //temporisation de 10 second par défaut
MODULE_PARM(tempo, "b");MODULE_PARM_DESC(tempo, "time-out period from 1s to 255s (default 10s)");MODULE_AUTHOR("Massinissa AGOUDJIL RATP(R) <[email protected]>");MODULE_LICENSE("GPL");static int wdpiano_open(struct inode *inode, struct
file *file) { if (MINOR(inode->i_rdev)!=WATCHDOG_MINOR) return -ENODEV; // access exclusive au fichier de driver if (wdpiano_is_open) return -EBUSY; // Comptage du nombre de chargement MOD_INC_USE_COUNT; //Initialise le timeout outb_p(tempo,WDIO); printk("<1>wdpiano: initialised with a time-out of %ds\n",tempo); // limiter l'ouverture wdpiano_is_open=1; return 0; }static int wdpiano_release(struct inode *inode, struct
file *file) { if (MINOR(inode->i_rdev)==WATCHDOG_MINOR) { #ifndef CONFIG_WATCHDOG_NOWAYOUT //désactiver le watchdog à la fermeture inb_p(WDIO); inb_p(WDIODIS); #endif wdpiano_is_open=0; } MOD_DEC_USE_COUNT; return 0; }static
ssize_twdpiano_write(struct file *file, constchar *buf, size_t count, loff_t *ppos) { if (ppos!=&file->f_pos) return -ESPIPE; if (count) { //reinitialiser le timer du watchdog inb_p(WDIODIS); inb_p(WDIO); return 1; } return 0; } //Un petit message! static int wdpiano_notify_sys(struct notifier_block *this, unsigned long code, void *unused) { if(code==SYS_DOWN || code==SYS_HALT) { //désactiver le watchdog à la fermeture inb_p(WDIO); inb_p(WDIODIS); } return NOTIFY_DONE; }static struct
file_operationswdpiano_fops= {
owner:THIS_MODULE,// read: wdpiano_read, write: wdpiano_write, open: wdpiano_open, release: wdpiano_release,};
static struct miscdevice
wdpiano_dev= {
WATCHDOG_MINOR, //fixer le mineur voirmiscdevice.h
et devices.txt
"watchdog", //fixer le nom de fichier d'accee
&wdpiano_fops
};static struct notifier_block wdpiano_notifier = { wdpiano_notify_sys, NULL, 0 };int
init_module(void)
{
int retval;
printk("Piano watchdog driver RATP(r) V1.0\n");wdpiano_dev.fops =
&wdpiano_fops;
// Allocation des ressources
register_reboot_notifier(&wdpiano_notifier);
// Enregistrement du module
retval =misc_register(&wdpiano_dev);
/* if (retval)
return retval;*/
return 0;
}void
cleanup_module(void)
{
printk("<1>wdpiano: cleanup_module\n");// Suppression du module
misc_deregister(&wdpiano_dev);
//liberation des ressources
unregister_reboot_notifier(&wdpiano_notifier);
}Thank's for your help.
Zine
--- Dirk Henning Gerdes <[email protected]> a écrit :
Quoted 68 lines
Hi Zine!
That is not the point. But I suppose that the module which runs under
2.4.18 won't run under Linux 2.6. Or quite even under 2.4.32.
That could cause some problems, either.
If the vendor would give you a new version compatible to 2.6, you could
update your whole kernel.Am Dienstag, den 06.12.2005, 11:35 +0100 schrieb zine el abidine Hamid:
Quoted 4 lines
Why? Do you think that the problem is the module
wdpiano?It's a small program which modify the Watch-Dog
Timer
Quoted 3 lines
value only...
--- Dirk Henning Gerdes <[email protected]> a
écrit
Quoted 3 lines
:
Quoted 1 line
Probably you can contact the manufactor of the
board
Quoted 2 lines
Quoted 2 lines
to get a driver for
the watchdog, which runs under newerLinux-versions,
Quoted 3 lines
Quoted 3 lines
if you really need
the watchdog
Am Montag, den 05.12.2005, 17:48 +0100 schriebzine
Quoted 3 lines
Quoted 3 lines
el abidine Hamid:
Quoted 2 lines
I don't know if it's helpfull but the output
of
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
ksymoops is :
ksymoops 2.4.4 on i686 2.4.18-3. Options used
-V (default)
-k/proc/ksyms(default)
-l/proc/modules(default)
-o/lib/modules/2.4.18-3/(default) -m/boot/System.map-2.4.18-3(default)Warning: You did not tell me where to find
symbol
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
information. I will
assume that the log matches the kernel andmodules
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
that are running
right now and I'll use the default optionsabove
Quoted 3 lines
Quoted 3 lines
for
Quoted 2 lines
symbol resolution.
If the current kernel and/or modules do notmatch
Quoted 6 lines
Quoted 6 lines
the
Quoted 2 lines
log, you can get
more accurate output by telling me the kernelversion
Quoted 2 lines
and where to find
map, modules, ksyms etc. ksymoops -h explainsthe
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
options.
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Error (
expand_objects): cannotstat(/lib/ext3.o)
Quoted 4 lines
Quoted 4 lines
for
Quoted 3 lines
ext3
ksymoops: No such file or directory Error (expand_objects): cannotstat(/lib/jbd.o)
Quoted 11 lines
Quoted 10 lines
for
Quoted 8 lines
jbd
....
Warning (
compare_maps): parport symbolparport_unregister_portnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.oQuoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
entry
Warning (compare_maps): parport symbolparport_wait_eventnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.oQuoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
entry
Warning (compare_maps): parport symbolparport_wait_peripheralnot found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.oQuoted 8 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
entry
Warning (compare_maps): parport symbol
parport_writeQuoted 2 lines
not found in
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.o.Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Ignoring
/lib/modules/2.4.18-3/kernel/drivers/parport/parport.oQuoted 38 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
entry
Warning (map_ksym_to_module): cannot matchloaded
Quoted 1 line
Quoted 1 line
Quoted 1 line
module ext3 to a unique module object. Trace
may
Quoted 3 lines
Quoted 3 lines
not
Quoted 2 lines
be reliable.
Warning (map_ksym_to_module): cannot matchloaded
Quoted 1 line
Quoted 1 line
Quoted 1 line
module jbd to a unique module object. Trace
may
Quoted 3 lines
Quoted 3 lines
not
Quoted 2 lines
be reliable.
Dec 1 14:54:58 Republique_ncl_a kernel:kernel
Quoted 3 lines
Quoted 3 lines
BUG at
Quoted 2 lines
page_alloc.c:117!
Dec 1 14:54:58 Republique_ncl_a kernel:invalid
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
operand: 0000
Dec 1 14:54:58 Republique_ncl_a kernel: CPU:0
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Dec 1 14:54:58 Republique_ncl_a kernel: EIP:0010:[<c01316e7>] Not tainted
Using defaults from ksymoops -t elf32-i386 -a
i386
Quoted 1 line
Quoted 1 line
Quoted 1 line
Dec 1 14:54:58 Republique_ncl_a kernel:EFLAGS:
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
00010282
Dec 1 14:54:58 Republique_ncl_a kernel: eax:00000020
Quoted 2 lines
ebx:
c16502d8ecx: 00000001 edx: 000019Dec 1 14:54:58 Republique_ncl_a kernel: esi:00000000
Quoted 2 lines
edi:
000001d0ebp: 00000000 esp: c1755fDec 1 14:54:58 Republique_ncl_a kernel: ds:Quoted 35 lines
0018
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
es: 0018 ss: 0018
Dec 1 14:54:58 Republique_ncl_a kernel:Process
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
kswapd (pid: 5, stackpage=c1755000)
Dec 1 14:54:58 Republique_ncl_a kernel:Stack:Quoted 26 lines
Quoted 26 lines
Quoted 1 line
c02250b500000075c013d0e3ddf7e600c16502d8000001d
Quoted 3 lines
Dec 1 14:54:58 Republique_ncl_a kernel:
c16502f4c16502d8c16502d8000001d0000001d0c012ff8
Quoted 3 lines
Dec 1 14:54:58 Republique_ncl_a kernel:00000125
c02c473c00000c24000008480000000fc013038
Quoted 1 line
Dec 1 14:54:58 Republique_ncl_a kernel: CallTrace:
Quoted 2 lines
[<
c013d0e3>]try_to_free_buffers[kernel]0xb3Dec 1 14:54:58 Republique_ncl_a kernel:[<
c013b23a>]Quoted 2 lines
try_to_release_page[kernel]0x3aDec 1 14:54:58 Republique_ncl_a kernel:[<
c012ff8b>]Quoted 2 lines
page_launder_zone[kernel]0x42bDec 1 14:54:58 Republique_ncl_a kernel:[<
c0130388>]Quoted 2 lines
page_launder[kernel]0x168Dec 1 14:54:58 Republique_ncl_a kernel:[<
c0130c12>]Quoted 2 lines
do_try_to_free_pages[kernel]0x12Dec 1 14:54:58 Republique_ncl_a kernel:=== message truncated ===
___________________________________________________________________________
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com
Signature · 7 lines
Dirk Henning Gerdes
Bönnersdyk 47
47803 Krefeld
Tel: 02151-755745
0174-7776640
Mail: [email protected]