linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Gavin Guo <tuffkidtt@gmail.com>
To: linux-mm@kvack.org, penberg@kernel.org, cl@linux.com, mpm@selenic.com
Subject: [Question] Crash of kmem_cache_cpu->freelist access
Date: Sun, 14 Dec 2014 00:06:07 +0800	[thread overview]
Message-ID: <CAAh6nknX5=8ucX_ObxB+_Dy9NCmTgNH1QRhQFKxJ+pgbDsRRaw@mail.gmail.com> (raw)

Hi all,

I'm currently debugging a bug and found out the problem is the general
protection fault of the following access:

static inline void *get_freepointer(struct kmem_cache *s, void *object)
{
        return *(void **)(object + s->offset);
}

I tried to disassembly and found that the object is from c->freelist
and it has an abnormal value which caused the fault. My first thought
is to try to add slub_debug in the kernel command line. But, the
kernel is a production kernel and may not have the chance to add
kernel parameters. The other way is to "echo 1 >
/sys/kernel/slab/<object name>/poison." But, I found the allocation is
bound to kmalloc-1024. So, it may not have a chance to enable the
sysfs poison debugging.

I tried to debug for a long time and can't find any clue. Is there
anyone has efficient debugging methods to deal with the c->freelist
crashing if the slub_debug doesn't have a chance to be added to kernel
parameters.

Really thanks for your time reading the mail.

Thanks,
Tuffkid

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-12-13 16:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-13 16:06 Gavin Guo [this message]
2014-12-15 14:14 ` Christoph Lameter

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='CAAh6nknX5=8ucX_ObxB+_Dy9NCmTgNH1QRhQFKxJ+pgbDsRRaw@mail.gmail.com' \
    --to=tuffkidtt@gmail.com \
    --cc=cl@linux.com \
    --cc=linux-mm@kvack.org \
    --cc=mpm@selenic.com \
    --cc=penberg@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox