From: Philippe Gerum <rpm@xenomai.org>
To: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>, xenomai@xenomai.org
Subject: Re: [Xenomai] Hit BUG() in arch/arm/mm/pgd.c
Date: Wed, 01 Apr 2015 16:20:34 +0200 [thread overview]
Message-ID: <551BFEB2.1000009@xenomai.org> (raw)
In-Reply-To: <20150401135910.GO29558@csclub.uwaterloo.ca>
On 04/01/2015 03:59 PM, Lennart Sorensen wrote:
> We are seeing occational hits on a BUG() statement in pgd.c:
>
> static inline void pgd_holder_free(pgd_t *pgd)
> {
> struct rb_node *node = pgd_table.rb_node;
> struct pgd_holder *p;
> unsigned long flags;
>
> pgd_table_lock(flags);
>
> while (node) {
> p = rb_entry(node, struct pgd_holder, rb);
> if ((unsigned long)pgd < (unsigned long)p->pgd)
> node = node->rb_left;
> else if ((unsigned long)pgd > (unsigned long)p->pgd)
> node = node->rb_right;
> else {
> rb_erase(node, &pgd_table);
> pgd_table_unlock(flags);
> kfree(p);
> return;
> }
> }
>
> pgd_table_unlock(flags);
>
> BUG(); <- this one
> }
>
> Any idea how that could be happening?
>
That is a sanity check covering an unexpected situation, when a page
table directory to be freed is not found in the map of active PGDs as
tracked by the pipeline. Could you try the following change?
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
index a4aafb5..672e811 100644
--- a/arch/arm/mm/pgd.c
+++ b/arch/arm/mm/pgd.c
@@ -299,8 +299,8 @@ no_pmd:
no_pud:
pgd_clear(pgd);
pud_free(mm, pud);
-no_pgd:
pgd_holder_free(pgd);
+no_pgd:
#ifdef CONFIG_ARM_LPAE
/*
--
Philippe.
next prev parent reply other threads:[~2015-04-01 14:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 13:59 [Xenomai] Hit BUG() in arch/arm/mm/pgd.c Lennart Sorensen
2015-04-01 14:04 ` Gilles Chanteperdrix
2015-04-01 14:16 ` Lennart Sorensen
2015-04-01 14:20 ` Philippe Gerum [this message]
2015-04-01 14:47 ` Lennart Sorensen
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=551BFEB2.1000009@xenomai.org \
--to=rpm@xenomai.org \
--cc=lsorense@csclub.uwaterloo.ca \
--cc=xenomai@xenomai.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 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.