From: Nikolay Borisov <kernel@kyup.com>
To: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: mm@1h.com, linux-fsdevel@vger.kernel.org,
viro@zeniv.linux.org.uk, adilger.kernel@dilger.ca,
linux-kernel@vger.kernel.org, operations@siteground.com,
tytso@mit.edu
Subject: Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI
Date: Fri, 9 Oct 2015 11:50:11 +0300 [thread overview]
Message-ID: <56177FC3.4050506@kyup.com> (raw)
In-Reply-To: <CAOtvUMcrhq3epOPCEciMGq53S6rTyURAKEWhQ=NwrkF95aJ+_Q@mail.gmail.com>
On 10/09/2015 11:41 AM, Gilad Ben-Yossef wrote:
> On Oct 8, 2015 18:31, "Nikolay Borisov" <kernel@kyup.com> wrote:
>>
>> Currently when bios are being finished in ext4_finish_bio this is done by
>> first disabling interrupts and then acquiring a bit_spin_lock.
> ...
>>
>> To fix the situation this patch changes the order in which the
>> bit_spin_lock and interrupts disabling occcurs. The exepected
>> effect is that even if a core is spinning on the bitlock it will
>> have its interrupts enabled, thus being able to respond to IPIs.
>
> Are you sure this spin lock is never taken from interrupt context?
Good point.
I think indeed this fix is wrong as this lock is actually taken from
soft irq context as evident from this thread, which prompted me to write
the patch in the first place:
http://permalink.gmane.org/gmane.linux.kernel/2056730
> If it does an interrupt occurring after the lock is taken and before
> interrupts are disabled can deadlock .
>
> Gilad
>
next prev parent reply other threads:[~2015-10-09 8:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-08 15:31 [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI Nikolay Borisov
2015-10-08 15:31 ` [RFC PATCH 2/2] fs: Disable interrupts after acquiring bit_spin_lock Nikolay Borisov
[not found] ` <CAOtvUMcrhq3epOPCEciMGq53S6rTyURAKEWhQ=NwrkF95aJ+_Q@mail.gmail.com>
2015-10-09 8:50 ` Nikolay Borisov [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-10-09 7:19 [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI Hillf Danton
2015-10-09 7:26 ` Nikolay Borisov
2015-10-09 7:37 ` Hillf Danton
2015-10-09 8:03 ` Nikolay Borisov
2015-10-12 13:40 ` Jan Kara
2015-10-12 14:51 ` Nikolay Borisov
2015-10-13 8:15 ` Jan Kara
2015-10-13 10:37 ` Nikolay Borisov
2015-10-13 13:14 ` Jan Kara
2015-10-14 9:02 ` Nikolay Borisov
2015-10-16 8:08 ` Nikolay Borisov
2015-10-16 12:51 ` Jan Kara
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=56177FC3.4050506@kyup.com \
--to=kernel@kyup.com \
--cc=adilger.kernel@dilger.ca \
--cc=gilad@benyossef.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm@1h.com \
--cc=operations@siteground.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/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).