Panic on mount with write-locked USB media (umass)

Kevin Oberman oberman at es.net
Tue Apr 5 13:18:20 PDT 2005


> From: Charles Swiger <cswiger at mac.com>
> Date: Tue, 5 Apr 2005 15:47:03 -0400
> 
> On Apr 5, 2005, at 3:36 PM, Kevin Oberman wrote:
> > Then I plugged it in with the write lock switch on and tried to mount
> > it.  "mount_msdosfs: /dev/da0s1: Permission denied" Hey! I'm root! This
> > is supposed to work. Sounds like the partitioning and GEOM foot 
> > shooting
> > thread. Oh, well, but this really could be handled better.
> 
> What happens if you try to mount a read-only NFS volume as read-write?  
> Being root gives one superhuman powers over the local machine, but it 
> does not make a device which is write-protected by hardware writeable.
> 
> It would be useful if mount was smart enough to notice when it is 
> dealing with a read-only device, and try to mount such things 
> read-only, rather than trying to mount things read-write by default and 
> failing.  Of course, the system shouldn't panic, either.  :-)

I think that is what I said. I am almost sure that this is how it used
to work. I'm not sure whether the change was caused by something in
msdosfs or GEOM (or somewhere else), but I sure preferred it when the RO
device mounted RO. CDs still do this (thankfully). This makes me suspect
msdosfs is the culprit.

But the real concern on my part was the panic. The other issue is just
POLA and annoyance. Panics should NEVER happen (although they always will).
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634


More information about the freebsd-current mailing list