OSDN Git Service

UPSTREAM: lib/stackdepot: export save/fetch stack for drivers
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 10 Nov 2016 18:46:47 +0000 (10:46 -0800)
committerPaul Lawrence <paullawrence@google.com>
Thu, 14 Dec 2017 16:22:26 +0000 (08:22 -0800)
commitb8bff7a41314f518c21df0995577b41c9c0ec9ec
treeb2785a4ebb0efe9c04990748dec4b9798f4f3b2d
parentd390896bf9ee0b14582d891e5b615852bad430df
UPSTREAM: lib/stackdepot: export save/fetch stack for drivers

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/20161108133209.22704-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 64145065
(cherry-picked from ae65a21fb851f09bf6341761d884fb86b644b75a)
Change-Id: I3bf7ab5c6526c1ac895ac98d2d37cc26ea05bbde
Signed-off-by: Paul Lawrence <paullawrence@google.com>
lib/stackdepot.c