Re: [PATCH 2/2] tty: sysrq: Use printk_loud_console context on __handle_sysrq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcos,

kernel test robot noticed the following build errors:

[auto build test ERROR on 1d227fcc72223cbdd34d0ce13541cbaab5e0d72f]

url:    https://github.com/intel-lab-lkp/linux/commits/Marcos-Paulo-de-Souza/printk-Introduce-LOUD_CON-flag/20241017-010521
base:   1d227fcc72223cbdd34d0ce13541cbaab5e0d72f
patch link:    https://lore.kernel.org/r/20241016-printk-loud-con-v1-2-065e4dad6632%40suse.com
patch subject: [PATCH 2/2] tty: sysrq: Use printk_loud_console context on __handle_sysrq
config: x86_64-buildonly-randconfig-004-20241018 (https://download.01.org/0day-ci/archive/20241018/202410181116.WA27FpBB-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241018/202410181116.WA27FpBB-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410181116.WA27FpBB-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/tty/sysrq.c: In function '__handle_sysrq':
>> drivers/tty/sysrq.c:600:9: error: implicit declaration of function 'printk_loud_console_enter' [-Werror=implicit-function-declaration]
     600 |         printk_loud_console_enter();
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/sysrq.c:610:25: error: implicit declaration of function 'printk_loud_console_exit' [-Werror=implicit-function-declaration]
     610 |                         printk_loud_console_exit();
         |                         ^~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/printk_loud_console_enter +600 drivers/tty/sysrq.c

   582	
   583	void __handle_sysrq(u8 key, bool check_mask)
   584	{
   585		const struct sysrq_key_op *op_p;
   586		int orig_suppress_printk;
   587		int i;
   588	
   589		orig_suppress_printk = suppress_printk;
   590		suppress_printk = 0;
   591	
   592		rcu_sysrq_start();
   593		rcu_read_lock();
   594		/*
   595		 * Enter in the console_loud context so that sysrq header is shown to
   596		 * provide the user with positive feedback.  We do not simply emit this
   597		 * at KERN_EMERG as that would change message routing in the consumers
   598		 * of /proc/kmsg.
   599		 */
 > 600		printk_loud_console_enter();
   601	
   602		op_p = __sysrq_get_key_op(key);
   603		if (op_p) {
   604			/*
   605			 * Should we check for enabled operations (/proc/sysrq-trigger
   606			 * should not) and is the invoked operation enabled?
   607			 */
   608			if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
   609				pr_info("%s\n", op_p->action_msg);
 > 610				printk_loud_console_exit();
   611				op_p->handler(key);
   612			} else {
   613				pr_info("This sysrq operation is disabled.\n");
   614				printk_loud_console_exit();
   615			}
   616		} else {
   617			pr_info("HELP : ");
   618			/* Only print the help msg once per handler */
   619			for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) {
   620				if (sysrq_key_table[i]) {
   621					int j;
   622	
   623					for (j = 0; sysrq_key_table[i] !=
   624							sysrq_key_table[j]; j++)
   625						;
   626					if (j != i)
   627						continue;
   628					pr_cont("%s ", sysrq_key_table[i]->help_msg);
   629				}
   630			}
   631			pr_cont("\n");
   632			printk_loud_console_exit();
   633		}
   634		rcu_read_unlock();
   635		rcu_sysrq_end();
   636	
   637		suppress_printk = orig_suppress_printk;
   638	}
   639	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux