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>] [day] [month] [year] [list]
Message-ID: <202209191450.Y4sMY2Om-lkp@intel.com>
Date:   Mon, 19 Sep 2022 12:19:34 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     kbuild@...ts.01.org, Thomas Zimmermann <tzimmermann@...e.de>
Cc:     lkp@...el.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org,
        Javier Martinez Canillas <javierm@...hat.com>
Subject: drivers/gpu/drm/display/drm_hdcp_helper.c:254 drm_hdcp_request_srm()
 error: uninitialized symbol 'fw'.

Hi Thomas,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   521a547ced6477c54b4b0cc206000406c221b4d6
commit: 6a99099fe1d6c46cbcd74298eeb386c4b9048f77 drm/display: Move HDCP helpers into display-helper module
config: arc-randconfig-m041-20220919 (https://download.01.org/0day-ci/archive/20220919/202209191450.Y4sMY2Om-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>

smatch warnings:
drivers/gpu/drm/display/drm_hdcp_helper.c:254 drm_hdcp_request_srm() error: uninitialized symbol 'fw'.

vim +/fw +254 drivers/gpu/drm/display/drm_hdcp_helper.c

79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  233  static int drm_hdcp_request_srm(struct drm_device *drm_dev,
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  234  				u8 **revoked_ksv_list, u32 *revoked_ksv_cnt)
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  235  {
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  236  	char fw_name[36] = "display_hdcp_srm.bin";
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  237  	const struct firmware *fw;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  238  	int ret;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  239  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  240  	ret = request_firmware_direct(&fw, (const char *)fw_name,
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  241  				      drm_dev->dev);
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  242  	if (ret < 0) {
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  243  		*revoked_ksv_cnt = 0;
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  244  		*revoked_ksv_list = NULL;
5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  245  		ret = 0;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  246  		goto exit;

"fw" isn't initialized so this will crash.  Just "return 0;"

5fe89a6acd668c drivers/gpu/drm/drm_hdcp.c Sean Paul    2020-04-14  247  	}
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  248  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  249  	if (fw->size && fw->data)
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  250  		ret = drm_hdcp_srm_update(fw->data, fw->size, revoked_ksv_list,
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  251  					  revoked_ksv_cnt);
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  252  
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  253  exit:
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07 @254  	release_firmware(fw);
79643fddd6eb2d drivers/gpu/drm/drm_hdcp.c Ramalingam C 2020-02-12  255  	return ret;
6498bf5800a302 drivers/gpu/drm/drm_hdcp.c Ramalingam C 2019-05-07  256  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ