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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 27 Feb 2023 15:48:34 +0200
From:   Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To:     Thomas Zimmermann <tzimmermann@...e.de>,
        Nathan Chancellor <nathan@...nel.org>, airlied@...il.com,
        daniel@...ll.ch, javierm@...hat.com
Cc:     ndesaulniers@...gle.com, trix@...hat.com,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, patches@...ts.linux.dev,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] drm: omapdrm: Do not use helper unininitialized in
 omap_fbdev_init()

On 27/02/2023 11:01, Thomas Zimmermann wrote:
> Hi
> 
> Am 24.02.23 um 18:25 schrieb Nathan Chancellor:
>> Clang warns (or errors with CONFIG_WERROR):
>>
>>    ../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:6: error: variable 
>> 'helper' is used uninitialized whenever 'if' condition is true 
>> [-Werror,-Wsometimes-uninitialized]
>>            if (!fbdev)
>>                ^~~~~~
>>    ../drivers/gpu/drm/omapdrm/omap_fbdev.c:259:26: note: uninitialized 
>> use occurs here
>>            drm_fb_helper_unprepare(helper);
>>                                    ^~~~~~
>>    ../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:2: note: remove the 
>> 'if' if its condition is always false
>>            if (!fbdev)
>>            ^~~~~~~~~~~
>>    ../drivers/gpu/drm/omapdrm/omap_fbdev.c:228:30: note: initialize 
>> the variable 'helper' to silence this warning
>>            struct drm_fb_helper *helper;
>>                                        ^
>>                                         = NULL
>>    1 error generated.
>>
>> Return early, as there is nothing for the function to do if memory
>> cannot be allocated. There is no point in adding another label to just
>> emit the warning at the end of the function in this case, as memory
>> allocation failures are already logged.
>>
>> Fixes: 3fb1f62f80a1 ("drm/fb-helper: Remove drm_fb_helper_unprepare() 
>> from drm_fb_helper_fini()")
>> Link: https://github.com/ClangBuiltLinux/linux/issues/1809
>> Link: 
>> https://lore.kernel.org/oe-kbuild-all/202302250058.fYTe9aTP-lkp@intel.com/
>> Reported-by: kernel test robot <lkp@...el.com>
>> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
> 
> Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>
> 
>> ---
>> This is currently showing in mainline so I believe this should go to
>> drm-misc-next-fixes.
> 
> This tree is only active from -rc6 to sometime during the merge window. 
> I'll add your patch to drm-misc-fixes ASAP.

If it's not too late:

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>

  Tomi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ