* module load/unload race protection?
@ 2001-04-14 10:26 Mikael Pettersson
2001-04-17 3:37 ` Maneesh Soni
0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2001-04-14 10:26 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: module load/unload race protection?
2001-04-14 10:26 module load/unload race protection? Mikael Pettersson
@ 2001-04-17 3:37 ` Maneesh Soni
0 siblings, 0 replies; 2+ messages in thread
From: Maneesh Soni @ 2001-04-17 3:37 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-04-17 3:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-14 10:26 module load/unload race protection? Mikael Pettersson
2001-04-17 3:37 ` Maneesh Soni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox