From beb116954b9b7f3bb56412b2494b562f02b864b1 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 7 Jan 1997 02:33:00 +0000 Subject: Import of Linux/MIPS 2.1.14 --- kernel/exec_domain.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'kernel/exec_domain.c') diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c index 7f0114a46..9a202359a 100644 --- a/kernel/exec_domain.c +++ b/kernel/exec_domain.c @@ -28,6 +28,27 @@ static struct exec_domain *exec_domains = &default_exec_domain; static asmlinkage void no_lcall7(struct pt_regs * regs) { + + /* + * This may have been a static linked SVr4 binary, so we would have the + * personality set incorrectly. Check to see whether SVr4 is available, + * and use it, otherwise give the user a SEGV. + */ + if (current->exec_domain && current->exec_domain->use_count) + (*current->exec_domain->use_count)--; + + current->personality = PER_SVR4; + current->exec_domain = lookup_exec_domain(current->personality); + + if (current->exec_domain && current->exec_domain->use_count) + (*current->exec_domain->use_count)++; + + if (current->exec_domain && current->exec_domain->handler + && current->exec_domain->handler != no_lcall7) { + current->exec_domain->handler(regs); + return; + } + send_sig(SIGSEGV, current, 1); } -- cgit v1.2.3