public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Schspa Shi <schspa@gmail.com>
Cc: cohuck@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] vfio: Clear the caps->buf to NULL after free
Date: Thu, 30 Jun 2022 13:51:40 -0600	[thread overview]
Message-ID: <20220630135140.2dd079c9.alex.williamson@redhat.com> (raw)
In-Reply-To: <20220629022948.55608-1-schspa@gmail.com>

On Wed, 29 Jun 2022 10:29:48 +0800
Schspa Shi <schspa@gmail.com> wrote:

> On buffer resize failure, vfio_info_cap_add() will free the buffer,
> report zero for the size, and return -ENOMEM.  As additional
> hardening, also clear the buffer pointer to prevent any chance of a
> double free.
> 
> Signed-off-by: Schspa Shi <schspa@gmail.com>
> 

Applied to vfio next branch for v5.20.  Thanks,

Alex


      reply	other threads:[~2022-06-30 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-29  2:29 [PATCH v3] vfio: Clear the caps->buf to NULL after free Schspa Shi
2022-06-30 19:51 ` Alex Williamson [this message]

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=20220630135140.2dd079c9.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schspa@gmail.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