Thread (19 messages) 19 messages, 4 authors, 2009-06-22

Re: [PATCH] fix NULL pointer + success return in route lookup path

flat view

From: Alexey Kuznetsov <hidden>
Date: 2009-06-22 09:17:56

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.

Alexey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help