From patchwork Tue Jan 20 04:43:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 3245 X-Patchwork-Delegate: lethal@linux-sh.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n0K4dU9m021929 for ; Mon, 19 Jan 2009 20:39:31 -0800 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754494AbZATEn7 (ORCPT ); Mon, 19 Jan 2009 23:43:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754521AbZATEn7 (ORCPT ); Mon, 19 Jan 2009 23:43:59 -0500 Received: from mo11.iij4u.or.jp ([210.138.174.79]:49453 "EHLO mo11.iij4u.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754494AbZATEn7 (ORCPT ); Mon, 19 Jan 2009 23:43:59 -0500 Received: by mo.iij4u.or.jp (mo11) id n0K4hvJ3011735; Tue, 20 Jan 2009 13:43:57 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox11) id n0K4hpKx021535; Tue, 20 Jan 2009 13:43:55 +0900 Date: Tue, 20 Jan 2009 13:43:50 +0900 (JST) Message-Id: <20090120.134350.89916914.kkojima@rr.iij4u.or.jp> To: lethal@linux-sh.org Cc: linux-sh@vger.kernel.org Subject: Re: ERESTART* seen by userland From: Kaz Kojima In-Reply-To: <20090120032258.GD12965@linux-sh.org> References: <20090117.084015.142054869.kkojima@rr.iij4u.or.jp> <20090120032258.GD12965@linux-sh.org> X-Mailer: Mew version 5.2 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Paul Mundt wrote: >> It seems that some syscalls return with ERESTART* errno when >> they should return EINTR in the recent SH kernels. >> Has anybody experienced this? >> > I haven't hit this personally, but the only logical explanation I can > think of for this is the T-bit setting in the syscall restart code. I > suppose I will have to find another bit to use. Can you confirm if > getting rid of regs->sr T-bit manipulation makes this go away? I've confirmed that my testcases are fixed with removing the if line just before handle_syscall_restart call in do_signal: Regards, kaz --- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- GIT/linux-2.6/arch/sh/kernel/signal_32.c 2008-12-30 09:31:12.000000000 +0900 +++ linux-2.6.29-rc1/arch/sh/kernel/signal_32.c 2009-01-20 12:48:40.000000000 +0900 @@ -589,8 +589,7 @@ static void do_signal(struct pt_regs *re signr = get_signal_to_deliver(&info, &ka, regs, NULL); if (signr > 0) { - if (regs->sr & 1) - handle_syscall_restart(save_r0, regs, &ka.sa); + handle_syscall_restart(save_r0, regs, &ka.sa); /* Whee! Actually deliver the signal. */ if (handle_signal(signr, &ka, &info, oldset,