Summary: | [lor] if_lagg rmlock <-> if_addr_lock | ||
---|---|---|---|
Product: | Base System | Reporter: | Jean-Sébastien Pédron <dumbbell> |
Component: | kern | Assignee: | Ryan Stone <rstone> |
Status: | Closed FIXED | ||
Severity: | Affects Many People | CC: | asomers, fbsd, melifaro, np, re, rpokala, rstone, sbruno |
Priority: | --- | Keywords: | needs-qa, patch, regression |
Version: | 11.0-STABLE | Flags: | koobs:
mfc-stable11?
|
Hardware: | Any | ||
OS: | Any | ||
URL: | https://reviews.freebsd.org/D6845 |
Description
Jean-Sébastien Pédron
2014-10-03 08:21:31 UTC
The lagg0 interface is configured like this in /etc/rc.conf: ifconfig_lagg0="laggproto failover laggport re0 laggport wlan0 SYNCDHCP" Deadlocks due to this LOR are easy to reproduce. https://reviews.freebsd.org/D6845 has a proposed fix (not reviewed yet). r272211 is mentioned as the possible culprit in that review. This still occurs on 11.0-BETA1 so I've updated the version and added re@ to the CC list. I do not see a corresponding commit for this. Is it still an issue? (In reply to Glen Barber from comment #3) No commit has been implemented for this issue. My review/phab thing is a proof of concept that demonstrates that the LOR dissapears if you remove the LOCK, which is kind of dumb. At this time there is no fix for this issue. I've got a better patch here, but it needs review https://reviews.freebsd.org/D8306 The bug is not in the lagg driver but in the upper layer that held the if_addr_lock while calling into the driver. This review should fix the lagg driver and any other ifnet implementation that needs to get a lock in its if_counter handler: https://reviews.freebsd.org/D8498 A commit references this bug: Author: rstone Date: Sat Nov 12 19:03:24 UTC 2016 New revision: 308580 URL: https://svnweb.freebsd.org/changeset/base/308580 Log: Don't read if_counters with if_addr_lock held Calling into an ifnet implementation with the if_addr_lock already held can cause a LOR and potentially a deadlock, as ifnet implementations typically can take the if_addr_lock after their own locks during configuration. Refactor a sysctl handler that was violating this to read if_counter data in a temporary buffer before the if_addr_lock is taken, and then copying the data in its final location later, when the if_addr_lock is held. PR: 194109 Reported by: Jean-Sebastien Pedron MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8498 Reviewed by: sbruno Changes: head/sys/net/rtsock.c A commit references this bug: Author: rstone Date: Sat Nov 26 01:16:33 UTC 2016 New revision: 309177 URL: https://svnweb.freebsd.org/changeset/base/309177 Log: MFC r308580: Don't read if_counters with if_addr_lock held Calling into an ifnet implementation with the if_addr_lock already held can cause a LOR and potentially a deadlock, as ifnet implementations typically can take the if_addr_lock after their own locks during configuration. Refactor a sysctl handler that was violating this to read if_counter data in a temporary buffer before the if_addr_lock is taken, and then copying the data in its final location later, when the if_addr_lock is held. PR: 194109 Reported by: Jean-Sebastien Pedron MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8498 Reviewed by: sbruno Changes: _U stable/11/ stable/11/sys/net/rtsock.c *** Bug 216731 has been marked as a duplicate of this bug. *** |