MmGetSystemAddressForMdlSafe more than once

In the same call, can the function be called more than once ?
Thank

xxxxx@gmail.com xxxxx@lists.osr.com wrote:

In the same call, can the function be called more than once ?

I’m really curious to know what you lead you to think this might be an
issue. Also, what would be the definition of “the same call”? Kernel
code is essentially one big process.

MmGetSystemAddressForMdlSafe is quite simple. In fact, it’s a macro;
you can go look up exactly what it does. If the MDL has already been
mapped, all it does is return a field from the MDL.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>In the same call, can the function be called more than once ?

To answer the specific question:

Yes. It is specifically designed to be both safe and efficient when called multiple times. Those multiple times are usually once each by multiple drivers in a branch of the device tree. But, in the same driver or the same function will also be fine.

Aside from that, what Mr. Roberts said.

Peter
OSR
@OSRDrivers