public inbox for dmaengine@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <oliver.sang@intel.com>
To: Rosen Penev <rosenp@gmail.com>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>,
	<dmaengine@vger.kernel.org>, Vinod Koul <vkoul@kernel.org>,
	Frank Li <Frank.Li@kernel.org>, Kees Cook <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	<oliver.sang@intel.com>
Subject: Re: [PATCH] dmaengine: idma64: use kzalloc_flex
Date: Fri, 20 Mar 2026 15:51:43 +0800	[thread overview]
Message-ID: <202603200800.38a86c8a-lkp@intel.com> (raw)
In-Reply-To: <20260317003730.72379-1-rosenp@gmail.com>



Hello,

kernel test robot noticed "WARNING:HARDIRQ-safe->HARDIRQ-unsafe_lock_order_detected" on:

commit: 9aaf187d4b233d22a895a594836a02c32c413937 ("[PATCH] dmaengine: idma64: use kzalloc_flex")
url: https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/dmaengine-idma64-use-kzalloc_flex/20260317-084750
base: https://git.kernel.org/cgit/linux/kernel/git/vkoul/dmaengine.git next
patch link: https://lore.kernel.org/all/20260317003730.72379-1-rosenp@gmail.com/
patch subject: [PATCH] dmaengine: idma64: use kzalloc_flex

in testcase: perf-event-tests
version: perf-event-tests-x86_64-54251c2-1_20251210
with following parameters:

	paranoid: not_paranoid_at_all


config: x86_64-rhel-9.4-bpf
compiler: gcc-14
test machine: 16 threads Intel(R) Core(TM) i7-13620H (Raptor Lake) with 32G memory

(please refer to attached dmesg/kmsg for entire log/backtrace)


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 <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202603200800.38a86c8a-lkp@intel.com



kern  :warn  : [   92.812882] [    T125] WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected
kern  :warn  : [   92.812886] [    T125] 7.0.0-rc1-00048-g9aaf187d4b23 #1 Tainted: G S
kern  :warn  : [   92.812888] [    T125] -----------------------------------------------------
kern  :warn  : [   92.812890] [    T125] kworker/u64:13/125 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
kern  :info  : [   92.820021] [    T301] scsi host1: ahci
kern  :warn  : [   92.824348] [    T125] ffffffff85238340 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_noprof (include/linux/sched/mm.h:318 mm/slub.c:4452 mm/slub.c:4807 mm/slub.c:5218 mm/slub.c:5231)
kern  :info  : [   92.832922] [    T301] ata1: SATA max UDMA/133 abar m2048@0x50a02000 port 0x50a02100 irq 157 lpm-pol 0
kern  :warn  : [   92.840680] [    T125]
and this task is already holding:
kern  :warn  : [   92.840681] [    T125] ffffffff87aa2698 (&port_lock_key){-.-.}-{3:3}, at: serial_port_runtime_resume (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 drivers/tty/serial/serial_port.c:42)
kern  :info  : [   92.847517] [    T301] ata2: SATA max UDMA/133 abar m2048@0x50a02000 port 0x50a02180 irq 157 lpm-pol 0
kern  :warn  : [   92.856658] [    T125] which would create a new lock dependency:
kern  :warn  : [   92.856660] [    T125]  (&port_lock_key){-.-.}-{3:3} -> (fs_reclaim){+.+.}-{0:0}
kern  :warn  : [   92.921503] [    T125]
but this new dependency connects a HARDIRQ-irq-safe lock:
kern  :warn  : [   92.921505] [    T125]  (&port_lock_key){-.-.}-{3:3}
kern  :warn  : [   92.921509] [    T125]
... which became HARDIRQ-irq-safe at:
kern  :warn  : [   92.921510] [    T125]   __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   92.959014] [    T125]   lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))
kern  :warn  : [   92.959019] [    T125]   _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:133 kernel/locking/spinlock.c:162)
kern  :warn  : [   92.970359] [    T125]   serial8250_handle_irq (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 drivers/tty/serial/8250/8250_port.c:1798)
kern  :warn  : [   92.976110] [    T125]   serial8250_default_handle_irq (drivers/tty/serial/8250/8250_port.c:1846)
kern  :warn  : [   92.982547] [    T125]   serial8250_interrupt (drivers/tty/serial/8250/8250_core.c:86 (discriminator 1))
kern  :warn  : [   92.988104] [    T125]   __handle_irq_event_percpu (kernel/irq/handle.c:209)
kern  :warn  : [   92.994068] [    T125]   handle_irq_event (kernel/irq/handle.c:248 kernel/irq/handle.c:263)
kern  :warn  : [   92.999068] [    T125]   handle_edge_irq (kernel/irq/chip.c:857)
kern  :warn  : [   93.004157] [    T125]   __common_interrupt (include/asm-generic/irq_regs.h:29 (discriminator 5) arch/x86/kernel/irq.c:336 (discriminator 5))
kern  :warn  : [   93.009323] [    T125]   common_interrupt (arch/x86/kernel/irq.c:326 (discriminator 35))
kern  :warn  : [   93.014316] [    T125]   asm_common_interrupt (arch/x86/include/asm/idtentry.h:569)
kern  :warn  : [   93.019650] [    T125]   finish_task_switch+0x10b/0x3b0
kern  :warn  : [   93.025596] [    T125]   __schedule (kernel/sched/core.c:5298)
kern  :warn  : [   93.030226] [    T125]   schedule (arch/x86/include/asm/preempt.h:27 kernel/sched/core.c:5780 kernel/sched/core.c:5800 kernel/sched/core.c:6990 kernel/sched/core.c:7004)
kern  :warn  : [   93.034596] [    T125]   worker_thread (kernel/workqueue.c:3392)
kern  :warn  : [   93.039471] [    T125]   kthread (kernel/kthread.c:467)
kern  :warn  : [   93.043818] [    T125]   ret_from_fork (arch/x86/kernel/process.c:164)
kern  :warn  : [   93.048676] [    T125]   ret_from_fork_asm (arch/x86/entry/entry_64.S:255)
kern  :warn  : [   93.053710] [    T125]
to a HARDIRQ-irq-unsafe lock:
kern  :warn  : [   93.061189] [    T125]  (fs_reclaim){+.+.}-{0:0}
kern  :warn  : [   93.061193] [    T125]
... which became HARDIRQ-irq-unsafe at:
kern  :warn  : [   93.074129] [    T125] ...
kern  :warn  : [   93.074131] [    T125]   __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   93.081760] [    T125]   lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))
kern  :warn  : [   93.086999] [    T125]   fs_reclaim_acquire (mm/page_alloc.c:4349 mm/page_alloc.c:4362)
kern  :warn  : [   93.092056] [    T125]   mem_cgroup_alloc (include/linux/sched/mm.h:318 include/linux/xarray.h:876 mm/memcontrol.c:3758)
kern  :warn  : [   93.097030] [    T125]   mem_cgroup_css_alloc (mm/memcontrol.c:3830)
kern  :warn  : [   93.102350] [    T125]   cgroup_init_subsys (kernel/cgroup/cgroup.c:6257)
kern  :warn  : [   93.107583] [    T125]   cgroup_init (include/linux/list.h:191 kernel/cgroup/cgroup.c:6387)
kern  :warn  : [   93.112204] [    T125]   start_kernel (init/main.c:1202)
kern  :warn  : [   93.116907] [    T125]   __pfx_clear_bss (arch/x86/kernel/head64.c:310)
kern  :warn  : [   93.121614] [    T125]   x86_64_start_kernel (??:?)
kern  :warn  : [   93.126754] [    T125]   common_startup_64 (arch/x86/kernel/head_64.S:419)
kern  :warn  : [   93.131895] [    T125]
other info that might help us debug this:

kern  :warn  : [   93.142675] [    T125]  Possible interrupt unsafe locking scenario:

kern  :warn  : [   93.151346] [    T125]        CPU0                    CPU1
kern  :warn  : [   93.156839] [    T125]        ----                    ----
kern  :warn  : [   93.162328] [    T125]   lock(fs_reclaim);
kern  :info  : [   93.166307] [    T391] ata1: SATA link down (SStatus 4 SControl 300)
kern  :warn  : [   93.166424] [    T125]                                local_irq_disable();
kern  :warn  : [   93.166425] [    T125]                                lock(&port_lock_key);
kern  :info  : [   93.177705] [    T393] ata2: SATA link down (SStatus 4 SControl 300)
kern  :warn  : [   93.179181] [    T125]                                lock(fs_reclaim);
kern  :warn  : [   93.179183] [    T125]   <Interrupt>
kern  :warn  : [   93.179184] [    T125]     lock(&port_lock_key);
kern  :warn  : [   93.179186] [    T125]
*** DEADLOCK ***

kern  :warn  : [   93.179186] [    T125] 3 locks held by kworker/u64:13/125:
kern  :warn  : [   93.222088] [    T125]  #0: ffff8881016d2948 ((wq_completion)pm){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3250)
kern  :warn  : [   93.232332] [    T125]  #1: ffff888101b3fd40 ((work_completion)(&dev->power.work)){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3251)
kern  :warn  : [   93.244208] [    T125]  #2: ffffffff87aa2698 (&port_lock_key){-.-.}-{3:3}, at: serial_port_runtime_resume (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 drivers/tty/serial/serial_port.c:42)
kern  :warn  : [   93.255081] [    T125]
the dependencies between HARDIRQ-irq-safe lock and the holding lock:
kern  :warn  : [   93.265967] [    T125] -> (&port_lock_key){-.-.}-{3:3} {
kern  :warn  : [   93.271368] [    T125]    IN-HARDIRQ-W at:
kern  :warn  : [   93.275551] [    T125]                     __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   93.282082] [    T125]                     lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))
kern  :warn  : [   93.288963] [    T125]                     _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:133 kernel/locking/spinlock.c:162)
kern  :warn  : [   93.296016] [    T125]                     serial8250_handle_irq (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 drivers/tty/serial/8250/8250_port.c:1798)
kern  :warn  : [   93.303060] [    T125]                     serial8250_default_handle_irq (drivers/tty/serial/8250/8250_port.c:1846)
kern  :warn  : [   93.310805] [    T125]                     serial8250_interrupt (drivers/tty/serial/8250/8250_core.c:86 (discriminator 1))
kern  :warn  : [   93.317680] [    T125]                     __handle_irq_event_percpu (kernel/irq/handle.c:209)
kern  :warn  : [   93.325157] [    T125]                     handle_irq_event (kernel/irq/handle.c:248 kernel/irq/handle.c:263)
kern  :warn  : [   93.331689] [    T125]                     handle_edge_irq (kernel/irq/chip.c:857)
kern  :warn  : [   93.338301] [    T125]                     __common_interrupt (include/asm-generic/irq_regs.h:29 (discriminator 5) arch/x86/kernel/irq.c:336 (discriminator 5))
kern  :warn  : [   93.345005] [    T125]                     common_interrupt (arch/x86/kernel/irq.c:326 (discriminator 35))
kern  :warn  : [   93.351528] [    T125]                     asm_common_interrupt (arch/x86/include/asm/idtentry.h:569)
kern  :warn  : [   93.358390] [    T125]                     finish_task_switch+0x10b/0x3b0
kern  :warn  : [   93.365862] [    T125]                     __schedule (kernel/sched/core.c:5298)
kern  :warn  : [   93.372039] [    T125]                     schedule (arch/x86/include/asm/preempt.h:27 kernel/sched/core.c:5780 kernel/sched/core.c:5800 kernel/sched/core.c:6990 kernel/sched/core.c:7004)
kern  :warn  : [   93.377948] [    T125]                     worker_thread (kernel/workqueue.c:3392)
kern  :warn  : [   93.384375] [    T125]                     kthread (kernel/kthread.c:467)
kern  :warn  : [   93.390278] [    T125]                     ret_from_fork (arch/x86/kernel/process.c:164)
kern  :warn  : [   93.396705] [    T125]                     ret_from_fork_asm (arch/x86/entry/entry_64.S:255)
kern  :warn  : [   93.403303] [    T125]    IN-SOFTIRQ-W at:
kern  :warn  : [   93.407480] [    T125]                     __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   93.413998] [    T125]                     lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))
kern  :warn  : [   93.420866] [    T125]                     _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:133 kernel/locking/spinlock.c:162)
kern  :warn  : [   93.427896] [    T125]                     serial8250_handle_irq (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 drivers/tty/serial/8250/8250_port.c:1798)
kern  :warn  : [   93.434913] [    T125]                     serial8250_default_handle_irq (drivers/tty/serial/8250/8250_port.c:1846)
kern  :warn  : [   93.442616] [    T125]                     serial8250_interrupt (drivers/tty/serial/8250/8250_core.c:86 (discriminator 1))
kern  :warn  : [   93.449446] [    T125]                     __handle_irq_event_percpu (kernel/irq/handle.c:209)
kern  :warn  : [   93.456868] [    T125]                     handle_irq_event (kernel/irq/handle.c:248 kernel/irq/handle.c:263)
kern  :warn  : [   93.463342] [    T125]                     handle_edge_irq (kernel/irq/chip.c:857)
kern  :warn  : [   93.469897] [    T125]                     __common_interrupt (include/asm-generic/irq_regs.h:29 (discriminator 5) arch/x86/kernel/irq.c:336 (discriminator 5))
kern  :warn  : [   93.476528] [    T125]                     common_interrupt (arch/x86/kernel/irq.c:326 (discriminator 2))
kern  :warn  : [   93.482981] [    T125]                     asm_common_interrupt (arch/x86/include/asm/idtentry.h:569)
kern  :warn  : [   93.489779] [    T125]                     sched_balance_update_blocked_averages (kernel/sched/fair.c:9949)
kern  :warn  : [   93.498233] [    T125]                     sched_balance_softirq (kernel/sched/fair.c:13021)
kern  :warn  : [   93.505116] [    T125]                     handle_softirqs (arch/x86/include/asm/jump_label.h:37 include/trace/events/irq.h:142 kernel/softirq.c:623)
kern  :warn  : [   93.511663] [    T125]                     __irq_exit_rcu (kernel/softirq.c:657 kernel/softirq.c:496 kernel/softirq.c:723)
kern  :warn  : [   93.518123] [    T125]                     irq_exit_rcu (kernel/softirq.c:741 (discriminator 38))
kern  :warn  : [   93.524134] [    T125]                     sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1056 (discriminator 35) arch/x86/kernel/apic/apic.c:1056 (discriminator 35))
kern  :warn  : [   93.531547] [    T125]                     asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:569)
kern  :warn  : [   93.539311] [    T125]                     cpuidle_enter_state (drivers/cpuidle/cpuidle.c:294)
kern  :warn  : [   93.546121] [    T125]                     cpuidle_enter (drivers/cpuidle/cpuidle.c:403 (discriminator 2))
kern  :warn  : [   93.552324] [    T125]                     cpuidle_idle_call (kernel/sched/idle.c:161 kernel/sched/idle.c:237)
kern  :warn  : [   93.559039] [    T125]                     do_idle (kernel/sched/idle.c:332)
kern  :warn  : [   93.564800] [    T125]                     cpu_startup_entry (kernel/sched/idle.c:429)
kern  :warn  : [   93.571342] [    T125]                     start_secondary (arch/x86/kernel/smpboot.c:200 (discriminator 10) arch/x86/kernel/smpboot.c:280 (discriminator 10))
kern  :warn  : [   93.577886] [    T125]                     common_startup_64 (arch/x86/kernel/head_64.S:419)
kern  :warn  : [   93.584604] [    T125]    INITIAL USE at:
kern  :warn  : [   93.588630] [    T125]                    __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   93.595007] [    T125]                    lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))
kern  :warn  : [   93.601736] [    T125]                    _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:133 kernel/locking/spinlock.c:162)
kern  :warn  : [   93.608635] [    T125]                    serial8250_do_set_termios (include/linux/serial_core.h:640 include/linux/serial_core.h:674 include/linux/serial_core.h:718 include/linux/serial_core.h:797 drivers/tty/serial/8250/8250_port.c:2760)
kern  :warn  : [   93.615969] [    T125]                    uart_set_options (drivers/tty/serial/serial_core.c:2239)
kern  :warn  : [   93.622513] [    T125]                    serial8250_console_setup (drivers/tty/serial/8250/8250_port.c:3405)
kern  :warn  : [   93.629758] [    T125]                    univ8250_console_setup (drivers/tty/serial/8250/8250_core.c:430)
kern  :warn  : [   93.636745] [    T125]                    try_enable_preferred_console (kernel/printk/printk.c:3882 kernel/printk/printk.c:3873 kernel/printk/printk.c:3926)
kern  :warn  : [   93.644337] [    T125]                    register_console (kernel/printk/printk.c:4120)
kern  :warn  : [   93.650898] [    T125]                    univ8250_console_init (drivers/tty/serial/8250/8250_core.c:516)
kern  :warn  : [   93.657715] [    T125]                    console_init (kernel/printk/printk.c:4407)
kern  :warn  : [   93.663915] [    T125]                    start_kernel (init/main.c:1148)
kern  :warn  : [   93.670115] [    T125]                    __pfx_clear_bss (arch/x86/kernel/head64.c:310)
kern  :warn  : [   93.676311] [    T125]                    x86_64_start_kernel (??:?)
kern  :warn  : [   93.682946] [    T125]                    common_startup_64 (arch/x86/kernel/head_64.S:419)
kern  :warn  : [   93.689577] [    T125]  }
kern  :warn  : [   93.692212] [    T125]  ... key      at: port_lock_key+0x0/0x40
kern  :warn  : [   93.699982] [    T125]
the dependencies between the lock to be acquired
kern  :warn  : [   93.699983] [    T125]  and HARDIRQ-irq-unsafe lock:
kern  :warn  : [   93.714039] [    T125] -> (fs_reclaim){+.+.}-{0:0} {
kern  :warn  : [   93.719030] [    T125]    HARDIRQ-ON-W at:
kern  :warn  : [   93.723151] [    T125]                     __lock_acquire (kernel/locking/lockdep.c:5191 (discriminator 1))
kern  :warn  : [   93.729625] [    T125]                     lock_acquire (include/trace/events/lock.h:24 (discriminator 15) include/trace/events/lock.h:24 (discriminator 15) kernel/locking/lockdep.c:5831 (discriminator 15))


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20260320/202603200800.38a86c8a-lkp@intel.com



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


      reply	other threads:[~2026-03-20  7:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17  0:37 [PATCH] dmaengine: idma64: use kzalloc_flex Rosen Penev
2026-03-20  7:51 ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202603200800.38a86c8a-lkp@intel.com \
    --to=oliver.sang@intel.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=rosenp@gmail.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox