mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 06:10:56 +00:00
net: sched: fix error return code in tcf_del_walker()
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>
This commit is contained in:
parent
b244163f2c
commit
55d96f72e8
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue