diff options
| author | Taehee Yoo <ap420073@gmail.com> | 2020-03-13 06:50:14 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-02 19:02:33 +0200 |
| commit | 6c32c9d5907e4e567bb989eb19000e18d40adc17 (patch) | |
| tree | 9ee7fb4c561536e3d29399a36a1ef2782c39c732 /include/linux/debugobjects.h | |
| parent | 2451793d16616450566eb3b238b65430ddaa419c (diff) | |
hsr: use rcu_read_lock() in hsr_get_node_{list/status}()
[ Upstream commit 173756b86803655d70af7732079b3aa935e6ab68 ]
hsr_get_node_{list/status}() are not under rtnl_lock() because
they are callback functions of generic netlink.
But they use __dev_get_by_index() without rtnl_lock().
So, it would use unsafe data.
In order to fix it, rcu_read_lock() and dev_get_by_index_rcu()
are used instead of __dev_get_by_index().
Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
