linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: card: don't use PF_MEMALLOC
@ 2016-03-16 11:43 Martin Kepplinger
  2016-03-16 14:41 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Kepplinger @ 2016-03-16 11:43 UTC (permalink / raw)
  To: ulf.hansson, axboe, chuanxiao.dong, fabf
  Cc: linux-mmc, linux-kernel, Martin Kepplinger

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-16 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 11:43 [PATCH] mmc: card: don't use PF_MEMALLOC Martin Kepplinger
2016-03-16 14:41 ` Jens Axboe
2016-03-16 15:07   ` Martin Kepplinger
2016-03-16 15:12     ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).