From: Scott Wood <scottwood@freescale.com>
To: Alex Zeffertt <ajz@cambridgebroadband.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: local_irq_save not masking interrupts
Date: Tue, 26 Sep 2006 11:52:53 -0500 [thread overview]
Message-ID: <45195AE5.3030100@freescale.com> (raw)
In-Reply-To: <45195882.1090003@cambridgebroadband.com>
Alex Zeffertt wrote:
> It follows from what you are saying that kmalloc(,GFP_KERNEL)
> MUST NOT occur anywhere in the call chain during a critical section.
>
> This must catch others out too. Surely kmalloc/cache_grow should
> return NULL rather than enable interrupts.
The local_irq_enable() is intended to reverse a previous
local_irq_save() done in the allocator (with the assumption that if
GFP_WAIT is specified, the flags saved had IRQs enabled), not to handle
the case where IRQs were disabled by kmalloc's caller. Returning NULL
would mean that slabs can never grow with GFP_KERNEL.
> In fact, shouldn't it be
> a BUG() if kmalloc(,GFP_KERNEL) is called with IRQs disabled?
Yes.
-Scott
next prev parent reply other threads:[~2006-09-26 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-26 10:00 local_irq_save not masking interrupts Alex Zeffertt
2006-09-26 10:19 ` Liu Dave-r63238
2006-09-26 10:28 ` Alex Zeffertt
2006-09-26 16:02 ` Scott Wood
2006-09-26 16:17 ` Alex Zeffertt
2006-09-26 16:27 ` Scott Wood
2006-09-26 16:42 ` Alex Zeffertt
2006-09-26 16:52 ` Scott Wood [this message]
2006-09-27 16:52 ` Esben Nielsen
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=45195AE5.3030100@freescale.com \
--to=scottwood@freescale.com \
--cc=ajz@cambridgebroadband.com \
--cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).