[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201102183051.GZ18329@kadam>
Date: Mon, 2 Nov 2020 21:30:51 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: kbuild@...ts.01.org, Tian Tao <tiantao6@...ilicon.com>,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...ux.ie, daniel@...ll.ch,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Cc: lkp@...el.com, Dan Carpenter <error27@...il.com>,
kbuild-all@...ts.01.org
Subject: [kbuild] Re: [PATCH] drm/irq: Add irq as false detection
Hi Tian,
url: https://github.com/0day-ci/linux/commits/Tian-Tao/drm-irq-Add-irq-as-false-detection/20201102-192137
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3cea11cd5e3b00d91caf0b4730194039b45c5891
config: x86_64-randconfig-m001-20201102 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
New smatch warnings:
drivers/gpu/drm/drm_irq.c:175 drm_irq_uninstall() warn: variable dereferenced before check 'dev' (see line 175)
Old smatch warnings:
drivers/gpu/drm/drm_irq.c:149 drm_irq_install() warn: 'irq' not released on lines: 133.
vim +/dev +175 drivers/gpu/drm/drm_irq.c
84b1fd103dbbe01 drivers/char/drm/drm_irq.c Dave Airlie 2007-07-11 169 int drm_irq_uninstall(struct drm_device *dev)
^1da177e4c3f415 drivers/char/drm/drm_irq.c Linus Torvalds 2005-04-16 170 {
dc1336ff4fe08ae drivers/gpu/drm/drm_irq.c Jesse Barnes 2009-01-06 171 unsigned long irqflags;
4423843cde65232 drivers/gpu/drm/drm_irq.c Ville Syrjälä 2013-10-04 172 bool irq_enabled;
4423843cde65232 drivers/gpu/drm/drm_irq.c Ville Syrjälä 2013-10-04 173 int i;
^1da177e4c3f415 drivers/char/drm/drm_irq.c Linus Torvalds 2005-04-16 174
fa889e8baa5377b drivers/gpu/drm/drm_irq.c Tian Tao 2020-11-02 @175 if (!dev->irq_enabled || !dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^
This is checking "dev" after dereferencing it. Can "dev" even be NULL?
fa889e8baa5377b drivers/gpu/drm/drm_irq.c Tian Tao 2020-11-02 176 return 0;
fa889e8baa5377b drivers/gpu/drm/drm_irq.c Tian Tao 2020-11-02 177
^1da177e4c3f415 drivers/char/drm/drm_irq.c Linus Torvalds 2005-04-16 178 irq_enabled = dev->irq_enabled;
4423843cde65232 drivers/gpu/drm/drm_irq.c Ville Syrjälä 2013-10-04 179 dev->irq_enabled = false;
^1da177e4c3f415 drivers/char/drm/drm_irq.c Linus Torvalds 2005-04-16 180
dc1336ff4fe08ae drivers/gpu/drm/drm_irq.c Jesse Barnes 2009-01-06 181 /*
3bff93d64cf59f0 drivers/gpu/drm/drm_irq.c Daniel Vetter 2015-02-22 182 * Wake up any waiters so they don't hang. This is just to paper over
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (30701 bytes)
_______________________________________________
kbuild mailing list -- kbuild@...ts.01.org
To unsubscribe send an email to kbuild-leave@...ts.01.org
Powered by blists - more mailing lists