if (n && (NULL != n->pf)) 
if (n) 
static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,		      struct rtattr **tca,		      unsigned long *arg){	struct tc_u_common *tp_c = tp->data;	struct tc_u_hnode *ht;	struct tc_u_knode *n;	struct tc_u32_sel *s;	struct rtattr *opt = tca[TCA_OPTIONS-1];	struct rtattr *tb[TCA_U32_MAX];	u32 htid;	int err;	if (opt == NULL)		return handle ? -EINVAL : 0;	if (rtattr_parse_nested(tb, TCA_U32_MAX, opt) < 0)		return -EINVAL;	if ((n = (struct tc_u_knode*)*arg) != NULL) {		if (TC_U32_KEY(n->handle) == 0)			return -EINVAL;		return u32_set_parms(tp, base, n->ht_up, n, tb, tca[TCA_RATE-1]);	}	if (tb[TCA_U32_DIVISOR-1]) {		unsigned divisor = *(unsigned*)RTA_DATA(tb[TCA_U32_DIVISOR-1]);		if (--divisor > 0x100)			return -EINVAL;		if (TC_U32_KEY(handle))			return -EINVAL;		if (handle == 0) {			handle = gen_new_htid(tp->data);			if (handle == 0)				return -ENOMEM;		}		ht = kmalloc(sizeof(*ht) + divisor*sizeof(void*), GFP_KERNEL);		if (ht == NULL)			return -ENOBUFS;		memset(ht, 0, sizeof(*ht) + divisor*sizeof(void*));		ht->tp_c = tp_c;		ht->refcnt = 0;		ht->divisor = divisor;		ht->handle = handle;		ht->prio = tp->prio;		ht->next = tp_c->hlist;		tp_c->hlist = ht;		*arg = (unsigned long)ht;		return 0;	}	if (tb[TCA_U32_HASH-1]) {		htid = *(unsigned*)RTA_DATA(tb[TCA_U32_HASH-1]);		if (TC_U32_HTID(htid) == TC_U32_ROOT) {			ht = tp->root;			htid = ht->handle;		} else {			ht = u32_lookup_ht(tp->data, TC_U32_HTID(htid));			if (ht == NULL)				return -EINVAL;		}	} else {		ht = tp->root;		htid = ht->handle;	}	if (ht->divisor < TC_U32_HASH(htid))		return -EINVAL;	if (handle) {		if (TC_U32_HTID(handle) && TC_U32_HTID(handle^htid))			return -EINVAL;		handle = htid | TC_U32_NODE(handle);	} else		handle = gen_new_kid(ht, htid);	if (tb[TCA_U32_SEL-1] == 0 ||	    RTA_PAYLOAD(tb[TCA_U32_SEL-1]) < sizeof(struct tc_u32_sel))		return -EINVAL;	s = RTA_DATA(tb[TCA_U32_SEL-1]);	n = kmalloc(sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key), GFP_KERNEL);	if (n == NULL)		return -ENOBUFS;	memset(n, 0, sizeof(*n) + s->nkeys*sizeof(struct tc_u32_key));#ifdef CONFIG_CLS_U32_PERF	n->pf = kmalloc(sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64), GFP_KERNEL);	if (n->pf == NULL) {		kfree(n);		return -ENOBUFS;	}	memset(n->pf, 0, sizeof(struct tc_u32_pcnt) + s->nkeys*sizeof(u64));#endif	memcpy(&n->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));	n->ht_up = ht;	n->handle = handle;{	u8 i = 0;	u32 mask = s->hmask;	if (mask) {		while (!(mask & 1)) {			i++;			mask>>=1;		}	}	n->fshift = i;}#ifdef CONFIG_CLS_U32_MARK	if (tb[TCA_U32_MARK-1]) {		struct tc_u32_mark *mark;		if (RTA_PAYLOAD(tb[TCA_U32_MARK-1]) < sizeof(struct tc_u32_mark)) {#ifdef CONFIG_CLS_U32_PERF			kfree(n->pf);#endif			kfree(n);			return -EINVAL;		}		mark = RTA_DATA(tb[TCA_U32_MARK-1]);		memcpy(&n->mark, mark, sizeof(struct tc_u32_mark));		n->mark.success = 0;	}#endif	err = u32_set_parms(tp, base, ht, n, tb, tca[TCA_RATE-1]);	if (err == 0) {		struct tc_u_knode **ins;		for (ins = &ht->ht[TC_U32_HASH(handle)]; *ins; ins = &(*ins)->next)			if (TC_U32_NODE(handle) < TC_U32_NODE((*ins)->handle))				break;		n->next = *ins;		wmb();		*ins = n;		*arg = (unsigned long)n;		return 0;	}#ifdef CONFIG_CLS_U32_PERF	if (n && (NULL != n->pf))		kfree(n->pf);#endif	kfree(n);	return err;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a51482bde22f99c63fbbb57d5d46cc666384e379/cls_u32.c/clean/net/sched/cls_u32.c