linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev, Alex Hung <alex.hung@amd.com>
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Harry Wentland <harry.wentland@amd.com>
Subject: [linux-next:master 4679/10295] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9280 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9277)
Date: Thu, 4 Jan 2024 15:05:03 +0300	[thread overview]
Message-ID: <7e5c7ab1-4ee9-4221-b585-6a9aa2c6dcc3@moroto.mountain> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   39676dfe52331dba909c617f213fdb21015c8d10
commit: f872e2f5f0beabd34c03799a5c597f6ba47b51cc [4679/10295] drm/amd/display: Add writeback enable field (wb_enabled)
config: x86_64-randconfig-161-20231228 (https://download.01.org/0day-ci/archive/20240101/202401010520.1VZfOvg0-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0

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 <lkp@intel.com>
| Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
| Closes: https://lore.kernel.org/r/202401010520.1VZfOvg0-lkp@intel.com/

New smatch warnings:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9280 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9277)

vim +/acrtc +9280 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c

e7b07ceef2a650 Harry Wentland      2017-08-10  9263  
c81e13b929df2f Alex Hung           2023-12-01  9264  	/* Enable writeback */
c81e13b929df2f Alex Hung           2023-12-01  9265  	for_each_new_connector_in_state(state, connector, new_con_state, i) {
c81e13b929df2f Alex Hung           2023-12-01  9266  		struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
c81e13b929df2f Alex Hung           2023-12-01  9267  		struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
c81e13b929df2f Alex Hung           2023-12-01  9268  
c81e13b929df2f Alex Hung           2023-12-01  9269  		if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK)
c81e13b929df2f Alex Hung           2023-12-01  9270  			continue;
c81e13b929df2f Alex Hung           2023-12-01  9271  
c81e13b929df2f Alex Hung           2023-12-01  9272  		if (!new_con_state->writeback_job)
c81e13b929df2f Alex Hung           2023-12-01  9273  			continue;
c81e13b929df2f Alex Hung           2023-12-01  9274  
c81e13b929df2f Alex Hung           2023-12-01  9275  		new_crtc_state = NULL;
c81e13b929df2f Alex Hung           2023-12-01  9276  
c81e13b929df2f Alex Hung           2023-12-01 @9277  		if (acrtc)
                                                                    ^^^^^
Check for NULL

c81e13b929df2f Alex Hung           2023-12-01  9278  			new_crtc_state = drm_atomic_get_new_crtc_state(state, &acrtc->base);
c81e13b929df2f Alex Hung           2023-12-01  9279  
f872e2f5f0beab Alex Hung           2023-12-01 @9280  		if (acrtc->wb_enabled)
                                                                    ^^^^^^^^^^^^^^^^^
Unchecked dereference

f872e2f5f0beab Alex Hung           2023-12-01  9281  			continue;
f872e2f5f0beab Alex Hung           2023-12-01  9282  
c81e13b929df2f Alex Hung           2023-12-01  9283  		dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
c81e13b929df2f Alex Hung           2023-12-01  9284  
c81e13b929df2f Alex Hung           2023-12-01  9285  		dm_set_writeback(dm, dm_new_crtc_state, connector, new_con_state);
f872e2f5f0beab Alex Hung           2023-12-01  9286  		acrtc->wb_enabled = true;
c81e13b929df2f Alex Hung           2023-12-01  9287  	}
c81e13b929df2f Alex Hung           2023-12-01  9288  
6ce8f316673f61 Nicholas Kazlauskas 2019-07-11  9289  	/* Update audio instances for each connector. */
6ce8f316673f61 Nicholas Kazlauskas 2019-07-11  9290  	amdgpu_dm_commit_audio(dev, state);
6ce8f316673f61 Nicholas Kazlauskas 2019-07-11  9291  
7230362c78d441 Alex Deucher        2020-12-10  9292  	/* restore the backlight level */

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



                 reply	other threads:[~2024-01-04 12:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e5c7ab1-4ee9-4221-b585-6a9aa2c6dcc3@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=alex.hung@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox