Commit 5bce200
committed
ASoC: SOF: trace: 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 4394639 commit 5bce200
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
236 | 251 | | |
237 | 252 | | |
238 | 253 | | |
| |||
345 | 360 | | |
346 | 361 | | |
347 | 362 | | |
348 | | - | |
| 363 | + | |
349 | 364 | | |
350 | 365 | | |
351 | 366 | | |
| |||
417 | 432 | | |
418 | 433 | | |
419 | 434 | | |
420 | | - | |
| 435 | + | |
421 | 436 | | |
422 | 437 | | |
423 | 438 | | |
| |||
524 | 539 | | |
525 | 540 | | |
526 | 541 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
531 | 545 | | |
532 | 546 | | |
533 | 547 | | |
| |||
0 commit comments