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:24:02 +0000 (10:24 +0200)
commiteefc0b32159aad57ce8bb664bd22a63a407f875f
tree252590342b23e87cf7cc4787bd5a91b8c5241b43
parent5523d2e31935d145760ec2341dcb18a43b4f279c
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