linux/net/dsa
Vladimir Oltean 0b0e2ff103 net: dsa: restore error path of dsa_tree_change_tag_proto
When the DSA_NOTIFIER_TAG_PROTO returns an error, the user space process
which initiated the protocol change exits the kernel processing while
still holding the rtnl_mutex. So any other process attempting to lock
the rtnl_mutex would deadlock after such event.

The error handling of DSA_NOTIFIER_TAG_PROTO was inadvertently changed
by the blamed commit, introducing this regression. We must still call
rtnl_unlock(), and we must still call DSA_NOTIFIER_TAG_PROTO for the old
protocol. The latter is due to the limiting design of notifier chains
for cross-chip operations, which don't have a built-in error recovery
mechanism - we should look into using notifier_call_chain_robust for that.

Fixes: dc452a471d ("net: dsa: introduce tagger-owned storage for private and shared data")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/20220228141715.146485-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-03-01 18:26:21 -08:00
..
dsa2.c net: dsa: restore error path of dsa_tree_change_tag_proto 2022-03-01 18:26:21 -08:00
dsa_priv.h net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN 2022-02-14 13:31:12 +00:00
dsa.c net: dsa: mv88e6xxx: flush switchdev FDB workqueue before removing VLAN 2022-02-14 13:31:12 +00:00
Kconfig net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag 2021-10-18 14:02:56 +01:00
Makefile net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag 2021-10-18 14:02:56 +01:00
master.c net: dsa: avoid call to __dev_set_promiscuity() while rtnl_mutex isn't held 2022-02-19 21:18:33 +00:00
port.c net: dsa: fix panic when removing unoffloaded port from bridge 2022-02-22 17:03:02 -08:00
slave.c net: dsa: merge rtnl_lock sections in dsa_slave_create 2022-01-06 11:59:09 +00:00
switch.c net: dsa: remove cross-chip support for HSR 2022-01-05 15:04:51 +00:00
tag_8021q.c net: dsa: keep the bridge_dev and bridge_num as part of the same structure 2021-12-08 14:31:16 -08:00
tag_ar9331.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_brcm.c net: dsa: create a helper for locating EtherType DSA headers on RX 2021-08-11 14:44:58 +01:00
tag_dsa.c net: dsa: hide dp->bridge_dev and dp->bridge_num in the core behind helpers 2021-12-08 14:31:15 -08:00
tag_gswip.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_hellcreek.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_ksz.c net/dsa/tag_ksz.c: remove superfluous headers 2021-09-29 11:38:21 +01:00
tag_lan9303.c net: dsa: lan9303: handle hwaccel VLAN tags 2022-02-17 09:32:06 -08:00
tag_mtk.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_ocelot_8021q.c net: dsa: make tagging protocols connect to individual switches from a tree 2021-12-14 12:45:16 +00:00
tag_ocelot.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-23 16:09:58 -08:00
tag_qca.c net: dsa: create a helper for locating EtherType DSA headers on TX 2021-08-11 14:44:58 +01:00
tag_rtl4_a.c net: dsa: tag_rtl4_a: Drop bit 9 from egress frames 2021-09-14 19:34:03 -07:00
tag_rtl8_4.c net: dsa: tag_rtl8_4: add realtek 8 byte protocol 4 tag 2021-10-18 14:02:56 +01:00
tag_sja1105.c net: dsa: make tagging protocols connect to individual switches from a tree 2021-12-14 12:45:16 +00:00
tag_trailer.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00
tag_xrs700x.c net: dsa: remove the struct packet_type argument from dsa_device_ops::rcv() 2021-08-02 15:13:15 +01:00