Re: [PATCH v4 2/4] uacce: fix isolate sysfs check condition

From: Zhangfei Gao
Date: Mon Nov 10 2025 - 02:27:56 EST


On Wed, 22 Oct 2025 at 10:11, Chenghai Huang <huangchenghai2@xxxxxxxxxx> wrote:
>
> uacce supports the device isolation feature. If the driver
> implements the isolate_err_threshold_read and
> isolate_err_threshold_write callback functions, uacce will create
> sysfs files now. Users can read and configure the isolation policy
> through sysfs. Currently, sysfs files are created as long as either
> isolate_err_threshold_read or isolate_err_threshold_write callback
> functions are present.
>
> However, accessing a non-existent callback function may cause the
> system to crash. Therefore, add checks before calling the
> corresponding ops.
>
> Fixes: e3e289fbc0b5 ("uacce: supports device isolation feature")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Chenghai Huang <huangchenghai2@xxxxxxxxxx>

Acked-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>

Thanks