Commit ed56f3e
committed
fix(safety): resolve potential mutex deadlock in get_e_core_l2_cache_size
The original code acquired cached_s_core_count mutex twice in the same
if-expression. Rust drops temporaries at statement end, not at &&, so
when the first condition evaluated to true the second .lock() would
deadlock. Consolidate into a single lock acquisition with matches!.1 parent e7ba644 commit ed56f3e
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
714 | | - | |
715 | | - | |
| 713 | + | |
716 | 714 | | |
717 | | - | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
718 | 719 | | |
719 | 720 | | |
720 | 721 | | |
| |||
0 commit comments