[dpdk-dev] [PATCH 1/2] vfio: fix check for vfio_group_fd
Burakov, Anatoly
anatoly.burakov at intel.com
Thu Sep 17 13:44:26 CEST 2020
On 19-May-20 4:42 AM, wangyunjian wrote:
> From: Yunjian Wang <wangyunjian at huawei.com>
>
> The issue is that a file descriptor at 0 is a valid one. Currently
> the file not found, the return value will be set to 0. As a result,
> it is impossible to distinguish between a correct descriptor and a
> failed return value. Fix it to return -ENOENT instead of 0.
>
> Fixes: b758423bc4fe ("vfio: fix race condition with sysfs")
> Fixes: ff0b67d1c868 ("vfio: DMA mappinge")
> Cc: stable at dpdk.org
>
> Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
> ---
Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>
--
Thanks,
Anatoly
More information about the dev
mailing list