]> git.baikalelectronics.ru Git - kernel.git/commit
uprobes: Change unregister/apply to WARN() if uprobe/consumer is gone
authorOleg Nesterov <oleg@redhat.com>
Fri, 27 Jun 2014 17:01:40 +0000 (19:01 +0200)
committerSteven Rostedt <rostedt@goodmis.org>
Mon, 30 Jun 2014 17:22:15 +0000 (13:22 -0400)
commit21cde7494d9836224c9b4abc8f2052f95cbde1c1
tree568f93a984be6f8b1524e4883130aee38fe6692e
parent2ff0c496e922ddd0ab903c44e439504c4ecc6b5a
uprobes: Change unregister/apply to WARN() if uprobe/consumer is gone

Add WARN_ON's into uprobe_unregister() and uprobe_apply() to ensure
that nobody tries to play with the dead uprobe/consumer. This helps
to catch the bugs like the one fixed by the previous patch.

In the longer term we should fix this poorly designed interface.
uprobe_register() should return "struct uprobe *" which should be
passed to apply/unregister. Plus other semantic changes, see the
changelog in commit 9e119f95a939.

Link: http://lkml.kernel.org/p/20140627170140.GA18322@redhat.com
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/events/uprobes.c