Re: [PATCH] Input: serio - don't sleep on serio_mutex from drvctl_store()

From: kernel test robot

Date: Wed Sep 23 2026 - 19:06:12 EST


Hi Nguyen,

kernel test robot noticed the following build errors:

[auto build test ERROR on dtor-input/next]
[also build test ERROR on dtor-input/for-linus linus/master v7.3-rc4 next-20260922]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Nguyen-Ngoc-Thang/Input-serio-don-t-sleep-on-serio_mutex-from-drvctl_store/20260919-194604
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/20260919124604.210505-1-ngocthang2710.1999%40gmail.com
patch subject: [PATCH] Input: serio - don't sleep on serio_mutex from drvctl_store()
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260924/202609240622.tn7TrVy2-lkp@xxxxxxxxx/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260924/202609240622.tn7TrVy2-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/202609240622.tn7TrVy2-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/input/serio/serio.c:361:38: error: call to undeclared function 'restart_syscall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
361 | scoped_cond_guard(mutex_try, return restart_syscall(), &serio_mutex) {
| ^
1 error generated.


vim +/restart_syscall +361 drivers/input/serio/serio.c

353
354 static ssize_t drvctl_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
355 {
356 struct serio *serio = to_serio_port(dev);
357 struct device_driver *drv;
358 int error;
359
360 /* Port removal holds serio_mutex and drains us: don't wait for it. */
> 361 scoped_cond_guard(mutex_try, return restart_syscall(), &serio_mutex) {
362 if (!strncmp(buf, "none", count)) {
363 serio_disconnect_port(serio);
364 } else if (!strncmp(buf, "reconnect", count)) {
365 serio_reconnect_subtree(serio);
366 } else if (!strncmp(buf, "rescan", count)) {
367 serio_disconnect_port(serio);
368 serio_find_driver(serio);
369 serio_remove_duplicate_events(serio, SERIO_RESCAN_PORT);
370 } else if ((drv = driver_find(buf, &serio_bus)) != NULL) {
371 serio_disconnect_port(serio);
372 error = serio_bind_driver(serio, to_serio_driver(drv));
373 serio_remove_duplicate_events(serio, SERIO_RESCAN_PORT);
374 if (error)
375 return error;
376 } else {
377 return -EINVAL;
378 }
379 }
380
381 return count;
382 }
383

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