Re: [dpdk-dev] [PATCH 3/3] vhost: fix null pointer checking

2019-04-04 Thread Tiwei Bie
On Thu, Apr 04, 2019 at 02:47:24PM +0800, Ye Xiaolong wrote: > Hi, Tiwei, > > On 04/04, Tiwei Bie wrote: > [snip] > >> @@ -515,7 +515,7 @@ rte_vhost_get_ifname(int vid, char *buf, size_t len) > >> { > >>struct virtio_net *dev = get_device(vid); > >> > >> - if (dev == NULL) > >> + if (dev

Re: [dpdk-dev] [PATCH 3/3] vhost: fix null pointer checking

2019-04-03 Thread Ye Xiaolong
Hi, Tiwei, On 04/04, Tiwei Bie wrote: [snip] >> @@ -515,7 +515,7 @@ rte_vhost_get_ifname(int vid, char *buf, size_t len) >> { >> struct virtio_net *dev = get_device(vid); >> >> -if (dev == NULL) >> +if (dev == NULL || !buf) > >It would be better to do the check in this way: (!dev |

Re: [dpdk-dev] [PATCH 3/3] vhost: fix null pointer checking

2019-04-03 Thread Tiwei Bie
On Wed, Apr 03, 2019 at 05:08:23PM +0100, Mohammad Abdul Awal wrote: > Null value for parameters will cause segfault. > > Fuxes: d7280c9fff ("vhost: support selective datapath") s/Fuxes/Fixes/ > Fixes: 72e8543093 ("vhost: add external message handling to the API") Should be 72e8543093df ("vhost

[dpdk-dev] [PATCH 3/3] vhost: fix null pointer checking

2019-04-03 Thread Mohammad Abdul Awal
Null value for parameters will cause segfault. Fuxes: d7280c9fff ("vhost: support selective datapath") Fixes: 72e8543093 ("vhost: add external message handling to the API") Fixes: a277c71598 ("vhost: refactor code structure") Fixes: ca33faf9ef ("vhost: introduce API to fetch negotiated features")