From: David Miller <davem@davemloft.net>
To: kda@linux-powerpc.org
Cc: mst@redhat.com, jasowang@redhat.com, kvm@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] vhost: fix null pointer dereference in vhost_del_umem_range
Date: Tue, 09 Jul 2019 12:58:50 -0700 (PDT) [thread overview]
Message-ID: <20190709.125850.2133620086434576103.davem@davemloft.net> (raw)
In-Reply-To: <20190709114251.24662-1-dkirjanov@suse.com>
From: Denis Kirjanov <kda@linux-powerpc.org>
Date: Tue, 9 Jul 2019 13:42:51 +0200
> @@ -962,7 +962,8 @@ static void vhost_del_umem_range(struct vhost_umem *umem,
>
> while ((node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
> start, end)))
> - vhost_umem_free(umem, node);
> + if (node)
> + vhost_umem_free(umem, node);
If 'node' is NULL we will not be in the body of the loop as per
the while() condition.
How did you test this?
next prev parent reply other threads:[~2019-07-09 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 11:42 [PATCH] vhost: fix null pointer dereference in vhost_del_umem_range Denis Kirjanov
2019-07-09 19:58 ` David Miller [this message]
2019-07-10 7:56 ` Denis Kirjanov
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=20190709.125850.2133620086434576103.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=kda@linux-powerpc.org \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
/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).