mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maneesh Soni <smaneesh@in.ibm.com>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: module load/unload race protection?
Date: Tue, 17 Apr 2001 09:07:40 +0530	[thread overview]
Message-ID: <20010417090740.A10775@in.ibm.com> (raw)
In-Reply-To: <200104141026.MAA22602@harpo.it.uu.se>
In-Reply-To: <200104141026.MAA22602@harpo.it.uu.se>; from mikpe@csd.uu.se on Sat, Apr 14, 2001 at 12:26:40PM +0200

On Sat, Apr 14, 2001 at 12:26:40PM +0200, Mikael Pettersson wrote:
> Does the kernel's module loader (kernel/module.c, not kmod)
> protect adequately against concurrent load/load or load/unload
> requests? The question applies to both 2.2 and 2.4 kernels.
> 
> I'm trying to track down a problem where a user using a
> RedHat 2.2.17-14 SMP kernel managed to trigger a situation where
> a driver module had been unloaded while still being in use
> (as in "the kernel has pointers into it", not USE_COUNT != 0).
> I'm reviewing the driver's internal INC/DEC_USE_COUNT usage,
> but so far I've not found any obvious errors.
> 
> /Mikael

There are race conditions while module unloading, present in both 2.2 and 2.4
kernels. Efforts are being made in handling these races by using
read-copy-update mechanism (http://lse.sourceforge.net/locking/rclock.html)
and by using synchronize_kernel() (from Rusty Russell, Keith Owens).
 
 
Regards,
Maneesh                                                                         

-- 
Maneesh Soni <smaneesh@in.ibm.com>
http://lse.sourceforge.net/locking/rclock.html
IBM Linux Technology Center,
IBM Software Lab, Bangalore, India

      reply	other threads:[~2001-04-17  3:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-14 10:26 Mikael Pettersson
2001-04-17  3:37 ` Maneesh Soni [this message]

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=20010417090740.A10775@in.ibm.com \
    --to=smaneesh@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    /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®