On Thu, 15 Mar 2018 16:07:54 +0100
Petr Mladek <pmla...@suse.com> wrote:

> Good point. The following should do the job:
> 
> static const char *check_pointer_access(const void *ptr)
> {
>       char c;
> 
>       if (!ptr)
>               return "(null)";
> 
>       if ((unsigned long)ptr < TASK_SIZE || probe_kernel_address(ptr, c))

Please don't.

-- Steve

>               return "(efault)";
> 
>       return 0;
> }

Reply via email to