Re: Can TerminateThread() kill a thread that has entered the kernel?
- From: "Short But Sweet" <terse@xxxxxxx>
- Date: Mon, 21 Aug 2006 10:24:35 -0700
"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message
news:u8sBHD8wGHA.4972@xxxxxxxxxxxxxxxxxxxxxxx
runningIs is possible for one user mode thread, say thread A, to kill (via
TermiateThread() ) another user mode thread, thread B, while thread B
is called into a kernel driver via DeviceIoControl()?
Yes. It will be terminated on return from the kernel to user, after
through your DispatchIoctl path.the
Also, KeWaitForSingleObject(UserMode) will be abruptly interrupted, and
function will return STATUS_USER_APC. KeWaitForSingleObject(KernelMode) -will
not, the thread termination will be delayed till the wait will besatisfied.
In no way TerminateThread can interrupt kernel mode code execution.
I am seeing a strange problem and the only way I can explain it, so
far, is if a user thread calls into my driver and is terminated before
it finishes the execution of one of my functions.
Impossible.
These are the best kinds of conversations... the problem is researched by
the OP, their understanding of it stated as clearly as possible, and the
answer is unequivocal.
.
- References:
- Can TerminateThread() kill a thread that has entered the kernel?
- From: DavidP
- Re: Can TerminateThread() kill a thread that has entered the kernel?
- From: Maxim S. Shatskih
- Can TerminateThread() kill a thread that has entered the kernel?
- Prev by Date: packet does not get to tcp ip
- Next by Date: RE: Missing DDK Sample Source Code pixel.cpp
- Previous by thread: Re: Can TerminateThread() kill a thread that has entered the kernel?
- Next by thread: Breakpoints in Kernel-mode code
- Index(es):
Relevant Pages
|