Re: [Patch 12/21] Check if the process is an ELF executable

From: Oleg Nesterov
Date: Tue Dec 14 2010 - 11:12:33 EST


On 12/14, Suzuki K. Poulose wrote:
>
> + */
> +static int get_elf_class(struct task_struct *task)
> +{
> + struct elfhdr hdr;
> + int ret = 0;
> +
> + ret = kernel_read(task->mm->exe_file, 0, (char*)&hdr, sizeof(hdr));

->exe_file can be NULL.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/