public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Kepplinger <martink@posteo.de>
To: ulf.hansson@linaro.org, axboe@fb.com, chuanxiao.dong@intel.com,
	fabf@skynet.be
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Martin Kepplinger <martink@posteo.de>
Subject: [PATCH] mmc: card: don't use PF_MEMALLOC
Date: Wed, 16 Mar 2016 12:43:55 +0100	[thread overview]
Message-ID: <1458128635-3539-1-git-send-email-martink@posteo.de> (raw)

PF_MEMALLOC is assigned to processes by mm. If drivers prevent memory
reclaim and mm is not in control, strange hang-up or OOM Killer invocation
could happen.

Signed-off-by: Martin Kepplinger <martink@posteo.de>
---
I use MMC cards with this change perfectly fine. As I understand it,
even *if* PF_MEMALLOC has a real reason to be here, I think it should
be very well documented.


 drivers/mmc/card/queue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 6f4323c..be71249 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -51,8 +51,6 @@ static int mmc_queue_thread(void *d)
 	struct mmc_queue *mq = d;
 	struct request_queue *q = mq->queue;
 
-	current->flags |= PF_MEMALLOC;
-
 	down(&mq->thread_sem);
 	do {
 		struct request *req = NULL;
-- 
2.1.4

             reply	other threads:[~2016-03-16 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 11:43 Martin Kepplinger [this message]
2016-03-16 14:41 ` [PATCH] mmc: card: don't use PF_MEMALLOC Jens Axboe
2016-03-16 15:07   ` Martin Kepplinger
2016-03-16 15:12     ` Jens Axboe

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=1458128635-3539-1-git-send-email-martink@posteo.de \
    --to=martink@posteo.de \
    --cc=axboe@fb.com \
    --cc=chuanxiao.dong@intel.com \
    --cc=fabf@skynet.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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