Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • L lustre-release
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • debian-packagesdebian-packages
  • lustre-release
  • Repository
Switch branch/tag
  • lustre-release
  • lustre
  • llite
  • llite_lib.c
Find file BlameHistoryPermalink
  • Mr NeilBrown's avatar
    LU-9679 llite: fix possible race with module unload. · 89aff2f3
    Mr NeilBrown authored Jan 02, 2020
    
    
    lustre_fill_super() calls client_fill_super() without holding a
    reference to the module containing client_fill_super.  If that
    module is unloaded at a bad time, this can crash.
    
    To be able to get a reference to the module using
    try_get_module(), we need a pointer to the module.
    
    So replace
      lustre_register_client_fill_super() and
      lustre_register_kill_super_cb()
    with a single
      lustre_register_super_ops()
    which also passed a module pointer.
    
    Then use a spinlock to ensure the module pointer isn't removed
    while try_module_get() is running, and use try_module_get() to
    ensure we have a reference before calling client_fill_super().
    
    Now that we take the reference to the module before calling
    luster_fill_super(), we don't need to take one inside
    lustre_fill_super().
    
    Linux-commit: d487fe31f49e78f3cdd826923bf0c340a839ffd8
    
    Signed-off-by: default avatarMr NeilBrown <neilb@suse.de>
    Change-Id: I9474622f2a253d9882eae3f0578c50782dd11ad4
    Reviewed-on: https://review.whamcloud.com/37020
    
    
    Tested-by: default avatarjenkins <devops@whamcloud.com>
    Tested-by: default avatarMaloo <maloo@whamcloud.com>
    Reviewed-by: default avatarJames Simmons <jsimmons@infradead.org>
    Reviewed-by: default avatarJian Yu <yujian@whamcloud.com>
    Reviewed-by: default avatarPetros Koutoupis <pkoutoupis@cray.com>
    Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
    89aff2f3

https://git.gsi.de is provided by CIT→Linux&Web | GSI Helmholtzzentrum fuer Schwerionenforschung GmbH | Imprint (in German) | Privacy policy