lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88ca250d-0eb5-a150-0142-32b41b89c703@huawei.com>
Date:   Thu, 5 Sep 2019 19:01:50 +0800
From:   tanhuazhong <tanhuazhong@...wei.com>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
        <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <salil.mehta@...wei.com>, <yisen.zhuang@...wei.com>,
        <linuxarm@...wei.com>, <jakub.kicinski@...ronome.com>,
        Peng Li <lipeng321@...wei.com>
Subject: Re: [PATCH net-next 4/7] net: hns3: add client node validity judgment



On 2019/9/5 18:12, Sergei Shtylyov wrote:
> On 04.09.2019 17:06, Huazhong Tan wrote:
> 
>> From: Peng Li <lipeng321@...wei.com>
>>
>> HNS3 driver can only unregister client which included in 
>> hnae3_client_list.
>> This patch adds the client node validity judgment.
>>
>> Signed-off-by: Peng Li <lipeng321@...wei.com>
>> Signed-off-by: Huazhong Tan <tanhuazhong@...wei.com>
>> ---
>>   drivers/net/ethernet/hisilicon/hns3/hnae3.c | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.c 
>> b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
>> index 528f624..6aa5257 100644
>> --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.c
>> +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.c
>> @@ -138,12 +138,28 @@ EXPORT_SYMBOL(hnae3_register_client);
>>   void hnae3_unregister_client(struct hnae3_client *client)
>>   {
>> +    struct hnae3_client *client_tmp;
>>       struct hnae3_ae_dev *ae_dev;
>> +    bool existed = false;
>>       if (!client)
>>           return;
>>       mutex_lock(&hnae3_common_lock);
>> +
>> +    list_for_each_entry(client_tmp, &hnae3_client_list, node) {
>> +        if (client_tmp->type == client->type) {
>> +            existed = true;
>> +            break;
>> +        }
>> +    }
>> +
>> +    if (!existed) {
>> +        mutex_unlock(&hnae3_common_lock);
>> +        pr_err("client %s not existed!\n", client->name);
> 
>     Did not exist, you mean?
> 

yes

> [...]
> 
> MBR, Sergei
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ