[Bug 224037] Kernel crashes when trying to mount certain USB keys reported as WriteProtected

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 15 11:20:20 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224037

--- Comment #24 from commit-hook at freebsd.org ---
A commit references this bug:

Author: avg
Date: Mon Jan 15 11:20:01 UTC 2018
New revision: 327996
URL: https://svnweb.freebsd.org/changeset/base/327996

Log:
  geom_disk / scsi_da: deny opening write-protected disks for writing

  Ths change consists of two parts.

  geom_disk: deny opening a disk for writing if it's marked as
  write-protected.  A new disk(9) flag is added to mark write protected
  disks.  A possible alternative could be to add another parameter to d_open,
  so that the open mode could be passed to it and the disk drivers could
  make the decision internally, but the flag required less churn.

  scsi_da: add a new phase of disk probing to query the all pages mode
  sense page.  We can determine if the disk is write protected using bit 7
  of the device specific field in the mode parameter header returned by
  MODE SENSE.

  PR:           224037
  Reviewed by:  mav
  MFC after:    4 weeks
  Differential Revision: https://reviews.freebsd.org/D13360

Changes:
  head/sys/cam/scsi/scsi_da.c
  head/sys/geom/geom_disk.c
  head/sys/geom/geom_disk.h

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-scsi mailing list