diff options
| author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-17 10:57:56 +0400 | 
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-08-17 11:01:08 +0400 | 
| commit | a22ddff8bedfe33eeb1330bbb7ef1fbe007a42c4 (patch) | |
| tree | 61a2eb7fa62f5af10c2b913ca429e6b068b0eb2d /net/sched/cls_api.c | |
| parent | 20d5a540e55a29daeef12706f9ee73baf5641c16 (diff) | |
| parent | d9875690d9b89a866022ff49e3fcea892345ad92 (diff) | |
| download | linux-a22ddff8bedfe33eeb1330bbb7ef1fbe007a42c4.tar.xz | |
Merge tag 'v3.6-rc2' into drm-intel-next
Backmerge Linux 3.6-rc2 to resolve a few funny conflicts before we put
even more madness on top:
- drivers/gpu/drm/i915/i915_irq.c: Just a spurious WARN removed in
  -fixes, that has been changed in a variable-rename in -next, too.
- drivers/gpu/drm/i915/intel_ringbuffer.c: -next remove scratch_addr
  (since all their users have been extracted in another fucntion),
  -fixes added another user for a hw workaroudn.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'net/sched/cls_api.c')
| -rw-r--r-- | net/sched/cls_api.c | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index f452f696b4b3..6dd1131f2ec1 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -140,7 +140,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)  	int tp_created = 0;  replay: -	t = NLMSG_DATA(n); +	t = nlmsg_data(n);  	protocol = TC_H_MIN(t->tcm_info);  	prio = TC_H_MAJ(t->tcm_info);  	nprio = prio; @@ -349,8 +349,10 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,  	struct nlmsghdr  *nlh;  	unsigned char *b = skb_tail_pointer(skb); -	nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags); -	tcm = NLMSG_DATA(nlh); +	nlh = nlmsg_put(skb, pid, seq, event, sizeof(*tcm), flags); +	if (!nlh) +		goto out_nlmsg_trim; +	tcm = nlmsg_data(nlh);  	tcm->tcm_family = AF_UNSPEC;  	tcm->tcm__pad1 = 0;  	tcm->tcm__pad2 = 0; @@ -368,7 +370,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,  	nlh->nlmsg_len = skb_tail_pointer(skb) - b;  	return skb->len; -nlmsg_failure: +out_nlmsg_trim:  nla_put_failure:  	nlmsg_trim(skb, b);  	return -1; @@ -418,7 +420,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)  	struct net_device *dev;  	struct Qdisc *q;  	struct tcf_proto *tp, **chain; -	struct tcmsg *tcm = (struct tcmsg *)NLMSG_DATA(cb->nlh); +	struct tcmsg *tcm = nlmsg_data(cb->nlh);  	unsigned long cl = 0;  	const struct Qdisc_class_ops *cops;  	struct tcf_dump_args arg;  | 
