From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f199.google.com (mail-pf0-f199.google.com [209.85.192.199]) by kanga.kvack.org (Postfix) with ESMTP id AD6AE6B0038 for ; Tue, 12 Dec 2017 15:06:07 -0500 (EST) Received: by mail-pf0-f199.google.com with SMTP id y62so70476pfd.3 for ; Tue, 12 Dec 2017 12:06:07 -0800 (PST) Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com. [15.241.48.73]) by mx.google.com with ESMTPS id x4si11858600pgv.629.2017.12.12.12.06.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 12:06:04 -0800 (PST) Date: Tue, 12 Dec 2017 14:05:42 -0600 From: Dimitri Sivanich Subject: Re: [patch 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks Message-ID: <20171212200542.GJ5848@hpe.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: David Rientjes Cc: Andrew Morton , Michal Hocko , Andrea Arcangeli , Benjamin Herrenschmidt , Paul Mackerras , Oded Gabbay , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , David Airlie , Joerg Roedel , Doug Ledford , Jani Nikula , Mike Marciniszyn , Sean Hefty , Dimitri Sivanich , Boris Ostrovsky , =?iso-8859-1?B?Suly9G1l?= Glisse , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org 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? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org