Skip to content

Commit 56046d6

Browse files
happyCoder92copybara-github
authored andcommitted
Automated rollback of commit fa30cb7.
PiperOrigin-RevId: 794614830 Change-Id: Ie62133ce8b3a3b0a3dcca4005f2b4ecfa25bca14
1 parent c53536d commit 56046d6

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

sandboxed_api/sandbox2/fork_client.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SandboxeeProcess ForkClient::SendRequest(const ForkRequest& request,
4040
int exec_fd, int comms_fd) {
4141
SandboxeeProcess process;
4242
// Acquire the channel ownership for this request (transaction).
43-
absl::MutexLock l(comms_mutex_);
43+
absl::MutexLock l(&comms_mutex_);
4444

4545
if (!comms_->SendProtoBuf(request)) {
4646
LOG(ERROR) << "Sending PB to the ForkServer failed";

sandboxed_api/sandbox2/global_forkclient.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ absl::Mutex GlobalForkClient::instance_mutex_(absl::kConstInit);
168168
GlobalForkClient* GlobalForkClient::instance_ = nullptr;
169169

170170
void GlobalForkClient::EnsureStarted(GlobalForkserverStartMode mode) {
171-
absl::MutexLock lock(instance_mutex_);
171+
absl::MutexLock lock(&instance_mutex_);
172172
EnsureStartedLocked(mode);
173173
}
174174

@@ -199,7 +199,7 @@ void GlobalForkClient::EnsureStartedLocked(GlobalForkserverStartMode mode) {
199199
}
200200

201201
void GlobalForkClient::ForceStart() {
202-
absl::MutexLock lock(GlobalForkClient::instance_mutex_);
202+
absl::MutexLock lock(&GlobalForkClient::instance_mutex_);
203203
SAPI_RAW_CHECK(instance_ == nullptr,
204204
"A force start requested when the Global Fork-Server was "
205205
"already running");
@@ -212,7 +212,7 @@ void GlobalForkClient::ForceStart() {
212212
void GlobalForkClient::Shutdown() {
213213
pid_t pid = -1;
214214
{
215-
absl::MutexLock lock(GlobalForkClient::instance_mutex_);
215+
absl::MutexLock lock(&GlobalForkClient::instance_mutex_);
216216
if (instance_) {
217217
pid = instance_->fork_client_.pid();
218218
}
@@ -226,7 +226,7 @@ void GlobalForkClient::Shutdown() {
226226

227227
SandboxeeProcess GlobalForkClient::SendRequest(const ForkRequest& request,
228228
int exec_fd, int comms_fd) {
229-
absl::ReleasableMutexLock lock(GlobalForkClient::instance_mutex_);
229+
absl::ReleasableMutexLock lock(&GlobalForkClient::instance_mutex_);
230230
EnsureStartedLocked(GlobalForkserverStartMode::kOnDemand);
231231
if (!instance_) {
232232
return SandboxeeProcess();
@@ -247,7 +247,7 @@ SandboxeeProcess GlobalForkClient::SendRequest(const ForkRequest& request,
247247
}
248248

249249
pid_t GlobalForkClient::GetPid() {
250-
absl::MutexLock lock(instance_mutex_);
250+
absl::MutexLock lock(&instance_mutex_);
251251
EnsureStartedLocked(GlobalForkserverStartMode::kOnDemand);
252252
if (!instance_) {
253253
return -1;
@@ -256,7 +256,7 @@ pid_t GlobalForkClient::GetPid() {
256256
}
257257

258258
bool GlobalForkClient::IsStarted() {
259-
absl::ReaderMutexLock lock(instance_mutex_);
259+
absl::ReaderMutexLock lock(&instance_mutex_);
260260
return instance_ != nullptr;
261261
}
262262
} // namespace sandbox2

sandboxed_api/sandbox2/logsink.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ LogSink::LogSink(int fd) : comms_(fd) { absl::AddLogSink(this); }
3636
LogSink::~LogSink() { absl::RemoveLogSink(this); }
3737

3838
void LogSink::Send(const absl::LogEntry& e) {
39-
absl::MutexLock l(lock_);
39+
absl::MutexLock l(&lock_);
4040

4141
LogMessage msg;
4242
msg.set_severity(static_cast<int>(e.log_severity()));

sandboxed_api/sandbox2/monitor_ptrace.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,15 @@ void PtraceMonitor::NotifyMonitor() {
182182
if (use_deadline_manager_) {
183183
pid_waiter_.Notify();
184184
} else {
185-
absl::MutexLock lock(thread_mutex_);
185+
absl::MutexLock lock(&thread_mutex_);
186186
if (thread_.IsJoinable()) {
187187
pthread_kill(thread_.handle(), SIGCHLD);
188188
}
189189
}
190190
}
191191

192192
void PtraceMonitor::Join() {
193-
absl::MutexLock lock(thread_mutex_);
193+
absl::MutexLock lock(&thread_mutex_);
194194
if (thread_.IsJoinable()) {
195195
thread_.Join();
196196
CHECK(IsDone()) << "Monitor did not terminate";
@@ -201,7 +201,7 @@ void PtraceMonitor::Join() {
201201

202202
void PtraceMonitor::RunInternal() {
203203
{
204-
absl::MutexLock lock(thread_mutex_);
204+
absl::MutexLock lock(&thread_mutex_);
205205
thread_ = sapi::Thread(this, &PtraceMonitor::Run, "sandbox2-Monitor");
206206
}
207207

sandboxed_api/sandbox2/monitor_unotify.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ bool UnotifyMonitor::InitSetupNotifyEventFd() {
388388
}
389389

390390
void UnotifyMonitor::NotifyMonitor() {
391-
absl::ReaderMutexLock lock(notify_mutex_);
391+
absl::ReaderMutexLock lock(&notify_mutex_);
392392
if (monitor_notify_fd_.get() < 0) {
393393
return;
394394
}
@@ -414,7 +414,7 @@ void UnotifyMonitor::KillInit() {
414414
}
415415

416416
void UnotifyMonitor::Join() {
417-
absl::MutexLock lock(notify_mutex_);
417+
absl::MutexLock lock(&notify_mutex_);
418418
if (thread_.IsJoinable()) {
419419
thread_.Join();
420420
CHECK(IsDone()) << "Monitor did not terminate";

0 commit comments

Comments
 (0)