All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Williams, Dan J" <dan.j.williams@intel.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: [GIT PULL] filesystem-dax fix for 4.19-rc6
Date: Sun, 30 Sep 2018 02:16:57 +0000	[thread overview]
Message-ID: <1538273814.24243.65.camel@intel.com> (raw)

Hi Greg, please pull from...

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6

...to receive one more urgent fix for 4.19-rc6.

---

The following changes since commit 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84:

  Linux 4.19-rc5 (2018-09-23 19:15:18 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6

for you to fetch changes up to f52afc93cd018fe6910133a05d44671192d1aeb0:

  dax: Fix deadlock in dax_lock_mapping_entry() (2018-09-27 10:56:15 -0700)

----------------------------------------------------------------
filesystem-dax for 4.19-rc6

Fix a deadlock in the new for 4.19 dax_lock_mapping_entry() routine.

----------------------------------------------------------------
Jan Kara (1):
      dax: Fix deadlock in dax_lock_mapping_entry()

 fs/dax.c | 1 +
 1 file changed, 1 insertion(+)

commit f52afc93cd018fe6910133a05d44671192d1aeb0
Author: Jan Kara <jack@suse.cz>
Date:   Thu Sep 27 13:23:32 2018 +0200

    dax: Fix deadlock in dax_lock_mapping_entry()
    
    When dax_lock_mapping_entry() has to sleep to obtain entry lock, it will
    fail to unlock mapping->i_pages spinlock and thus immediately deadlock
    against itself when retrying to grab the entry lock again. Fix the
    problem by unlocking mapping->i_pages before retrying.
    
    Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()")
    Reported-by: Barret Rhoden <brho@google.com>
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/fs/dax.c b/fs/dax.c
index f32d7125ad0f..e4ef8af31aa6 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -447,6 +447,7 @@ bool dax_lock_mapping_entry(struct page *page)
                        xa_unlock_irq(&mapping->i_pages);
                        break;
                } else if (IS_ERR(entry)) {
+                       xa_unlock_irq(&mapping->i_pages);
                        WARN_ON_ONCE(PTR_ERR(entry) != -EAGAIN);
                        continue;
                }
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: "Williams, Dan J" <dan.j.williams@intel.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: [GIT PULL] filesystem-dax fix for 4.19-rc6
Date: Sun, 30 Sep 2018 02:16:57 +0000	[thread overview]
Message-ID: <1538273814.24243.65.camel@intel.com> (raw)

Hi Greg, please pull from...

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6

...to receive one more urgent fix for 4.19-rc6.

---

The following changes since commit 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84:

  Linux 4.19-rc5 (2018-09-23 19:15:18 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-fixes2-4.19-rc6

for you to fetch changes up to f52afc93cd018fe6910133a05d44671192d1aeb0:

  dax: Fix deadlock in dax_lock_mapping_entry() (2018-09-27 10:56:15 -0700)

----------------------------------------------------------------
filesystem-dax for 4.19-rc6

Fix a deadlock in the new for 4.19 dax_lock_mapping_entry() routine.

----------------------------------------------------------------
Jan Kara (1):
      dax: Fix deadlock in dax_lock_mapping_entry()

 fs/dax.c | 1 +
 1 file changed, 1 insertion(+)

commit f52afc93cd018fe6910133a05d44671192d1aeb0
Author: Jan Kara <jack@suse.cz>
Date:   Thu Sep 27 13:23:32 2018 +0200

    dax: Fix deadlock in dax_lock_mapping_entry()
    
    When dax_lock_mapping_entry() has to sleep to obtain entry lock, it will
    fail to unlock mapping->i_pages spinlock and thus immediately deadlock
    against itself when retrying to grab the entry lock again. Fix the
    problem by unlocking mapping->i_pages before retrying.
    
    Fixes: c2a7d2a11552 ("filesystem-dax: Introduce dax_lock_mapping_entry()")
    Reported-by: Barret Rhoden <brho@google.com>
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/fs/dax.c b/fs/dax.c
index f32d7125ad0f..e4ef8af31aa6 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -447,6 +447,7 @@ bool dax_lock_mapping_entry(struct page *page)
                        xa_unlock_irq(&mapping->i_pages);
                        break;
                } else if (IS_ERR(entry)) {
+                       xa_unlock_irq(&mapping->i_pages);
                        WARN_ON_ONCE(PTR_ERR(entry) != -EAGAIN);
                        continue;
                }

             reply	other threads:[~2018-09-30  2:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30  2:16 Williams, Dan J [this message]
2018-09-30  2:16 ` [GIT PULL] filesystem-dax fix for 4.19-rc6 Williams, Dan J
2018-09-30 13:38 ` gregkh
2018-09-30 13:38   ` gregkh

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=1538273814.24243.65.camel@intel.com \
    --to=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.