Re: [RFC PATCH] vfio: type1: fix kthread use case
From: Markus Elfring
Date: Mon Jul 06 2020 - 07:32:49 EST
â
> +++ b/drivers/vfio/vfio_iommu_type1.c
> @@ -2798,7 +2798,8 @@ static int vfio_iommu_type1_dma_rw_chunk
â
> - bool kthread = current->mm == NULL;
> + bool kthread = current->flags & PF_KTHREAD;
> + bool use_mm = current->mm == NULL;
â
Can it be helpful to convert initialisations for these variables
into later assignments?
Regards,
Markus