lkml.org 
[lkml]   [2005]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RFC: i386: kill !4KSTACKS
Daniel Phillips wrote:
> There are only two stacks involved, the normal kernel stack and your new ndis
> stack. You save ESP of the kernel stack at the base of the ndis stack. When
> the Windows code calls your api, you get the ndis ESP, load the kernel ESP
> from the base of the ndis stack, push the ndis ESP so you can get back to the
> ndis code later, and continue on your merry way.

With CONFIG_PREEMPT, this will still cause trouble due to lack
of "current" task info on the NDIS stack.

One option is to copy (duplicate) the bottom-of-stack info when
switching to the NDIS stack.

Another option is to stick a Mutex around any use of the NDIS stack
when calling into the foreign driver (might be done like this already??),
which will prevent PREEMPTion during the call.

Cheers
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-07 04:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site