[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120522.151554.106838106733194160.davem@davemloft.net>
Date: Tue, 22 May 2012 15:15:54 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: kunx.jiang@...el.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
yanmin_zhang@...ux.intel.com
Subject: Re: [PATCH] ipv4: fix the rcu race between free_fib_info and
ip_route_output_slow
From: "kun.jiang" <kunx.jiang@...el.com>
Date: Tue, 22 May 2012 17:48:53 +0800
> From: Yanmin Zhang <yanmin_zhang@...ux.intel.com>
>
> 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 <yanmin_zhang@...ux.intel.com>
> Signed-off-by: Kun Jiang <kunx.jiang@...el.com>
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.
--
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