Re: [External] Re: [PATCH v2 2/2] platform/x86: think-lmi: Opcode support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Hans

On 2021-11-18 06:32, Hans de Goede wrote:
> Hi Mark,
> 
> On 11/17/21 19:44, Mark Pearson wrote:
>> Implement Opcode support.
>> This is available on ThinkCenter and ThinkStations platforms and
>> gives improved password setting capabilities
>>
>> Add options to configure System, HDD & NVMe passwords.
>> HDD & NVMe passwords need a user level (user/master) along with
>> drive index.
>>
>> Signed-off-by: Mark Pearson <markpearson@xxxxxxxxxx>
>> ---
>> Changes in v2:
>>  - Rebased to latest
>>  - Fixed kobject_init implementation for system-mgmt and drive roles
>>  - Added is_visible support for level and index attributes
> 
> Thank you.
> 
> I noticed one small issue, where tlmi_priv.pwd_admin would get
> free-ed twice on a goto fail_free_pwd_admin.
> 
> I've squashed in the following fix to fix this:
> 
> --- a/drivers/platform/x86/think-lmi.c
> +++ b/drivers/platform/x86/think-lmi.c
> @@ -1152,7 +1152,7 @@ static int tlmi_analyze(void)
>  	tlmi_priv.pwd_power = tlmi_create_auth("pop", "power-on");
>  	if (!tlmi_priv.pwd_power) {
>  		ret = -ENOMEM;
> -		goto fail_free_pwd_admin;
> +		goto fail_clear_attr;
>  	}
>  	if (tlmi_priv.pwdcfg.core.password_state & TLMI_POP_PWD)
>  		tlmi_priv.pwd_power->valid = true;
> @@ -1204,8 +1204,6 @@ static int tlmi_analyze(void)
>  	}
>  	return 0;
>  
> -fail_free_pwd_admin:
> -	kfree(tlmi_priv.pwd_admin);
>  fail_clear_attr:
>  	for (i = 0; i < TLMI_SETTINGS_COUNT; ++i) {
>  		if (tlmi_priv.setting[i]) {
> 
Thanks - good catch.

> Thank you for your patch-series, I've applied the series to my
> review-hans branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans>> 
> Note it will show up in my review-hans branch once I've pushed my
> local branch there, which might take a while.
> 
> Once I've run some tests on this branch the patches there will be
> added to the platform-drivers-x86/for-next branch and eventually
> will be included in the pdx86 pull-request to Linus for the next
> merge-window.
> 
> Regards,
> 
> Hans
> 
> p.s.
> 
> I've also noticed 2 small possible cleanups, I will send out
> a patch-series for that soon. Can you please give these cleanups
> a test-spin (on top of my latest review-hans branch) ?

Will do. Thank you!
Mark




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux