From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/3] virtio_net: Fix leaked netdev->refcnt Date: Sun, 26 Oct 2008 16:17:10 +0200 Message-ID: <49047BE6.9070706@redhat.com> References: <> <1224688830-26216-1-git-send-email-markmc@redhat.com> <1224688830-26216-2-git-send-email-markmc@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm@vger.kernel.org To: Mark McLoughlin Return-path: Received: from mx2.redhat.com ([66.187.237.31]:59298 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbYJZORR (ORCPT ); Sun, 26 Oct 2008 10:17:17 -0400 In-Reply-To: <1224688830-26216-2-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Mark McLoughlin wrote: > If after receiving some packets and refilling the queue with buffers, > we detect that more packets are available then we re-schedule the > queue and process them. > > This re-scheduling - i.e. calling __netif_rx_schedule() - causes a > netdev reference to be taken. > > Once we've finally run out of buffers to process, we return zero and > net_rx_action() drops the reference taken by the original call to > _netif_rx_schedule() in e.g. skb_recv_done(). > > The reference taken by re-scheduling is always leaked, leading to: > > waiting for eth0 to become free. Usage count = 132568 > > Fix by immediately dropping the extra reference taken. > Applied all three, thanks. -- error compiling committee.c: too many arguments to function