countersize = COUNTER_OFFSET(table->table->nentries) * num_possible_cpus(); 
countersize = COUNTER_OFFSET(table->table->nentries) * (highest_possible_processor_id()+1); 
int ebt_register_table(struct ebt_table *table){	struct ebt_table_info *newinfo;	int ret, i, countersize;	if (!table || !table->table ||!table->table->entries ||	    table->table->entries_size == 0 ||	    table->table->counters || table->private) {		BUGPRINT("Bad table data for ebt_register_table!!!\n");		return -EINVAL;	}	countersize = COUNTER_OFFSET(table->table->nentries) * num_possible_cpus();	newinfo = (struct ebt_table_info *)	   vmalloc(sizeof(struct ebt_table_info) + countersize);	ret = -ENOMEM;	if (!newinfo)		return -ENOMEM;	newinfo->entries = (char *)vmalloc(table->table->entries_size);	if (!(newinfo->entries))		goto free_newinfo;	memcpy(newinfo->entries, table->table->entries,	   table->table->entries_size);	if (countersize)		memset(newinfo->counters, 0, countersize);	/* fill in newinfo and parse the entries */	newinfo->chainstack = NULL;	ret = translate_table(table->table, newinfo);	if (ret != 0) {		BUGPRINT("Translate_table failed\n");		goto free_chainstack;	}	if (table->check && table->check(newinfo, table->valid_hooks)) {		BUGPRINT("The table doesn't like its own initial data, lol\n");		return -EINVAL;	}	table->private = newinfo;	rwlock_init(&table->lock);	ret = down_interruptible(&ebt_mutex);	if (ret != 0)		goto free_chainstack;	if (list_named_find(&ebt_tables, table->name)) {		ret = -EEXIST;		BUGPRINT("Table name already exists\n");		goto free_unlock;	}	/* Hold a reference count if the chains aren't empty */	if (newinfo->nentries && !try_module_get(table->me)) {		ret = -ENOENT;		goto free_unlock;	}	list_prepend(&ebt_tables, table);	up(&ebt_mutex);	return 0;free_unlock:	up(&ebt_mutex);free_chainstack:	if (newinfo->chainstack) {		for (i = 0; i < num_possible_cpus(); i++)			vfree(newinfo->chainstack[i]);		vfree(newinfo->chainstack);	}	vfree(newinfo->entries);free_newinfo:	vfree(newinfo);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c8923c6b852d3a97c1faad0566e38fca330375a7/ebtables.c/buggy/net/bridge/netfilter/ebtables.c