On 4/10/26 3:12 PM, Mikhail Dmitrichenko wrote:
> VLOG_WARN_BUF() allocates a new string with xasprintf() every time it is
> called and overwrites *errp without freeing the previous value. This can
> lead to a memory leak if multiple warnings are emitted or if a later
> hard error in netdev_dpdk_set_config() also writes
> to errp.
> 
> The three cases in dpdk_set_rx_steer_config() are not fatal errors:
> - unsupported rx-steering value
> - rss+lacp on non-ethernet port
> - rss+lacp together with hw-offload
> 
> In all cases program simply log a warning and fall back to default RSS
> steering. Configuration continues normally (err remains 0 and execution
> flow do not goto out).
> 
> Therefore change them to plain VLOG_WARN(). As a result the 'errp'
> parameter becomes unused and is removed from the function signature and
> the call site in netdev_dpdk_set_config().
> 
> This makes the code cleaner and consistent with the rest of netdev-dpdk.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: fc06ea9a1883 ("netdev-dpdk: Add custom rx-steering configuration.")
> Signed-off-by: Mikhail Dmitrichenko <[email protected]>
> ---
>  lib/netdev-dpdk.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)

Thanks Mikhail. I shortened the subject line length to avoid a
checkpatch warning and applied to main branch. Backported to all
branches down as far as branch-3.3 as well.

I also added you to the AUTHORS.rst - Welcome!

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to