From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933123Ab1ERNCH (ORCPT ); Wed, 18 May 2011 09:02:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33747 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756831Ab1ERNCE (ORCPT ); Wed, 18 May 2011 09:02:04 -0400 Date: Wed, 18 May 2011 15:00:04 +0200 From: Oleg Nesterov To: Jiri Slaby Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, jirislaby@gmail.com, Alan Cox , Al Viro , Andi Kleen Subject: Re: [PATCH v2 1/3] coredump: use get_task_comm for %e filename format Message-ID: <20110518130004.GA10638@redhat.com> References: <1305181093-20871-1-git-send-email-jslaby@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1305181093-20871-1-git-send-email-jslaby@suse.cz> 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 Sorry for delay, On 05/12, Jiri Slaby wrote: > > We currently access current->comm directly. As we have > prctl(PR_SET_NAME), we need the access be protected by task_lock. This > is exactly what get_task_comm does, so use it. > > I'm not 100% convinced prctl(PR_SET_NAME) may be called at the time of > core dump, It can't be called. Apart from current, a sub-thread can change ->comm[] via /proc/pid/comm, but we already killed all threads. > but the locking won't hurt. Agreed, the patch looks correct. but still unneeded. Oleg.