From patchwork Sat May 19 09:41:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: rajan.gupta@freescale.com X-Patchwork-Id: 160178 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D4F55B6FC8 for ; Sat, 19 May 2012 19:41:27 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077Ab2ESJlZ (ORCPT ); Sat, 19 May 2012 05:41:25 -0400 Received: from db3ehsobe005.messaging.microsoft.com ([213.199.154.143]:49231 "EHLO db3outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752133Ab2ESJlY (ORCPT ); Sat, 19 May 2012 05:41:24 -0400 Received: from mail72-db3-R.bigfish.com (10.3.81.253) by DB3EHSOBE001.bigfish.com (10.3.84.21) with Microsoft SMTP Server id 14.1.225.23; Sat, 19 May 2012 09:41:13 +0000 Received: from mail72-db3 (localhost [127.0.0.1]) by mail72-db3-R.bigfish.com (Postfix) with ESMTP id AA524220411; Sat, 19 May 2012 09:41:12 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839hd24he5bhf0ah) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail72-db3 (localhost.localdomain [127.0.0.1]) by mail72-db3 (MessageSwitch) id 1337420468901529_16602; Sat, 19 May 2012 09:41:08 +0000 (UTC) Received: from DB3EHSMHS004.bigfish.com (unknown [10.3.81.232]) by mail72-db3.bigfish.com (Postfix) with ESMTP id D5AFE42004D; Sat, 19 May 2012 09:41:08 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB3EHSMHS004.bigfish.com (10.3.87.104) with Microsoft SMTP Server (TLS) id 14.1.225.23; Sat, 19 May 2012 09:41:08 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.2.298.5; Sat, 19 May 2012 04:41:16 -0500 Received: from right.am.freescale.net (right.am.freescale.net [10.82.193.13]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id q4J9fGd7015056; Sat, 19 May 2012 02:41:16 -0700 Received: by right.am.freescale.net (Postfix, from userid 65005523) id 03FDC1202B0; Sat, 19 May 2012 04:41:16 -0500 (CDT) From: To: , CC: Rajan Gupta Subject: [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently Date: Sat, 19 May 2012 04:41:12 -0500 Message-ID: <1337420472-28159-1-git-send-email-rajan.gupta@freescale.com> X-Mailer: git-send-email 1.7.3.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.net Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Rajan Gupta dst_gc_work is cancelled and again rescheduled in __ds_free(). In case __dsf_free() is consistently called dst_gc_work will never get called resulting in memory not getting freed at all until one stops calling __dst_free Signed-off-by: Rajan Gupta --- net/core/dst.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/core/dst.c b/net/core/dst.c index 8246d47..6820206 100644 --- a/net/core/dst.c +++ b/net/core/dst.c @@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst) if (dst_garbage.timer_inc > DST_GC_INC) { dst_garbage.timer_inc = DST_GC_INC; dst_garbage.timer_expires = DST_GC_MIN; - cancel_delayed_work(&dst_gc_work); schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires); } spin_unlock_bh(&dst_garbage.lock);