Re: 3.3.0-rc2+: oops went mounting via cifs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 2, 2012 at 9:20 AM, Chris Clayton <chris2553@xxxxxxxxxxxxxx> wrote:
> Hi.
> I'm not subscribed, so please cc me on any replies.
>
> I'm getting an oops when trying to mount a FAT32 partition hosted on
> another machine on my home network. The kernel is built from a pull of
> from kernel.org this morning. "git describe" gives
> v3.3-rc2-37-gbd3ce7d.
>
> The oops message is:
>
> CIFS VFS: default security mechanism requested.  The default security
> mechanism will be upgraded from ntlm to ntlmv2in kernel release 3.3
> BUG: unable to handle kernel NULL pointer dereference at   (null)
> IP: [<c116b146>] strnlen+0x6/0x20
> *pdpt = 0000000033f0c001 *pde = 0000000000000000
> Oops: 0000 [#1] PREEMPT SMP
> Modules linked in: md4 cifs ipt_LOG xt_state iptable_filter
> ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
> nf_conntrack psmouse r8169 [last unloaded: microcode]
>
> Pid: 811, comm: mount.cifs Not tainted 3.3.0-rc2+ #94 Hewlett-Packard
> HP G61 Notebook PC/3069
> EIP: 0060:[<c116b146>] EFLAGS: 00010207 CPU: 0
> EIP is at strnlen+0x6/0x20
> EAX: 00000000 EBX: f31149ac ECX: 00000000 EDX: 000000ff
> ESI: f32a1df4 EDI: f31149b0 EBP: f1a63830 ESP: f32a1d88
>  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> Process mount.cifs (pid: 811, ti=f32a0000 task=f1a78380 task.ti=f32a0000)
> Stack:
>  f943a9aa f3114900 9a734c2c 00000000 f1a63800 f943b64a f32a1df0 00000001
>  c1047be2 00000000 00000001 00000000 00000001 c1087bf1 f1bfc380 c14d9a80
>  00000000 00000007 00000001 f3da7a40 f45dc1c0 00000041 00000000 00000000
> Call Trace:
>  [<f943a9aa>] ? ascii_ssetup_strings.isra.7+0x3a/0xd0 [cifs]
>  [<f943b64a>] ? CIFS_SessSetup+0xc0a/0x115c [cifs]
>  [<c1047be2>] ? __wake_up+0x42/0x60
>  [<c1087bf1>] ? mempool_free+0x41/0xa0
>  [<f941937a>] ? CIFSSMBNegotiate+0x1ca/0x750 [cifs]
>  [<f9426b3d>] ? cifs_setup_session+0x4d/0x1b0 [cifs]
>  [<f9426ac1>] ? cifs_negotiate_protocol+0x71/0xa0 [cifs]
>  [<f9426fb6>] ? cifs_get_smb_ses+0x316/0x4d0 [cifs]
>  [<f94271f7>] ? cifs_mount+0x87/0x5a0 [cifs]
>  [<f94175f6>] ? cifs_do_mount+0x66/0x460 [cifs]
>  [<c1097150>] ? kstrndup+0x40/0x60
>  [<f9417617>] ? cifs_do_mount+0x87/0x460 [cifs]
>  [<c10b8c0d>] ? mount_fs+0x1d/0xd0
>  [<c10ce616>] ? alloc_vfsmnt+0x96/0x130
>  [<c10ce8d1>] ? vfs_kern_mount+0x51/0xd0
>  [<c10cecef>] ? do_kern_mount+0x3f/0xe0
>  [<c10d03d4>] ? do_mount+0x474/0x730
>  [<c1020d90>] ? vmalloc_sync_all+0x10/0x10
>  [<c10d07a2>] ? sys_mount+0x72/0xb0
>  [<c13b57d0>] ? sysenter_do_call+0x12/0x26
> Code: 26 00 00 00 00 85 c9 57 89 c7 74 07 89 d0 f2 ae 75 01 4f 89 f8
> 5f c3 8d b4 26 00 00 00 00 8d bc 27 00 00 00 0089 c1 89 c8 eb 06 <80>
> 38 00 74 07 40 4a 83 fa ff 75 f4 29 c8 c3 90 90 90 90 90 90
> EIP: [<c116b146>] strnlen+0x6/0x20 SS:ESP 0068:f32a1d88
> CR2: 0000000000000000
> ---[ end trace 9f3a2989281718b5 ]---
>
> The full dmesg is attached, in case it helps.
>
> Let me know if I can help in any way to fix this.
>
> Chris
>
> --
> The more I see, the more I know. The more I know, the less I
> understand. Changing Man - Paul Weller

Does this attached patch fix the oops?
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c
index d85efad..96ac60c 100644
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -246,16 +246,15 @@ static void ascii_ssetup_strings(char **pbcc_area, struct cifs_ses *ses,
 	/* copy user */
 	/* BB what about null user mounts - check that we do this BB */
 	/* copy user */
-	if (ses->user_name != NULL)
+	if (ses->user_name != NULL) {
 		strncpy(bcc_ptr, ses->user_name, MAX_USERNAME_SIZE);
+		bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE);
+	}
 	/* else null user mount */
-
-	bcc_ptr += strnlen(ses->user_name, MAX_USERNAME_SIZE);
 	*bcc_ptr = 0;
 	bcc_ptr++; /* account for null termination */
 
 	/* copy domain */
-
 	if (ses->domainName != NULL) {
 		strncpy(bcc_ptr, ses->domainName, 256);
 		bcc_ptr += strnlen(ses->domainName, 256);

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux