[Fault-injection-developer] RE: semaphore usage in xxx_store()
Status: Alpha
Brought to you by:
rustyl
|
From: Lynch, R. <rus...@in...> - 2003-01-06 17:06:23
|
I'm not sure which xxx_store() function you are talking about.
In general if a store() operation is triggering some action
that parallel user write operations (i.e. the same store()
being called at the same time) might cause wacky side effects
then I would serialize the store() operations with a semaphore.
As a result I tend to use a semaphore in my boiler plate
attribute code, but if we do not need the semaphore then we
should drop it.
--rustyl
> -----Original Message-----
> From: Zhuang, Louis
> Sent: Monday, January 06, 2003 1:33 AM
> To: Lynch, Rusty
> Cc: FITHML (E-mail)
> Subject: semaphore usage in xxx_store()
>
>
> Dear Rusty,
> I noticed you always down an semaphore in attribute
> store function. But I wonder if it is too paranoia... The
> only race condition I can image is somebody write the sysfs
> file with unloading module... But kernel/module.c should be
> the right place to care about it. If it is broken by that
> condition, we should challenge another Rusty. ;-> Could you
> give me some light about it?
>
> Yours truly,
> Louis Zhuang
> ---------------
> Fault Injection Test Harness Project
> BK tree: http://fault-injection.bkbits.net/linux-2.5
> Home Page: http://sf.net/projects/fault-injection
>
|