Thread (22 messages) flat view 22 messages, 4 authors, 2012-05-23

Re: [PATCH] ipv4: fix the rcu race between free_fib_info and ip_route_output_slow

From: David Miller <davem@davemloft.net>
Date: 2012-05-22 19:15:59
Also in: lkml

From: "kun.jiang" <redacted>
Date: Tue, 22 May 2012 17:48:53 +0800
From: Yanmin Zhang <redacted>

We hit a kernel OOPS.
 ...
In function free_fib_info, we don't reset nexthop_nh->nh_dev to NULL before releasing
nh_dev. kfree_rcu(fi, rcu) would release the whole area.

Signed-off-by: Yanmin Zhang <redacted>
Signed-off-by: Kun Jiang <redacted>
This isn't a fix.  You're keeping around a pointer to a completely
released object, which is therefore illegal to dereference.

That's why we must set it to NULL, to catch such illegal accesses.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help