Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

RE: Example with ExInitializeNPagedLookasideList with Non-PagedPoolMus-tSucceed will blue screen.

Paul_BunnPaul_Bunn Member Posts: 251
I don't think it's a bug in the CLASS driver (just sloppy programming --
programmers too lazy to do implement specific KeBugCheckEx calls) -- since
every disk and tape driver is using this code, it is obviously robust. The
class drivers dependent on ScsiClassInitializeSrbLookasideList do not ask
for more than 4 elements, so the resource usage is extremely light.


Paul Bunn,, 425-644-6000
Microsoft MVP - WindowsNT/2000

-----Original Message-----
From: Taed Nelson [mailto:[email protected]]
Sent: Tuesday, May 09, 2000 11:08 AM
To: NT Developers Interest List
Subject: [ntdev] Example with ExInitializeNPagedLookasideList with
NonPagedPoolMus tSucceed will blue screen.

[I have already submitted this bug to the DDK bug reports, but thought I'd
share it with all of you, since it's potentially very bad. I suggest
everyone search their code base for the same bug!]

The only code example of ExInitializeNPagedLookasideList in either the NT
4.0 DDK or MSDN is in CLASS.C, which is a SCSI driver. However, this
example specifies the flag NonPagedPoolMustSucceed.

There are two problems with this.

First, that flag is not valid. The documentation for
ExInitializeNPagedLookasideList clearly states that the flags should nearly
always be 0, except for the rare POOL_RAISE_IF_ALLOCATION_FAILURE.

Second, if the flag NonPagedPoolMustSucceed is specified, all allocations
for that lookaside list (not just the initialization) will be from the "must
succeed" pool.

The "must succeed" pool is a very scarce resource, which is only about 16 KB
large. If the lookaside list happens to exhaust that memory, it will cause
a blue screen, namely event 0x00000041, MUST_SUCCEED_POOL_EMPTY.

A programmer here had copied the code from the DDK for our project, and we
would get that blue screen under high load. It took us a few days to track
it down to using the "must succeed" pool instead of the normal pool.

I feel that is a serious bug in the CLASS.C code, which will cause bugs in
other people's code since it is the only example of the
ExInitializeNPagedLookasideList function.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online