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