From: Ian Campbell Subject: Re: [PATCH v2 2/2] libvchan: replace munmap with correct xc_gntshr_munmap Date: Wed, 8 May 2013 11:55:07 +0100 Message-ID: <1368010507.26321.225.camel@zakaz.uk.xensource.com> References: <20130508040327.951AD329@duch.mimuw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: Daniel De Graaf , Marek Marczykowski , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2013-05-08 at 11:48 +0100, George Dunlap wrote: > On Sat, May 4, 2013 at 11:10 PM, Marek Marczykowski > wrote: > > On linux it will end up in munmap anyway, but do not assume any > > particular xc_gntshr_munmap implementation details. > > > > Signed-off-by: Marek Marczykowski > > Hmm, we don't seem to have a maintainer specifically for this code. Daniel (already CCd) is the de-facto maintainer. I'd be happy for him to propose himself as a maintainer. > > Is this fixing an actual bug for you? The commit message doesn't > mention anything. If it's just code clean-up, it should probably wait > until the 4.4 development window opens. > > -George > > > --- > > tools/libvchan/io.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/tools/libvchan/io.c b/tools/libvchan/io.c > > index 5ec5fb9..3040099 100644 > > --- a/tools/libvchan/io.c > > +++ b/tools/libvchan/io.c > > @@ -324,9 +324,11 @@ void libxenvchan_close(struct libxenvchan *ctrl) > > if (!ctrl) > > return; > > if (ctrl->read.order >= PAGE_SHIFT) > > - munmap(ctrl->read.buffer, 1 << ctrl->read.order); > > + xc_gntshr_munmap(ctrl->gntshr, ctrl->read.buffer, > > + 1 << (ctrl->read.order - PAGE_SHIFT)); > > if (ctrl->write.order >= PAGE_SHIFT) > > - munmap(ctrl->write.buffer, 1 << ctrl->write.order); > > + xc_gntshr_munmap(ctrl->gntshr, ctrl->write.buffer, > > + 1 << (ctrl->write.order - PAGE_SHIFT)); > > if (ctrl->ring) { > > if (ctrl->is_server) { > > ctrl->ring->srv_live = 0; > > -- > > 1.8.1.4 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel