From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 10/13] xen: introduce xen_event_channel_register_3level Date: Tue, 5 Feb 2013 12:14:27 -0500 Message-ID: <20130205171422.GH2187@konrad-lan.dumpdata.com> References: <1359643627-29486-1-git-send-email-wei.liu2@citrix.com> <1359643627-29486-11-git-send-email-wei.liu2@citrix.com> <20130205165550.GC2187@konrad-lan.dumpdata.com> <1360083900.7477.154.camel@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1360083900.7477.154.camel@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: David Vrabel , Ian Campbell , "jbeulich@suse.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Feb 05, 2013 at 05:05:00PM +0000, Wei Liu wrote: > On Tue, 2013-02-05 at 16:55 +0000, Konrad Rzeszutek Wilk wrote: > > > + > > > + rc = HYPERVISOR_event_channel_op(EVTCHNOP_register_nlevel, ®); > > > + if (rc) { > > > + free_pages((unsigned long)evtchn_pending, BITMAP_NR_PAGES); > > > + free_pages((unsigned long)evtchn_mask, BITMAP_NR_PAGES); > > > + evtchn_pending = NULL; > > > + evtchn_mask = NULL; > > > + } > > > + > > > +out: > > > + kfree(_evtchn_pending); > > > + kfree(_evtchn_mask); > > > + kfree(l2sel_mfns); > > > + kfree(l2sel_offsets); > > > > So it is OK to just free it even on success?? > > Yes. They are only used for registration. OK. Might want to provide a comment saying that right above the __ALLOC_PAGES. Hm, might even call the macro 'ALLOC_TMP_PAGES' > > And for all the above stuffs regarding comments, I will fix them in > later post. > > > Wei. > >