From: Eric Paris Date: Thu, 28 Apr 2011 19:55:52 +0000 (-0400) Subject: flex_arrays: allow zero length flex arrays X-Git-Tag: v2.6.39-rc7~20^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf69d41d198138e3c601e9a6645f4f1369aff7e0;p=pandora-kernel.git flex_arrays: allow zero length flex arrays Just like kmalloc will allow one to allocate a 0 length segment of memory flex arrays should do the same thing. It should bomb if you try to use something, but it should at least allow the allocation. This is needed because when SELinux switched to using flex_arrays in 2.6.38 the inability to allocate a 0 length array resulted in SELinux policy load returning -ENOSPC when previously it worked. Based-on-patch-by: Steffen Klassert Signed-off-by: Eric Paris Tested-by: Chris Richards Cc: stable@kernel.org [2.6.38+] --- Reading git-diff-tree failed