All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Glitta <glittao@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH -mm] slub: STACKDEPOT: rename save_stack_trace()
Date: Thu, 13 May 2021 11:37:44 +0200	[thread overview]
Message-ID: <CAD=R=qomoJW5jLNPWieKSCU1W=hM2dp2p1TJ-6a_DJhYmNaWQA@mail.gmail.com> (raw)
In-Reply-To: <20210513051920.29320-1-rdunlap@infradead.org>

št 13. 5. 2021 o 7:19 Randy Dunlap <rdunlap@infradead.org> napísal(a):
>
> 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
>
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Oliver Glitta <glittao@gmail.com>

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

> Cc: Oliver Glitta <glittao@gmail.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: linux-mm@kvack.org
> ---
>  mm/slub.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> --- mmotm-2021-0512-2146.orig/mm/slub.c
> +++ mmotm-2021-0512-2146/mm/slub.c
> @@ -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();

  reply	other threads:[~2021-05-13  9:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  5:19 Randy Dunlap
2021-05-13  9:37 ` Oliver Glitta [this message]
2021-05-13  9:37   ` Oliver Glitta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=R=qomoJW5jLNPWieKSCU1W=hM2dp2p1TJ-6a_DJhYmNaWQA@mail.gmail.com' \
    --to=glittao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@infradead.org \
    --subject='Re: [PATCH -mm] slub: STACKDEPOT: rename save_stack_trace()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.