NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/54189 CVS commit: src/sys
The following reply was made to PR kern/54189; it has been noted by GNATS.
From: "Ryota Ozaki" <ozaki-r%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/54189 CVS commit: src/sys
Date: Wed, 15 May 2019 02:59:19 +0000
Module Name: src
Committed By: ozaki-r
Date: Wed May 15 02:59:19 UTC 2019
Modified Files:
src/sys/net: if_vlan.c
src/sys/netinet: in_pcb.c ip_output.c
src/sys/netinet6: in6_pcb.c ip6_output.c
Log Message:
Get rid of IFNET_LOCK for if_mcast_op to avoid a deadlock
The IFNET_LOCK was added to avoid data races on if_flags for IFF_ALLMULTI.
Unfortunatetly it caused a deadlock instead. A known scenario causing a
deadlock is to occur the following two operations concurrently: (a) a removal of
an IP adddres assigned to an interface and (b) a manipulation of multicast
groups to the interface. The resource dependency graph is like this:
softnet_lock => IFNET_LOCK => psref_target_destroy => softint => softnet_lock
Thanks to the previous commit that avoids data races on if_flags for
IFF_ALLMULTI by another approach, we can remove IFNET_LOCK and defuse the
deadlock.
PR kern/54189
To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/net/if_vlan.c
cvs rdiff -u -r1.182 -r1.183 src/sys/netinet/in_pcb.c
cvs rdiff -u -r1.311 -r1.312 src/sys/netinet/ip_output.c
cvs rdiff -u -r1.165 -r1.166 src/sys/netinet6/in6_pcb.c
cvs rdiff -u -r1.219 -r1.220 src/sys/netinet6/ip6_output.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index