Re: [patch 1/2] mm, mmu_notifier: annotate mmu notifiers with blockable invalidate callbacks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 12 Dec 2017, Dimitri Sivanich 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?
> 

Absolutely, but whether it is better to explicitly document that the mmu 
notifier has cleared flags, i.e. there are no blockable callbacks, is 
another story.  I can change it if preferred.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux