Commit d7081cb
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 e890361 commit d7081cb
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
244 | 259 | | |
245 | 260 | | |
246 | 261 | | |
| |||
357 | 372 | | |
358 | 373 | | |
359 | 374 | | |
360 | | - | |
| 375 | + | |
361 | 376 | | |
362 | 377 | | |
363 | 378 | | |
| |||
433 | 448 | | |
434 | 449 | | |
435 | 450 | | |
436 | | - | |
| 451 | + | |
437 | 452 | | |
438 | 453 | | |
439 | 454 | | |
| |||
545 | 560 | | |
546 | 561 | | |
547 | 562 | | |
548 | | - | |
549 | | - | |
550 | | - | |
551 | | - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
552 | 566 | | |
553 | 567 | | |
554 | 568 | | |
| |||
0 commit comments