projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b244163
)
net: sched: fix error return code in tcf_del_walker()
author
Yang Yingliang
<yangyingliang@huawei.com>
Thu, 17 Jun 2021 08:02:07 +0000
(16:02 +0800)
committer
David S. Miller
<davem@davemloft.net>
Thu, 17 Jun 2021 18:36:18 +0000
(11:36 -0700)
When nla_put_u32() fails, 'ret' could be 0, it should
return error code in tcf_del_walker().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_api.c
patch
|
blob
|
history
diff --git
a/net/sched/act_api.c
b/net/sched/act_api.c
index f6d5755d669eba66a40b44088b362c8ae6f8d934..d17a66aab8eead6074a5aa49df3c94892abffa17 100644
(file)
--- a/
net/sched/act_api.c
+++ b/
net/sched/act_api.c
@@
-381,7
+381,8
@@
static int tcf_del_walker(struct tcf_idrinfo *idrinfo, struct sk_buff *skb,
}
mutex_unlock(&idrinfo->lock);
- if (nla_put_u32(skb, TCA_FCNT, n_i))
+ ret = nla_put_u32(skb, TCA_FCNT, n_i);
+ if (ret)
goto nla_put_failure;
nla_nest_end(skb, nest);