oe-lkp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: tada keisuke <keisuke1.tada@kioxia.com>
To: kernel test robot <oliver.sang@intel.com>
Cc: "oe-lkp@lists.linux.dev" <oe-lkp@lists.linux.dev>,
	"lkp@intel.com" <lkp@intel.com>,
	ohtake toshifumi <toshifumi.ootake@kioxia.com>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"song@kernel.org" <song@kernel.org>,
	"yukuai3@huawei.com" <yukuai3@huawei.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 09/11] md: add atomic mode switching when removing disk
Date: Fri, 5 Apr 2024 05:18:04 +0000	[thread overview]
Message-ID: <bdffa39d605c4340910640d10ac6a9b4@kioxia.com> (raw)
In-Reply-To: <202403310746.6c8b0587-oliver.sang@intel.com>

> kern  :err   : [  118.926307] BUG: sleeping function called from invalid context at lib/percpu-refcount.c:331
> kern  :err   : [  118.935427] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 55, name: kworker/6:0
> kern  :err   : [  118.944338] preempt_count: 0, expected: 0
> kern  :err   : [  118.949122] RCU nest depth: 1, expected: 0
> kern  :warn  : [  118.954016] CPU: 6 PID: 55 Comm: kworker/6:0 Tainted: G S
> 6.8.0-rc3-00236-gff944d1be0fa #1
> kern  :warn  : [  118.964389] Hardware name: Gigabyte Technology Co., Ltd. Z97X-UD5H/Z97X-UD5H, BIOS F9
> 04/21/2015
> kern  :warn  : [  118.973916] Workqueue: md_misc md_start_sync
> kern  :warn  : [  118.978937] Call Trace:
> kern  :warn  : [  118.982115]  <TASK>
> kern :warn : [  118.984943] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1))
> kern :warn : [  118.989337] __might_resched (kernel/sched/core.c:10190)
> kern :warn : [  118.993989] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:115
> include/linux/atomic/atomic-arch-fallback.h:2164 include/linux/atomic/atomic-instrumented.h:1296
> include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:111
> kernel/locking/spinlock.c:162)
> kern :warn : [  118.999243] ? preempt_notifier_dec (kernel/sched/core.c:10144)
> kern :warn : [  119.004321] percpu_ref_switch_to_atomic_sync (include/linux/kernel.h:107 lib/percpu-refcount.c:331)
> kern :warn : [  119.010353] ? percpu_ref_reinit (lib/percpu-refcount.c:329)
> kern :warn : [  119.015351] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:115
> include/linux/atomic/atomic-arch-fallback.h:2164 include/linux/atomic/atomic-instrumented.h:1296
> include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:111
> kernel/locking/spinlock.c:162)
> kern :warn : [  119.020596] ? _raw_read_unlock_irqrestore (kernel/locking/spinlock.c:161)
> kern :warn : [  119.026282] ? finish_task_switch+0x158/0x730
> kern :warn : [  119.031969] ? __switch_to (arch/x86/include/asm/bitops.h:55
> include/asm-generic/bitops/instrumented-atomic.h:29 include/linux/thread_info.h:89
> arch/x86/include/asm/fpu/sched.h:66 arch/x86/kernel/process_64.c:626)
> kern :warn : [  119.036435] rdev_removeable (drivers/md/md.c:9282)
> kern :warn : [  119.041083] md_start_sync (drivers/md/md.c:9339 drivers/md/md.c:9449)
> kern :warn : [  119.045462] ? mddev_unlock (drivers/md/md.c:9444)
> kern :warn : [  119.050021] ? _raw_spin_lock_irq (arch/x86/include/asm/atomic.h:115
> include/linux/atomic/atomic-arch-fallback.h:2164 include/linux/atomic/atomic-instrumented.h:1296
> include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120
> kernel/locking/spinlock.c:170)
> kern :warn : [  119.054928] ? _raw_spin_lock_bh (kernel/locking/spinlock.c:169)
> kern :warn : [  119.059739] process_one_work (kernel/workqueue.c:2638)
> kern :warn : [  119.064476] worker_thread (kernel/workqueue.c:2700 kernel/workqueue.c:2787)
> kern :warn : [  119.068943] ? process_one_work (kernel/workqueue.c:2733)
> kern :warn : [  119.073864] kthread (kernel/kthread.c:388)
> kern :warn : [  119.077815] ? kthread_complete_and_exit (kernel/kthread.c:341)
> kern :warn : [  119.083321] ret_from_fork (arch/x86/kernel/process.c:153)
> kern :warn : [  119.087627] ? kthread_complete_and_exit (kernel/kthread.c:341)
> kern :warn : [  119.093140] ret_from_fork_asm (arch/x86/entry/entry_64.S:250)
> kern  :warn  : [  119.097786]  </TASK>

Thanks for reporting.
I need to execute percpu_ref_switch_to_atomic_sync() when RCU is unlocked.
I will fix this problem and submit v2.

Thanks,
Keisuke


      reply	other threads:[~2024-04-05  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e95e7cea71d1465496a9502b4de49e75@kioxia.com>
2024-03-31  0:02 ` [PATCH 09/11] md: add atomic mode switching when removing disk kernel test robot
2024-04-05  5:18   ` tada keisuke [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=bdffa39d605c4340910640d10ac6a9b4@kioxia.com \
    --to=keisuke1.tada@kioxia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=song@kernel.org \
    --cc=toshifumi.ootake@kioxia.com \
    --cc=yukuai3@huawei.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).