Linux s390 Architecture development
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: Peter Oberparleiter <oberpar@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	linux-s390@vger.kernel.org, Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH] s390/debug: Fix deadlock during unregister
Date: Wed, 12 Aug 2026 16:28:24 +0200	[thread overview]
Message-ID: <ttjnuvc@ub.hpns> (raw)
In-Reply-To: <20260812075319.2007940-1-oberpar@linux.ibm.com>

On Wed, Aug 12, 2026 at 09:53:19AM +0200, Peter Oberparleiter wrote:
> Unregistering an s390dbf debug area while one of the associated debugfs
> files is being written to can cause a deadlock:
> 
> $ echo >.../vmur/level    $ rmmod vmur
> ===================================================
> debugfs write
> debugfs_file_get()
>                           debug_unregister()
>                           mutex_lock(debug_mutex)
>                           debugfs_remove()
>                           wait for debugfs_file_put()
> debug_file_ops.write()
> debug_input()
> mutex_lock(debug_mutex) ==> DEADLOCK
> 
> Fix this by splitting debug_unregister() into an s390dbf and debugfs
> part, and running only the s390dbf part with debug_mutex locked.
> 
> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
> ---
>  arch/s390/kernel/debug.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)

Added
Fixes: 9372a82892c2 ("s390/debug: fix debug area life cycle")

and applied, thank you!

      parent reply	other threads:[~2026-08-12 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  7:53 [PATCH] s390/debug: Fix deadlock during unregister Peter Oberparleiter
2026-08-12  8:02 ` sashiko-bot
2026-08-12 10:11 ` Heiko Carstens
2026-08-12 14:28 ` Vasily Gorbik [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=ttjnuvc@ub.hpns \
    --to=gor@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.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