ANDROID: KVM: arm64: Fix pKVM module handler registration
A typo in cmpxchg inverted the old and new value. The registration is
silently failing. Fix this.
Bug: 357781595
Bug: 382397533
Bug: 397325645
Fixes: 0a901ecd7f ("ANDROID: KVM: arm64: Rework pKVM module fault handler")
Change-Id: I442aebe4ec24a8dda09b64f3de1110511c4d5d84
Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
This commit is contained in:
@@ -144,7 +144,7 @@ static int mod_handler_register(enum mod_handler_type type, void *handler)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_MOD_HANDLERS; i++) {
|
||||
if (!cmpxchg64_release(&mod_handlers[type][i], handler, NULL))
|
||||
if (!cmpxchg64_release(&mod_handlers[type][i], NULL, handler))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user