[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090622.024243.70686716.davem@davemloft.net>
Date: Mon, 22 Jun 2009 02:42:43 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kuznet@....inr.ac.ru
Cc: jarkao2@...il.com, nhorman@...driver.com, netdev@...r.kernel.org,
mbizon@...ebox.fr, dada1@...mosbay.com, pekkas@...core.fi,
jmorris@...ei.org, yoshfuji@...ux-ipv6.org
Subject: Re: [PATCH] fix NULL pointer + success return in route lookup path
From: Alexey Kuznetsov <kuznet@....inr.ac.ru>
Date: Mon, 22 Jun 2009 12:59:50 +0400
> On Mon, Jun 22, 2009 at 05:43:15AM +0000, Jarek Poplawski wrote:
>> Maybe it can work, but it needs a thorough checking now and adds a new
>> code path to track later while looking for bugs. So, I wonder if it's
>> not better to link such dsts in rt_intern_hash anyway, probably as a
>> separate list, scanned only for expired entries.
>
> Such a list already exists, it is gc list in core/dst.c.
>
> The fix to the problem could be replacing rt_drop() with rt_free()
> (adding rt_free() after the patch, which deleted rt_drop()), something like:
>
> if (!rt_caching(dev_net(rt->u.dst.dev))) {
> /* ..... */
> + rt_free(rt);
> goto report_and_exit;
> }
>
> rt_free() will put the route on that gc list and it will be releases
> as soon as refcnt becomes 0.
That should work.
Can someone put together a formal patch and give it at least
a quick test?
Thanks!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists