]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: correct probe disable behaviour for syscalls
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 18 Jan 2016 10:28:30 +0000 (05:28 -0500)
committerNick Alcock <nick.alcock@oracle.com>
Wed, 3 Feb 2016 16:36:30 +0000 (16:36 +0000)
commita4cae615b81bd6691e1856c18f4058a9f7f06178
treea4f820eeddb031471f2d3708a5f02136ee5cc252
parent8ce7d3c7930db5c81ef10f610e2960fa947e8139
dtrace: correct probe disable behaviour for syscalls

Previously, when both entry and return probes were enabled for a
syscall, upon disabling one of them, the function pointer in the
syscall table would already be reset to the default, removing the
interceptor.  This resulted in an inconsistent state when the
2nd probe would get removed, and could cause a nasty race if one
were to try to enable one of the probes in between.

We now only remove the interceptor when we know the last probe
is being disabled.

Orabug: 22352636
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
dtrace/systrace_dev.c