[openib-general] Re: SDP: still getting sk_alloc() panic, any ideas?

Tom Duffy tduffy at sun.com
Mon Jun 27 14:27:54 PDT 2005


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().

Right now, we could make SDP depend on !CONFIG_MODULE_UNLOAD.  That is
even uglier!

-tduffy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050627/2f49e84e/attachment.sig>


More information about the general mailing list