From: schwidefsky@de.ibm.com
To: Linus Torvalds <torvalds@transmeta.com>
Cc: mingo@chiara.elte.hu, linux-kernel@vger.kernel.org
Subject: Re: Memory management bug
Date: Thu, 16 Nov 2000 17:12:27 +0100 [thread overview]
Message-ID: <C1256999.005B8F06.00@d12mta07.de.ibm.com> (raw)
>What happens if you just replace all places that would use a bad page
>table with a BUG()? (Ie do _not_ add the bug to the place where you
>added the test: by that time it's too late. I'm talking about the
>places where the bad page tables are used, like in the error cases of
>"get_pte_kernel_slow()" etc.
Ok, the BUG() hit in get_pmd_slow:
pmd_t *
get_pmd_slow(pgd_t *pgd, unsigned long offset)
{
pmd_t *pmd;
int i;
pmd = (pmd_t *) __get_free_pages(GFP_KERNEL,2);
if (pgd_none(*pgd)) {
if (pmd) {
for (i = 0; i < PTRS_PER_PMD; i++)
pmd_clear(pmd+i);
pgd_set(pgd, pmd);
return pmd + offset;
}
BUG(); /* <--- this one hit */
pmd = (pmd_t *) get_bad_pmd_table();
pgd_set(pgd, pmd);
return NULL;
}
free_pages((unsigned long)pmd,2);
if (pgd_bad(*pgd))
BUG();
return (pmd_t *) pgd_page(*pgd) + offset;
}
The allocation of 4 consecutive pages for the page middle directory failed.
This caused empty_bad_pmd_table to be used and clear_page_tables inserted
it to the pmd quicklist. The important question is: why did
__get_free_pages fail?
blue skies,
Martin
Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-11-16 17:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-16 16:12 schwidefsky [this message]
2000-11-16 17:01 ` Memory management bug Linus Torvalds
2000-11-16 17:45 ` Andrea Arcangeli
2000-11-16 18:07 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2000-11-21 19:55 schwidefsky
2000-11-17 16:35 schwidefsky
2000-11-17 16:42 ` Linus Torvalds
2000-11-17 18:11 ` Andrea Arcangeli
2000-11-17 19:15 ` Rik van Riel
2000-11-17 10:41 schwidefsky
2000-11-17 15:44 ` Andrea Arcangeli
2000-11-17 19:12 ` Rik van Riel
2000-11-15 13:24 schwidefsky
2000-11-15 12:39 schwidefsky
2000-11-15 13:19 ` Andi Kleen
2000-11-15 16:45 ` Linus Torvalds
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=C1256999.005B8F06.00@d12mta07.de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@chiara.elte.hu \
--cc=torvalds@transmeta.com \
/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