#include <linux/mm.h>
#include <linux/cpu.h>
#include <linux/nmi.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <linux/kthread.h>
#include <linux/lockdep.h>
#include <linux/export.h>
#include <linux/panic_notifier.h>
#include <linux/sysctl.h>
#include <linux/suspend.h>
#include <linux/utsname.h>
#include <linux/sched/signal.h>
#include <linux/sched/debug.h>
#include <linux/sched/sysctl.h>
#include <trace/events/sched.h>
static int __read_mostly sysctl_hung_task_check_count = …;
#define HUNG_TASK_LOCK_BREAK …
unsigned long __read_mostly sysctl_hung_task_timeout_secs = …;
EXPORT_SYMBOL_GPL(…);
static unsigned long __read_mostly sysctl_hung_task_check_interval_secs;
static int __read_mostly sysctl_hung_task_warnings = …;
static int __read_mostly did_panic;
static bool hung_task_show_lock;
static bool hung_task_call_panic;
static bool hung_task_show_all_bt;
static struct task_struct *watchdog_task;
#ifdef CONFIG_SMP
static unsigned int __read_mostly sysctl_hung_task_all_cpu_backtrace;
#else
#define sysctl_hung_task_all_cpu_backtrace …
#endif
static unsigned int __read_mostly sysctl_hung_task_panic = …
IS_ENABLED(…);
static int
hung_task_panic(struct notifier_block *this, unsigned long event, void *ptr)
{ … }
static struct notifier_block panic_block = …;
static void check_hung_task(struct task_struct *t, unsigned long timeout)
{ … }
static bool rcu_lock_break(struct task_struct *g, struct task_struct *t)
{ … }
static void check_hung_uninterruptible_tasks(unsigned long timeout)
{ … }
static long hung_timeout_jiffies(unsigned long last_checked,
unsigned long timeout)
{ … }
#ifdef CONFIG_SYSCTL
static int proc_dohung_task_timeout_secs(const struct ctl_table *table, int write,
void *buffer,
size_t *lenp, loff_t *ppos)
{ … }
static const unsigned long hung_task_timeout_max = …;
static struct ctl_table hung_task_sysctls[] = …;
static void __init hung_task_sysctl_init(void)
{ … }
#else
#define hung_task_sysctl_init …
#endif
static atomic_t reset_hung_task = …;
void reset_hung_task_detector(void)
{ … }
EXPORT_SYMBOL_GPL(…);
static bool hung_detector_suspended;
static int hungtask_pm_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{ … }
static int watchdog(void *dummy)
{ … }
static int __init hung_task_init(void)
{ … }
subsys_initcall(hung_task_init);