futex: Provide and use pi_state_update_owner()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 19 Jan 2021 14:21:35 +0000 (15:21 +0100)
committerPDO SCM Team <hudsoncm@motorola.com>
Tue, 3 Aug 2021 08:26:21 +0000 (03:26 -0500)
commit4e32b9ec8bca15b6183f92f3a770600d21c20fff
tree2308b9c095af1c16ece9fb60454c2d924385aea9
parenta8a09d5afb537afaf6319cce8e8d61fde238f309
futex: Provide and use pi_state_update_owner()

commit c5cade200ab9a2a3be9e7f32a752c8d86b502ec7 upstream

Updating pi_state::owner is done at several places with the same
code. Provide a function for it and use that at the obvious places.

This is also a preparation for a bug fix to avoid yet another copy of the
same code or alternatively introducing a completely unpenetratable mess of
gotos.

Mot-CRs-fixed: (CR)
CVE-Fixed: CVE-2021-3347
Bug: 171705902

Change-Id: I5b8db1c9b1fcee748b2b893f1523c9cefb028547
Originally-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Gajjala Chakradhar <gajjalac@motorola.com>
Reviewed-on: https://gerrit.mot.com/2018802
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
(cherry picked from commit a72a6829f68d57cf7a15ac5f86b8945b399863d7)
kernel/futex.c