How to check a memory address is valid inside Linux kernel?

3.5k Views Asked by At

i am debugging a corrupt packet content inside Network driver. I want to dump a packet content inside network driver for debugging. Before that i want to check whether its address is accessible and valid inside kernel address space . Any API is available for the same other that NULL check??

1

There are 1 best solutions below

1
On

I guess, virt_addr_valid() might come in handy. As far as I understand, this is merely a validity check with respect to the kernel address space.