* [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
@ 2012-12-20 15:11 Seiji Aguchi
2012-12-20 19:09 ` Don Zickus
0 siblings, 1 reply; 5+ messages in thread
From: Seiji Aguchi @ 2012-12-20 15:11 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org, Luck, Tony (tony.luck@intel.com),
dzickus@redhat.com
Cc: ccross@android.com, keescook@chromium.org, cbouatmailru@gmail.com,
Satoru Moriya, dle-develop@lists.sourceforge.net
Changelog
v2 -> v3
- Merge modifications of pstore part in 2/2 to 1/2.
- Rename pstore_is_non_blocking_path() to pstore_cannot_block_path().
v1 -> v2
- Erase a logic checking the number of online cpus.
- Create a patchset to fix deadlocking issue in both pstore filesystem and
efi_pstore driver.
- Introduce a function, is_non_blocking_path(), to check if pstore
is in panic and emergency-restart paths (PATCH 1/2)
- Avoid efi_pstore_driver is blocked in non-blocking paths
such as nmi, panic and emergency-restart paths (PATCH 2/2)
[Issue]
There are some paths in kernel which shouldn't be blocked,
like NMI, panic case after stopping cpus, emergency-restart.
On the other hand, current pstore avoids blocking in a NMI path
but it may be blocked in other paths.
Also, an efi_pstore driver may be blocked in all of those paths
because it simply takes a spin lock at writing time.
If they are blocked in those paths, the system will hang up and
it has a big impact for users.
Here is an example scenario which pstore is blocked in panic path.
- cpuA grabs psinfo->buf_lock
- cpuB panics and calls smp_send_stop
- smp_send_stop sends IRQ to cpuA
after 1 second, cpuB gives up on cpuA and sends an NMI instead
- cpuA is now in an NMI handler while still holding buf_lock.
And then, cpuB is deadlocked by taking efi_pstore->lock again.
This case may happen if a firmware has a bug and cpuA is stuck in it.
[Solution]
This patchset avoids that pstore and efi_pstore driver are blocked
in the non-blocking paths like NMI, panic, and emrgency-restart
by introducing a function checking if they are in those paths.
Please see each patch for detailed explanations.
Seiji Aguchi (2):
[PATCH v3 1/2] pstore: Avoid deadlock in panic and emergency-restart path
[PATCH v3 2/2] efi_pstore: Avoid deadlock in non-blocking paths
drivers/firmware/efivars.c | 11 ++++++++++-
fs/pstore/platform.c | 34 ++++++++++++++++++++++++++++------
include/linux/pstore.h | 6 ++++++
3 files changed, 44 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
2012-12-20 15:11 [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths Seiji Aguchi
@ 2012-12-20 19:09 ` Don Zickus
2012-12-21 23:27 ` Seiji Aguchi
0 siblings, 1 reply; 5+ messages in thread
From: Don Zickus @ 2012-12-20 19:09 UTC (permalink / raw)
To: Seiji Aguchi
Cc: linux-kernel@vger.kernel.org, Luck, Tony (tony.luck@intel.com),
ccross@android.com, keescook@chromium.org, cbouatmailru@gmail.com,
Satoru Moriya, dle-develop@lists.sourceforge.net
On Thu, Dec 20, 2012 at 03:11:14PM +0000, Seiji Aguchi wrote:
> Changelog
> v2 -> v3
> - Merge modifications of pstore part in 2/2 to 1/2.
> - Rename pstore_is_non_blocking_path() to pstore_cannot_block_path().
>
> v1 -> v2
> - Erase a logic checking the number of online cpus.
> - Create a patchset to fix deadlocking issue in both pstore filesystem and
> efi_pstore driver.
> - Introduce a function, is_non_blocking_path(), to check if pstore
> is in panic and emergency-restart paths (PATCH 1/2)
> - Avoid efi_pstore_driver is blocked in non-blocking paths
> such as nmi, panic and emergency-restart paths (PATCH 2/2)
>
> [Issue]
>
> There are some paths in kernel which shouldn't be blocked,
> like NMI, panic case after stopping cpus, emergency-restart.
I am ok with it.
Acked-by: Don Zickus <dzickus@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
2012-12-20 19:09 ` Don Zickus
@ 2012-12-21 23:27 ` Seiji Aguchi
2012-12-21 23:37 ` Anton Vorontsov
0 siblings, 1 reply; 5+ messages in thread
From: Seiji Aguchi @ 2012-12-21 23:27 UTC (permalink / raw)
To: Luck, Tony (tony.luck@intel.com)
Cc: linux-kernel@vger.kernel.org, ccross@android.com,
keescook@chromium.org, cbouatmailru@gmail.com, Satoru Moriya,
dle-develop@lists.sourceforge.net, dzickus@redhat.com
Tony,
Could you please apply this patchset to your tree?
Seiji
> -----Original Message-----
> From: Don Zickus [mailto:dzickus@redhat.com]
> Sent: Thursday, December 20, 2012 2:09 PM
> To: Seiji Aguchi
> Cc: linux-kernel@vger.kernel.org; Luck, Tony (tony.luck@intel.com); ccross@android.com; keescook@chromium.org;
> cbouatmailru@gmail.com; Satoru Moriya; dle-develop@lists.sourceforge.net
> Subject: Re: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
>
> On Thu, Dec 20, 2012 at 03:11:14PM +0000, Seiji Aguchi wrote:
> > Changelog
> > v2 -> v3
> > - Merge modifications of pstore part in 2/2 to 1/2.
> > - Rename pstore_is_non_blocking_path() to pstore_cannot_block_path().
> >
> > v1 -> v2
> > - Erase a logic checking the number of online cpus.
> > - Create a patchset to fix deadlocking issue in both pstore filesystem and
> > efi_pstore driver.
> > - Introduce a function, is_non_blocking_path(), to check if pstore
> > is in panic and emergency-restart paths (PATCH 1/2)
> > - Avoid efi_pstore_driver is blocked in non-blocking paths
> > such as nmi, panic and emergency-restart paths (PATCH 2/2)
> >
> > [Issue]
> >
> > There are some paths in kernel which shouldn't be blocked, like NMI,
> > panic case after stopping cpus, emergency-restart.
>
> I am ok with it.
>
> Acked-by: Don Zickus <dzickus@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
2012-12-21 23:27 ` Seiji Aguchi
@ 2012-12-21 23:37 ` Anton Vorontsov
2013-01-05 0:01 ` Seiji Aguchi
0 siblings, 1 reply; 5+ messages in thread
From: Anton Vorontsov @ 2012-12-21 23:37 UTC (permalink / raw)
To: Seiji Aguchi
Cc: Luck, Tony (tony.luck@intel.com), linux-kernel@vger.kernel.org,
ccross@android.com, keescook@chromium.org, Satoru Moriya,
dle-develop@lists.sourceforge.net, dzickus@redhat.com
On Fri, Dec 21, 2012 at 11:27:00PM +0000, Seiji Aguchi wrote:
> Tony,
>
> Could you please apply this patchset to your tree?
Actually, I'd prefer to take both patches via pstore tree. The EFI part is
isolated and small, so even if it conflicts, it would be easy to resolve,
unlike to pstore core part.
So, would be great if Tony could give an Ack for EFI part and we'd merge
this via pstore tree.
Thanks,
Anton
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
2012-12-21 23:37 ` Anton Vorontsov
@ 2013-01-05 0:01 ` Seiji Aguchi
0 siblings, 0 replies; 5+ messages in thread
From: Seiji Aguchi @ 2013-01-05 0:01 UTC (permalink / raw)
To: Luck, Tony (tony.luck@intel.com)
Cc: linux-kernel@vger.kernel.org, ccross@android.com,
keescook@chromium.org, Satoru Moriya,
dle-develop@lists.sourceforge.net, dzickus@redhat.com,
anton.vorontsov@linaro.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1062 bytes --]
Tony,
Can you review this patchset?
Seiji
> -----Original Message-----
> From: Anton Vorontsov [mailto:cbouatmailru@gmail.com]
> Sent: Friday, December 21, 2012 6:37 PM
> To: Seiji Aguchi
> Cc: Luck, Tony (tony.luck@intel.com); linux-kernel@vger.kernel.org; ccross@android.com; keescook@chromium.org; Satoru Moriya;
> dle-develop@lists.sourceforge.net; dzickus@redhat.com
> Subject: Re: [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths
>
> On Fri, Dec 21, 2012 at 11:27:00PM +0000, Seiji Aguchi wrote:
> > Tony,
> >
> > Could you please apply this patchset to your tree?
>
> Actually, I'd prefer to take both patches via pstore tree. The EFI part is isolated and small, so even if it conflicts, it would be easy to
> resolve, unlike to pstore core part.
>
> So, would be great if Tony could give an Ack for EFI part and we'd merge this via pstore tree.
>
> Thanks,
> Anton
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-05 0:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20 15:11 [PATCH v3 0/2] pstore,efi_pstore: Avoid deadlock in non-blocking paths Seiji Aguchi
2012-12-20 19:09 ` Don Zickus
2012-12-21 23:27 ` Seiji Aguchi
2012-12-21 23:37 ` Anton Vorontsov
2013-01-05 0:01 ` Seiji Aguchi
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).