lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] vfio: type1: fix kthread use case
From
Date

> +++ 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

\
 
 \ /
  Last update: 2020-07-06 13:40    [W:0.040 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site