[PATCH v2] exit: avoid undefined behaviour when call wait4

2017-06-13 Thread zhong jiang
From: zhongjiang wait4(-2147483648, 0x20, 0, 0xdd) triggers: UBSAN: Undefined behaviour in kernel/exit.c:1651:9 The related calltrace is as follows: [518871.435738] negation of -2147483648 cannot be represented in type 'int': [518871.442618] CPU: 9 PID: 16482 Comm:

[PATCH v2] exit: avoid undefined behaviour when call wait4

2017-06-13 Thread zhong jiang
From: zhongjiang wait4(-2147483648, 0x20, 0, 0xdd) triggers: UBSAN: Undefined behaviour in kernel/exit.c:1651:9 The related calltrace is as follows: [518871.435738] negation of -2147483648 cannot be represented in type 'int': [518871.442618] CPU: 9 PID: 16482 Comm: zj Tainted: GB