kern/81767: ndis driver does not compile into kernel

Eygene A. Ryabinkin rea at rea.mbslab.kiae.ru
Wed Jun 1 08:20:02 PDT 2005


>Number:         81767
>Category:       kern
>Synopsis:       ndis driver does not compile into kernel
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 01 15:20:01 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Eygene A. Ryabinkin
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
Code Labs
>Environment:
System: FreeBSD visitor-169432 6.0-CURRENT FreeBSD 6.0-CURRENT #9: Wed Jun 1 18:36:49 MSD 2005 rea at visitor-169432:/usr/obj/usr/src/sys/TWILIGHT i386


>Description:
 If we specify 'device ndis' and 'options NDISAPI' in kernel configuration
file, then we will not be able to build such kernel due to a syntaxical errors
in file /sys/compat/ndis/subr_ntoskrnl.c
>How-To-Repeat:
 Cvsup 6.0-CURRENT, put
options NDISAPI
device ndis
device wlan
 into kernel config and build a kernel. The compiler will spit a bunch of errors
for subr_ntoskrnl.c
>Fix:
 Just specify explicit typecast of dpc->k_lock in KeRemoveQueueDpc()

--- subr_ntoskrnl.c.orig        Wed Jun  1 18:28:11 2005
+++ subr_ntoskrnl.c     Wed Jun  1 18:31:10 2005
@@ -3110,15 +3110,15 @@
        if (dpc->k_lock == NULL)
                return(FALSE);
 
-       mtx_lock_spin(dpc->k_lock);
+       mtx_lock_spin((struct mtx *)(dpc->k_lock));
        if (dpc->k_dpclistentry.nle_flink == &dpc->k_dpclistentry) {
-               mtx_unlock_spin(dpc->k_lock);
+               mtx_unlock_spin((struct mtx *)(dpc->k_lock));
                return(FALSE);
        }
 
        REMOVE_LIST_ENTRY((&dpc->k_dpclistentry));
        INIT_LIST_HEAD((&dpc->k_dpclistentry));
-       mtx_unlock_spin(dpc->k_lock);
+       mtx_unlock_spin((struct mtx *)(dpc->k_lock));
 
        return(TRUE);
 }

-- 
 rea
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list