LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Kernel Oops within Linux Fedore Core 5
@ 2008-04-11 15:13 Uladzislau Rezki
  2008-04-12 19:53 ` Arjan van de Ven
  0 siblings, 1 reply; 3+ messages in thread
From: Uladzislau Rezki @ 2008-04-11 15:13 UTC (permalink / raw)
  To: linux-kernel

HI,

I am running linux Fedore Core 5 with 2.6.15 linux kernel.

So , the problem is that, while loading my own kernel module, kernel gets Oops.

---> usbfs
---> tmpfs
---> binfmt_misc
---> rpc_pipefs
---> autofs
Unable to handle kernel paging request at virtual address dead4ead
printing eip:
c7034018
*pde = 00000000
Oops: 0000 [#1]
last sysfs file: /class/net/sit0/address
Modules linked in: sb_show(U) ipv6 autofs4 hidp rfcomm l2cap bluetooth
sunrpc dm_mirror dm_mod video button battery ac lp parport_pc parport
floppy nvram sg i2c_piix4 pcnet32 mii i2c_core ext3 jbd mptspi
mptscsih sd_mod scsi_mod mptbase
CPU: 0
EIP: 0060:[<c7034018>] Not tainted VLI
EFLAGS: 00010282 (2.6.15-1.2054_FC5.root #1)
EIP is at sb_show_init+0x18/0x41 [sb_show]
eax: dead4ead ebx: c0344740 ecx: c5877d90 edx: c7006096
esi: c1304e00 edi: c57d2b68 ebp: c70065c8 esp: c3962e6c
ds: 007b es: 007b ss: 0068
Process insmod (pid: 1675, threadinfo=c3962000 task=c621d000)
Stack: <0>c57d2b58 c7006580 c0130506 0001027a 00000550 00000320
c7006580 00000000
00000000 00000000 00000000 00000000 00000000 00000000 c72205fc 00000000
c59e78c0 c721b8ec c721b5cc c721b914 c720b000 00000004 0000000a 00000000
Call Trace:
[<c0130506>] sys_init_module+0x1382/0x1514 [<c015240f>] do_sync_read+0xb8/0xf3
[<c01511f1>] nameidata_to_filp+0x19/0x28 [<c012a17b>]
autoremove_wake_function+0x0/0x2d
[<c014620e>] vma_link+0x4a/0xc2 [<c01c066e>] _atomic_dec_and_lock+0x22/0x2c
[<c0169c2e>] mntput_no_expire+0x11/0x6d [<c0102bc1>] syscall_call+0x7/0xb
Code: Bad EIP value.
Continuing in 1 seconds.

here is source:

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>

#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/mount.h>

static int __init
sb_show_init (void)
{
    struct super_block *init_sb = NULL;
    struct task_struct *init = NULL;
    struct list_head *list_sb = NULL;
    struct vfsmount *root_mnt;

    /*
     * The init_task struct describes
     * init process.
    */
    init = &init_task;
    root_mnt = init->fs->rootmnt;
    init_sb = root_mnt->mnt_sb;

    list_for_each(list_sb, &init_sb->s_list) {
        struct super_block *sb = sb_entry(list_sb);

        mutex_lock(&s->s_lock);
        printk(KERN_ERR "---> %s\n", sb->s_id);
        mutex_unlock(&s->s_lock);
    }

    return 0;
}

static void __exit
sb_show_exit (void)
{
    printk(KERN_ERR "By-by.\n");
}

I try just go through the list of super blocks and printing "s_id" as
a result get Oops. it works fine with 2.6.18/22/24 kernels. Maybe this
problem concerns just Fedore Core kernel? Or maybe my code is wrong?

thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Kernel Oops within Linux Fedore Core 5
  2008-04-11 15:13 Kernel Oops within Linux Fedore Core 5 Uladzislau Rezki
@ 2008-04-12 19:53 ` Arjan van de Ven
  2008-04-13  9:40   ` Uladzislau Rezki
  0 siblings, 1 reply; 3+ messages in thread
From: Arjan van de Ven @ 2008-04-12 19:53 UTC (permalink / raw)
  To: Uladzislau Rezki; +Cc: linux-kernel

On Fri, 11 Apr 2008 18:13:59 +0300
"Uladzislau Rezki" <urezki@gmail.com> wrote:

> HI,
> 
> I am running linux Fedore Core 5 with 2.6.15 linux kernel.
> 
> So , the problem is that, while loading my own kernel module, kernel
> gets Oops.
> 
> ---> usbfs
> ---> tmpfs
> ---> binfmt_misc
> ---> rpc_pipefs
> ---> autofs
> Unable to handle kernel paging request at virtual address dead4ead
> printing eip:
> c7034018
> *pde = 00000000
> Oops: 0000 [#1]
> last sysfs file: /class/net/sit0/address
> Modules linked in: sb_show(U) ipv6 autofs4 hidp rfcomm l2cap bluetooth
> sunrpc dm_mirror dm_mod video button battery ac lp parport_pc parport
> floppy nvram sg i2c_piix4 pcnet32 mii i2c_core ext3 jbd mptspi
> mptscsih sd_mod scsi_mod mptbase
> CPU: 0
> EIP: 0060:[<c7034018>] Not tainted VLI
> EFLAGS: 00010282 (2.6.15-1.2054_FC5.root #1)
> EIP is at sb_show_init+0x18/0x41 [sb_show]
> eax: dead4ead ebx: c0344740 ecx: c5877d90 edx: c7006096
> esi: c1304e00 edi: c57d2b68 ebp: c70065c8 esp: c3962e6c
> ds: 007b es: 007b ss: 0068
> Process insmod (pid: 1675, threadinfo=c3962000 task=c621d000)
> Stack: <0>c57d2b58 c7006580 c0130506 0001027a 00000550 00000320
> c7006580 00000000
> 00000000 00000000 00000000 00000000 00000000 00000000 c72205fc
> 00000000 c59e78c0 c721b8ec c721b5cc c721b914 c720b000 00000004
> 0000000a 00000000 Call Trace:
> [<c0130506>] sys_init_module+0x1382/0x1514 [<c015240f>]


Hi,

normally (read: 99% of the cases) this happens when your Makefile is buggy.
Are you sure your Makefile is correct? Also, are you sure you're compiling
against the right kernel headers ?

Greetings,
   Arjan van de Ven

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Kernel Oops within Linux Fedore Core 5
  2008-04-12 19:53 ` Arjan van de Ven
@ 2008-04-13  9:40   ` Uladzislau Rezki
  0 siblings, 0 replies; 3+ messages in thread
From: Uladzislau Rezki @ 2008-04-13  9:40 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: linux-kernel

>
> Hi,
>
>  normally (read: 99% of the cases) this happens when your Makefile is buggy.
>  Are you sure your Makefile is correct? Also, are you sure you're compiling
>  against the right kernel headers ?
>
>  Greetings,
>
>    Arjan van de Ven
>
Yes I'm shure that makefile is right, and I'm compiling with right
linux-headers. Bellow you can see Makefile which I use:

obj-m := sb_show.o

KDIR  := /lib/modules/$(shell uname -r)/build
PWD   := $(shell pwd)

default:
	$(MAKE) -C $(KDIR) M=$(PWD) modules

clean:
	rm -rf sb_show.ko .sb_show.ko.cmd .sb_show.mod.o.cmd .sb_show.o.cmd
.tmp_versions

--
Uladzislau Rezki

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-13  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-11 15:13 Kernel Oops within Linux Fedore Core 5 Uladzislau Rezki
2008-04-12 19:53 ` Arjan van de Ven
2008-04-13  9:40   ` Uladzislau Rezki

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).