WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]Fix memory leak for copy-receiver of netfront

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]Fix memory leak for copy-receiver of netfront
From: Kasai Takanori <kasai.takanori@xxxxxxxxxxxxxx>
Date: Thu, 12 Jun 2008 10:39:19 +0900
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 11 Jun 2008 18:39:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4850448E.1020603@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <37C8CB88D5C4E2kasai.takanori@xxxxxxxxxxxxxx> <4850448E.1020603@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Jeremy,

I reviewed the 2.6.25 versions of netfront.

First of all, the xennet_release_rx_bufs() function is freeing 
processing of flipping mode. 
Therefore, more memory leaks are generated. 

It is necessary to change to the freeing processing of the copy-receiver 
mode referring to the following patch. 
http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/41918416db51

And, if this patch that we made is applied, the memory leak will not be 
generated. 

Best Regards,

---
Takanori Kasai

---------- Original Message ----------
>Date:     2008/06/12
>From:     Jeremy Fitzhardinge <jeremy@xxxxxxxx>
>To:       Kasai Takanori <kasai.takanori@xxxxxxxxxxxxxx>
>Cc:       xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
>Subject:  Re: [Xen-devel] [PATCH]Fix memory leak for copy-receiver of 
>          netfront
>
>Kasai Takanori wrote:
>> Hi all,
>>
>> We found the problem of the memory leak when working with copy-
>> receiver of netfront.
>>
>> The source of a problem is that the fragment page is not released with 
>> dev_kfree_skb() because the nr_frags variable of skb is set to 0. 
>>
>> This is the patch to fix memory leak in netfront.
>>   
>
>This code doesn't apply to the current 2.6.25 version of netfront.  The 
>only similar code I could see is:
>
>                skb = np->rx_skbs[id];
>                mfn = gnttab_end_foreign_transfer_ref(ref);
>                gnttab_release_grant_reference(&np->gref_rx_head, ref);
>                np->grant_rx_ref[id] = GRANT_INVALID_REF;
>
>                if (0 == mfn) {
>                        skb_shinfo(skb)->nr_frags = 0;
>                        dev_kfree_skb(skb);
>                        noxfer++;
>                        continue;
>                }
>
>
>Would you mind reviewing the 2.6.25 version of netfront to see if it 
>needs a patch?
>
>Thanks,
>    J
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@xxxxxxxxxxxxxxxxxxx
>http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>