HACK: ARM: disable sleeping while atomic warning in do_signal

ARM disables interrupts in do_signal, which triggers a warning in
try_to_freeze, see details at https://lkml.org/lkml/2011/8/23/221.
To prevent the warnings, add try_to_freeze_nowarn and call it from
do_signal.

Change-Id: If7482de21c386adc705fa1ac4ecb8c7ece5bb356
Signed-off-by: Colin Cross <ccross@android.com>
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 80e7fae..fa35433 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -41,6 +41,17 @@
 extern void thaw_processes(void);
 extern void thaw_kernel_threads(void);
 
+/*
+ * HACK: prevent sleeping while atomic warnings due to ARM signal handling
+ * disabling irqs
+ */
+static inline bool try_to_freeze_nowarn(void)
+{
+	if (likely(!freezing(current)))
+		return false;
+	return __refrigerator(false);
+}
+
 static inline bool try_to_freeze(void)
 {
 /* This causes problems for ARM targets and is a known