linux-stable/net
Vladimir Oltean 485ab7fb5e net/sched: pass netlink extack to mqprio and taprio offload
[ Upstream commit c54876cd59 ]

With the multiplexed ndo_setup_tc() model which lacks a first-class
struct netlink_ext_ack * argument, the only way to pass the netlink
extended ACK message down to the device driver is to embed it within the
offload structure.

Do this for struct tc_mqprio_qopt_offload and struct tc_taprio_qopt_offload.

Since struct tc_taprio_qopt_offload also contains a tc_mqprio_qopt_offload
structure, and since device drivers might effectively reuse their mqprio
implementation for the mqprio portion of taprio, we make taprio set the
extack in both offload structures to point at the same netlink extack
message.

In fact, the taprio handling is a bit more tricky, for 2 reasons.

First is because the offload structure has a longer lifetime than the
extack structure. The driver is supposed to populate the extack
synchronously from ndo_setup_tc() and leave it alone afterwards.
To not have any use-after-free surprises, we zero out the extack pointer
when we leave taprio_enable_offload().

The second reason is because taprio does overwrite the extack message on
ndo_setup_tc() error. We need to switch to the weak form of setting an
extack message, which preserves a potential message set by the driver.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-24 17:30:06 +01:00
..
6lowpan
9p 9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition 2023-04-02 01:00:31 +00:00
802
8021q vlan: partially enable SIOCSHWTSTAMP in container 2023-05-11 23:17:13 +09:00
appletalk
atm
ax25
batman-adv
bluetooth bluetooth: Perform careful capability checks in hci_sock_ioctl() 2023-05-01 08:32:25 +09:00
bpf bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES 2023-03-06 11:15:54 -08:00
bpfilter
bridge net: add vlan_get_protocol_and_depth() helper 2023-05-24 17:29:59 +01:00
caif net: caif: Fix use-after-free in cfusbl_device_notify() 2023-03-02 22:22:07 -08:00
can can: isotp: fix race between isotp_sendsmg() and isotp_release() 2023-04-05 11:16:37 +02:00
ceph Networking changes for 6.3. 2023-02-21 18:24:12 -08:00
core net: Catch invalid index in XPS mapping 2023-05-24 17:30:05 +01:00
dcb
dccp netfilter: keep conntrack reference until IPsecv6 policy checks are done 2023-05-11 23:17:13 +09:00
devlink devlink: drop leftover duplicate/unused code 2023-02-20 11:38:35 +00:00
dns_resolver
dsa net: dsa: sync unicast and multicast addresses for VLAN filters too 2023-03-30 11:32:46 -07:00
ethernet
ethtool ethtool: Fix uninitialized number of lanes 2023-05-17 14:01:45 +02:00
hsr hsr: ratelimit only when errors are printed 2023-03-16 21:11:03 -07:00
ieee802154 net: ieee802154: remove an unnecessary null pointer check 2023-03-17 09:13:53 +01:00
ife
ipv4 tcp: add annotations around sk->sk_shutdown accesses 2023-05-24 17:29:59 +01:00
ipv6 net: ipv6: fix skb hash for some RST packets 2023-05-17 14:01:40 +02:00
iucv net/iucv: Fix size of interrupt data 2023-03-16 17:34:40 -07:00
kcm
key
l2tp l2tp: generate correct module alias strings 2023-03-31 09:25:12 +01:00
l3mdev
lapb
llc net: deal with most data-races in sk_wait_event() 2023-05-24 17:29:59 +01:00
mac80211 wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta 2023-03-30 11:19:53 +02:00
mac802154 Merge tag 'ieee802154-for-net-next-2023-02-20' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next 2023-02-20 16:40:52 -08:00
mctp
mpls net: mpls: fix stale pointer if allocation fails during device rename 2023-02-15 10:26:37 +00:00
mptcp mptcp: fix accept vs worker race 2023-04-19 09:08:37 +01:00
ncsi net/ncsi: clear Tx enable mode when handling a Config required AEN 2023-05-17 14:01:39 +02:00
netfilter netfilter: conntrack: fix possible bug_on with enable_hooks=1 2023-05-24 17:29:58 +01:00
netlabel
netlink netlink: annotate accesses to nlk->cb_running 2023-05-24 17:29:58 +01:00
netrom
nfc nfc: change order inside nfc_se_io error path 2023-03-07 13:37:05 -08:00
nsh
openvswitch net: openvswitch: fix race on port output 2023-04-07 19:42:53 -07:00
packet net: add vlan_get_protocol_and_depth() helper 2023-05-24 17:29:59 +01:00
phonet
psample
qrtr net: qrtr: Fix an uninit variable access bug in qrtr_tx_resume() 2023-04-13 09:35:30 +02:00
rds
rfkill
rose
rxrpc rxrpc: Fix timeout of a call that hasn't yet been granted a channel 2023-05-17 14:01:42 +02:00
sched net/sched: pass netlink extack to mqprio and taprio offload 2023-05-24 17:30:06 +01:00
sctp sctp: fix a potential overflow in sctp_ifwdtsn_skip 2023-04-13 10:01:59 +02:00
smc net: deal with most data-races in sk_wait_event() 2023-05-24 17:29:59 +01:00
strparser
sunrpc SUNRPC: remove the maximum number of retries in call_bind_status 2023-05-11 23:17:33 +09:00
switchdev
tipc net: deal with most data-races in sk_wait_event() 2023-05-24 17:29:59 +01:00
tls net: deal with most data-races in sk_wait_event() 2023-05-24 17:29:59 +01:00
unix af_unix: Fix data races around sk->sk_shutdown. 2023-05-24 17:29:59 +01:00
vmw_vsock vsock/vmci: convert VMCI error code to -ENOMEM on send 2023-03-31 09:42:30 +01:00
wireless Including fixes from netfilter, wifi and ipsec. 2023-03-17 13:31:16 -07:00
x25
xdp xsk: Fix unaligned descriptor validation 2023-05-11 23:17:16 +09:00
xfrm ipsec-2023-03-15 2023-03-16 17:23:48 -07:00
compat.c
devres.c
Kconfig
Kconfig.debug
Makefile
socket.c net: annotate sk->sk_err write from do_recvmmsg() 2023-05-24 17:29:59 +01:00
sysctl_net.c