[libcamera-devel] [PATCH 5/7] ipa: raspberrypi: Contrast: Protect status_ access in Initialise()
Hirokazu Honda
hiroh at chromium.org
Fri Dec 3 20:55:37 CET 2021
This fixes the bug that status_ is accessed without acquiring
mutex_ in Contrast::Initialise().
Signed-off-by: Hirokazu Honda <hiroh at chromium.org>
---
src/ipa/raspberrypi/controller/rpi/contrast.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/ipa/raspberrypi/controller/rpi/contrast.cpp b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
index 6726b4e3..be61353a 100644
--- a/src/ipa/raspberrypi/controller/rpi/contrast.cpp
+++ b/src/ipa/raspberrypi/controller/rpi/contrast.cpp
@@ -83,6 +83,7 @@ void Contrast::Initialise()
{
// Fill in some default values as Prepare will run before Process gets
// called.
+ MutexLocker locker(mutex_);
fill_in_status(status_, brightness_, contrast_, config_.gamma_curve);
}
--
2.34.1.400.ga245620fadb-goog
More information about the libcamera-devel
mailing list