mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-30 03:24:13 +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) {
|
PosixResult NvMap::Handle::Duplicate(bool internalSession) {
|
||||||
|
std::scoped_lock lock(mutex);
|
||||||
|
|
||||||
// Unallocated handles cannot be duplicated as duplication requires memory accounting (in HOS)
|
// Unallocated handles cannot be duplicated as duplication requires memory accounting (in HOS)
|
||||||
if (!allocated) [[unlikely]]
|
if (!allocated) [[unlikely]]
|
||||||
return PosixResult::InvalidArgument;
|
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
|
// If we internally use FromId the duplication tracking of handles won't work accurately due to us not implementing
|
||||||
// per-process handle refs.
|
// per-process handle refs.
|
||||||
if (internalSession)
|
if (internalSession)
|
||||||
|
Loading…
Reference in New Issue
Block a user