From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Fastabend Subject: Re: [net-2.6 PATCH] nete zero kobject in rx_queue_release Date: Mon, 15 Nov 2010 23:13:38 -0800 Message-ID: <4CE22F22.4000706@intel.com> References: <20101111201341.4418.16400.stgit@jf-dev1-dcblab> <20101112.130824.68146775.davem@davemloft.net> <20101114.151529.183053743.davem@davemloft.net> <4CE1E73C.1000105@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "therbert@google.com" , "netdev@vger.kernel.org" , "eric.dumazet@gmail.com" To: David Miller Return-path: Received: from mga01.intel.com ([192.55.52.88]:56204 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759386Ab0KPHNj (ORCPT ); Tue, 16 Nov 2010 02:13:39 -0500 In-Reply-To: <4CE1E73C.1000105@intel.com> Sender: netdev-owner@vger.kernel.org List-ID: On 11/15/2010 6:06 PM, John Fastabend wrote: > On 11/14/2010 3:15 PM, David Miller wrote: >> From: Tom Herbert >> Date: Sun, 14 Nov 2010 14:40:00 -0800 >> >>>> So we'll need something like: >>>> >>>> if (atomic_dec_and_test(&first->count)) >>>> kfree(first); >>>> else >>>> /* clear everything except queue->first */ >>>> >>> >>> The patches to get rid of the separate refcnt should obviate this >>> complexity. Could just clear the queue in kobject release. >> >> True but we'll still need a patch for older kernels. > > OK Thanks. I'll have a stable patch and a net-2.6 patch soon. > > -- John To address Tom's comment, queue->dev would need to be reset if the queue was cleared. In the latest patch I didn't bother and just clear the kobject.