diff options
| author | Jamal Hadi Salim <jhs@mojatatu.com> | 2026-10-20 07:00:08 -0400 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-21 17:58:20 -0700 |
| commit | 700b4c6c70d6a36e6878c5ea092c4877da3f10d8 (patch) | |
| tree | a018db54f936f95c4f746f9d30fda25d6c3cf09f /scripts/Makefile.thinlto | |
| parent | dc48c97e7c69215483beeb7d1d80e8e3adbd92c9 (diff) | |
| download | linux-700b4c6c70d6a36e6878c5ea092c4877da3f10d8.tar.gz linux-700b4c6c70d6a36e6878c5ea092c4877da3f10d8.zip | |
net/sched/sch_cake: drop dead nla_nest_end() error check
cake_dump_class_stats() closes the TCA_STATS_APP nest with
if (nla_nest_end(d->skb, stats) < 0)
return -1;
nla_nest_end() never returns a negative value: it has a single
`return skb->len;` and no error path (that is why the overflow-aware
nla_nest_end_safe() helper was later added). The '< 0' test can never
be true, so the 'return -1' is unreachable dead code.
Drop the check and close the nest with the bare statement, matching the
sibling cake nests in the same file.
This issue was discovered while fixing a bug on the gate action, see:
https://lore.kernel.org/netdev/QDISC-H19Z.v1.20261001053234@mojatatu.com/
Conditions to recreate the bug:
- not runtime observable: the issue is found by inspection.
Link: https://lore.kernel.org/netdev/87v77csd5q.fsf@toke.dk/
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Link: https://patch.msgid.link/QDISC-5RTM.v3.r0.20261020053711-4@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
