[dpdk-dev] [PATCH v3 2/5] examples/vhost_scsi: fix missing NULL-check for parameter
Tiwei Bie
tiwei.bie at intel.com
Tue Apr 9 03:53:51 CEST 2019
On Mon, Apr 08, 2019 at 10:46:37AM +0100, Bruce Richardson wrote:
> Coverity points out that there is a check in the main thread loop for the
> ctrlr->bdev being NULL, but by that stage the pointer has already been
> dereferenced. Therefore, for safety, before we enter the loop do an
> initial check on the parameter structure.
>
> Coverity issue: 158657
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> CC: stable at dpdk.org
> CC: Maxime Coquelin <maxime.coquelin at redhat.com>
> CC: Tiwei Bie <tiwei.bie at intel.com>
> CC: Zhihong Wang <zhihong.wang at intel.com>
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
> examples/vhost_scsi/vhost_scsi.c | 6 ++++++
> 1 file changed, 6 insertions(+)
Reviewed-by: Tiwei Bie <tiwei.bie at intel.com>
More information about the dev
mailing list