Commit f1feb43
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 a80343f commit f1feb43
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
227 | 242 | | |
228 | 243 | | |
229 | 244 | | |
| |||
336 | 351 | | |
337 | 352 | | |
338 | 353 | | |
339 | | - | |
| 354 | + | |
340 | 355 | | |
341 | 356 | | |
342 | 357 | | |
| |||
408 | 423 | | |
409 | 424 | | |
410 | 425 | | |
411 | | - | |
| 426 | + | |
412 | 427 | | |
413 | 428 | | |
414 | 429 | | |
| |||
506 | 521 | | |
507 | 522 | | |
508 | 523 | | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
513 | 527 | | |
514 | 528 | | |
515 | 529 | | |
| |||
0 commit comments