linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: emilne@redhat.com (Ewan D. Milne)
Subject: [PATCH] nvme_fc: avoid double kfree(), don't call nvme_cleanup_cmd() in nvme_unmap_data()
Date: Thu,  6 Apr 2017 10:16:30 -0400	[thread overview]
Message-ID: <1491488190-5564-1-git-send-email-emilne@redhat.com> (raw)

nvme_cleanup_cmd() is already called by callers of nvme_unmap_data().
Don't call it twice to avoid double-free on completion of discard commands.

Signed-off-by: Ewan D. Milne <emilne at redhat.com>
---
 drivers/nvme/host/fc.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index fc42172..b5f92cc 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -1700,8 +1700,6 @@ enum blk_eh_timer_return
 				((rq_data_dir(rq) == WRITE) ?
 					DMA_TO_DEVICE : DMA_FROM_DEVICE));
 
-	nvme_cleanup_cmd(rq);
-
 	sg_free_table_chained(&freq->sg_table, true);
 
 	freq->sg_cnt = 0;
-- 
1.7.1

             reply	other threads:[~2017-04-06 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 14:16 Ewan D. Milne [this message]
2017-04-06 14:53 ` [PATCH] nvme_fc: avoid double kfree(), don't call nvme_cleanup_cmd() in nvme_unmap_data() Johannes Thumshirn

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=1491488190-5564-1-git-send-email-emilne@redhat.com \
    --to=emilne@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).