Files
linux-st/include/linux
David Rientjes b62e408c05 flex_array: convert element_nr formals to unsigned
It's problematic to allow signed element_nr's or total's to be passed as
part of the flex array API.

flex_array_alloc() allows total_nr_elements to be set to a negative
quantity, which is obviously erroneous.

flex_array_get() and flex_array_put() allows negative array indices in
dereferencing an array part, which could address memory mapped before
struct flex_array.

The fix is to convert all existing element_nr formals to be qualified as
unsigned.  Existing checks to compare it to total_nr_elements or the max
array size based on element_size need not be changed.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-08-26 20:06:52 -07:00
..
2009-06-18 08:46:47 +10:00
2009-06-30 18:56:00 -07:00
2009-07-12 12:22:34 -07:00
2009-06-30 18:55:58 -07:00
2009-07-29 19:10:35 -07:00
2009-06-22 10:12:35 +01:00
2009-07-12 12:22:34 -07:00
2009-07-12 13:02:10 -07:00
2009-06-22 10:12:30 +01:00
2009-06-22 10:12:35 +01:00
2009-07-08 09:18:05 -07:00
2009-06-24 08:17:04 -04:00
2009-06-30 18:56:00 -07:00
2009-08-24 14:58:23 +10:00
2009-06-18 18:40:18 -04:00
2009-06-30 20:12:24 +02:00
2009-06-18 13:04:05 -07:00
2009-07-12 12:22:34 -07:00
2009-06-29 08:59:10 +10:00
2009-06-18 13:03:57 -07:00
2009-07-31 08:55:48 +02:00
2009-06-18 13:03:56 -07:00
2009-06-22 10:12:35 +01:00
2009-06-23 20:21:39 +01:00
2009-07-30 16:03:45 +09:30
2009-07-28 21:07:09 -04:00
2009-07-08 09:31:56 -07:00
2009-06-18 13:03:57 -07:00
2009-06-17 18:02:11 -07:00
2009-06-17 18:02:11 -07:00
2009-06-17 12:24:34 -07:00
2009-08-12 08:21:39 -07:00
2009-06-17 12:24:34 -07:00
2009-06-17 18:02:11 -07:00
2009-06-29 12:14:51 -07:00
2009-06-30 18:55:59 -07:00
2009-06-18 13:04:04 -07:00
2009-07-29 19:10:36 -07:00
2009-07-12 12:22:34 -07:00
2009-06-24 08:17:06 -04:00
2009-08-18 16:31:13 -07:00
2009-06-24 08:17:06 -04:00
2009-06-23 12:50:05 -07:00
2009-07-06 13:57:03 -07:00
2009-07-12 15:16:39 -07:00