[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121018.153616.732430567959014097.davem@davemloft.net>
Date: Thu, 18 Oct 2012 15:36:16 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: eric.dumazet@...il.com
Cc: netdev@...r.kernel.org, marcheu@...gle.com, kliegs@...gle.com,
sleffler@...gle.com
Subject: Re: [PATCH] netlink: use kfree_rcu() in netlink_release()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 18 Oct 2012 15:21:55 +0200
> From: Eric Dumazet <edumazet@...gle.com>
>
> On some suspend/resume operations involving wimax device, we have
> noticed some intermittent memory corruptions in netlink code.
>
> Stéphane Marchesin tracked this corruption in netlink_update_listeners()
> and suggested a patch.
>
> It appears netlink_release() should use kfree_rcu() instead of kfree()
> for the listeners structure as it may be used by other cpus using RCU
> protection.
>
> netlink_release() must set to NULL the listeners pointer when
> it is about to be freed.
>
> Also have to protect netlink_update_listeners() and
> netlink_has_listeners() if listeners is NULL.
>
> Add a nl_deref_protected() lockdep helper to properly document which
> locks protects us.
>
> Reported-by: Jonathan Kliegman <kliegs@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable.
--
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