Skip to contentSkip to conversation

slub: STACKDEPOT: rename save_stack_trace()

PATCH Applied Randy Dunlap 2 participants 2 messages May 13, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slub: STACKDEPOT: rename save_stack_trace()

save_stack_trace() already exists, so change the one in CONFIG_STACKDEPOT to be save_stack_depot_trace().

Fixes this build error:

../mm/slub.c:607:29: error: conflicting types for ‘save_stack_trace’
static depot_stack_handle_t save_stack_trace(gfp_t flags)

                             ^~~~~~~~~~~~~~~~
In file included from ../include/linux/page_ext.h:6:0,
                 from ../include/linux/mm.h:25,
                 from ../mm/slub.c:13:
../include/linux/stacktrace.h:86:13: note: previous declaration of ‘save_stack_trace’ was here
 extern void save_stack_trace(struct stack_trace *trace);
             ^~~~~~~~~~~~~~~~

from this patch in mmotm:
Subject: mm/slub: use stackdepot to save stack trace in objects

---
 mm/slub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/slub.c +2 -2
@@ -604,7 +604,7 @@ static struct track *get_track(struct km
 }
 
 #ifdef CONFIG_STACKDEPOT
-static depot_stack_handle_t save_stack_trace(gfp_t flags)
+static depot_stack_handle_t save_stack_depot_trace(gfp_t flags)
 {
 	unsigned long entries[TRACK_ADDRS_COUNT];
 	depot_stack_handle_t handle;
@@ -623,7 +623,7 @@ static void set_track(struct kmem_cache
 
 	if (addr) {
 #ifdef CONFIG_STACKDEPOT
-		p->handle = save_stack_trace(GFP_KERNEL);
+		p->handle = save_stack_depot_trace(GFP_KERNEL);
 #endif
 		p->addr = addr;
 		p->cpu = smp_processor_id();
Acked-by on v1 1/1
#1 lore raw

št 13. 5. 2021 o 7:19 Randy Dunlap <[email protected]> napísal(a):

Quoted 16 lines

save_stack_trace() already exists, so change the one in CONFIG_STACKDEPOT to be save_stack_depot_trace().

Fixes this build error:

../mm/slub.c:607:29: error: conflicting types for ‘save_stack_trace’
static depot_stack_handle_t save_stack_trace(gfp_t flags)

                             ^~~~~~~~~~~~~~~~
In file included from ../include/linux/page_ext.h:6:0,
                 from ../include/linux/mm.h:25,
                 from ../mm/slub.c:13:
../include/linux/stacktrace.h:86:13: note: previous declaration of ‘save_stack_trace’ was here
 extern void save_stack_trace(struct stack_trace *trace);
             ^~~~~~~~~~~~~~~~
Quoted 5 lines

from this patch in mmotm:
Subject: mm/slub: use stackdepot to save stack trace in objects

I run it with CONFIG_ARCH_STACKWALK set on, so it didn't show this error. Thank you for your fix.

Quoted 27 lines
Cc Oliver Glitta <[email protected]>
Cc Andrew Morton <[email protected]>
---
 mm/slub.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/slub.c +2 -2
@@ -604,7 +604,7 @@ static struct track *get_track(struct km
 }
 
 #ifdef CONFIG_STACKDEPOT
-static depot_stack_handle_t save_stack_trace(gfp_t flags)
+static depot_stack_handle_t save_stack_depot_trace(gfp_t flags)
 {
        unsigned long entries[TRACK_ADDRS_COUNT];
        depot_stack_handle_t handle;
@@ -623,7 +623,7 @@ static void set_track(struct kmem_cache
 
        if (addr) {
 #ifdef CONFIG_STACKDEPOT
-               p->handle = save_stack_trace(GFP_KERNEL);
+               p->handle = save_stack_depot_trace(GFP_KERNEL);
 #endif
                p->addr = addr;
                p->cpu = smp_processor_id();