[dpdk-dev] [PATCH] examples/ioat: fix possible null dereference

David Marchand david.marchand at redhat.com
Tue Nov 26 17:27:50 CET 2019


On Mon, Nov 25, 2019 at 5:48 PM Bruce Richardson
<bruce.richardson at intel.com> wrote:
>
> When searching for raw devices with the correct type, we check the driver
> name using strcmp, without first checking that the call to info get
> succeeded and assigned a value to that pointer.
>
> If the call to get the device info fails, we can treat it as if the device
> didn't match, and continue the loop, so the easiest fix is just to skip the
> strcmp if the driver_name is null. [A non-null value from a previous failed
> match is ok as it too causes the same behaviour of another loop iteration].
>
> Coverity issue: 350353
> Fixes: 2328542ed84e ("examples/ioat: add rawdev copy mode")
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>

Applied, thanks.



--
David Marchand



More information about the dev mailing list