Skip to contentSkip to conversation

netlink: fix typo in initialization

PATCH In review Jiri Pirko 2 participants 4 messages Oct 8, 2009

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author
#0 lore raw

PATCH 1/1 netlink: fix typo in initialization

Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 introduced a typo in initialization. This patch fixes this.

net/sched/cls_api.c +1 -1
index 6a53694..7cf6c0f 100644
@@ -350,7 +350,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
 	tcm = NLMSG_DATA(nlh);
 	tcm->tcm_family = AF_UNSPEC;
 	tcm->tcm__pad1 = 0;
-	tcm->tcm__pad1 = 0;
+	tcm->tcm__pad2 = 0;
 	tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;
 	tcm->tcm_parent = tp->classid;
 	tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
maintainer
#1 lore raw

From: Jiri Pirko <[email protected]>
Date: Thu, 8 Oct 2009 09:23:23 +0200

Quoted 4 lines

Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 introduced a typo in initialization. This patch fixes this.

Doesn't this leak some uninitialized bytes to userspace?

Therefore, this fix probably belongs in net-2.6 and -stable instead of net-next-2.6, right?

Quoted 13 lines
net/sched/cls_api.c +1 -1
index 6a53694..7cf6c0f 100644
@@ -350,7 +350,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
 	tcm = NLMSG_DATA(nlh);
 	tcm->tcm_family = AF_UNSPEC;
 	tcm->tcm__pad1 = 0;
-	tcm->tcm__pad1 = 0;
+	tcm->tcm__pad2 = 0;
 	tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;
 	tcm->tcm_parent = tp->classid;
 	tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
author
#2 lore raw
Quoted 9 lines · Thu, Oct 08, 2009 at 09:57:43AM CEST, [email protected] wrote:

From: Jiri Pirko <[email protected]>
Date: Thu, 8 Oct 2009 09:23:23 +0200

Quoted 4 lines

Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 introduced a typo in initialization. This patch fixes this.

Doesn't this leak some uninitialized bytes to userspace?

Yes it does.

Quoted 3 lines

Therefore, this fix probably belongs in net-2.6 and -stable instead of net-next-2.6, right?

Okay. The patch is applicable on net-2.6 (I presume on -stable too). Feel free to apply.

Thanks.

Jirka

Quoted 14 lines
Quoted 14 lines
net/sched/cls_api.c +1 -1
index 6a53694..7cf6c0f 100644
@@ -350,7 +350,7 @@ static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp,
 	tcm = NLMSG_DATA(nlh);
 	tcm->tcm_family = AF_UNSPEC;
 	tcm->tcm__pad1 = 0;
-	tcm->tcm__pad1 = 0;
+	tcm->tcm__pad2 = 0;
 	tcm->tcm_ifindex = qdisc_dev(tp->q)->ifindex;
 	tcm->tcm_parent = tp->classid;
 	tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
maintainer
#3 lore raw

From: Jiri Pirko <[email protected]>
Date: Thu, 8 Oct 2009 10:08:59 +0200

Quoted 9 lines
Quoted 5 lines · Thu, Oct 08, 2009 at 09:57:43AM CEST, [email protected] wrote:

From: Jiri Pirko <[email protected]>
Date: Thu, 8 Oct 2009 09:23:23 +0200

Therefore, this fix probably belongs in net-2.6 and -stable instead of net-next-2.6, right?

Okay. The patch is applicable on net-2.6 (I presume on -stable too). Feel free to apply.

Great, I'll take care of this, thanks.