[dpdk-dev] [PATCH v2] vhost: fix possible null pointer dereferencing

Maxime Coquelin maxime.coquelin at redhat.com
Tue Dec 11 19:30:18 CET 2018



On 11/27/18 11:30 AM, Jens Freimann wrote:
> On Tue, Nov 27, 2018 at 10:54:51AM +0100, Maxime Coquelin wrote:
>> If mmap() call fails in vhost_user_set_mem_table, dev->mem
>> is set to NULL. If later, qva_to_vva() is called, a segfault
>> occurs.
>>
>> Fixes: 8f972312b8f4 ("vhost: support vhost-user")
>> Cc: stable at dpdk.org
>>
>> Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
>> ---
>> lib/librte_vhost/vhost_user.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
> 
> Jumping to an out label would have worked as well, but it doesn't
> really matter.
> 
> Reviewed-by: Jens Freimann <jfreimann at redhat.com>
> 


Thanks, applied with label change you suggested.

Maxime


More information about the dev mailing list