kern/146759: cxgb panic calling without cxgb_set_lro() without port
lock held
Andrew Boyer
aboyer at averesystems.com
Thu May 20 14:40:07 UTC 2010
>Number: 146759
>Category: kern
>Synopsis: cxgb panic calling without cxgb_set_lro() without port lock held
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu May 20 14:40:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Andrew Boyer
>Release: RELENG_7
>Organization:
Avere Systems
>Environment:
FreeBSD armada2 7.1-RELEASE-p3 FreeBSD 7.1-RELEASE-p3 #140: Wed May 19 16:52:20 EDT 2010 root at XXX:/usr/home/aboyer/src/freebsd/src/sys/amd64/compile/DEBUG amd64
>Description:
The cxgb driver causes a kernel panic if you try to disable LRO; it asserts that the port lock is held when there is no way that it could be. This problem appears to have existed for a long time (SVN 181616, Aug 2008?).
We must be the only people disabling LRO.
>How-To-Repeat:
'ifconfig cxgb0 -lro'
>Fix:
Take the port lock before calling cxgb_set_lro() in src/sys/dev/cxgb/cxgb_main.c.
diff -u cxgb_main.c cxgb_main_upd.c
--- cxgb_main.c 2010-05-20 10:24:49.000000000 -0400
+++ cxgb_main_upd.c 2010-05-20 10:26:22.000000000 -0400
@@ -2106,8 +2106,10 @@
if (mask & IFCAP_LRO) {
ifp->if_capenable ^= IFCAP_LRO;
+ PORT_LOCK(p);
/* Safe to do this even if cxgb_up not called yet */
cxgb_set_lro(p, ifp->if_capenable & IFCAP_LRO);
+ PORT_UNLOCK(p);
}
if (mask & IFCAP_VLAN_HWTAGGING) {
ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list