On Mon, Jun 27, 2005 at 02:27:54PM -0700, Tom Duffy wrote: > On Mon, 2005-06-27 at 11:17 -0700, Libor Michalek wrote: > > The problem is that each call to sk_alloc() is grabbing a reference to > > the module, but it checks to make sure that there already is at least one > > reference, if not the top BUG is triggered. In the case of the passive > > connection there are no other references to the module. You can see that > > the problem goes away if you open just one socket, even if you don't > > listen on it, and then try the failing passive connect. When a socket is > > created it actually grabs two references to the module, one at the sock > > level and one at the sk level. The first reference at the sock level does > > not trigger the BUG since it's through another code path. (try_module_get > > vs. __module_get) This is why we only hit this during passive connect > > to a system that has no active SDP sockets. > > > > Not sure the right way to fix this, maybe check to see if the socket > > table size (dev_root_s.sk_entry) is greater then 0 in sdp_cm_req_handler() > > before even performing the alloc... > > Hrm. That seems ugly. How about a patch to upstream changing > sk_alloc() to use try_module_get().
I'm thinking the listen_lookup needs to be moved earlier in the req_handler ahead of the sk_alloc, since it makes no sense to do the alloc if we are not going to queue the new incomming connection, since it just leads to a destroy in the same function. -Libor _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
