Skip to contentSkip to conversation

use __GFP_NOKILL in sys_poll()'s top-level fd table

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

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

PATCH 7/13 use __GFP_NOKILL in sys_poll()'s top-level fd table

The struct pollfd allocation in sys_poll() is done in response to a system call which may be failed instead of OOM killing other tasks.

fs/select.c +1 -1
diff -urN linux-2.5.33/fs/select.c linux-2.5.33-mm5/fs/select.c
@@ -439,7 +439,7 @@
 	if (nfds != 0) {
 		fds = (struct pollfd **)kmalloc(
 			(1 + (nfds - 1) / POLLFD_PER_PAGE) * sizeof(struct pollfd *),
-			GFP_KERNEL);
+			GFP_KERNEL | __GFP_NOKILL);
 		if (fds == NULL)
 			goto out;
 	}

--
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/