lkml.org 
[lkml]   [1999]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: problem in md?
Ingo Molnar wrote:
> On Tue, 2 Nov 1999, Manfred Spraul wrote:
> > are you aware that do_something() is called WITHOUT the global interrupt
> > lock held?
>
> yep, thanks for pointing this out. I've added asserts to sleep_on() ages
> ago to fix exactly this type of breakage [check out linux-kernel archives
> for sleep_on & cli], but actually forgot to fix this in the RAID code and
> the asserts/warnings got removed from 2.2.
>

Could you add the warning again? I doubt that md is the only place which
relies on the cli()+sleep_on(), eg drivers/block/floppy.c looks
suspicious:
> INT_OFF;
> while (fdc_busy && NO_SIGNAL)
> interruptible_sleep_on(&fdc_wait);
> if (fdc_busy){
> INT_ON;
> return -EINTR;
> }
> fdc_busy = 1;
> INT_ON;

testing and setting fdc_busy is not atomic.

[What about disallowing schedule(), sleep_on() with the global irq lock
held? It's only a band-aid for old drivers, and I'm sure that 90% of
these drivers contain races on SMP, ie I would prefer a clean oops
instead an unexplainable bug report - at least until 2.4pre]

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.673 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site