lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202111230705.9SvnLMfU-lkp@intel.com>
Date:   Tue, 23 Nov 2021 07:01:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Xiaoming Ni <nixiaoming@...wei.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Luis Chamberlain <mcgrof@...nel.org>,
        Kees Cook <keescook@...omium.org>
Subject: [mcgrof-next:20211116-sysctl-cleanups-v4 3/35]
 kernel/hung_task.c:69:8: error: 'sysctl_hung_task_timeout_secs' redeclared
 as different kind of symbol

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211116-sysctl-cleanups-v4
head:   5347239461f25fc50aa761923245b9ec4a4aafec
commit: e854631643628749ab037f54ca9c26d69ffabb3e [3/35] hung_task: Move hung_task sysctl interface to hung_task.c
config: x86_64-randconfig-a013-20211116 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=e854631643628749ab037f54ca9c26d69ffabb3e
        git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
        git fetch --no-tags mcgrof-next 20211116-sysctl-cleanups-v4
        git checkout e854631643628749ab037f54ca9c26d69ffabb3e
        # save the attached .config to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> kernel/hung_task.c:69:8: error: 'sysctl_hung_task_timeout_secs' redeclared as different kind of symbol
      69 | enum { sysctl_hung_task_timeout_secs = 0 };
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/hung_task.c:45:29: note: previous definition of 'sysctl_hung_task_timeout_secs' was here
      45 | unsigned long __read_mostly sysctl_hung_task_timeout_secs = CONFIG_DEFAULT_HUNG_TASK_TIMEOUT;
         |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/hung_task.c: In function 'check_hung_task':
>> kernel/hung_task.c:144:7: error: 'sysctl_hung_task_all_cpu_backtrace' undeclared (first use in this function); did you mean 'sysctl_oops_all_cpu_backtrace'?
     144 |   if (sysctl_hung_task_all_cpu_backtrace)
         |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         |       sysctl_oops_all_cpu_backtrace
   kernel/hung_task.c:144:7: note: each undeclared identifier is reported only once for each function it appears in
   kernel/hung_task.c: At top level:
>> kernel/hung_task.c:329:12: error: lvalue required as unary '&' operand
     329 |   .data  = &sysctl_hung_task_timeout_secs,
         |            ^


vim +/sysctl_hung_task_timeout_secs +69 kernel/hung_task.c

    60	
    61	#ifdef CONFIG_SMP
    62	/*
    63	 * Should we dump all CPUs backtraces in a hung task event?
    64	 * Defaults to 0, can be changed via sysctl.
    65	 */
    66	unsigned int __read_mostly sysctl_hung_task_all_cpu_backtrace;
    67	#else
    68	/* Avoid need for ifdefs elsewhere in the code */
  > 69	enum { sysctl_hung_task_timeout_secs = 0 };
    70	#endif /* CONFIG_SMP */
    71	
    72	/*
    73	 * Should we panic (and reboot, if panic_timeout= is set) when a
    74	 * hung task is detected:
    75	 */
    76	unsigned int __read_mostly sysctl_hung_task_panic =
    77					CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE;
    78	
    79	static int
    80	hung_task_panic(struct notifier_block *this, unsigned long event, void *ptr)
    81	{
    82		did_panic = 1;
    83	
    84		return NOTIFY_DONE;
    85	}
    86	
    87	static struct notifier_block panic_block = {
    88		.notifier_call = hung_task_panic,
    89	};
    90	
    91	static void check_hung_task(struct task_struct *t, unsigned long timeout)
    92	{
    93		unsigned long switch_count = t->nvcsw + t->nivcsw;
    94	
    95		/*
    96		 * Ensure the task is not frozen.
    97		 * Also, skip vfork and any other user process that freezer should skip.
    98		 */
    99		if (unlikely(t->flags & (PF_FROZEN | PF_FREEZER_SKIP)))
   100		    return;
   101	
   102		/*
   103		 * When a freshly created task is scheduled once, changes its state to
   104		 * TASK_UNINTERRUPTIBLE without having ever been switched out once, it
   105		 * musn't be checked.
   106		 */
   107		if (unlikely(!switch_count))
   108			return;
   109	
   110		if (switch_count != t->last_switch_count) {
   111			t->last_switch_count = switch_count;
   112			t->last_switch_time = jiffies;
   113			return;
   114		}
   115		if (time_is_after_jiffies(t->last_switch_time + timeout * HZ))
   116			return;
   117	
   118		trace_sched_process_hang(t);
   119	
   120		if (sysctl_hung_task_panic) {
   121			console_verbose();
   122			hung_task_show_lock = true;
   123			hung_task_call_panic = true;
   124		}
   125	
   126		/*
   127		 * Ok, the task did not get scheduled for more than 2 minutes,
   128		 * complain:
   129		 */
   130		if (sysctl_hung_task_warnings) {
   131			if (sysctl_hung_task_warnings > 0)
   132				sysctl_hung_task_warnings--;
   133			pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n",
   134			       t->comm, t->pid, (jiffies - t->last_switch_time) / HZ);
   135			pr_err("      %s %s %.*s\n",
   136				print_tainted(), init_utsname()->release,
   137				(int)strcspn(init_utsname()->version, " "),
   138				init_utsname()->version);
   139			pr_err("\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\""
   140				" disables this message.\n");
   141			sched_show_task(t);
   142			hung_task_show_lock = true;
   143	
 > 144			if (sysctl_hung_task_all_cpu_backtrace)
   145				hung_task_show_all_bt = true;
   146		}
   147	
   148		touch_nmi_watchdog();
   149	}
   150	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (34030 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ