From: pkluba@dension.com (Patrik, Kluba)
To: linux-arm-kernel@lists.infradead.org
Subject: Fw: [PATCH 01/01] arm: fix a preempt_count() corruption for CONFIG_PREEMPT=n
Date: Sat, 15 Dec 2012 08:51:29 +0100 [thread overview]
Message-ID: <20121215085129.71d203b2.pkluba@dension.com> (raw)
Hi All,
Maybe this list is a better place for the following request.
I've checked, and this bug is also present in the linux-next tree.
Regards,
Patrik
Begin forwarded message:
Date: Fri, 14 Dec 2012 15:13:57 +0100
From: "Patrik, Kluba" <pkluba@dension.com>
To: linux-kernel at vger.kernel.org
Subject: [PATCH 01/01] arm: fix a preempt_count() corruption for
CONFIG_PREEMPT=n
Hi All,
After a hard days' work, I've managed to track down a ghost causing
sporadic kernel warnings and system crashes. The patch applies for the
HEAD of linux-stable. I don't know how to create and submit patches
correctly, and hope that somebody will pick it up...
Regards,
Patrik
---
>From 4dd31e88a2715389e5ac198dcf00b48b4f148ea6 Mon Sep 17 00:00:00 2001
From: Patrik Kluba <pkluba@dension.com>
Date: Fri, 14 Dec 2012 14:36:27 +0100
Subject: [PATCH] arm: fix a preempt_count() corruption for
CONFIG_PREEMPT=n
All the preempt-disabling assembly code is under CONFIG_PREEMPT,
while VFP_bounce calls preempt_enable() uncoditionally, leading to
a preempt_count() corruption (gets set to 0xffffffff). Fix the
imbalance by adding #ifdef CONFIG_PREEMPT before preempt_enable().
---
arch/arm/vfp/vfpmodule.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 3b44e0d..2184f7e 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -428,7 +428,10 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct
pt_regs *regs) if (exceptions)
vfp_raise_exceptions(exceptions, trigger, orig_fpscr,
regs); exit:
+#ifdef CONFIG_PREEMPT
preempt_enable();
+#endif
+ return;
}
static void vfp_enable(void *unused)
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2012-12-15 7:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-15 7:51 Patrik, Kluba [this message]
2012-12-18 23:54 ` Fw: [PATCH 01/01] arm: fix a preempt_count() corruption for CONFIG_PREEMPT=n Stephen Boyd
2012-12-19 0:01 ` Russell King - ARM Linux
2013-01-03 0:41 ` Stephen Boyd
2013-01-04 7:48 ` Patrik, Kluba
2013-01-04 22:21 ` Stephen Boyd
2013-01-08 11:51 ` Patrik, Kluba
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=20121215085129.71d203b2.pkluba@dension.com \
--to=pkluba@dension.com \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.