diff options
author | Eric Dumazet <edumazet@google.com> | 2012-10-18 03:21:55 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-18 15:34:30 -0400 |
commit | 6d772ac5578f711d1ce7b03535d1c95bffb21dff (patch) | |
tree | 392933a2d8a842e22f44bef7207182d67338b3d3 /lib/proportions.c | |
parent | 13d82bf50dce632355fcccafa4fe44a9b5e706d8 (diff) |
netlink: use kfree_rcu() in netlink_release()
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@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stéphane Marchesin <marcheu@google.com>
Cc: Sam Leffler <sleffler@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/proportions.c')
0 files changed, 0 insertions, 0 deletions