diff options
author | Vaibhav Jain <vaibhav@linux.vnet.ibm.com> | 2017-11-24 14:03:38 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-11-29 19:56:18 +1100 |
commit | 7e4d4233260be0611c7fbdb2730c12731c4b8dc0 (patch) | |
tree | 52eab6d31594903d88d7dd68f547d16bf873106c /drivers | |
parent | aca7573fde95152378361cba734996b384f3b1d3 (diff) | |
download | linux-stable-7e4d4233260be0611c7fbdb2730c12731c4b8dc0.tar.gz linux-stable-7e4d4233260be0611c7fbdb2730c12731c4b8dc0.tar.bz2 linux-stable-7e4d4233260be0611c7fbdb2730c12731c4b8dc0.zip |
powerpc: Do not assign thread.tidr if already assigned
If set_thread_tidr() is called twice for same task_struct then it will
allocate a new tidr value to it leaving the previous value still
dangling in the vas_thread_ida table.
To fix this the patch changes set_thread_tidr() to check if a tidr
value is already assigned to the task_struct and if yes then returns
zero.
Fixes: ec233ede4c86("powerpc: Add support for setting SPRN_TIDR")
Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
[mpe: Modify to return 0 in the success case, not the TID value]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions