mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: zippel@linux-m68k.org
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au, wa@almesberger.net
Subject: Re: [RFC] Is an alternative module interface needed/possible?
Date: Thu, 20 Feb 2003 04:09:34 -0800	[thread overview]
Message-ID: <200302201209.EAA12261@adam.yggdrasil.com> (raw)

On 2003-02-20, Roman Zippel responded to Werner Almesberger:
>The question is now whether we return an error value or use a callback. 
>When a device is removed, we usually also want to remove all its data 
>structures, on the other hand we can only remove a module when there are 
>no users, so here we return an error value.
>Now I need a bigger example to put this into a context, a nice example is 
>scsi_unregister. It removes among other things procfs entries and these 
>entries have a reference to struct Scsi_Host. As long as scsi_unregister 
>is called from module_exit everything works fine, but a bit searching 
>reveals drivers/usb/storage/usb.c, which create/removes a scsi host when 
>you plug/unplug a storage device (let's ignore other problems here, like 
>it's still mounted).

	The ability to remove a module is generally independent of
whether or not there is any hardware present at that moment for which
the module supplies a driver.  Instead, the determining issue is
whether there are file descriptors open for that driver.

	Of course, if the necessary hardware was never present at any
time when the device driver's module was loaded, then there never will
be any file descriptors open for the device driver.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

             reply	other threads:[~2003-02-20 12:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 12:09 Adam J. Richter [this message]
2003-02-20 12:46 ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2003-02-20 13:51 Adam J. Richter
2003-02-20 14:06 ` Werner Almesberger
2003-02-20 15:38 ` Roman Zippel
2003-02-14 12:04 [RFC] Migrating net/sched to new module interface Rusty Russell
2003-02-14 13:21 ` Roman Zippel
2003-02-14 13:53   ` Werner Almesberger
2003-02-14 14:24     ` Roman Zippel
2003-02-14 18:30       ` Werner Almesberger
2003-02-14 20:09         ` Roman Zippel
2003-02-15  0:12           ` Werner Almesberger
2003-02-15  0:51             ` Roman Zippel
2003-02-15  2:28               ` Werner Almesberger
2003-02-15 23:20                 ` Roman Zippel
2003-02-17 17:04                   ` Werner Almesberger
2003-02-17 23:09                     ` [RFC] Is an alternative module interface needed/possible? Roman Zippel
2003-02-18  1:18                       ` Werner Almesberger
2003-02-18  4:54                         ` Rusty Russell
2003-02-18  7:20                           ` Werner Almesberger
2003-02-18 12:06                             ` Roman Zippel
2003-02-18 14:12                               ` Werner Almesberger
2003-02-18 12:45                                 ` Thomas Molina
2003-02-18 17:22                                 ` Werner Almesberger
2003-02-19  3:30                                   ` Rusty Russell
2003-02-19  4:11                                     ` Werner Almesberger
2003-02-19 23:38                                       ` Rusty Russell
2003-02-20  9:46                                         ` Roman Zippel
2003-02-20  0:40                                   ` Roman Zippel
2003-02-20  2:17                                     ` Werner Almesberger
2003-02-23 16:02                                       ` Roman Zippel
2003-02-26 23:26                                         ` Werner Almesberger
2003-02-27 12:34                                           ` Roman Zippel
2003-02-27 13:20                                             ` Werner Almesberger
2003-02-27 14:33                                               ` Roman Zippel
2003-02-23 23:34                                   ` Kevin O'Connor
2003-02-24 12:14                                     ` Roman Zippel
2003-02-18 12:35                             ` Roman Zippel
2003-02-18 14:14                               ` Werner Almesberger
2003-02-19  1:48                         ` Roman Zippel
2003-02-19  2:27                           ` Werner Almesberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200302201209.EAA12261@adam.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=wa@almesberger.net \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®