All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow
@ 2010-09-07 17:34 Pedro Francisco
  2010-09-07 18:21 ` Alejandro Riveira Fernández
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Francisco @ 2010-09-07 17:34 UTC (permalink / raw)
  To: Linux Kernel Mailing List

sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow.

Now what I'm surprised is not the filesystem errors but me being allowed to 
remove the module without using the '-f' option.

Do note, lsmod |grep ahci reports something like [this is adapted from a 
2.6.32 kernel]:

ahci                   32200  0

so it isn't at all surprising I'm being allowed to remove a seemingly unused 
module. So....
a) is this supposed to happen?
b) do you need any more info?

P.S.: CC'ing me will probably ensure I'll reply faster but not explicitly 
needed since I'm subscribed.
-- 
Pedro

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow
  2010-09-07 17:34 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow Pedro Francisco
@ 2010-09-07 18:21 ` Alejandro Riveira Fernández
  2010-09-07 21:47   ` Pedro Francisco
  0 siblings, 1 reply; 5+ messages in thread
From: Alejandro Riveira Fernández @ 2010-09-07 18:21 UTC (permalink / raw)
  To: Pedro Francisco; +Cc: Linux Kernel Mailing List

El Tue, 7 Sep 2010 18:34:27 +0100
Pedro Francisco <pedrogfrancisco@gmail.com> escribió:

> sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow.
> 
> Now what I'm surprised is not the filesystem errors but me being allowed to 
> remove the module without using the '-f' option.
> 
> Do note, lsmod |grep ahci reports something like [this is adapted from a 
> 2.6.32 kernel]:
> 
> ahci                   32200  0
> 
> so it isn't at all surprising I'm being allowed to remove a seemingly unused 
> module. So....
> a) is this supposed to happen?

 Yes afaics. root can do many stupid things if (s)he wants
 including « rm -rf --no-preserve-root / »

> b) do you need any more info?
> 
> P.S.: CC'ing me will probably ensure I'll reply faster but not explicitly 
> needed since I'm subscribed.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow
  2010-09-07 18:21 ` Alejandro Riveira Fernández
@ 2010-09-07 21:47   ` Pedro Francisco
  2010-09-08 18:28     ` Stefan Richter
  0 siblings, 1 reply; 5+ messages in thread
From: Pedro Francisco @ 2010-09-07 21:47 UTC (permalink / raw)
  To: Alejandro Riveira Fernández; +Cc: Linux Kernel Mailing List

On Tuesday 07 September 2010 19:21:43 Alejandro Riveira Fernández wrote:
> El Tue, 7 Sep 2010 18:34:27 +0100
> 
> Pedro Francisco <pedrogfrancisco@gmail.com> escribió:
> > sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow.
> > 
> > Now what I'm surprised is not the filesystem errors but me being allowed
> > to remove the module without using the '-f' option.
> > 
> > Do note, lsmod |grep ahci reports something like [this is adapted from a
> > 2.6.32 kernel]:
> > 
> > ahci                   32200  0
> > 
> > so it isn't at all surprising I'm being allowed to remove a seemingly
> > unused module. So....
> > a) is this supposed to happen?
> 
>  Yes afaics. root can do many stupid things if (s)he wants
>  including « rm -rf --no-preserve-root / »

That makes no sense. That's what the force option "-f" is for. It's my opinion 
the usage count for ahci on `lsmod' should be 1 and not 0. Whoever still wants 
to remove it can use the `rmmod -f ahci'


> 
> > b) do you need any more info?
> > 
> > P.S.: CC'ing me will probably ensure I'll reply faster but not explicitly
> > needed since I'm subscribed.


-- 
Pedro

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow
  2010-09-07 21:47   ` Pedro Francisco
@ 2010-09-08 18:28     ` Stefan Richter
  2010-09-08 19:49       ` Pedro Francisco
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Richter @ 2010-09-08 18:28 UTC (permalink / raw)
  To: Pedro Francisco; +Cc: Alejandro Riveira Fernández, linux-kernel

Pedro Francisco wrote:
> On Tuesday 07 September 2010 19:21:43 Alejandro Riveira Fernández wrote:
>> El Tue, 7 Sep 2010 18:34:27 +0100
>>
>> Pedro Francisco <pedrogfrancisco@gmail.com> escribió:
>>> sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow.
>>>
>>> Now what I'm surprised is not the filesystem errors but me being allowed
>>> to remove the module without using the '-f' option.
>>>
>>> Do note, lsmod |grep ahci reports something like [this is adapted from a
>>> 2.6.32 kernel]:
>>>
>>> ahci                   32200  0
>>>
>>> so it isn't at all surprising I'm being allowed to remove a seemingly
>>> unused module. So....
>>> a) is this supposed to happen?
>>  Yes afaics. root can do many stupid things if (s)he wants
>>  including « rm -rf --no-preserve-root / »
> 
> That makes no sense. That's what the force option "-f" is for. It's my opinion 
> the usage count for ahci on `lsmod' should be 1 and not 0. Whoever still wants 
> to remove it can use the `rmmod -f ahci'

The usage count of a module is only there to ensure that function calls into
the module succeed.  As long as some other part of the kernel has a pointer of
a function in the module, removal of the module needs to be prevented.

"rmmod ahci" on the other hand is something like pulling the SATA cable.  Or
ejection of the controller from an ExpressCard slot.  The driver shutdown
causes the controller device and thus its child devices (disk devices behind
the controller) to go away, and that's it.  You can do also
# echo $DEVICE_ID > /sys/module/ahci/drivers/pci\:ahci/unbind
which tells the driver to let go of the controller.
-- 
Stefan Richter
-=====-==-=- =--= -=---
http://arcgraph.de/sr/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow
  2010-09-08 18:28     ` Stefan Richter
@ 2010-09-08 19:49       ` Pedro Francisco
  0 siblings, 0 replies; 5+ messages in thread
From: Pedro Francisco @ 2010-09-08 19:49 UTC (permalink / raw)
  To: Stefan Richter; +Cc: Alejandro Riveira Fernández, linux-kernel

On Wednesday 08 September 2010 19:28:57 Stefan Richter wrote:
> Pedro Francisco wrote:
> > That makes no sense. That's what the force option "-f" is for. It's my
> > opinion the usage count for ahci on `lsmod' should be 1 and not 0.
> > Whoever still wants to remove it can use the `rmmod -f ahci'
> 
> The usage count of a module is only there to ensure that function calls
> into the module succeed.  As long as some other part of the kernel has a
> pointer of a function in the module, removal of the module needs to be
> prevented.
> 
> "rmmod ahci" on the other hand is something like pulling the SATA cable. 
> Or ejection of the controller from an ExpressCard slot.  The driver
> shutdown causes the controller device and thus its child devices (disk
> devices behind the controller) to go away, and that's it.  You can do also
> # echo $DEVICE_ID > /sys/module/ahci/drivers/pci\:ahci/unbind
> which tells the driver to let go of the controller.

Hum ok... Still I find it weird since on 2.6.32 I've, after `lsmod | grep -i 
ahci':
ahci                   32200  4
and on 2.6.35.4:
ahci                   32200  0

Why the change of behaviour? Is it because of the split of libahci from ahci ?

-- 
Pedro

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-09-08 19:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 17:34 2.6.35.4: sudo rmmod ahci @ 2.6.35.4 succeeds: filesystem access errors follow Pedro Francisco
2010-09-07 18:21 ` Alejandro Riveira Fernández
2010-09-07 21:47   ` Pedro Francisco
2010-09-08 18:28     ` Stefan Richter
2010-09-08 19:49       ` Pedro Francisco

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.