jump_label: Check entries limit in __jump_label_update
authorJiri Olsa <jolsa@redhat.com>
Tue, 10 May 2011 10:43:46 +0000 (12:43 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 25 May 2011 23:56:36 +0000 (19:56 -0400)
commit7cbc5b8d4a775a43875a09e29c49a2a8195b5b2d
treeb172a445ca84bd463abc6006233799e0a5f422b2
parent9905ce8ad7b79dddd23c7b4753d0b2cdb65bde3c
jump_label: Check entries limit in __jump_label_update

When iterating the jump_label entries array (core or modules),
the __jump_label_update function peeks over the last entry.

The reason is that the end of the for loop depends on the key
value of the processed entry. Thus when going through the
last array entry, we will touch the memory behind the array
limit.

This bug probably will never be triggered, since most likely the
memory behind the jump_label entries will be accesable and the
entry->key will be different than the expected value.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Link: http://lkml.kernel.org/r/20110510104346.GC1899@jolsa.brq.redhat.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/jump_label.c