public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Rustam Kovhaev <rkovhaev@gmail.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	pbonzini@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org
Subject: Re: [PATCH v2] KVM: fix memory leak in kvm_io_bus_unregister_dev()
Date: Fri, 4 Sep 2020 09:37:53 -0500	[thread overview]
Message-ID: <20200904143753.GE31464@embeddedor> (raw)
In-Reply-To: <87ft7xoiig.fsf@vitty.brq.redhat.com>

On Fri, Sep 04, 2020 at 02:04:23PM +0200, Vitaly Kuznetsov wrote:
> Rustam Kovhaev <rkovhaev@gmail.com> writes:
> 
> > On Wed, Sep 02, 2020 at 06:34:11PM -0500, Gustavo A. R. Silva wrote:
> >> Hi,
> >> 
> >> On 9/2/20 17:57, Rustam Kovhaev wrote:
> >> > when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing
> >> > the bus, we should iterate over all other devices linked to it and call
> >> > kvm_iodevice_destructor() for them
> >> > 
> >> > Reported-and-tested-by: syzbot+f196caa45793d6374707@syzkaller.appspotmail.com
> >> > Link: https://syzkaller.appspot.com/bug?extid=f196caa45793d6374707
> >> > Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
> >> > Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> >> 
> >> I think it's worthwhile to add a Fixes tag for this, too.
> >> 
> >> Please, see more comments below...
[..]
> >
> > hi Gustavo, thank you for the review, i'll send the new patch.
> > Vitaly, i think i will need to drop your "Reviewed-by", because there is
> > going to be a bit more changes
> >
> 
> Personally, I'd prefer to make struct_size()/flex_array_size() a
> separate preparatory patch so the real fix is small but I don't have a
> strong opinion. I'll take look at v3 so feel free to drop R-b if you
> decide to make a combined patch and feel free to keep it if you make the
> preparatory changes separate :-)
> 

I agree. A two-patch series is much better in this case.

Rustam - please add a Fixes tag to the first patch and see if it can be
applied to -stable. If so, you should Cc stable@vger.kernel.org, too.

Thanks
--
Gustavo

      reply	other threads:[~2020-09-04 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 22:57 [PATCH v2] KVM: fix memory leak in kvm_io_bus_unregister_dev() Rustam Kovhaev
2020-09-02 23:34 ` Gustavo A. R. Silva
2020-09-03 17:22   ` Rustam Kovhaev
2020-09-04 12:04     ` Vitaly Kuznetsov
2020-09-04 14:37       ` Gustavo A. R. Silva [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=20200904143753.GE31464@embeddedor \
    --to=gustavoars@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=gustavo@embeddedor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkovhaev@gmail.com \
    --cc=vkuznets@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