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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 7 Jul 2021 13:50:21 +0200
From:   Christian König <christian.koenig@....com>
To:     Lucas Stach <l.stach@...gutronix.de>,
        Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org
Cc:     Tian Tao <tiantao6@...ilicon.com>, etnaviv@...ts.freedesktop.org,
        dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH AUTOSEL 5.13 001/189] drm/etnaviv: fix NULL check before
 some freeing functions is not needed



Am 07.07.21 um 12:52 schrieb Lucas Stach:
> Am Dienstag, dem 06.07.2021 um 07:11 -0400 schrieb Sasha Levin:
>> From: Tian Tao <tiantao6@...ilicon.com>
>>
>> [ Upstream commit 7d614ab2f20503ed8766363d41f8607337571adf ]
>>
>> fixed the below warning:
>> drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c:84:2-8: WARNING: NULL check
>> before some freeing functions is not needed.
> While the subject contains "fix" this only removes a duplicated NULL
> check, so the code is correct before and after this change.
> Is this really stable material? Doesn't this just add commit noise to
> the stable kernels?

Yeah, agree.

I also had a case where a NULL check was removed in amdgpu and then a 
bit later back ported to stable.

Maybe just use something like "remove superfluous NULL check".

Regards,
Christian.

>
> Regards,
> Lucas
>
>> Signed-off-by: Tian Tao <tiantao6@...ilicon.com>
>> Acked-by: Christian König <christian.koenig@....com>
>> Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
>> Signed-off-by: Sasha Levin <sashal@...nel.org>
>> ---
>>   drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
>> index b390dd4d60b7..d741b1d735f7 100644
>> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
>> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c
>> @@ -80,8 +80,7 @@ static void etnaviv_gem_prime_release(struct etnaviv_gem_object *etnaviv_obj)
>>   	/* Don't drop the pages for imported dmabuf, as they are not
>>   	 * ours, just free the array we allocated:
>>   	 */
>> -	if (etnaviv_obj->pages)
>> -		kvfree(etnaviv_obj->pages);
>> +	kvfree(etnaviv_obj->pages);
>>   
>>   	drm_prime_gem_destroy(&etnaviv_obj->base, etnaviv_obj->sgt);
>>   }
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ