lkml.org 
[lkml]   [2024]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next v4] net: openvswitch: Check vport netdev name
From
My mistake, I'm wondering that I need to submit a new patch or a v5 
version based on this patch?

在 4/23/24 08:38, Jakub Kicinski 写道:
> On Fri, 19 Apr 2024 14:14:25 +0800 Jun Gu wrote:
>> vport->dev = dev_get_by_name(ovs_dp_get_net(vport->dp), name);
>> - if (!vport->dev) {
>> + /* Ensure that the device exists and that the provided
>> + * name is not one of its aliases.
>> + */
>> + if (!vport->dev || strcmp(name, ovs_vport_name(vport))) {
>> err = -ENODEV;
>> goto error_free_vport;
>> }
>
> Sorry I applied this before I realised that it's buggy.
> dev_get_by_name() will give you a reference on the device.
> You must free it, so the error handling is different.
> Please follow up ASAP to fix that.
>

\
 
 \ /
  Last update: 2024-05-27 17:57    [W:0.678 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site