Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Sep 1997 03:11:54 -0700 (PDT)
From:      Bruce Evans <bde@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG
Subject:   cvs commit: src/sys/kern subr_diskslice.c
Message-ID:  <199709161011.DAA17076@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         1997/09/16 03:11:54 PDT

  Modified files:
    sys/kern             subr_diskslice.c 
  Log:
  Reject attempts to set an in-core label which says that the "disk"
  or a partition is larger than the slice.
  
  Now `disklabel -Brw sdX auto' should fail properly on sliced disks
  without partition of type 165, e.g., on zip disks with the factory
  default formatting.  Previously it set a bogus in-core label for
  the compatibility slice and used this to corrupt the MBR (the slice
  has offset 0 and size 0, but setting the label in effect corrupted
  its size to nonzero).
  
  `disklabel -Brw sdX auto' already failed properly on normally (not
  dangerously dedicated) sliced disks _with_ partition of type 165,
  because the compatibility slice has a nonzero offset so the MBR
  remained inaccessible when the size was corrupted.
  
  This bug only affected in-core labels.  On-disk labels are checked
  carefully when they read and written.
  
  Revision  Changes    Path
  1.38      +10 -4     src/sys/kern/subr_diskslice.c



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