Commit e02ab4d
committed
fast-get: fix crash by freeing buffer before removing partition
Fix crash in fast_put() when freeing large buffers (>2048 bytes) by
freeing the heap memory BEFORE removing the memory domain partition.
The previous code removed the partition first, making the memory
inaccessible to the current thread. When sof_heap_free() then tried to
access the heap metadata, it caused a load prohibited exception.
The fix reorders operations:
1. Free the buffer while partition still grants access
2. Remove the partition to prevent partition table leaks
This crash manifested during pipeline deletion with 44.1kHz family
sample rates (88200, 44100, etc.) which use large SRC coefficient
buffers requiring userspace partition management.
Fixes: b927092 ("fast-get: enable sharing between userspace
threads")
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 359584a commit e02ab4d
1 file changed
+28
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
282 | 283 | | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
294 | 311 | | |
295 | | - | |
296 | | - | |
297 | 312 | | |
298 | 313 | | |
299 | 314 | | |
| |||
0 commit comments