From: Sasha Levin <sasha.levin@oracle.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86-64, espfix: consider IRQs are off when initializing
Date: Thu, 17 Jul 2014 11:58:42 -0400 [thread overview]
Message-ID: <53C7F2B2.2000803@oracle.com> (raw)
In-Reply-To: <53C7F063.7030007@zytor.com>
On 07/17/2014 11:48 AM, H. Peter Anvin wrote:
> On 07/17/2014 08:13 AM, Sasha Levin wrote:
>> > When going through our initialization code (init_espfix_ap() ) we need to
>> > keep in mind IRQs are off, and we need to handle it appropriately:
>> >
>> > - Do not allocate with __GFP_FS.
>> > - No point in using a mutex.
>> >
>> > Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
> I don't think this is safe. The whole point was that if we do
> GFP_ATOMIC we have to accept failure, and if we have a spin lock then
> sleeping is not permitted. It is unclear to me is sleeping is safe in
> this context even so, so we may still have a problem, but calling
> __get_free_page(GFP_ATOMIC) and then unconditionally use the results is
> not right.
This is the result of getting an error message for allocating with GFP_KERNEL
saying that we can't do that with IRQs off.
My assumption after that was that we're not going to be sleeping at all, which
is why spinlock/GFP_ATOMIC would be correct here.
Thanks,
Sasha
next prev parent reply other threads:[~2014-07-17 15:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-17 15:13 [PATCH] x86-64, espfix: consider IRQs are off when initializing Sasha Levin
2014-07-17 15:48 ` H. Peter Anvin
2014-07-17 15:58 ` Sasha Levin [this message]
2014-07-17 16:16 ` H. Peter Anvin
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=53C7F2B2.2000803@oracle.com \
--to=sasha.levin@oracle.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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