Handle unlikely errors from personality syscall
Despite being marked as SYSCALL_NEVER_FAILS, personality syscall still might report a failure on some architectures due to obscure kernel bugs. Check for this unlikely case and let users know that their kernel has gone bananas. * personality.c (SYS_FUNC(personality)): Do not parse syscall return value in case of syserror.
This commit is contained in:
parent
abfa939f57
commit
0297e0c067
@ -50,6 +50,9 @@ SYS_FUNC(personality)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (syserror(tcp))
|
||||
return 0;
|
||||
|
||||
pers = tcp->u_rval;
|
||||
const char *type = xlookup(personality_types, pers & PER_MASK);
|
||||
char *p;
|
||||
|
Loading…
Reference in New Issue
Block a user