Messages in this thread | | | Date | Tue, 02 Nov 1999 08:58:54 +0100 | From | Manfred Spraul <> | Subject | Re: 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/
| |