1. 20 4月, 2008 10 次提交
  2. 08 4月, 2008 1 次提交
    • J
      [SCSI] transport_class: BUG if we can't release the attribute container · 2f3edc69
      James Bottomley 提交于
      Every current transport class calls transport_container_release but
      ignores the return value.  This is catastrophic if it returns an error
      because the containers are part of a global list and the next action of
      almost every transport class is to free the memory used by the
      container.
      
      Fix this by making transport_container_release a void, but making it BUG
      if attribute_container_release returns an error ... this catches the
      root cause of a system panic much earlier.  If we don't do this, we get
      an eventual BUG when the attribute container list notices the corruption
      caused by the freed memory it's still referencing.
      
      Also made attribute_container_release __must_check as a reminder.
      
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      2f3edc69
  3. 29 3月, 2008 1 次提交
    • J
      driver core: fix small mem leak in driver_add_kobj() · d478376c
      Jesper Juhl 提交于
      The Coverity checker spotted that we leak the storage allocated to 'name' in
      int driver_add_kobj().  The leak looks legit to me - this is the code :
      
      int driver_add_kobj(struct device_driver *drv, struct kobject *kobj,
                          const char *fmt, ...)
      {
              va_list args;
              char *name;
              int ret;
      
              va_start(args, fmt);
              name = kvasprintf(GFP_KERNEL, fmt, args);
              ^^^^^^^^ This dynamically allocates space...
      
              va_end(args);
      
              if (!name)
                      return -ENOMEM;
      
              return kobject_add(kobj, &drv->p->kobj, "%s", name);
      	^^^^^^^^ This neglects to free the space allocated
      }
      
      Inside kobject_add() a copy of 'name' will be made and used.  As far as I can
      see, Coverity is correct in flagging this as a leak, but I'd like some
      configmation before the patch is applied.
      
      This should fix it.
      Signed-off-by: NJesper Juhl <jesper.juhl@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d478376c
  4. 25 3月, 2008 1 次提交
  5. 11 3月, 2008 2 次提交
  6. 05 3月, 2008 4 次提交
  7. 04 3月, 2008 1 次提交
  8. 22 2月, 2008 3 次提交
  9. 21 2月, 2008 1 次提交
  10. 08 2月, 2008 1 次提交
  11. 07 2月, 2008 1 次提交
  12. 03 2月, 2008 3 次提交
  13. 02 2月, 2008 1 次提交
  14. 31 1月, 2008 1 次提交
  15. 29 1月, 2008 1 次提交
  16. 28 1月, 2008 2 次提交
  17. 25 1月, 2008 6 次提交