Re: [PATCH] kernel/capability.c get_task_comm compile error (MMOTM)

Ingo Molnar
2007-11-11T14:20:54Z

* Erez Zadok <ezk@cs.sunysb.edu> wrote:

> Small patch below fixes compile error.

> + char name[sizeof(current->comm)];
> warned++;
> printk(KERN_INFO
> "warning: process `%s' sets w/ old libcap\n",
> - get_task_comm(current));
> + get_task_comm(name, current));

that's buggy - get_task_comm() returns void.

the proper fix would be to first do a get_task_comm() then pass in
'name' as an argument to printk.

Ingo