buggy GFP_KERNEL allocators
Andrea Arcangeli
andrea en suse.de
Sab Ene 29 14:16:14 CST 2000
On Sat, 29 Jan 2000, Andrea Arcangeli wrote:
>--- 2.2.15pre4-raid1/drivers/block/raid1.c.~1~ Tue Dec 22 17:12:38 1998
>+++ 2.2.15pre4-raid1/drivers/block/raid1.c Sat Jan 29 14:45:24 2000
>@@ -211,7 +211,11 @@
> while (!( /* FIXME: now we are rather fault tolerant than nice */
> r1_bh = kmalloc (sizeof (struct raid1_bh), GFP_KERNEL)
> ) )
>+ {
> printk ("raid1_make_request(#1): out of memory\n");
>+ current->policy |= SCHED_YIELD;
>+ schedule();
>+ }
> memset (r1_bh, 0, sizeof (struct raid1_bh));
This incremental patch is necessary too
--- 2.2.15pre4-raid1/drivers/block/raid1.c.~1~ Tue Dec 22 17:12:38 1998
+++ 2.2.15pre4-raid1/drivers/block/raid1.c Sat Jan 29 14:49:47 2000
@@ -299,7 +303,11 @@
while (!( /* FIXME: now we are rather fault tolerant than nice */
mirror_bh[i] = kmalloc (sizeof (struct buffer_head), GFP_KERNEL)
) )
+ {
printk ("raid1_make_request(#2): out of memory\n");
+ current->policy |= SCHED_YIELD;
+ schedule();
+ }
memset (mirror_bh[i], 0, sizeof (struct buffer_head));
/*
@@ -711,7 +719,11 @@
while (!( /* FIXME: now we are rather fault tolerant than nice */
mddev->private = kmalloc (sizeof (struct raid1_data), GFP_KERNEL)
) )
+ {
printk ("raid1_run(): out of memory\n");
+ current->policy |= SCHED_YIELD;
+ schedule();
+ }
raid_conf = mddev->private;
memset(raid_conf, 0, sizeof(*raid_conf));
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda