From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20475 invoked by alias); 13 Nov 2009 23:16:10 -0000 Received: (qmail 20466 invoked by uid 22791); 13 Nov 2009 23:16:10 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Nov 2009 23:16:05 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nADNG4Qf003526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Nov 2009 18:16:04 -0500 Received: from gateway.sf.frob.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nADNG2DC030041; Fri, 13 Nov 2009 18:16:04 -0500 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 6198B357B; Fri, 13 Nov 2009 15:16:02 -0800 (PST) Received: by magilla.sf.frob.com (Postfix, from userid 5281) id 2DD2C100E; Fri, 13 Nov 2009 15:16:02 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Masami Hiramatsu X-Fcc: ~/Mail/linus Cc: Ingo Molnar , lkml , systemtap , DLE , Hidehiro Kawai , Andrew Morton , Oleg Nesterov Subject: Re: [PATCH -tip 1/3] Pass mm->flags to binfmt core_dump for bitflag consistency In-Reply-To: Masami Hiramatsu's message of Friday, 13 November 2009 17:52:27 -0500 <20091113225226.15079.90813.stgit@harusame> References: <20091113225226.15079.90813.stgit@harusame> Message-Id: <20091113231602.2DD2C100E@magilla.sf.frob.com> Date: Fri, 13 Nov 2009 23:16:00 -0000 X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2009-q4/txt/msg00512.txt.bz2 To clarify, proc_coredump_filter_write() is the one place that can change mm->flags during a core dump. I don't think any other is possible while all the other tasks sharing that mm are prevented from running. Is there any other way that mm->flags might change during do_coredump()? I don't see anything wrong with this change. But (assuming that is the only case), there is another approach we could take instead. That is, have proc_coredump_filter_write() do: down_read(&mm->mmap_sem); ret = mm->core_state ? -EBUSY : 0; up_read(&mm->mmap_sem); Thanks, Roland