aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorVladimir Oltean <[email protected]>2022-02-28 14:17:15 +0000
committerJakub Kicinski <[email protected]>2022-03-02 02:26:21 +0000
commit0b0e2ff10356e7e2ffd66ecdd6eee69a2f03449b (patch)
tree31d5bcd796965afcbc8c3e74fb51a3f56a1cc51f /net/unix/af_unix.c
parentMerge tag 'for-net-2022-03-01' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadkernel-0b0e2ff10356e7e2ffd66ecdd6eee69a2f03449b.tar.gz
kernel-0b0e2ff10356e7e2ffd66ecdd6eee69a2f03449b.zip
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: dc452a471dba ("net: dsa: introduce tagger-owned storage for private and shared data") Signed-off-by: Vladimir Oltean <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions