All of lore.kernel.org
 help / color / mirror / Atom feed
From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH] drivers/nvme/host/rdma.c: Fix double freeing of async event data
Date: Wed, 21 Nov 2018 18:57:48 -0800	[thread overview]
Message-ID: <71ba474f-527f-fb67-5b7e-9b0ffc17a01c@grimberg.me> (raw)
In-Reply-To: <CAL1RGDWGs6E5nPUJEc73wuMjnUP-aEM62MywyT6X_fK4Tbj1Gw@mail.gmail.com>


> <psajeepa@purestorage.com> wrote:
>> Yes, we need to set qe->data to NULL in alloc_qe failure path as well.
>> I was suggesting setting of qe->data to NULL in nvme_rdma_free_qe() in addition to the fix suggested by you.
> 
> I'm ambivalent, I think either way of handling clearing data after
> free_qe is fine.  Two out of the three calls to free_qe need the "set
> to NULL", so I personally don't have a strong feeling about whether
> open-coding the data=NULL or putting it in the free function is
> better.

How about simply NULLing for the specific flow that Roland spotted in
addition to yours?

  reply	other threads:[~2018-11-22  2:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20 20:11 [PATCH] drivers/nvme/host/rdma.c: Fix double freeing of async event data Prabhath Sajeepa
2018-11-21  0:10 ` Sagi Grimberg
2018-11-21  0:21 ` Roland Dreier
2018-11-21  0:30   ` Sagi Grimberg
     [not found]     ` <CAE=VkfB4G8PFZuNihQR0fei9BSr5ayqOrMWjFq9Xo5anQNgk7w@mail.gmail.com>
2018-11-21  1:57       ` Roland Dreier
     [not found]         ` <CAE=VkfBvD9gG3MuwptCdpZso3t0JsFTvO-s1q+aW9=Zm4QTR=Q@mail.gmail.com>
2018-11-21  4:37           ` Roland Dreier
2018-11-22  2:57             ` Sagi Grimberg [this message]
2018-11-26 17:17 Prabhath Sajeepa
2018-11-26 17:26 ` Roland Dreier
2018-11-27  7:33 ` Christoph Hellwig
2018-11-27  7:41 ` Sagi Grimberg
2018-11-27  7:42   ` Christoph Hellwig

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=71ba474f-527f-fb67-5b7e-9b0ffc17a01c@grimberg.me \
    --to=sagi@grimberg.me \
    /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.