Commit 145cd82
committed
pkg/cdi: do GetSpecErrors() with locked cache.
Avoid a read/write data race between refresh() and GetSpecErrors()
by taking the cache lock during GetSpecErrors(). While at it, also
make a copy and return that instead of the original error slice in
the Spec.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>1 parent d4004b3 commit 145cd82
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
413 | 423 | | |
414 | 424 | | |
415 | 425 | | |
| |||
0 commit comments