And that the bugcheck parameters nicely give you the actual demarcating
address as well as the bogus one you supplied.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Monday, August 15, 2005 12:41 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] BAD_POOL_CALLER “free kernel pool at user-mode
address”
Note that these ranges are adjusted if /3GB is on the boot.ini line and
all of kernel VA is shoved into the top 1GB instead of the top 2 GB.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Arlie Davis
Sent: Monday, August 15, 2005 9:35 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] BAD_POOL_CALLER “free kernel pool at user-mode
address”
The bugcheck means that you are passing an address to ExFreePoolWithTag
that
never, ever came out of ExAllocatePoolWithTag. Pool addresses are
always
kernel-mode-only addresses. On x86, this means that the high bit is set
to
1; the address is within the range 0x80000000 - 0xFFFFFFF, inclusive.
User-mode addresses, on x86, are 0 - 0x7FFFFFFF. (This assumption is
not
guaranteed to be true on other platforms, and is not something you
should
hard-code into your driver.)
You have called ExFreePoolWithTag with a user-mode address. This is
bogus
because it’s simply *impossible* for the pool allocator to allocate an
address in this range. Your driver has somehow corrupted the pointer
that
you are passing.
– arlie
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Omer B
Sent: Monday, August 15, 2005 8:48 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] BAD_POOL_CALLER “free kernel pool at user-mode
address”
But how can it be a user mode address if the allocation is from the
kernel
?
Maxim - are you sure Nikolas is wrong ?
NONPAGED memory can be freed in any scope ?
On 8/15/05, Mark Roddy wrote:
> The problem is that the buffer address is a user mode address - which
> means that you are handing garbage back to the kernel pool.
>
> Bug Check 0xC2: BAD_POOL_CALLER
> Parameter 1 - 0x40 - “The current thread attempted to free kernel
> pool at user-mode address.”
> Parameter 2 - starting address - the page address you are freeing.
> Parameter 3 - start of system address space - any address less than
> this is bogus.
> Parameter 4 - 0.
>
> =====================
> Mark Roddy DDK MVP
> Windows 2003/XP/2000 Consulting
> Hollis Technology Solutions 603-321-1032 www.hollistech.com
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Omer B
> > Sent: Monday, August 15, 2005 4:06 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] BAD_POOL_CALLER “free kernel pool at user-mode
> > address”
> >
> > Hi
> >
> > I got the above BSOD while calling ExFreePool() to free memory
> > previously allocated in my driver with ExAllocatedPoolWithTag()…
> >
> >
> > Does that’s means that the memory i allocated in kernel points to a
> > user mode space ? (and if so how can it be?)
> >
> >
> > Or maybe the problem is because a context switch or something like
> > that ?
> >
> >
> > Thanks for any help…
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com