Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] sys_mbind sanity checking

Make sure maxnodes is safe size before calculating nlongs in
get_nodes().

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Chris Wright and committed by
Linus Torvalds
636f13c1 74910e6c

+2
+2
mm/mempolicy.c
··· 808 808 nodes_clear(*nodes); 809 809 if (maxnode == 0 || !nmask) 810 810 return 0; 811 + if (maxnode > PAGE_SIZE) 812 + return -EINVAL; 811 813 812 814 nlongs = BITS_TO_LONGS(maxnode); 813 815 if ((maxnode % BITS_PER_LONG) == 0)