diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-04-29 18:58:12 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-05-01 18:37:07 -0700 |
commit | 0840556e5a3a331b6932ef17dd4bc94445df3297 (patch) | |
tree | cb33bf3e2a686696f6db4ce268fe77c5f3c9836c /net/unix/sysctl_net_unix.c | |
parent | a428bfc77a4dd4ba19b7646e887fa655fcfee5a0 (diff) | |
download | linux-stable-0840556e5a3a331b6932ef17dd4bc94445df3297.tar.gz linux-stable-0840556e5a3a331b6932ef17dd4bc94445df3297.tar.bz2 linux-stable-0840556e5a3a331b6932ef17dd4bc94445df3297.zip |
net: Protect dev->name by seqlock.
We will convert ioctl(SIOCGARP) to RCU, and then we need to copy
dev->name which is currently protected by rtnl_lock().
This patch does the following:
1) Add seqlock netdev_rename_lock to protect dev->name
2) Add netdev_copy_name() that copies dev->name to buffer
under netdev_rename_lock
3) Use netdev_copy_name() in netdev_get_name() and drop
devnet_rename_sem
Suggested-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/CANn89iJEWs7AYSJqGCUABeVqOCTkErponfZdT5kV-iD=-SajnQ@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20240430015813.71143-7-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions