diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-07 12:31:54 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-07 12:31:54 -0500 |
commit | 673f8205914a12e928c65afbcd78ae748f78df53 (patch) | |
tree | 38c60215646d079fab3bff812e094e914960c7ec /kernel/signal.c | |
parent | cf47b8f3d96b0b8b10b557444a28b3ca4024ff82 (diff) | |
parent | ae1a25da8448271a99745da03100d5299575a269 (diff) |
Merge branch 'linus' into core/locking
Conflicts:
fs/btrfs/locking.c
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 61 |
1 files changed, 26 insertions, 35 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 3152ac3b62e2..b6b36768b758 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -909,7 +909,9 @@ static void print_fatal_signal(struct pt_regs *regs, int signr) | |||
909 | } | 909 | } |
910 | #endif | 910 | #endif |
911 | printk("\n"); | 911 | printk("\n"); |
912 | preempt_disable(); | ||
912 | show_regs(regs); | 913 | show_regs(regs); |
914 | preempt_enable(); | ||
913 | } | 915 | } |
914 | 916 | ||
915 | static int __init setup_print_fatal_signals(char *str) | 917 | static int __init setup_print_fatal_signals(char *str) |
@@ -1961,7 +1963,7 @@ EXPORT_SYMBOL(unblock_all_signals); | |||
1961 | * System call entry points. | 1963 | * System call entry points. |
1962 | */ | 1964 | */ |
1963 | 1965 | ||
1964 | asmlinkage long sys_restart_syscall(void) | 1966 | SYSCALL_DEFINE0(restart_syscall) |
1965 | { | 1967 | { |
1966 | struct restart_block *restart = ¤t_thread_info()->restart_block; | 1968 | struct restart_block *restart = ¤t_thread_info()->restart_block; |
1967 | return restart->fn(restart); | 1969 | return restart->fn(restart); |
@@ -2014,8 +2016,8 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset) | |||
2014 | return error; | 2016 | return error; |
2015 | } | 2017 | } |
2016 | 2018 | ||
2017 | asmlinkage long | 2019 | SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set, |
2018 | sys_rt_sigprocmask(int how, sigset_t __user *set, sigset_t __user *oset, size_t sigsetsize) | 2020 | sigset_t __user *, oset, size_t, sigsetsize) |
2019 | { | 2021 | { |
2020 | int error = -EINVAL; | 2022 | int error = -EINVAL; |
2021 | sigset_t old_set, new_set; | 2023 | sigset_t old_set, new_set; |
@@ -2074,8 +2076,7 @@ out: | |||
2074 | return error; | 2076 | return error; |
2075 | } | 2077 | } |
2076 | 2078 | ||
2077 | asmlinkage long | 2079 | SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize) |
2078 | sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize) | ||
2079 | { | 2080 | { |
2080 | return do_sigpending(set, sigsetsize); | 2081 | return do_sigpending(set, sigsetsize); |
2081 | } | 2082 | } |
@@ -2146,11 +2147,9 @@ int copy_siginfo_to_user(siginfo_t __user *to, siginfo_t *from) | |||
2146 | 2147 | ||
2147 | #endif | 2148 | #endif |
2148 | 2149 | ||
2149 | asmlinkage long | 2150 | SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, |
2150 | sys_rt_sigtimedwait(const sigset_t __user *uthese, | 2151 | siginfo_t __user *, uinfo, const struct timespec __user *, uts, |
2151 | siginfo_t __user *uinfo, | 2152 | size_t, sigsetsize) |
2152 | const struct timespec __user *uts, | ||
2153 | size_t sigsetsize) | ||
2154 | { | 2153 | { |
2155 | int ret, sig; | 2154 | int ret, sig; |
2156 | sigset_t these; | 2155 | sigset_t these; |
@@ -2223,8 +2222,7 @@ sys_rt_sigtimedwait(const sigset_t __user *uthese, | |||
2223 | return ret; | 2222 | return ret; |
2224 | } | 2223 | } |
2225 | 2224 | ||
2226 | asmlinkage long | 2225 | SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) |
2227 | sys_kill(pid_t pid, int sig) | ||
2228 | { | 2226 | { |
2229 | struct siginfo info; | 2227 | struct siginfo info; |
2230 | 2228 | ||
@@ -2283,7 +2281,7 @@ static int do_tkill(pid_t tgid, pid_t pid, int sig) | |||
2283 | * exists but it's not belonging to the target process anymore. This | 2281 | * exists but it's not belonging to the target process anymore. This |
2284 | * method solves the problem of threads exiting and PIDs getting reused. | 2282 | * method solves the problem of threads exiting and PIDs getting reused. |
2285 | */ | 2283 | */ |
2286 | asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) | 2284 | SYSCALL_DEFINE3(tgkill, pid_t, tgid, pid_t, pid, int, sig) |
2287 | { | 2285 | { |
2288 | /* This is only valid for single tasks */ | 2286 | /* This is only valid for single tasks */ |
2289 | if (pid <= 0 || tgid <= 0) | 2287 | if (pid <= 0 || tgid <= 0) |
@@ -2295,8 +2293,7 @@ asmlinkage long sys_tgkill(pid_t tgid, pid_t pid, int sig) | |||
2295 | /* | 2293 | /* |
2296 | * Send a signal to only one task, even if it's a CLONE_THREAD task. | 2294 | * Send a signal to only one task, even if it's a CLONE_THREAD task. |
2297 | */ | 2295 | */ |
2298 | asmlinkage long | 2296 | SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) |
2299 | sys_tkill(pid_t pid, int sig) | ||
2300 | { | 2297 | { |
2301 | /* This is only valid for single tasks */ | 2298 | /* This is only valid for single tasks */ |
2302 | if (pid <= 0) | 2299 | if (pid <= 0) |
@@ -2305,8 +2302,8 @@ sys_tkill(pid_t pid, int sig) | |||
2305 | return do_tkill(0, pid, sig); | 2302 | return do_tkill(0, pid, sig); |
2306 | } | 2303 | } |
2307 | 2304 | ||
2308 | asmlinkage long | 2305 | SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, |
2309 | sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo) | 2306 | siginfo_t __user *, uinfo) |
2310 | { | 2307 | { |
2311 | siginfo_t info; | 2308 | siginfo_t info; |
2312 | 2309 | ||
@@ -2434,8 +2431,7 @@ out: | |||
2434 | 2431 | ||
2435 | #ifdef __ARCH_WANT_SYS_SIGPENDING | 2432 | #ifdef __ARCH_WANT_SYS_SIGPENDING |
2436 | 2433 | ||
2437 | asmlinkage long | 2434 | SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) |
2438 | sys_sigpending(old_sigset_t __user *set) | ||
2439 | { | 2435 | { |
2440 | return do_sigpending(set, sizeof(*set)); | 2436 | return do_sigpending(set, sizeof(*set)); |
2441 | } | 2437 | } |
@@ -2446,8 +2442,8 @@ sys_sigpending(old_sigset_t __user *set) | |||
2446 | /* Some platforms have their own version with special arguments others | 2442 | /* Some platforms have their own version with special arguments others |
2447 | support only sys_rt_sigprocmask. */ | 2443 | support only sys_rt_sigprocmask. */ |
2448 | 2444 | ||
2449 | asmlinkage long | 2445 | SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, |
2450 | sys_sigprocmask(int how, old_sigset_t __user *set, old_sigset_t __user *oset) | 2446 | old_sigset_t __user *, oset) |
2451 | { | 2447 | { |
2452 | int error; | 2448 | int error; |
2453 | old_sigset_t old_set, new_set; | 2449 | old_sigset_t old_set, new_set; |
@@ -2497,11 +2493,10 @@ out: | |||
2497 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ | 2493 | #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ |
2498 | 2494 | ||
2499 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION | 2495 | #ifdef __ARCH_WANT_SYS_RT_SIGACTION |
2500 | asmlinkage long | 2496 | SYSCALL_DEFINE4(rt_sigaction, int, sig, |
2501 | sys_rt_sigaction(int sig, | 2497 | const struct sigaction __user *, act, |
2502 | const struct sigaction __user *act, | 2498 | struct sigaction __user *, oact, |
2503 | struct sigaction __user *oact, | 2499 | size_t, sigsetsize) |
2504 | size_t sigsetsize) | ||
2505 | { | 2500 | { |
2506 | struct k_sigaction new_sa, old_sa; | 2501 | struct k_sigaction new_sa, old_sa; |
2507 | int ret = -EINVAL; | 2502 | int ret = -EINVAL; |
@@ -2531,15 +2526,13 @@ out: | |||
2531 | /* | 2526 | /* |
2532 | * For backwards compatibility. Functionality superseded by sigprocmask. | 2527 | * For backwards compatibility. Functionality superseded by sigprocmask. |
2533 | */ | 2528 | */ |
2534 | asmlinkage long | 2529 | SYSCALL_DEFINE0(sgetmask) |
2535 | sys_sgetmask(void) | ||
2536 | { | 2530 | { |
2537 | /* SMP safe */ | 2531 | /* SMP safe */ |
2538 | return current->blocked.sig[0]; | 2532 | return current->blocked.sig[0]; |
2539 | } | 2533 | } |
2540 | 2534 | ||
2541 | asmlinkage long | 2535 | SYSCALL_DEFINE1(ssetmask, int, newmask) |
2542 | sys_ssetmask(int newmask) | ||
2543 | { | 2536 | { |
2544 | int old; | 2537 | int old; |
2545 | 2538 | ||
@@ -2559,8 +2552,7 @@ sys_ssetmask(int newmask) | |||
2559 | /* | 2552 | /* |
2560 | * For backwards compatibility. Functionality superseded by sigaction. | 2553 | * For backwards compatibility. Functionality superseded by sigaction. |
2561 | */ | 2554 | */ |
2562 | asmlinkage unsigned long | 2555 | SYSCALL_DEFINE2(signal, int, sig, __sighandler_t, handler) |
2563 | sys_signal(int sig, __sighandler_t handler) | ||
2564 | { | 2556 | { |
2565 | struct k_sigaction new_sa, old_sa; | 2557 | struct k_sigaction new_sa, old_sa; |
2566 | int ret; | 2558 | int ret; |
@@ -2577,8 +2569,7 @@ sys_signal(int sig, __sighandler_t handler) | |||
2577 | 2569 | ||
2578 | #ifdef __ARCH_WANT_SYS_PAUSE | 2570 | #ifdef __ARCH_WANT_SYS_PAUSE |
2579 | 2571 | ||
2580 | asmlinkage long | 2572 | SYSCALL_DEFINE0(pause) |
2581 | sys_pause(void) | ||
2582 | { | 2573 | { |
2583 | current->state = TASK_INTERRUPTIBLE; | 2574 | current->state = TASK_INTERRUPTIBLE; |
2584 | schedule(); | 2575 | schedule(); |
@@ -2588,7 +2579,7 @@ sys_pause(void) | |||
2588 | #endif | 2579 | #endif |
2589 | 2580 | ||
2590 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND | 2581 | #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND |
2591 | asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize) | 2582 | SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) |
2592 | { | 2583 | { |
2593 | sigset_t newset; | 2584 | sigset_t newset; |
2594 | 2585 | ||