* [PATCH] pkt_sched: fix error return code in fw_change_attrs()
@ 2013-04-18 2:49 Wei Yongjun
2013-04-18 2:50 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-04-18 2:49 UTC (permalink / raw)
To: jhs, davem; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF
instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere
in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
---
net/sched/cls_fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 1135d82..9b97172 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -204,7 +204,6 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
if (err < 0)
return err;
- err = -EINVAL;
if (tb[TCA_FW_CLASSID]) {
f->res.classid = nla_get_u32(tb[TCA_FW_CLASSID]);
tcf_bind_filter(tp, &f->res, base);
@@ -218,6 +217,7 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
}
#endif /* CONFIG_NET_CLS_IND */
+ err = -EINVAL;
if (tb[TCA_FW_MASK]) {
mask = nla_get_u32(tb[TCA_FW_MASK]);
if (mask != head->mask)
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] pkt_sched: fix error return code in fw_change_attrs()
2013-04-18 2:49 [PATCH] pkt_sched: fix error return code in fw_change_attrs() Wei Yongjun
@ 2013-04-18 2:50 ` David Miller
2013-04-18 2:56 ` yongjun_wei
2013-04-18 13:23 ` Jamal Hadi Salim
2013-04-19 21:35 ` David Miller
2 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2013-04-18 2:50 UTC (permalink / raw)
To: weiyj.lk; +Cc: jhs, yongjun_wei, netdev
From: Wei Yongjun <weiyj.lk@gmail•com>
Date: Thu, 18 Apr 2013 10:49:10 +0800
> From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
>
> Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF
> instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere
> in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
You posted this patch twice.
What is the different between this version and the previous one
posted?
You must always mention this when you post a patch multiple times.
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] pkt_sched: fix error return code in fw_change_attrs()
2013-04-18 2:50 ` David Miller
@ 2013-04-18 2:56 ` yongjun_wei
0 siblings, 0 replies; 6+ messages in thread
From: yongjun_wei @ 2013-04-18 2:56 UTC (permalink / raw)
To: David Miller, weiyj.lk@gmail•com; +Cc: jhs@mojatatu•com, netdev@vger•kernel.org
Sorry David,
It seems that the MAIL server send this dup mail, I am not know what happened
now. I see one mail I send this morning had been dup many times.
Regards,
Yongjun Wei
-----Original Message-----
From: David Miller [mailto:davem@davemloft•net]
Sent: 2013年4月18日 10:51
To: weiyj.lk@gmail•com
Cc: jhs@mojatatu•com; Yongjun Wei (RD-CN); netdev@vger•kernel.org
Subject: Re: [PATCH] pkt_sched: fix error return code in fw_change_attrs()
From: Wei Yongjun <weiyj.lk@gmail•com>
Date: Thu, 18 Apr 2013 10:49:10 +0800
> From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
>
> Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask !=
> 0xFFFFFFFF instead of 0 (ifdef CONFIG_NET_CLS_IND and
> tb[TCA_FW_INDEV]), as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
You posted this patch twice.
What is the different between this version and the previous one posted?
You must always mention this when you post a patch multiple times.
<table class="TM_EMAIL_NOTICE"><tr><td><pre>
TREND MICRO EMAIL NOTICE
The information contained in this email and any attachments is confidential
and may be subject to copyright or other intellectual property protection.
If you are not the intended recipient, you are not authorized to use or
disclose this information, and we request that you notify us by reply mail or
telephone and delete the original message from your mail system.
</pre></td></tr></table>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pkt_sched: fix error return code in fw_change_attrs()
2013-04-18 2:49 [PATCH] pkt_sched: fix error return code in fw_change_attrs() Wei Yongjun
2013-04-18 2:50 ` David Miller
@ 2013-04-18 13:23 ` Jamal Hadi Salim
2013-04-19 21:35 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: Jamal Hadi Salim @ 2013-04-18 13:23 UTC (permalink / raw)
To: Wei Yongjun; +Cc: davem, yongjun_wei, netdev
On 13-04-17 10:49 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
>
> Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF
> instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere
> in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
Makes sense. I think i would have said something like:
"dont use the err code from tcf_change_indev() in case it succeeds to
report TCA_FW_MASK errors"
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu•com>
cheers,
jamal
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] pkt_sched: fix error return code in fw_change_attrs()
2013-04-18 2:49 [PATCH] pkt_sched: fix error return code in fw_change_attrs() Wei Yongjun
2013-04-18 2:50 ` David Miller
2013-04-18 13:23 ` Jamal Hadi Salim
@ 2013-04-19 21:35 ` David Miller
2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2013-04-19 21:35 UTC (permalink / raw)
To: weiyj.lk; +Cc: jhs, yongjun_wei, netdev
From: Wei Yongjun <weiyj.lk@gmail•com>
Date: Thu, 18 Apr 2013 10:49:10 +0800
> From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
>
> Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF
> instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere
> in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] pkt_sched: fix error return code in fw_change_attrs()
@ 2013-04-18 2:37 Wei Yongjun
0 siblings, 0 replies; 6+ messages in thread
From: Wei Yongjun @ 2013-04-18 2:37 UTC (permalink / raw)
To: jhs, davem; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
Fix to return -EINVAL when tb[TCA_FW_MASK] is set and head->mask != 0xFFFFFFFF
instead of 0 (ifdef CONFIG_NET_CLS_IND and tb[TCA_FW_INDEV]), as done elsewhere
in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro•com.cn>
---
net/sched/cls_fw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 1135d82..9b97172 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -204,7 +204,6 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
if (err < 0)
return err;
- err = -EINVAL;
if (tb[TCA_FW_CLASSID]) {
f->res.classid = nla_get_u32(tb[TCA_FW_CLASSID]);
tcf_bind_filter(tp, &f->res, base);
@@ -218,6 +217,7 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f,
}
#endif /* CONFIG_NET_CLS_IND */
+ err = -EINVAL;
if (tb[TCA_FW_MASK]) {
mask = nla_get_u32(tb[TCA_FW_MASK]);
if (mask != head->mask)
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-19 21:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18 2:49 [PATCH] pkt_sched: fix error return code in fw_change_attrs() Wei Yongjun
2013-04-18 2:50 ` David Miller
2013-04-18 2:56 ` yongjun_wei
2013-04-18 13:23 ` Jamal Hadi Salim
2013-04-19 21:35 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-04-18 2:37 Wei Yongjun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox