]> Git Repo - linux.git/commitdiff
lib/stackdepot: export save/fetch stack for drivers
authorChris Wilson <[email protected]>
Thu, 10 Nov 2016 18:46:47 +0000 (10:46 -0800)
committerLinus Torvalds <[email protected]>
Fri, 11 Nov 2016 16:12:37 +0000 (08:12 -0800)
Some drivers would like to record stacktraces in order to aide leak
tracing.  As stackdepot already provides a facility for only storing the
unique traces, thereby reducing the memory required, export that
functionality for use by drivers.

The code was originally created for KASAN and moved under lib in commit
cd11016e5f521 ("mm, kasan: stackdepot implementation.  Enable stackdepot
for SLAB") so that it could be shared with mm/.  In turn, we want to
share it now with drivers.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Chris Wilson <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Cc: Alexander Potapenko <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/stackdepot.c

index 4d830e29998937c8c800445815d665f2e683b84c..f87d138e96724a43d219231bb98d6b1a863a0f0a 100644 (file)
@@ -192,6 +192,7 @@ void depot_fetch_stack(depot_stack_handle_t handle, struct stack_trace *trace)
        trace->entries = stack->entries;
        trace->skip = 0;
 }
+EXPORT_SYMBOL_GPL(depot_fetch_stack);
 
 /**
  * depot_save_stack - save stack in a stack depot.
@@ -283,3 +284,4 @@ exit:
 fast_exit:
        return retval;
 }
+EXPORT_SYMBOL_GPL(depot_save_stack);
This page took 0.075631 seconds and 4 git commands to generate.