svn commit: r321477 - head/sys/net

2017-07-25 Thread Sean Bruno
Author: sbruno
Date: Tue Jul 25 14:41:50 2017
New Revision: 321477
URL: https://svnweb.freebsd.org/changeset/base/321477

Log:
  Don't hold the RM lock during lagg_proto_addport() to avoid an LOR.
  
  Submitted by: Kevin Bowling 
  Reviewed by:  mav
  MFC after:1 week
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D11711

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==
--- head/sys/net/if_lagg.c  Tue Jul 25 14:38:30 2017(r321476)
+++ head/sys/net/if_lagg.c  Tue Jul 25 14:41:50 2017(r321477)
@@ -738,14 +738,15 @@ lagg_port_create(struct lagg_softc *sc, struct ifnet *
 
lagg_setmulti(lp);
 
+   LAGG_WUNLOCK(sc);
+
if ((error = lagg_proto_addport(sc, lp)) != 0) {
/* Remove the port, without calling pr_delport. */
+   LAGG_WLOCK(sc);
lagg_port_destroy(lp, 0);
LAGG_UNLOCK_ASSERT(sc);
return (error);
}
-
-   LAGG_WUNLOCK(sc);
 
/* Update lagg capabilities */
lagg_capabilities(sc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r321477 - head/sys/net

2017-11-17 Thread Ryan Stone
On Tue, Jul 25, 2017 at 10:41 AM, Sean Bruno  wrote:
> Author: sbruno
> Date: Tue Jul 25 14:41:50 2017
> New Revision: 321477
> URL: https://svnweb.freebsd.org/changeset/base/321477
>
> Log:
>   Don't hold the RM lock during lagg_proto_addport() to avoid an LOR.

Can lagg_proto_addport() really be safely called without a lock held?
That seems extremely dubious to me.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"