aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorDave Hansen <[email protected]>2021-06-30 18:56:56 -0700
committerLinus Torvalds <[email protected]>2021-07-01 11:06:06 -0700
commitbf68294a2ec39ed7fec6a5b45d52034e6983157a (patch)
tree3b9dbb3920f59d3a1a6b0856d82fe281f272ebf4 /scripts/gdb/linux/tasks.py
parentf36ef407628835a7d7fb3d235b1f1aac7022d9a3 (diff)
selftests/vm/pkeys: handle negative sys_pkey_alloc() return code
The alloc_pkey() sefltest function wraps the sys_pkey_alloc() system call. On success, it updates its "shadow" register value because sys_pkey_alloc() updates the real register. But, the success check is wrong. pkey_alloc() considers any non-zero return code to indicate success where the pkey register will be modified. This fails to take negative return codes into account. Consider only a positive return value as a successful call. Link: https://lkml.kernel.org/r/[email protected] Fixes: 5f23f6d082a9 ("x86/pkeys: Add self-tests") Reported-by: Thomas Gleixner <[email protected]> Signed-off-by: Dave Hansen <[email protected]> Tested-by: Aneesh Kumar K.V <[email protected]> Cc: Ram Pai <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Florian Weimer <[email protected]> Cc: "Desnes A. Nunes do Rosario" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thiago Jung Bauermann <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Michal Suchanek <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions