Re: [KMDF] Removing FDO and let PDO running



i am betting acpi is setting flag for you. you could clear the flag by
using the following code in your add device routine

WDF_DEVICE_STATE state

WDF_DEVICE_STATE_INIT(&state);
state.NotDisableable =WdfFalse;

WdfDeviceSetDeviceState(device, &state);

Isn't that reference the one for my running FDO ?? If it was zero, the
stack would unload without disabling right ?
If this reference is there after the stack has been removed, this is a
leaked reference. typically for a driver before a remove has been
processed, will have at least 2 references per created devobj

d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Your Name" <user@xxxxxxxxxxx> wrote in message
news:44fb8783$0$7018$626a54ce@xxxxxxxxxxxxxxx
that or somebody in the stack other then acpi is reporting
PNP_DEVICE_NOT_DISABLEABLE

You're right, here's what my stack looks like with !devnode (also, the
stack contains 2 devices.)

# The system timer PDO :

DevNode 0x86add9f0 for PDO 0000000000
(...)
Flags (0000000000)
CapabilityFlags (0xe9766544) LockSupported, UniqueID,
RawDeviceOK, WakeFromD0,
WakeFromD3, HardwareDisabled,
NoDisplayInUI
Unknown flags 0xe9740000

# My FDO :

DevNode 0x86adb1c8 for PDO 0x86add9f0
(...)
Flags (0x000000f0) DNF_ENUMERATED, DNF_IDS_QUERIED,
DNF_HAS_BOOT_CONFIG, DNF_BOOT_CONFIG_RESERVED
UserFlags (0x00000008) ***DNUF_NOT_DISABLEABLE***
CapabilityFlags (0x00000080) SilentInstall
DisableableDepends = 1 (including self)

So it appears I unintentionally set a PNP_DEVICE_NOT_DISABLEABLE user flag
somehow. I am not touching any flag of capability directly in my code. How
can I unset this flag safely ?

if you have one reference and no handles, you leaked a reference
somewhere with ObReferenceObject.

Isn't that reference the one for my running FDO ?? If it was zero, the
stack would unload without disabling right ?


.



Relevant Pages

  • Re: Is C99 the final C? (some suggestions)
    ... You mean vague terminologies like "stack"? ... wrap whatever "spawn" mechanism you have in your language (or use some ... >> and because of Java's bignum class, it meant that exposing a widening multiply ... >> you use to determine this is just related to examining the carry flag. ...
    (comp.lang.c)
  • LSE64 - reference
    ... Strings are represented by arrays in which cell 0 is the number of characters and the remaining cells are ... Variables and arrays yield their addresses when executed. ... The flag register is separate from the stack. ...
    (comp.lang.forth)
  • Re: Denesting
    ... The answer to "what next" is optimizing the resulting code, so the result is both shorter and faster than literally "rolled out" contents of definitions. ... above would copy the top stack item, push 9 on the stack, do a compare yielding a truth flag, and then evaluate the flag and jump or not. ...
    (comp.lang.forth)
  • Re: [ubuntu-hardened] Re: Collecting NX information
    ... > The PAGEEXEC flag will basically mandate the automated non-executable ... > setting for the stack and heap. ... > kernel randomizes anything that can be randomized in the address ...
    (Linux-Kernel)
  • Re: using MISC (post 1987 Forth hardware) opcodes
    ... because DUP is destructive. ... stack and want to branch on the top of stack element. ... Explicit arithmetic with flag values is relatively rare, and "short-circuit evaluation" is often a good substitute anyway. ... A persistent flag register makes it easy to return success or failure up through several levels of code, handling it appropritely at each level without stack gymnastics. ...
    (comp.lang.forth)