DragonFly BSD
DragonFly commits List (threaded) for 2010-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: kernel - Work through some memory leaks in dsched


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Sep 2010 17:21:36 -0700 (PDT)

commit b5d7061d1ace7a0b0583af8ceae683dbd3e9bc81
Author: Matthew Dillon <dillon@apollo.backplane.com>
Date:   Thu Sep 23 17:15:07 2010 -0700

    kernel - Work through some memory leaks in dsched
    
    * Add a uninitbufbio() function to complement initbufbio().  Also move
      BUF_LOCKINIT() into initbufbio() and BUF_LOCKFREE() into uninitbufbio().
    
    * There are several device drivers and other places where the struct buf
      is still being allocated manually (verses using getpbuf()).  These were
      kfree()ing the buffer without dealing with e.g. dsched_exit_buf().
    
      Have uninitbufbio() call dsched_exit_buf() and adjust the various manual
      allocations/frees of struct buf to call uninitbufbio() before kfree()ing.
      Also remove various manual calls to BUF_LOCKFREE() (which is now done
      inside uninitbufbio()).
    
    * This should hopefully deal with the memory leaks but there could be a
      few left.
    
    Reported-by: "Steve O'Hara-Smith" <steve@sohara.org>

Summary of changes:
 sys/dev/disk/ata/ata-raid.c         |   25 +++++++++++++++++--------
 sys/dev/disk/ccd/ccd.c              |    3 +--
 sys/dev/disk/nata/ata-raid.c        |    4 ++--
 sys/dev/raid/vinum/vinuminterrupt.c |    4 ++--
 sys/dev/raid/vinum/vinumrequest.c   |    8 +++-----
 sys/kern/kern_dsched.c              |    2 +-
 sys/kern/vfs_bio.c                  |   16 ++++++++++++++--
 sys/sys/buf.h                       |    1 +
 sys/vfs/devfs/devfs_vnops.c         |   19 ++++++++++---------
 9 files changed, 51 insertions(+), 31 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b5d7061d1ace7a0b0583af8ceae683dbd3e9bc81


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]