diff options
Diffstat (limited to 'kernel/sys.c')
-rw-r--r-- | kernel/sys.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index b3f1097c76fa..41e02eff3398 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1528,6 +1528,28 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3, | |||
1528 | current->timer_slack_ns = arg2; | 1528 | current->timer_slack_ns = arg2; |
1529 | error = 0; | 1529 | error = 0; |
1530 | break; | 1530 | break; |
1531 | case PR_MCE_KILL: | ||
1532 | if (arg4 | arg5) | ||
1533 | return -EINVAL; | ||
1534 | switch (arg2) { | ||
1535 | case 0: | ||
1536 | if (arg3 != 0) | ||
1537 | return -EINVAL; | ||
1538 | current->flags &= ~PF_MCE_PROCESS; | ||
1539 | break; | ||
1540 | case 1: | ||
1541 | current->flags |= PF_MCE_PROCESS; | ||
1542 | if (arg3 != 0) | ||
1543 | current->flags |= PF_MCE_EARLY; | ||
1544 | else | ||
1545 | current->flags &= ~PF_MCE_EARLY; | ||
1546 | break; | ||
1547 | default: | ||
1548 | return -EINVAL; | ||
1549 | } | ||
1550 | error = 0; | ||
1551 | break; | ||
1552 | |||
1531 | default: | 1553 | default: |
1532 | error = -EINVAL; | 1554 | error = -EINVAL; |
1533 | break; | 1555 | break; |