lkml.org 
[lkml]   [2002]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] 2.4.18 raid1 - fix SMP locking/interrupt
Date
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/

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