1. 10 Dec, 2008 2 commits
  2. 08 Dec, 2008 6 commits
  3. 03 Dec, 2008 1 commit
  4. 02 Dec, 2008 1 commit
    • Julia Lawall's avatar
      [MTD] [NAND] drivers/mtd/nand/pasemi_nand.c: Add missing pci_dev_put · d9476298
      Julia Lawall authored
      pci_get_device increments a reference count that should be decremented
      using pci_dev_put.
      
      The semantic patch that finds the problem is as follows:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S,S1;
      position p1,p2,p3;
      expression E,E1;
      type T,T1;
      expression *ptr != NULL;
      @@
      
      (
       if ((x@p1 = pci_get_device(...)) == NULL) S
      |
       x@p1 = pci_get_device(...);
      )
       ... when != pci_dev_put(...,(T)x,...)
           when != if (...) { <+... pci_dev_put(...,(T)x,...) ...+> }
           when != true x == NULL || ...
           when != x = E
           when != E = (T)x
           when any
      (
       if (x == NULL || ...) S1
      |
       if@p2 (...) {
        ... when != pci_dev_put(...,(T1)x,...)
            when != if (...) { <+... pci_dev_put(...,(T1)x,...) ...+> }
            when != x = E1
            when != E1 = (T1)x
      (
        return \(0\|<+...x...+>\|ptr\);
      |
        return@p3 ...;
      )
      }
      )
      
      @ script:python @
      p1 << r.p1;
      p3 << r.p3;
      @@
      
      print "* file: %s pci_get_device: %s return: %s" % (p1[0].file,p1[0].line,p3[0].line)
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Acked-by: default avatarOlof Johansson <olof@lixom.net>
      Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
      d9476298
  5. 27 Nov, 2008 1 commit
  6. 26 Nov, 2008 5 commits
  7. 24 Nov, 2008 1 commit
  8. 05 Nov, 2008 2 commits
  9. 31 Oct, 2008 1 commit
  10. 21 Oct, 2008 3 commits
  11. 20 Oct, 2008 17 commits