Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Apr 2002 06:17:33 -0700 (PDT)
From:      Bruce Evans <bde@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_conf.c
Message-ID:  <200204251317.g3PDHXX64849@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         2002/04/25 06:17:33 PDT

  Modified files:
    sys/kern             kern_conf.c 
  Log:
  Break the following implementation of panic(3):
  
          #!bin/sh
  
          # Original version of this by Michael Reifenberger
          # <root@nihil.plaut.de>.
  
          mdconfig -d -u 11 >/dev/null 2>&1
          dd if=/dev/zero of=zz bs=1m count=1
  
          while :
          do
                  mdconfig -a -t vnode -f zz -u 11
                  fdisk -f - -iv /dev/md11 <<EOF1
                  g c1 h64 s32
                  p 1 165 0 2048
                  a 1
          EOF1
                  mdconfig -d -u 11
          done
  
  Garbage pointers in __si_u were not cleared by destroy_dev().  Not
  clearing si_disk made the above fatal because the disk layer uses
  si_disk as a flag to indicate that the dev_t has been completely
  initialized.  disk_destroy() clears si_disk for the parent dev_t
  but doesn't get called for children.
  
  Not fixed:
  - setting the undocumented sysctl debug.free_devt should cause more
    complete destruction of the dev_t including clearing of __si_u, but
    actually causes the above to panic a little earlier.
  - the loop leaks 10 memory allocations per iteration (4 DEVFS, 2 devbuf
    and 4 dev_t).
  
  Reviewed by:    timeout by MAINTAINER after 3 months
  
  Revision  Changes    Path
  1.108     +1 -0      src/sys/kern/kern_conf.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204251317.g3PDHXX64849>