Re: [PATCH] 2.4.18 raid1 - fix SMP locking/interrupt

Manfred Spraul (manfred@colorfullife.com)
Mon, 25 Mar 2002 21:57:02 +0100


From: "Andrew Morton" <akpm@zip.com.au>
> > OTHO, if a function doesn't work correctly if it's called with
disabled
> > interrupts, then it should not use spin_lock_irqsave() - it's
> > misleading.
> > e.g. if it calls kmalloc(GFP_KERNEL), down(), schedule(), etc.
>
> mm? Those are legal (albeit unpleasant) inside local_irq_save(),
> but illegal inside global_cli() in 2.5. Aren't they? If not,
> then release_kernel_lock() needs talking to.
>
If a function is called with disabled interrupts, then the caller
probably expects that the interrupts remain disabled - otherwise he
would have reenabled them before calling. schedule reenables interrupts.
The calls might be legal, but usually they indicate a bug.

--
    Manfred

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