Repository navigation
Commit da2b540
audio: pipeline: guard against NULL source or sink in pipeline_copy()
Freeing the endpoint component of a pipeline clears
pipeline->source_comp or pipeline->sink_comp. If the pipeline is still
scheduled after that, pipeline_copy() dereferences
p->source_comp->direction or starts the copy walk from a NULL
component, and the DSP panics.
The SOF driver does not free the components of a running pipeline, but
the firmware should not crash on out of order IPCs either. The crash
was seen in about 10% of runs when capturing from the KPB and MWW PCMs
of a KPB + MFCC + MWW topology.
Add NULL checks for p->source_comp and the start component of the
copy walk, and return 0 without copying if an endpoint is gone.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 8668c10 commit da2b540
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
182 | 193 | | |
183 | 194 | | |
184 | 195 | | |
| |||
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
190 | 207 | | |
191 | 208 | | |
192 | 209 | | |
| |||
0 commit comments