Skip to contentSkip to conversation

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR: aconnector is NULL but dereferenced. (fwd)

PATCH In review Julia Lawall 2 participants 2 messages Oct 10, 2023 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 6935/11192 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR: aconnector is NULL but dereferenced. (fwd)

See line 538.

julia

---------- Forwarded message ----------
Date: Wed, 11 Oct 2023 01:30:34 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: [linux-next:master 6935/11192]
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR:
aconnector is NULL but dereferenced.

BCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Hamza Mahfooz <[email protected]>
CC: Alex Deucher <[email protected]>
CC: Rodrigo Siqueira <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c0a6edb636cba9c0d1db966a54d910a02e52e4be
commit: 5d72e247e58c966f4e50cffebf0d414de7fc90ed [6935/11192] drm/amd/display: switch DC over to the new DRM logging macros

:::::: branch date: 12 hours ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-104-20231010 (https://download.01.org/0day-ci/archive/20231011/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231011/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags

| Reported-by: kernel test robot <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR: aconnector is NULL but dereferenced.

vim +538 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

4562236b3bc0a28 Harry Wentland 2017-09-12  534
c84dec2fe8837fa Harry Wentland 2017-09-05  535  	struct amdgpu_dm_connector *aconnector = link->priv;
4562236b3bc0a28 Harry Wentland 2017-09-12  536
4562236b3bc0a28 Harry Wentland 2017-09-12  537  	if (!aconnector) {
5d72e247e58c966 Hamza Mahfooz  2023-09-20 @538  		drm_dbg_dp(aconnector->base.dev,
5d72e247e58c966 Hamza Mahfooz  2023-09-20  539  			   "Failed to find connector for link!\n");
4562236b3bc0a28 Harry Wentland 2017-09-12  540  		return false;
4562236b3bc0a28 Harry Wentland 2017-09-12  541  	}
4562236b3bc0a28 Harry Wentland 2017-09-12  542
4648cf5fc8c78d7 Hamza Mahfooz  2023-03-08  543  	return drm_dp_dpcd_read(&aconnector->dm_dp_aux.aux, address, data,
4648cf5fc8c78d7 Hamza Mahfooz  2023-03-08  544  				size) == size;
4562236b3bc0a28 Harry Wentland 2017-09-12  545  }
4562236b3bc0a28 Harry Wentland 2017-09-12  546
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 38 lines · Julia Lawall

See line 538.

julia

---------- Forwarded message ----------
Date: Wed, 11 Oct 2023 01:30:34 +0800
From: kernel test robot <[email protected]>
To: [email protected]
Cc: [email protected], Julia Lawall <[email protected]>
Subject: [linux-next:master 6935/11192]
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR:
aconnector is NULL but dereferenced.

BCC: [email protected]
CC: [email protected]
CC: Linux Memory Management List <[email protected]>
TO: Hamza Mahfooz <[email protected]>
CC: Alex Deucher <[email protected]>
CC: Rodrigo Siqueira <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c0a6edb636cba9c0d1db966a54d910a02e52e4be
commit: 5d72e247e58c966f4e50cffebf0d414de7fc90ed [6935/11192] drm/amd/display: switch DC over to the new DRM logging macros

:::::: branch date: 12 hours ago
:::::: commit date: 2 weeks ago
config: x86_64-randconfig-104-20231010 (https://download.01.org/0day-ci/archive/20231011/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231011/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags

| Reported-by: kernel test robot <[email protected]>
| Reported-by: Julia Lawall <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

cocci warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c:538:25-29: ERROR: aconnector is NULL but dereferenced.

Quoted 8 lines

vim +538 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

4562236b3bc0a28 Harry Wentland 2017-09-12  534
c84dec2fe8837fa Harry Wentland 2017-09-05  535  	struct amdgpu_dm_connector *aconnector = link->priv;
4562236b3bc0a28 Harry Wentland 2017-09-12  536
4562236b3bc0a28 Harry Wentland 2017-09-12  537  	if (!aconnector) {
5d72e247e58c966 Hamza Mahfooz  2023-09-20 @538  		drm_dbg_dp(aconnector->base.dev,
5d72e247e58c966 Hamza Mahfooz  2023-09-20  539  			   "Failed to find connector for link!\n");

Can you send out a patch that drops drm_dbg_dp() from here? Since, it should only be reachable before hw init and it is expected at that point, so it doesn't provide any meaningful insights.

Quoted 8 lines
4562236b3bc0a28 Harry Wentland 2017-09-12  540  		return false;
4562236b3bc0a28 Harry Wentland 2017-09-12  541  	}
4562236b3bc0a28 Harry Wentland 2017-09-12  542
4648cf5fc8c78d7 Hamza Mahfooz  2023-03-08  543  	return drm_dp_dpcd_read(&aconnector->dm_dp_aux.aux, address, data,
4648cf5fc8c78d7 Hamza Mahfooz  2023-03-08  544  				size) == size;
4562236b3bc0a28 Harry Wentland 2017-09-12  545  }
4562236b3bc0a28 Harry Wentland 2017-09-12  546
Signature · 1 line
Hamza