1. 21 Nov, 2009 1 commit
    • Julia Lawall's avatar
      fs/ceph: introduce missing kfree · 60d87733
      Julia Lawall authored
      Error handling code following a kmalloc should free the allocated data.
      
      The semantic match that finds this problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      expression E;
      identifier f,f1,l;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      (
      x->f1 = E
      |
       (x->f1 == NULL || ...)
      |
       f(...,x->f1,...)
      )
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      60d87733
  2. 20 Nov, 2009 7 commits
  3. 19 Nov, 2009 2 commits
  4. 18 Nov, 2009 3 commits
  5. 12 Nov, 2009 2 commits
  6. 11 Nov, 2009 4 commits
  7. 10 Nov, 2009 1 commit
  8. 09 Nov, 2009 1 commit
    • Sage Weil's avatar
      ceph: do not confuse stale and dead (unreconnected) caps · 685f9a5d
      Sage Weil authored
      We were using the cap_gen to track both stale caps (caps that timed out
      due to temporarily losing touch with the mds) and dead caps that did not
      reconnect after an MDS failure.  Introduce a recon_gen counter to track
      reconnections to restarted MDSs and kill dead caps based on that instead.
      
      Rename gen to cap_gen while we're at it to make it more clear which is
      which.
      Signed-off-by: default avatarSage Weil <sage@newdream.net>
      685f9a5d
  9. 08 Nov, 2009 1 commit
  10. 07 Nov, 2009 3 commits
  11. 06 Nov, 2009 1 commit
  12. 05 Nov, 2009 3 commits
  13. 03 Nov, 2009 1 commit
  14. 02 Nov, 2009 3 commits
  15. 30 Oct, 2009 1 commit
  16. 29 Oct, 2009 4 commits
  17. 27 Oct, 2009 2 commits