Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763430AbZFKPAy (ORCPT ); Thu, 11 Jun 2009 11:00:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754773AbZFKPAq (ORCPT ); Thu, 11 Jun 2009 11:00:46 -0400 Received: from NaN.false.org ([208.75.86.248]:58544 "EHLO nan.false.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754142AbZFKPAp (ORCPT ); Thu, 11 Jun 2009 11:00:45 -0400 X-Greylist: delayed 2022 seconds by postgrey-1.27 at vger.kernel.org; Thu, 11 Jun 2009 11:00:45 EDT Date: Thu, 11 Jun 2009 10:27:00 -0400 From: Daniel Jacobowitz To: "Kirill A. Shutemov" Cc: linux-arm-kernel@lists.arm.linux.org.uk, Nicolas Pitre , linux-kernel@vger.kernel.org, linux@arm.linux.org.uk Subject: Re: ERESTART_RESTARTBLOCK and ptrace() Message-ID: <20090611142700.GA12259@caradoc.them.org> Mail-Followup-To: "Kirill A. Shutemov" , linux-arm-kernel@lists.arm.linux.org.uk, Nicolas Pitre , linux-kernel@vger.kernel.org, linux@arm.linux.org.uk References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1029 Lines: 28 On Wed, Jun 10, 2009 at 01:25:34PM +0300, Kirill A. Shutemov wrote: > I've got bug in handling ERESTART_RESTARTBLOCK. Kernel version is 2.6.28. > > Steps to reproduce: > 1. Attach using ptrace() to process while it's in a syscall which use > ERESTART_RESTARTBLOCK > on interrupt. The easiest way is to attach to process which is in nanosleep(). > 2. Run a syscall in context of the process like it does gdb. > 3. Continue the process. > > Results: > Syscall(nanosleep) return error code 516(ERESTART_RESTARTBLOCK). It's > kernel's internal error > code and should never appear at userspace. > > It seems ARM-related since I can't reproduce it on x86. That's because GDB has code to do the right thing on x86. Consider filing a GDB bug please. -- Daniel Jacobowitz CodeSourcery -- 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/