for (vers=0; vers<prog->pg_nvers ; vers++) if (prog->pg_vers[vers]) { prog->pg_hivers = vers; if (prog->pg_lovers > vers) prog->pg_lovers = vers; if (prog->pg_vers[vers]->vs_xdrsize > xdrsize) xdrsize = prog->pg_vers[vers]->vs_xdrsize; } 
while (prog) { prog->pg_lovers = prog->pg_nvers-1; for (vers=0; vers<prog->pg_nvers ; vers++) if (prog->pg_vers[vers]) { prog->pg_hivers = vers; if (prog->pg_lovers > vers) prog->pg_lovers = vers; if (prog->pg_vers[vers]->vs_xdrsize > xdrsize) xdrsize = prog->pg_vers[vers]->vs_xdrsize; } prog = prog->pg_next; } 
svc_create(struct svc_program *prog, unsigned int bufsize){	struct svc_serv	*serv;	int vers;	unsigned int xdrsize;	if (!(serv = (struct svc_serv *) kmalloc(sizeof(*serv), GFP_KERNEL)))		return NULL;	memset(serv, 0, sizeof(*serv));	serv->sv_program   = prog;	serv->sv_nrthreads = 1;	serv->sv_stats     = prog->pg_stats;	serv->sv_bufsz	   = bufsize? bufsize : 4096;	prog->pg_lovers = prog->pg_nvers-1;	xdrsize = 0;	for (vers=0; vers<prog->pg_nvers ; vers++)		if (prog->pg_vers[vers]) {			prog->pg_hivers = vers;			if (prog->pg_lovers > vers)				prog->pg_lovers = vers;			if (prog->pg_vers[vers]->vs_xdrsize > xdrsize)				xdrsize = prog->pg_vers[vers]->vs_xdrsize;		}	serv->sv_xdrsize   = xdrsize;	INIT_LIST_HEAD(&serv->sv_threads);	INIT_LIST_HEAD(&serv->sv_sockets);	INIT_LIST_HEAD(&serv->sv_tempsocks);	INIT_LIST_HEAD(&serv->sv_permsocks);	spin_lock_init(&serv->sv_lock);	serv->sv_name      = prog->pg_name;	/* Remove any stale portmap registrations */	svc_register(serv, 0, 0);	return serv;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/9ba02638e4be28dd4ff724202a640264427c62d1/svc.c/buggy/net/sunrpc/svc.c