# Kernel-2.6.25-r5 cifs crashing(solved by upgrade kernel)

## drizzt

Upgraded from Kernel-2.6.24 to 2.6.25 some days ago. Since then I can't mount Windows shares.

```

mount -t cifs //HAL2/Temp /mnt/usbdisk1/

```

Produces the following output in dmesg:

```

BUG: unable to handle kernel NULL pointer dereference at 0000000000000045

IP: [<ffffffff8036f535>] strnlen+0x5/0x30

PGD 5e092067 PUD 71852067 PMD 0

Oops: 0000 [5] PREEMPT

CPU 0

Modules linked in: cifs snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss vboxdrv usb_storage b43 mac80211 cfg80211 snd_intel8x0m snd_intel8x0 snd_ac97_codec nvidia(P) ac97_bus snd_pcm firewire_ohci snd_timer snd firewire_core k8temp yenta_socket ssb rsrc_nonstatic ehci_hcd ohci_hcd pcmcia_core snd_page_alloc i2c_nforce2 i2c_core crc_itu_t

Pid: 5265, comm: mount.cifs Tainted: P   M  DA 2.6.25-gentoo-r5 #1

RIP: 0010:[<ffffffff8036f535>]  [<ffffffff8036f535>] strnlen+0x5/0x30

RSP: 0018:ffff81005b1cfc30  EFLAGS: 00010206

RAX: ffff810066140000 RBX: 0000000000000045 RCX: 0000000000000000

RDX: 0000000000000000 RSI: 000000000000000f RDI: 0000000000000045

RBP: 00000000fffffff4 R08: 0000000000000000 R09: ffff81005b1cfc48

R10: 0000000000000000 R11: 0000000000000206 R12: ffff81005e1e7420

R13: ffff81007ed2c000 R14: ffff81007ed2c000 R15: ffff81005e1e7420

FS:  00007fd3650566f0(0000) GS:ffffffff80604000(0000) knlGS:00000000f54ffb90

CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b

CR2: 0000000000000045 CR3: 0000000063d2c000 CR4: 00000000000006e0

DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000

DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400

Process mount.cifs (pid: 5265, threadinfo ffff81005b1ce000, task ffff81005b1da770)

Stack:  ffffffff88a9c0ae ffff81007ec90800 000000046e80a818 0000000000000000

 0000000000000000 0000000000000000 0000000000000000 0000000000000000

 0000000000000000 0000000000000000 0000000000000000 0000000000000000

Call Trace:

 [<ffffffff88a9c0ae>] ? :cifs:cifs_mount+0x7ee/0x2590

 [<ffffffff8036af4b>] ? idr_get_new+0xb/0x30

 [<ffffffff8036f86e>] ? strlcpy+0x4e/0x80

 [<ffffffff80289180>] ? set_anon_super+0x0/0x110

 [<ffffffff88a8d7ae>] ? :cifs:cifs_get_sb+0x9e/0x240

 [<ffffffff80288806>] ? vfs_kern_mount+0x56/0xc0

 [<ffffffff802888d3>] ? do_kern_mount+0x53/0x110

 [<ffffffff802a12db>] ? do_new_mount+0x9b/0xe0

 [<ffffffff802a1a06>] ? do_mount+0x1d6/0x210

 [<ffffffff80261039>] ? __alloc_pages+0x59/0x370

 [<ffffffff802613e0>] ? __get_free_pages+0x90/0xa0

 [<ffffffff802a1adb>] ? sys_mount+0x9b/0x100

 [<ffffffff8020b31b>] ? system_call_after_swapgs+0x7b/0x80

Code: ff ff 48 8d 44 05 00 89 da 38 10 74 0a 48 ff c8 48 39 c5 76 f4 31 c0 5b 5d c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 85 f6 74 1f <80> 3f 00 74 1a 48 8d 14 37 48 89 f8 eb 05 80 38 00 74 08 48 ff

RIP  [<ffffffff8036f535>] strnlen+0x5/0x30

 RSP <ffff81005b1cfc30>

CR2: 0000000000000045

---[ end trace 5f34c7d565847ff0 ]---

```

This machine runs Gentoo 64Bit with 26 BIT 2.6.25-gentoo-r5 kernel

Anybody any ideas ?

EDIT

Funny mistype:

This machine runs Gentoo 64Bit with 64 Bit 2.6.25-gentoo-r5 kernel

----------

## pappy_mcfae

When you moved your .config from one kernel to the next, did you run make oldconfig? If not, you need to do so. Then you need to use either make xconfig or make menuconfig to make sure the options you desire are set.

Blessed be!

Pappy

----------

## drizzt

Sure I did that  :Wink: 

It's not my first kernel update and I'm using Gentoo since Profile "1.something".

SMBFS and CIFS as modules built. 

If any more informations needed, please ask and I will post them,...

P.S. I think I will try and disable smbfs completely, maybe this helps

----------

## pappy_mcfae

Then I'm out of ideas because mount.cifs works on this machine and my old Toshiba laptop whether I'm using kernel 2.6.22.19, or 2.6.25-gentoo-r4 or any versions in between. I did notice that there were warnings about smbfs being depricated, but I don't think that has anything to do with your problem.

Blessed be!

Pappy

----------

## drizzt

UPDATE

Tried to use smbfs. Mounting works fine but then umount command crashes

```

WARNING: at kernel/exit.c:889 do_exit+0x721/0x7b0()

Modules linked in: nls_iso8859_15 nls_utf8 smbfs cifs snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss vboxdrv usb_storage b43 snd_intel8x0 snd_intel8x0m snd_ac97_codec mac80211 cfg80211 nvidia(P) ac97_bus snd_pcm snd_timer ssb firewire_ohci firewire_core k8temp snd i2c_nforce2 yenta_socket rsrc_nonstatic pcmcia_core i2c_core ehci_hcd ohci_hcd snd_page_alloc crc_itu_t

Pid: 6011, comm: umount Tainted: P   M  DA 2.6.25-gentoo-r5 #1

Call Trace:

 [<ffffffff8022d594>] warn_on_slowpath+0x64/0x90

 [<ffffffff8022e6f5>] vprintk+0x345/0x3b0

 [<ffffffff80246a7c>] ktime_get+0xc/0x50

 [<ffffffff80227ccf>] hrtick_start_fair+0xaf/0x140

 [<ffffffff8022e7ae>] printk+0x4e/0x60

 [<ffffffff802316e1>] do_exit+0x721/0x7b0

 [<ffffffff80226fc0>] __wake_up_common+0x50/0x80

 [<ffffffff8020c114>] oops_end+0x74/0x80

 [<ffffffff8021f840>] do_page_fault+0x400/0x890

 [<ffffffff804da109>] error_exit+0x0/0x51

 [<ffffffff80468370>] sock_destroy_inode+0x0/0x10

 [<ffffffff80238844>] lock_task_sighand+0x14/0x80

 [<ffffffff8023a1f2>] group_send_sig_info+0x62/0xb0

 [<ffffffff8029956b>] d_kill+0x4b/0x70

 [<ffffffff8023a29b>] kill_pid_info+0x5b/0xd0

 [<ffffffff88ad3902>] :smbfs:smb_put_super+0x62/0xc0

 [<ffffffff80288552>] generic_shutdown_super+0x62/0x150

 [<ffffffff80288669>] kill_anon_super+0x9/0x60

 [<ffffffff8028877f>] deactivate_super+0x9f/0xd0

 [<ffffffff802a008d>] sys_umount+0x7d/0x3d0

 [<ffffffff8028a247>] sys_newstat+0x27/0x50

 [<ffffffff8020b31b>] system_call_after_swapgs+0x7b/0x80

---[ end trace 537defafd4088441 ]---

```

Here's an strace of the crashing umount command....

```

AMD64 drizzt # strace umount /home/drizzt/mnt/HAL2/temp/

execve("/bin/umount", ["umount", "/home/drizzt/mnt/HAL2/temp/"], [/* 81 vars */]) = 0

brk(0)                                  = 0x60c000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc109616000

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc109615000

access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY)      = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=226484, ...}) = 0

mmap(NULL, 226484, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc1095dd000

close(3)                                = 0

open("/lib/libblkid.so.1", O_RDONLY)    = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p:\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=42992, ...}) = 0

mmap(NULL, 2138296, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc1091f2000

mprotect(0x7fc1091fb000, 2093056, PROT_NONE) = 0

mmap(0x7fc1093fa000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7fc1093fa000

close(3)                                = 0

open("/lib/libc.so.6", O_RDONLY)        = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\345\1\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=1330352, ...}) = 0

mmap(NULL, 3437208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc108eaa000

mprotect(0x7fc108fe9000, 2093056, PROT_NONE) = 0

mmap(0x7fc1091e8000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13e000) = 0x7fc1091e8000

mmap(0x7fc1091ed000, 17048, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc1091ed000

close(3)                                = 0

open("/lib/libuuid.so.1", O_RDONLY)     = 3

read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\26\0\0\0\0\0\0"..., 832) = 832

fstat(3, {st_mode=S_IFREG|0755, st_size=18776, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc1095dc000

mmap(NULL, 2113944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc108ca5000

mprotect(0x7fc108ca8000, 2097152, PROT_NONE) = 0

mmap(0x7fc108ea8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fc108ea8000

close(3)                                = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc1095db000

arch_prctl(ARCH_SET_FS, 0x7fc1095db750) = 0

mprotect(0x7fc108ea8000, 4096, PROT_READ) = 0

mprotect(0x7fc1091e8000, 16384, PROT_READ) = 0

mprotect(0x7fc1093fa000, 4096, PROT_READ) = 0

mprotect(0x609000, 4096, PROT_READ)     = 0

mprotect(0x7fc109617000, 4096, PROT_READ) = 0

munmap(0x7fc1095dd000, 226484)          = 0

brk(0)                                  = 0x60c000

brk(0x62d000)                           = 0x62d000

open("/usr/lib64/locale/locale-archive", O_RDONLY) = 3

fstat(3, {st_mode=S_IFREG|0644, st_size=1782464, ...}) = 0

mmap(NULL, 1782464, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc109427000

close(3)                                = 0

umask(022)                              = 022

getuid()                                = 0

geteuid()                               = 0

readlink("/home", 0x7fff11614cf0, 4096) = -1 EINVAL (Invalid argument)

readlink("/home/drizzt", 0x7fff11614cf0, 4096) = -1 EINVAL (Invalid argument)

readlink("/home/drizzt/mnt", 0x7fff11614cf0, 4096) = -1 EINVAL (Invalid argument)

readlink("/home/drizzt/mnt/HAL2", 0x7fff11614cf0, 4096) = -1 EINVAL (Invalid argument)

readlink("/home/drizzt/mnt/HAL2/temp", 0x7fff11614cf0, 4096) = -1 EINVAL (Invalid argument)

umask(077)                              = 022

open("/etc/mtab", O_RDONLY)             = 3

umask(022)                              = 077

fstat(3, {st_mode=S_IFREG|0644, st_size=775, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc109614000

read(3, "rootfs / rootfs rw 0 0\n/dev/root"..., 4096) = 775

read(3, "", 4096)                       = 0

close(3)                                = 0

munmap(0x7fc109614000, 4096)            = 0

stat("/sbin/umount.smbfs", 0x7fff11616b60) = -1 ENOENT (No such file or directory)

umount("/home/drizzt/mnt/HAL2/temp"..., 0 <unfinished ...>

+++ killed by SIGKILL +++

```

Strange....

----------

## drizzt

Update to kernel-2.6.25-gentoo-r6 fixed all problems.

----------

## pappy_mcfae

Cool! Glad to hear it.

Blessed be!

Pappy

----------

