Changeset 94840 in vbox
- Timestamp:
- May 5, 2022 10:35:12 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151239
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/VirtualBoxImpl.cpp
r94737 r94840 455 455 /** Pointer to the cryptographic support interface. */ 456 456 PCVBOXCRYPTOIF pCryptoIf; 457 /** Critical section protecting the module handle. */ 458 RTCRITSECT CritSectModCrypto; 457 459 /** @} */ 458 460 }; … … 570 572 571 573 i_reportDriverVersions(); 574 575 /* Create the critical section protecting the cryptographic module handle. */ 576 { 577 int vrc = RTCritSectInit(&m->CritSectModCrypto); 578 if (RT_FAILURE(vrc)) 579 throw setErrorBoth(E_FAIL, vrc, 580 tr("Could not create the cryptographic module critical section (%Rrc)"), 581 vrc); 582 583 } 572 584 573 585 /* compose the VirtualBox.xml file name */ … … 1096 1108 } 1097 1109 1110 RTCritSectDelete(&m->CritSectModCrypto); 1111 1098 1112 #ifdef VBOX_WITH_EXTPACK 1099 1113 if (m->ptrExtPackManager) … … 6130 6144 AssertComRCReturnRC(autoCaller.rc()); 6131 6145 6132 AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS); 6146 /* 6147 * No object lock due to some lock order fun with Machine objects. 6148 * There is a dedicated critical section to protect against concurrency 6149 * issues when loading the module. 6150 */ 6151 RTCritSectEnter(&m->CritSectModCrypto); 6133 6152 6134 6153 /* Try to load the extension pack module if it isn't currently. */ … … 6194 6213 } 6195 6214 6215 RTCritSectLeave(&m->CritSectModCrypto); 6216 6196 6217 return hrc; 6197 6218 } … … 6210 6231 AutoCaller autoCaller(this); 6211 6232 AssertComRCReturnRC(autoCaller.rc()); 6212 6213 AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);6214 6233 6215 6234 AssertReturn(pCryptoIf == m->pCryptoIf, E_INVALIDARG); … … 6238 6257 tr("The cryptographic support module is in use and can't be unloaded")); 6239 6258 6259 RTCritSectEnter(&m->CritSectModCrypto); 6240 6260 if (m->hLdrModCrypto != NIL_RTLDRMOD) 6241 6261 { … … 6244 6264 m->hLdrModCrypto = NIL_RTLDRMOD; 6245 6265 } 6266 RTCritSectLeave(&m->CritSectModCrypto); 6246 6267 6247 6268 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.