Re: SMBFS: recvmsg called within BH (was: Re: One more boobytrap needed for 2.2.15pre ?)

From: Michael H. Warfield (mhw@wittsend.com)
Date: Thu Feb 24 2000 - 09:29:33 EST


On Thu, Feb 24, 2000 at 09:46:24AM +0200, Andris Pavenis wrote:
> On Wed, 23 Feb 2000, Manfred Spraul wrote:
> > Andris, do you use smbfs?

> Yes.

> And there are also some problems with SMBFS (new with 2.2.X):
> After some time connection to shares (shared from WinNT 4.0) is lost.
> This problem appeared when I upgraded to 2.2.X. Therefore I used some
> periodic task (once per some minutes called 'df -t smbfs') to keep
> connection alive

        Yeah... For some reason that we have not been able to determine,
the "keep-alives" which are in BOTH the older smbfs (2.0.x) and the newer
(2.2.x) kernels seems to work in the older kernels but seems to be
ineffective in the newer kernels. Tridge and I are both aware of the
problem (we discused it f2f at the last San Jose LinuxWorld) but we haven't
had the time to dig into it. The calls are the same in the old code and
the newer code, it just doesn't seem to be working, so something changed.

        This other problem about calling a function out of a BH handler
is probably something that has been in there for a LONG time and could
acount for some sporatic error reports I heard. It also sounds like
a huge can of worms.

        Tridge said that he was going to formally take over maintaining
smbfs when he moved over and started working at LinuxCare. I suspect that
he's been pretty overwhelmed. I'm just glad he managed to cut a newer
version of smbmount with a "mount compatible" syntax.

        We have to look at these problems and see what to do about them.
I'll raise the BH issue with him, since I'm not sure he's on this list.

> Andris

> > I found the first codepath that could cause your problems:

> > Within net bottom half handler:
> > ip_rcv()
> > calls ip_local_deliver()
> > calls tcp_v4_rcv()
> > calls tcp_v4_do_rcv()
> > calls tcp_rcv_established()
> > calls sk->data_ready
> >
> > could be smb_data_callback() [in fs/smbfs/sock.c]
> > calls _recvfrom()
> > calls socket->ops->recvmsg()
> > could be inet_recvmsg
> > calls tcp_recvmsg !!!!! < this must not be called from an BH.
> >
> > Ok, it seems that smb_data_callback() is broken in 2.2.14.
> > It cannot read the data directly, it must wake the waiting thread up,
> > and the thread must call recvmsg() at process level.
> >
> > --
> > Manfred

        Mike

-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 331-2437   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:09 EST