open-gpu-kernel-modules
open-gpu-kernel-modules copied to clipboard
Fix potential race condition in _rmapiRmControl
` diff --git a/src/nvidia/src/kernel/rmapi/control.c b/src/nvidia/src/kernel/rmapi/control.c index 0ed2e1e7..140386ba 100644 --- a/src/nvidia/src/kernel/rmapi/control.c +++ b/src/nvidia/src/kernel/rmapi/control.c @@ -427,13 +427,6 @@ _rmapiRmControl(NvHandle hClient, NvHandle hObject, NvU32 cmd, NvP64 pUserParams } }
- // Potential race condition if run lockless?
- if (serverutilGetClientUnderLock(hClient) == NULL)
- {
-
rmStatus = NV_ERR_INVALID_CLIENT;
-
goto done;
- }
- // only kernel clients can issue raised IRQL or lock bypass cmds // bypass client priv check for internal calls done on behalf of lower priv // clients `
serverutilGetClientUnderLock() in _rmapiRmControl() is useless, and may cause race condition if someone else is creating/destroying RmClient simultaneously.