mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 14:04:16 +01:00
Fix slight locking bug with nvmap handle duplication
This commit is contained in:
parent
57378457dc
commit
97e740c986
@ -40,12 +40,12 @@ namespace skyline::service::nvdrv::core {
|
||||
}
|
||||
|
||||
PosixResult NvMap::Handle::Duplicate(bool internalSession) {
|
||||
std::scoped_lock lock(mutex);
|
||||
|
||||
// Unallocated handles cannot be duplicated as duplication requires memory accounting (in HOS)
|
||||
if (!allocated) [[unlikely]]
|
||||
return PosixResult::InvalidArgument;
|
||||
|
||||
std::scoped_lock lock(mutex);
|
||||
|
||||
// If we internally use FromId the duplication tracking of handles won't work accurately due to us not implementing
|
||||
// per-process handle refs.
|
||||
if (internalSession)
|
||||
|
Loading…
Reference in New Issue
Block a user