mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 00:20:51 +07:00
net: sched: fix error return code in tcf_del_walker()
[ Upstream commit 55d96f72e8ddc0a294e0b9c94016edbb699537e1 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d2801d1118
commit
92a9fb51e5
@ -333,7 +333,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 New Issue
Block a user