[openib-general] Re: [PATCHv6] SDP: Allow SDP to compile on 2.6.12-rc6

Tom Duffy tduffy at sun.com
Sun Jun 12 08:57:38 PDT 2005


On Sun, 2005-06-12 at 12:09 +0300, Michael S. Tsirkin wrote:
> > Index: linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c
> > ===================================================================
> > --- linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c	(revision 2577)
> > +++ linux-2.6.12-rc6-openib/drivers/infiniband/ulp/sdp/sdp_inet.c	(working copy)
> > @@ -129,9 +129,9 @@ MODULE_PARM_DESC(sdp_debug_level,
> >   */
> >  void sdp_inet_wake_send(struct sock *sk)
> >  {
> > -	struct sdp_opt *conn;
> > +	struct sdp_opt *conn = sdp_sk(sk);
> >  
> > -	if (!sk || !(conn = SDP_GET_CONN(sk)))
> > +	if (!sk)
> >  		return;
> >  
> >  	if (sk->sk_socket && test_bit(SOCK_NOSPACE, &sk->sk_socket->flags) &&
> 
> I didnt look at this in depth, but is it safe to call sdp_sk(sk) if sk may
> be NULL as the above seems to do?

Yes, it should be safe as all sdp_sk() does is a cast.

-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/20050612/bfc8e816/attachment.sig>


More information about the general mailing list