From: Bruno Prémont Date: Sun, 4 Jan 2009 21:11:54 +0000 (-0800) Subject: viafb: fix crashes due to 4k stack overflow X-Git-Tag: v2.6.29-rc1~516 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e687d691cb3790d25e31c74f5941fd7c565e9df5;p=pandora-kernel.git viafb: fix crashes due to 4k stack overflow The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits; CURSOR_SIZE is defined as (8 * 1024). Using up twice 1k on stack is too much for 4k-stack (though it works with 8k-stacks). Make those two variables kzalloc'ed to preserve stack space. Also merge the whole lot of local struct's in viafb_ioctl into a union so the stack usage gets minimized here as well. (struct's are only accessed in their indicidual IOCTL case) This second part is only compile-tested as I know of no userspace app using the IOCTLs. Signed-off-by: Bruno Prémont Cc: Cc: Krzysztof Helt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed