[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190709.125850.2133620086434576103.davem@davemloft.net>
Date: Tue, 09 Jul 2019 12:58:50 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: kda@...ux-powerpc.org
Cc: mst@...hat.com, jasowang@...hat.com, kvm@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH] vhost: fix null pointer dereference in
vhost_del_umem_range
From: Denis Kirjanov <kda@...ux-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?
Powered by blists - more mailing lists