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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <dbb7c7ae-1c8e-4b7e-bbb5-a7866d173468@oss.qualcomm.com>
Date: Mon, 3 Nov 2025 15:37:28 +0800
From: "Yu Zhang(Yuriy)" <yu.zhang@....qualcomm.com>
To: Baochen Qiang <baochen.qiang@....qualcomm.com>, jjohnson@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
        ath11k@...ts.infradead.org
Subject: Re: [PATCH ath-next 2/6] wifi: ath11k: Register debugfs for CFR
 configuration



On 11/3/2025 11:14 AM, Baochen Qiang wrote:
> 
> 
> On 11/2/2025 5:21 PM, Yu Zhang(Yuriy) wrote:
>>
>>
>> On 10/31/2025 10:43 AM, Baochen Qiang wrote:
>>>
>>>
>>> On 10/30/2025 12:31 PM, Yu Zhang(Yuriy) wrote:
>>>
>>>> @@ -88,6 +275,7 @@ void ath11k_cfr_deinit(struct ath11k_base *ab)
>>>>                ar = ab->pdevs[i].ar;
>>>>                cfr = &ar->cfr;
>>>>    +            ath11k_cfr_debug_unregister(ar);
>>>>                ath11k_cfr_ring_free(ar);
>>>>                  spin_lock_bh(&cfr->lut_lock);
>>>> @@ -140,6 +328,8 @@ int ath11k_cfr_init(struct ath11k_base *ab)
>>>>            }
>>>>              cfr->lut_num = num_lut_entries;
>>>> +
>>>> +        ath11k_cfr_debug_register(ar);
>>>>        }
>>>>          return 0;
>>>
>>> miss _debug_unregister() in the error handling?
>>>
>>>
>> The documention for debugfs_create_file() tells us:
>>   * NOTE: it's expected that most callers should _ignore_ the errors returned
>>   * by this function. Other debugfs functions handle the fact that the "dentry"
>>   * passed to them could be an error and they don't crash in that case.
>>   * Drivers should generally work fine even if debugfs fails to init anyway.
>>
>> So IMO any failure to create the file should be ignored.
> 
> Maybe I was not clear ...
> 
> I was not meaning the error check on ath11k_cfr_debug_register() or debugfs_create_file(),
> but was meaning that in the err handling below it, _debug_unregistered needs to be added:
> 

Got it,Thanks, will update.

> 		cfr->lut_num = num_lut_entries;
> +
> +               ath11k_cfr_debug_register(ar);
> 	}
> 
> 	return 0;
> 
> err:
> 	for (i = i - 1; i >= 0; i--) {
> 		ar = ab->pdevs[i].ar;
> 		cfr = &ar->cfr;
> 
> +		ath11k_cfr_debug_unregister()
> 		ath11k_cfr_ring_free(ar);
> 
> 		spin_lock_bh(&cfr->lut_lock);
> 		kfree(cfr->lut);
> 		cfr->lut = NULL;
> 		spin_unlock_bh(&cfr->lut_lock);
> 	}
> 	return ret;
> }
> 
>>
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ