Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753471Ab1DKQ2y (ORCPT ); Mon, 11 Apr 2011 12:28:54 -0400 Received: from linux-sh.org ([111.68.239.195]:43560 "EHLO linux-sh.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751921Ab1DKQ2x (ORCPT ); Mon, 11 Apr 2011 12:28:53 -0400 Date: Tue, 12 Apr 2011 01:28:19 +0900 From: Paul Mundt To: Frederic Weisbecker Cc: LKML , Ingo Molnar , Peter Zijlstra , Will Deacon , Prasad Subject: Re: [PATCH 5/5] sh, hw_breakpoints: Fix racy access to ptrace breakpoints Message-ID: <20110411162818.GB13545@linux-sh.org> References: <1302284067-7860-1-git-send-email-fweisbec@gmail.com> <1302284067-7860-6-git-send-email-fweisbec@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1302284067-7860-6-git-send-email-fweisbec@gmail.com> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 22 On Fri, Apr 08, 2011 at 07:34:27PM +0200, Frederic Weisbecker wrote: > While the tracer accesses ptrace breakpoints, the child task may > concurrently exit due to a SIGKILL and thus release its breakpoints > at the same time. We can then dereference some freed pointers. > > To fix this, hold a reference on the child breakpoints before > manipulating them. > > Reported-by: Oleg Nesterov > Signed-off-by: Frederic Weisbecker > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Will Deacon > Cc: Prasad > Cc: Paul Mundt Acked-by: Paul Mundt -- 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/