From: sagi@grimberg.me (Sagi Grimberg)
Subject: [PATCH v2] nvmet-rdma: fix possible bogus dereference under heavy load
Date: Wed, 5 Sep 2018 08:14:07 -0700 [thread overview]
Message-ID: <f7d0cba7-f363-0216-75c6-0be0723974d8@grimberg.me> (raw)
In-Reply-To: <20180904190653.GA2060@lst.de>
>> - rsp = list_first_entry(&queue->free_rsps,
>> + rsp = list_first_entry_or_null(&queue->free_rsps,
>> struct nvmet_rdma_rsp, free_list);
>> - list_del(&rsp->free_list);
>> + if (likely(rsp)) {
>> + list_del(&rsp->free_list);
>> + rsp->allocated = false;
>
> Given that we never set allocated to true for something we got from
> the freelist, and the structures were allocated using kcalloc I don't
> ?ee why we need to set it to false here.
I have no problem removing it, should I send a new spin?
next prev parent reply other threads:[~2018-09-05 15:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 10:47 [PATCH v2] nvmet-rdma: fix possible bogus dereference under heavy load Sagi Grimberg
2018-09-04 19:06 ` Christoph Hellwig
2018-09-05 15:14 ` Sagi Grimberg [this message]
2018-09-05 17:16 ` 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=f7d0cba7-f363-0216-75c6-0be0723974d8@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 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).