Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • include
  • linux
  • netdevice.h
Find file BlameHistoryPermalink
  • Kuniyuki Iwashima's avatar
    net: Protect dev->name by seqlock. · 0840556e
    Kuniyuki Iwashima authored Apr 29, 2024
    
    
    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: default avatarEric Dumazet <edumazet@google.com>
    Link: https://lore.kernel.org/netdev/CANn89iJEWs7AYSJqGCUABeVqOCTkErponfZdT5kV-iD=-SajnQ@mail.gmail.com/
    
    
    Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
    Link: https://lore.kernel.org/r/20240430015813.71143-7-kuniyu@amazon.com
    
    
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    0840556e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7