[Bug 12236] ash hangs after wait returns EINTR

bugzilla at busybox.net bugzilla at busybox.net
Mon Oct 21 21:43:21 UTC 2019


https://bugs.busybox.net/show_bug.cgi?id=12236

--- Comment #3 from martin.brueckner at psi.ch ---
(In reply to Denys Vlasenko from comment #2)

Thanks Denys for your very helpful analysis.
I am on vacation and couldn't reply earlier.

When I am back at work I can try to patch the kernel to check r7==1.
I am unsure where to put the check for r7==1. Is it after "case ERESTARTNOINTR"
like this?

        if (regs->orig_r2 >= 0) {
                continue_addr = regs->ea;
                restart_addr = continue_addr - 4;
                retval = regs->r2;

                /*
                 * Prepare for system call restart. We do this here so that a
                 * debugger will see the already changed PC.
                 */
                switch (retval) {
                case ERESTART_RESTARTBLOCK:
                        restart = -2;
                case ERESTARTNOHAND:
                case ERESTARTSYS:
                case ERESTARTNOINTR:
                        if (regs->r7 == 0) break; // or is it regs->orig_r7 ?
                        restart++;
                        regs->r2 = regs->orig_r2;
                        regs->r7 = regs->orig_r7;
                        regs->ea = restart_addr;
                        break;
                }

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list