public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Mikhail Ukhin <mish.uxin2012@yandex.ru>
Cc: stable@vger.kernel.org, Andreas Dilger <adilger.kernel@dilger.ca>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michail Ivanov <iwanov-23@bk.ru>,
	Pavel Koshutin <koshutin.pavel@yandex.ru>,
	Artem Sadovnikov <ancowi69@gmail.com>
Subject: Re: [PATCH] ext4: fix i_data_sem unlock order in ext4_ind_migrate()
Date: Thu, 4 Apr 2024 22:26:51 -0400	[thread overview]
Message-ID: <20240405022651.GB13376@mit.edu> (raw)
In-Reply-To: <20240404095000.5872-1-mish.uxin2012@yandex.ru>

On Thu, Apr 04, 2024 at 12:50:00PM +0300, Mikhail Ukhin wrote:
> Fuzzing reports a possible deadlock in jbd2_log_wait_commit.
> 
> The problem occurs in ext4_ind_migrate due to an incorrect order of
> unlocking of the journal and write semaphores - the order of unlocking
> must be the reverse of the order of locking.
> 
> Found by Linux Verification Center (linuxtesting.org) with syzkaller.

This doesn't make any sense.  Lock order matters; the order in which
you unlock shouldn't (and doesn't) make a difference.  This is also
something which lockdep doesn't complain about --- because it's not a
problem.

So how was this "found by syzkaller"?

					- Ted

  parent reply	other threads:[~2024-04-05  2:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04  9:50 [PATCH] ext4: fix i_data_sem unlock order in ext4_ind_migrate() Mikhail Ukhin
2024-04-04 10:00 ` Greg KH
2024-04-05  2:26 ` Theodore Ts'o [this message]
2024-04-05 18:40   ` Artem Sadovnikov
  -- strict thread matches above, loose matches on Subject: below --
2024-04-04 16:02 [PATCH] ext4: fix semaphore unlocking order Ritesh Harjani
2024-04-05 20:22 ` [PATCH] ext4: fix i_data_sem unlock order in ext4_ind_migrate() Mikhail Ukhin

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=20240405022651.GB13376@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=ancowi69@gmail.com \
    --cc=iwanov-23@bk.ru \
    --cc=koshutin.pavel@yandex.ru \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mish.uxin2012@yandex.ru \
    --cc=stable@vger.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