[openib-general] [PATCH][SDP] Allow SDP to compile on 2.6.12-rc3

Libor Michalek libor at topspin.com
Thu Apr 21 16:17:30 PDT 2005


On Thu, Apr 21, 2005 at 03:52:43PM -0700, Tom Duffy wrote:
> On Thu, 2005-04-21 at 15:36 -0700, Roland Dreier wrote:
> > Is this really the only change required?  It seems that the socket
> > allocation function changed too -- 2.6.11 has
> > 
> > 	extern struct sock *		sk_alloc(int family, int priority, int zero_it,
> > 						 kmem_cache_t *slab);
> > 
> > while my up-to-date Linus tree has
> > 
> > 	extern struct sock		*sk_alloc(int family, int priority,
> > 						  struct proto *prot, int zero_it);
> > 
> > so I think sdp_conn.c at least needs some fixing up.
> 
> Oh, you are right, I missed the compile warning, but I see it now.
> 
> Why does the SDP code pass in sizeof(struct inet_sock) for the zero_it
> bool?

  Is this a trick question? :) Because it's not a bool but an integer,
which use to be a bool in the 2.4 kernel days. Here's the relevant
code snip from net/core/sock.c:

		if (zero_it) {
			memset(sk, 0,
			       zero_it == 1 ? sizeof(struct sock) : zero_it);
			sk->sk_family = family;
			sock_lock_init(sk);
		}


-Libor




More information about the general mailing list