Skip to contentSkip to conversation

use __GFP_NOKILL in select_bits_alloc()

PATCH In review William Lee Irwin III 1 participant 1 message Sep 26, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 6/13 use __GFP_NOKILL in select_bits_alloc()

select_bits_alloc() is done in select.c, triggering the OOM killer. The system calls doing so are failable, and so use __GFP_NOKILL.

fs/select.c +1 -1
diff -urN linux-2.5.33/fs/select.c linux-2.5.33-mm5/fs/select.c
@@ -237,7 +237,7 @@
 
 static void *select_bits_alloc(int size)
 {
-	return kmalloc(6 * size, GFP_KERNEL);
+	return kmalloc(6 * size, GFP_KERNEL | __GFP_NOKILL);
 }
 
 static void select_bits_free(void *bits, int size)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/