Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243148

Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI

From Nikolay Borisov <kernel@kyup.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI
Date 2015-10-09 11:00 +0200
Message-ID <qhBGW-5Da-1@gated-at.bofh.it> (permalink)
References <qhlsv-7EU-39@gated-at.bofh.it> <qhBGW-5Da-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-08 17:40 +0200
  [RFC PATCH 2/2] fs: Disable interrupts after acquiring bit_spin_lock Nikolay Borisov <kernel@kyup.com> - 2015-10-08 17:40 +0200
  Re: [RFC PATCH 1/2] ext4: Fix possible deadlock with local interrupts  disabled and page-draining IPI Nikolay Borisov <kernel@kyup.com> - 2015-10-09 11:00 +0200

csiph-web