Commit ca4fba8
committed
hw-mgmt: scripts: Fix race condition in fan direction initialization
Fan direction setup in chassis-events depends on fanX_status symlinks
created by thermal-events. Since these handlers run asynchronously,
chassis-events may read fan status before symlinks exist.
Fix: Add fan_status_ready flag synchronization between handlers.
If flag not set, defer fan direction init via 5s background task.
Bug: 4859849
Signed-off-by: Oleksandr Shamray <oleksandrs@nvidia.com>1 parent b981634 commit ca4fba8
File tree
2 files changed
+29
-11
lines changed- usr/usr/bin
2 files changed
+29
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
512 | 527 | | |
513 | 528 | | |
514 | 529 | | |
| |||
1159 | 1174 | | |
1160 | 1175 | | |
1161 | 1176 | | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
1167 | | - | |
1168 | | - | |
1169 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1170 | 1187 | | |
1171 | 1188 | | |
1172 | 1189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
616 | 615 | | |
617 | 616 | | |
618 | 617 | | |
| |||
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| 627 | + | |
| 628 | + | |
628 | 629 | | |
629 | 630 | | |
630 | 631 | | |
| |||
0 commit comments