diff options
author | Kuniyuki Iwashima <[email protected]> | 2024-04-29 18:58:12 -0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-05-01 18:37:07 -0700 |
commit | 0840556e5a3a331b6932ef17dd4bc94445df3297 (patch) | |
tree | cb33bf3e2a686696f6db4ce268fe77c5f3c9836c /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | a428bfc77a4dd4ba19b7646e887fa655fcfee5a0 (diff) |
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 <[email protected]>
Link: https://lore.kernel.org/netdev/CANn89iJEWs7AYSJqGCUABeVqOCTkErponfZdT5kV-iD=-SajnQ@mail.gmail.com/
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions