1. 11 Oct, 2012 1 commit
    • Simon Derr's avatar
      9P: Fix race between p9_write_work() and p9_fd_request() · 759f4298
      Simon Derr authored
      
      
      Race scenario:
      
      thread A			thread B
      
      p9_write_work()                p9_fd_request()
      
      if (list_empty
        (&m->unsent_req_list))
        ...
      
                                     spin_lock(&client->lock);
                                     req->status = REQ_STATUS_UNSENT;
                                     list_add_tail(..., &m->unsent_req_list);
                                     spin_unlock(&client->lock);
                                     ....
                                     if (n & POLLOUT &&
                                     !test_and_set_bit(Wworksched, &m->wsched)
                                     schedule_work(&m->wq);
                                     --> not done because Wworksched is set
      
        clear_bit(Wworksched, &m->wsched);
        return;
      
      --> nobody will take care of sending the new request.
      
      This is not very likely to happen though, because p9_write_work()
      being called with an empty unsent_req_list is not frequent.
      But this also means that taking the lock earlier will not be costly.
      Signed-off-by: default avatarSimon Derr <simon.derr@bull.net>
      Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
      759f4298
  2. 17 Sep, 2012 4 commits
  3. 06 Sep, 2012 2 commits
  4. 01 Sep, 2012 5 commits
  5. 30 Aug, 2012 5 commits
  6. 29 Aug, 2012 18 commits
  7. 28 Aug, 2012 5 commits