]> Pileus Git - ~andy/linux/commit
uprobes: Uprobe_mmap/munmap needs list_for_each_entry_safe()
authorOleg Nesterov <oleg@redhat.com>
Sun, 29 Jul 2012 18:22:29 +0000 (20:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 30 Jul 2012 09:27:20 +0000 (11:27 +0200)
commit665605a2a207dbe1fa429b474f932d6ea138ba92
treea9f99fcb3972a73066af4591dd3e818b8b14ab27
parent9f92448ceeea5326db7d114005a7e7ac03904edf
uprobes: Uprobe_mmap/munmap needs list_for_each_entry_safe()

The bug was introduced by me in 449d0d7c ("uprobes: Simplify the
usage of uprobe->pending_list").

Yes, we do not care about uprobe->pending_list after return and
nobody can remove the current list entry, but put_uprobe(uprobe)
can actually free it and thus we need list_for_each_safe().

Reported-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Srikar Dronamraju <srikar.vnet.ibm.com>
Cc: Anton Arapov <anton@redhat.com>
Link: http://lkml.kernel.org/r/20120729182229.GA20329@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/uprobes.c