Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-12640

per cpu env race

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      The checking and assgin below could be racy:

          if (lu_env_percpu[i].lep_task == current) {
                  env = lu_env_percpu[i].lep_env;
          
          CPU0
            thread0 lu_env_percpu[i].lep_task == current
               thread1 switch into CPU0 changes lu_env_percpu[0]
                 thread0 switch back CPU0,return lu_env_percpu[0].lep_env;
          
      

      The problem is access and change per_cpu variable here
      shall be atomic, since it is per cpu variable, we should
      take care it not been preempted.

      Attachments

        Activity

          People

            wshilong Wang Shilong (Inactive)
            wshilong Wang Shilong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: