diff options
author | Eric Dumazet <[email protected]> | 2013-05-29 09:06:27 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2013-06-02 20:53:59 -0700 |
commit | c87a124a5d5e8cf8e21c4363c3372bcaf53ea190 (patch) | |
tree | 291681da6b67bc52bf92703f895070eb8b772a8c /lib/memory-notifier-error-inject.c | |
parent | c802db1164f28e62c6a43132b8d290cb8113f2ac (diff) |
net: force a reload of first item in hlist_nulls_for_each_entry_rcu
Roman Gushchin discovered that udp4_lib_lookup2() was not reloading
first item in the rcu protected list, in case the loop was restarted.
This produced soft lockups as in https://lkml.org/lkml/2013/4/16/37
rcu_dereference(X)/ACCESS_ONCE(X) seem to not work as intended if X is
ptr->field :
In some cases, gcc caches the value or ptr->field in a register.
Use a barrier() to disallow such caching, as documented in
Documentation/atomic_ops.txt line 114
Thanks a lot to Roman for providing analysis and numerous patches.
Diagnosed-by: Roman Gushchin <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Boris Zhmurov <[email protected]>
Signed-off-by: Roman Gushchin <[email protected]>
Acked-by: Paul E. McKenney <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions