netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <rajan.gupta@freescale.com>
To: <"netdev@vger.kernel.org.kuznet"@ms2.inr.ac.ru>
Cc: Rajan Gupta <rajan.gupta@freescale.com>
Subject: [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
Date: Sat, 19 May 2012 04:39:54 -0500	[thread overview]
Message-ID: <1337420394-28115-1-git-send-email-rajan.gupta@freescale.com> (raw)

From: Rajan Gupta <rajan.gupta@freescale.com>

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 <rajan.gupta@freescale.com>
---
 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);
-- 
1.7.9.5

             reply	other threads:[~2012-05-19  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-19  9:39 rajan.gupta [this message]
2012-05-19  9:41 [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently rajan.gupta
2012-05-19  9:44 b15745
2012-05-19 10:04 ` Eric Dumazet
2012-05-19 14:48   ` Gupta Rajan-B15745
2012-05-19 18:36   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337420394-28115-1-git-send-email-rajan.gupta@freescale.com \
    --to=rajan.gupta@freescale.com \
    --cc="netdev@vger.kernel.org.kuznet"@ms2.inr.ac.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).