diff options
author | Sharvil Nanavati <sharvil@google.com> | 2016-06-20 19:16:12 -0700 |
---|---|---|
committer | Jessica Wagantall <jwagantall@cyngn.com> | 2016-08-02 01:12:33 -0700 |
commit | 791c2192a9a19e42d8a396b0e46e1b15feb542cb (patch) | |
tree | 32c97666df9efaadc8206ea0499cf2480d2b8829 /osi/test/atomic_test.cpp | |
parent | 0e94bd5ac42a4621c873c8c2af4aa2aced3c6442 (diff) | |
download | android_system_bt-stable/cm-13.0-ZNH2K.tar.gz android_system_bt-stable/cm-13.0-ZNH2K.tar.bz2 android_system_bt-stable/cm-13.0-ZNH2K.zip |
Fix potential DoS caused by delivering signal to BT processstable/cm-13.0-ZNH2K
Ticket: CYNGNOS-3177
Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360
Diffstat (limited to 'osi/test/atomic_test.cpp')
-rw-r--r-- | osi/test/atomic_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/osi/test/atomic_test.cpp b/osi/test/atomic_test.cpp index b0039ab3f..6cde546e5 100644 --- a/osi/test/atomic_test.cpp +++ b/osi/test/atomic_test.cpp @@ -17,7 +17,7 @@ struct atomic_test_s32_s { void *atomic_thread(void *context) { struct atomic_test_s32_s *at = (struct atomic_test_s32_s *)context; for (int i = 0; i < at->max_val; i++) { - usleep(1); + TEMP_FAILURE_RETRY(usleep(1)); atomic_inc_prefix_s32(&at->data[i]); } return NULL; @@ -26,9 +26,9 @@ void *atomic_thread(void *context) { void *atomic_thread_inc_dec(void *context) { struct atomic_test_s32_s *at = (struct atomic_test_s32_s *)context; for (int i = 0; i < at->max_val; i++) { - usleep(1); + TEMP_FAILURE_RETRY(usleep(1)); atomic_inc_prefix_s32(&at->data[i]); - usleep(1); + TEMP_FAILURE_RETRY(usleep(1)); atomic_dec_prefix_s32(&at->data[i]); } return NULL; |