]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: ensure pdata and sdt_tab handling works on module reload
authorKris Van Hees <kris.van.hees@oracle.com>
Mon, 23 May 2016 17:38:49 +0000 (10:38 -0700)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 23 May 2016 21:52:40 +0000 (22:52 +0100)
commit269477c2cf31a50cd7bdd0e8948e2e2413796fee
tree56269a89654f97ae4ceedede2628ccf33cc78cf8
parenta589ebafb3b6913d56830464310c713bb29a79e5
dtrace: ensure pdata and sdt_tab handling works on module reload

The handling of the sdt_tab member in pdata caused crashes when the sdt
module was unloaded and then reloaded.  This member holds the trampolines
for SDT probe points in kernel modules, and is allocated when a module is
loaded and resides in modules-only address space).  This memory block was
incorrectly free'd from the sdt module code when sdt was unloaded.

This commit also adds verification that the anticipated trampoline max
size as used in the kernel is sufficient for what the sdt module needs.

This commit also adds verification (at runtime, with an assert) that the
reserved allocation to hold the pdata for a module is of a sufficient
size.

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