Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759473Ab0LNQM3 (ORCPT ); Tue, 14 Dec 2010 11:12:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45794 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757271Ab0LNQM2 (ORCPT ); Tue, 14 Dec 2010 11:12:28 -0500 Date: Tue, 14 Dec 2010 17:05:02 +0100 From: Oleg Nesterov To: "Suzuki K. Poulose" Cc: linux-kernel@vger.kernel.org, Jeremy Fitzhardinge , Christoph Hellwig , Masami Hiramatsu , Ananth N Mavinakayanahalli , Daisuke HATAYAMA , Andi Kleen , Roland McGrath , Amerigo Wang , Linus Torvalds , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Andrew Morton Subject: Re: [Patch 12/21] Check if the process is an ELF executable Message-ID: <20101214160502.GE11400@redhat.com> References: <20101214152259.67896960@suzukikp> <20101214154344.5c2b4737@suzukikp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101214154344.5c2b4737@suzukikp> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 497 Lines: 19 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/