Greeting,
FYI, we noticed the following commit (built with clang-15):
commit: b8de35843b16acbba3087ed8da75172f978e12a7 ("serial: 8250: implement write_atomic")
https://git.kernel.org/cgit/linux/kernel/git/rt/linux-rt-devel.git linux-5.19.y-rt-rebase
in testcase: boot
on test machine: qemu-system-i386 -enable-kvm -cpu SandyBridge -smp 2 -m 4G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>
[ 3.286566][ T1] BUG: sleeping function called from invalid context at kernel/async.c:274
[ 3.286567][ T1] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 1, name: swapper
[ 3.286568][ T1] preempt_count: 0, expected: 0
[ 3.286569][ T1] 3 locks held by swapper/1:
[ 3.286570][ T1] #0: 82b9ae1c (port_mutex){+.+.}-{3:3}, at: uart_add_one_port (??:?)
[ 3.286577][ T1] #1: 895b11a8 (&port->mutex){+.+.}-{3:3}, at: uart_add_one_port (??:?)
[ 3.286580][ T1] #2: 827a96bc (console_lock){+.+.}-{0:0}, at: serial8250_config_port (8250_port.c:?)
[ 3.286583][ T1] irq event stamp: 328802
[ 3.286583][ T1] hardirqs last enabled at (328801): _raw_spin_unlock_irqrestore (??:?)
[ 3.286586][ T1] hardirqs last disabled at (328802): serial8250_config_port (8250_port.c:?)
[ 3.286588][ T1] softirqs last enabled at (239942): raw_unhash_sk (??:?)
[ 3.286590][ T1] softirqs last disabled at (239940): raw_unhash_sk (??:?)
[ 3.286592][ T1] CPU: 0 PID: 1 Comm: swapper Tainted: G T 5.19.0-rc2-00002-gb8de35843b16 #1
[ 3.286594][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[ 3.286595][ T1] Call Trace:
[ 3.286596][ T1] dump_stack_lvl (??:?)
[ 3.286598][ T1] dump_stack (??:?)
[ 3.286599][ T1] __might_resched (??:?)
[ 3.286602][ T1] __might_sleep (??:?)
[ 3.286603][ T1] async_synchronize_cookie_domain (??:?)
[ 3.286605][ T1] ? io_serial_in (early_printk.c:?)
[ 3.286607][ T1] ? __mutex_unlock_slowpath (mutex.c:?)
[ 3.286608][ T1] ? mem32be_serial_in (8250_port.c:?)
[ 3.286610][ T1] async_synchronize_full (??:?)
[ 3.286611][ T1] probe_irq_on (??:?)
[ 3.286612][ T1] ? mem32be_serial_in (8250_port.c:?)
[ 3.286613][ T1] serial8250_config_port (8250_port.c:?)
[ 3.286615][ T1] univ8250_config_port (8250_core.c:?)
[ 3.286616][ T1] uart_add_one_port (??:?)
[ 3.286617][ T1] ? _raw_spin_unlock (??:?)
[ 3.286619][ T1] ? klist_add_tail (??:?)
[ 3.286621][ T1] ? device_add (??:?)
[ 3.286624][ T1] serial8250_register_ports (8250_core.c:?)
[ 3.286627][ T1] serial8250_init (8250_core.c:?)
[ 3.286628][ T1] ? serial8250_isa_init_ports (8250_core.c:?)
[ 3.286629][ T1] do_one_initcall (??:?)
[ 3.286630][ T1] ? sched_clock_local (build_utility.c:?)
[ 3.286632][ T1] ? sched_clock_cpu (??:?)
[ 3.286633][ T1] ? trace_hardirqs_on (??:?)
[ 3.286635][ T1] ? deactivate_slab (slub.c:?)
[ 3.286637][ T1] ? parameq (??:?)
[ 3.286639][ T1] ? parse_args (??:?)
[ 3.286641][ T1] ? serial8250_isa_init_ports (8250_core.c:?)
[ 3.286642][ T1] do_initcall_level (main.c:?)
[ 3.286643][ T1] ? rest_init (main.c:?)
[ 3.286645][ T1] do_initcalls (main.c:?)
[ 3.286646][ T1] do_basic_setup (main.c:?)
[ 3.286647][ T1] kernel_init_freeable (main.c:?)
[ 3.286648][ T1] kernel_init (main.c:?)
[ 3.286649][ T1] ret_from_fork (??:?)
[ 3.286801][ T1] random: get_random_u32 called from lock_pin_lock+0xb3/0xff with crng_init=0
To reproduce:
# build kernel
cd linux
cp config-5.19.0-rc2-00002-gb8de35843b16 .config
make HOSTCC=clang-15 CC=clang-15 ARCH=i386 olddefconfig prepare modules_prepare bzImage modules
make HOSTCC=clang-15 CC=clang-15 ARCH=i386 INSTALL_MOD_PATH=<mod-install-dir> modules_install
cd <mod-install-dir>
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://01.org/lkp