mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-09-21 12:10:52 +00:00
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>
This commit is contained in:
parent
1b23972213
commit
a997718e25
|
@ -642,7 +642,7 @@ static void do_signal(struct pt_regs *regs, int syscall)
|
|||
}
|
||||
}
|
||||
|
||||
if (try_to_freeze())
|
||||
if (try_to_freeze_nowarn())
|
||||
goto no_signal;
|
||||
|
||||
/*
|
||||
|
|
|
@ -41,6 +41,17 @@ extern int freeze_kernel_threads(void);
|
|||
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)
|
||||
{
|
||||
might_sleep();
|
||||
|
|
|
@ -2211,7 +2211,7 @@ relock:
|
|||
* Now that we woke up, it's crucial if we're supposed to be
|
||||
* frozen that we freeze now before running anything substantial.
|
||||
*/
|
||||
try_to_freeze();
|
||||
try_to_freeze_nowarn();
|
||||
|
||||
spin_lock_irq(&sighand->siglock);
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue