Commit 06b2ad1e authored by Weili Qian's avatar Weili Qian Committed by JiangShui
Browse files

uacce: fix NULL pointer when unbind device

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I867RA


CVE: NA

----------------------------------------------------------------------

When the user space process and 'unbind' device operations are
performed at the same time, the 'unbind' operation may be completed
before the memory is unmap(uacce_vma_close()). Since 'uacce->parent'
is set to NULL in uacce_remove(), 'pdev->driver' will trigger panic
in uacce_free_dma_buffers(). Therefore, the memory release process
is added to uacce_remove(), and uacce->mutex ensures that the memory
is released only once.

Signed-off-by: default avatarWeili Qian <qianweili@huawei.com>
Signed-off-by: default avatarJiangShui Yang <yangjiangshui@h-partners.com>
parent aa609da5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment