lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks
On Mon, Dec 11, 2017 at 02:11:55PM -0800, David Rientjes wrote:
> --- a/drivers/misc/sgi-gru/grutlbpurge.c
> +++ b/drivers/misc/sgi-gru/grutlbpurge.c
> @@ -298,6 +298,7 @@ struct gru_mm_struct *gru_register_mmu_notifier(void)
> return ERR_PTR(-ENOMEM);
> STAT(gms_alloc);
> spin_lock_init(&gms->ms_asid_lock);
> + gms->ms_notifier.flags = 0;
> gms->ms_notifier.ops = &gru_mmuops;
> atomic_set(&gms->ms_refcnt, 1);
> init_waitqueue_head(&gms->ms_wait_queue);
> diff --git a/drivers/xen/gntdev.c b/drivers/xen/gntdev.c

There is a kzalloc() just above this:
gms = kzalloc(sizeof(*gms), GFP_KERNEL);

Is that not sufficient to clear the 'flags' field?

\
 
 \ /
  Last update: 2017-12-12 21:07    [W:0.297 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site