Commit cd9eae5
committed
ASoC: SOF: ipc3-dtrace: Add helper function to update the sdev->host_offset
We are using the READ_ONCE() on the debugfs read path for accessing
sdev->host_offset, but the set is not atomic or protected in any way.
Add a small helper to do the host_offset update and be really paranoid
about the a possible race in update
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>1 parent 32531ea commit cd9eae5
1 file changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
254 | 269 | | |
255 | 270 | | |
256 | 271 | | |
| |||
367 | 382 | | |
368 | 383 | | |
369 | 384 | | |
370 | | - | |
| 385 | + | |
371 | 386 | | |
372 | 387 | | |
373 | 388 | | |
| |||
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
446 | | - | |
| 461 | + | |
447 | 462 | | |
448 | 463 | | |
449 | 464 | | |
| |||
558 | 573 | | |
559 | 574 | | |
560 | 575 | | |
561 | | - | |
562 | | - | |
| 576 | + | |
563 | 577 | | |
564 | | - | |
565 | 578 | | |
566 | 579 | | |
567 | 580 | | |
| |||
0 commit comments