forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
commit fe7ab805d63644e0374b04cc415d79e58bd9f9e6
Author: xinyu.dai <[email protected]>
Date: Fri Oct 17 10:22:31 2025 +0800
dsp: correct dma_buf_put argument
[Issue]
Invalid pointer would cause rt-kernel crash in stress test.
[Solution]
Changes the argument passed to dma_buf_put to use mbuf->dmabuf instead of mbuf->import_attach->dmabuf, preventing potential kernel crashes due to invalid pointer access during stress testing.
Signed-off-by: xinyu.dai <[email protected]>
diff --git a/drivers/misc/snps_accel/snps_accel_mem.c b/drivers/misc/snps_accel/snps_accel_mem.c
index 3342c7fc7b9e..e3f0251bdd3c 100644
--- a/drivers/misc/snps_accel/snps_accel_mem.c
+++ b/drivers/misc/snps_accel/snps_accel_mem.c
@@ -131,7 +131,7 @@ snps_accel_dmabuf_detach_device(struct snps_accel_mem_buffer *mbuf)
dma_buf_unmap_attachment(mbuf->import_attach, mbuf->dmasgt,
mbuf->dma_dir);
dma_buf_detach(mbuf->dmabuf, mbuf->import_attach);
- dma_buf_put(mbuf->import_attach->dmabuf);
+ dma_buf_put(mbuf->dmabuf);
}
static void snps_accel_dmabuf_op_release(struct dma_buf *dmabuf)
Metadata
Metadata
Assignees
Labels
No labels