Re: [PATCH v6 1/4] uacce: fix cdev handling in the cleanup path
From: Zhangfei Gao
Date: Tue Dec 02 2025 - 02:49:36 EST
On Tue, 2 Dec 2025 at 14:13, Chenghai Huang <huangchenghai2@xxxxxxxxxx> wrote:
>
> From: Wenkai Lin <linwenkai6@xxxxxxxxxxxxx>
>
> When cdev_device_add fails, it internally releases the cdev memory,
> and if cdev_device_del is then executed, it will cause a hang error.
> To fix it, we check the return value of cdev_device_add() and clear
> uacce->cdev to avoid calling cdev_device_del in the uacce_remove.
>
> Fixes: 015d239ac014 ("uacce: add uacce driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Wenkai Lin <linwenkai6@xxxxxxxxxxxxx>
> Signed-off-by: Chenghai Huang <huangchenghai2@xxxxxxxxxx>
Acked-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
Thanks