All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kaz Kojima <kkojima@rr.iij4u.or.jp>
To: linux-sh@vger.kernel.org
Subject: Re: ERESTART* seen by userland
Date: Tue, 20 Jan 2009 04:43:50 +0000	[thread overview]
Message-ID: <20090120.134350.89916914.kkojima@rr.iij4u.or.jp> (raw)
In-Reply-To: <20090117.084015.142054869.kkojima@rr.iij4u.or.jp>

Paul Mundt <lethal@linux-sh.org> 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:

--- 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,

Regards,
	kaz

  parent reply	other threads:[~2009-01-20  4:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16 23:40 ERESTART* seen by userland Kaz Kojima
2009-01-20  3:22 ` Paul Mundt
2009-01-20  4:43 ` Kaz Kojima [this message]
2009-01-27  7:27 ` Paul Mundt
2009-01-30 23:40 ` Kaz Kojima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090120.134350.89916914.kkojima@rr.iij4u.or.jp \
    --to=kkojima@rr.iij4u.or.jp \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.