]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sched: mqprio: add extack to mqprio_parse_nlattr()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 11 Apr 2023 18:01:51 +0000 (21:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:36 +0000 (10:22 +0200)
commit98f6bbdfc0cecdc2a38cc4781df1363bb0576791
tree3dc266512866119175a42353ed94f49e374bc7e1
parentb1e85c9d28dd149f5b7e9a02c6f38008ce9f6425
net/sched: mqprio: add extack to mqprio_parse_nlattr()

[ Upstream commit 57f21bf85400abadac0cb2a4db5de1d663f8863f ]

Netlink attribute parsing in mqprio is a minesweeper game, with many
options having the possibility of being passed incorrectly and the user
being none the wiser.

Try to make errors less sour by giving user space some information
regarding what went wrong.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ferenc Fejes <fejes@inf.elte.hu>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 6c58c8816abb ("net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/sch_mqprio.c