All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 2/4] lustre: use GFP_NOFS when lli_och_mutex is held - again
Date: Mon, 10 Dec 2018 11:46:16 +1100	[thread overview]
Message-ID: <154440277646.29887.1527233404610585779.stgit@noble> (raw)
In-Reply-To: <154440246926.29887.1667505755325904791.stgit@noble>

lockdep reports that lli_och_mutex is involved with fs_reclaim and is
held during this memory allocation - so GFP_NOFS should be used to
avoid a possible deadlock.

This is a second place where this was a problem - I don't think there
are more.

Fixes: 0b0c8c1ca0bd ("lustre: llite: replace several GFP_NOFS with GFP_KERNEL")
Signed-off-by: NeilBrown <neilb@suse.com>
---
 drivers/staging/lustre/lustre/llite/file.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 15910ff5f293..a6f149c47a7a 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -135,7 +135,7 @@ static int ll_close_inode_openhandle(struct inode *inode,
 		goto out;
 	}
 
-	op_data = kzalloc(sizeof(*op_data), GFP_KERNEL);
+	op_data = kzalloc(sizeof(*op_data), GFP_NOFS);
 	/*
 	 * We leak openhandle and request here on error, but not much to be
 	 * done in OOM case since app won't retry close on error either.
@@ -1652,7 +1652,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it)
 
 	LASSERT(it_open_error(DISP_OPEN_OPEN, it) == 0);
 
-	och = kzalloc(sizeof(*och), GFP_KERNEL);
+	och = kzalloc(sizeof(*och), GFP_NOFS);
 	if (!och) {
 		rc = -ENOMEM;
 		goto out;

  parent reply	other threads:[~2018-12-10  0:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-10  0:46 [lustre-devel] [PATCH 0/4] some modest linux-lustre cleanups NeilBrown
2018-12-10  0:46 ` [lustre-devel] [PATCH 4/4] lustre: clear up white space in osc header files NeilBrown
2018-12-27  2:15   ` James Simmons
2018-12-10  0:46 ` [lustre-devel] [PATCH 3/4] lustre: use bit-locking in echo_client NeilBrown
2018-12-10  0:57   ` Patrick Farrell
2018-12-10  1:26     ` NeilBrown
2018-12-10  4:09       ` Patrick Farrell
2018-12-27  2:14   ` James Simmons
2018-12-10  0:46 ` [lustre-devel] [PATCH 1/4] lustre: lnet_startup_lndnet: avoid use-after-free NeilBrown
2018-12-27  2:13   ` James Simmons
2018-12-10  0:46 ` NeilBrown [this message]
2018-12-27  2:11   ` [lustre-devel] [PATCH 2/4] lustre: use GFP_NOFS when lli_och_mutex is held - again James Simmons
2018-12-27  2:13   ` James Simmons

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=154440277646.29887.1527233404610585779.stgit@noble \
    --to=neilb@suse.com \
    --cc=lustre-devel@lists.lustre.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.