Re: smbfs Oops with Linux 2.6.3

From: Urban Widmark
Date: Wed Mar 10 2004 - 07:29:58 EST

On Tue, 9 Mar 2004, Linus Torvalds wrote:

> As to how something like that could happen, I have absolutely no clue. The
> "smb_install_null_ops()" would seem to cause that, but that's all I can
> say.
> Maybe the "smp_ops_null" thing should be filled in with stuff that always
> returns EINVAL or something? Rather than actual NULL pointers that will
> oops if they are ever used?

The getattr problem was that after the mount smbfs isn't ready to do
anything until it gets a connection from smbmount. Filling smp_ops_null
would give the user an error on whatever it is that it does immediately
after mounting.

smp_ops_null should really make all functions block and wait for the
connection to be created and given to us from smbmount. That would make it
behave more like smbfs in 2.4 does.

I am thinking of something like this for each entry in smp_ops_null.

int whatever_it_is_that_I_am(args)
timeleft = wait_event_interruptible_timeout(...)
if (!timeleft || signal_pending(current))
return -EIO;
if (!server->ops->whatever_it_is_that_I_am)
return -EIO;
return server->ops->whatever_it_is_that_I_am(args)

I know bugme has bug1671 with a similar oops. If no one else does, I'll
make a patch for Adam and #1671 to test.

I have not been able to reproduce this before, but if it is that readdir
is used before it is ready then some extra delays in smbmount might help.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at