linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Iskren Chernev <iskren.chernev@gmail.com>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>
Cc: kbuild-all@lists.01.org, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	Iskren Chernev <iskren.chernev@gmail.com>
Subject: Re: [PATCH] drm/msm: Fix use-after-free in msm_gem with carveout
Date: Thu, 26 Nov 2020 19:28:15 +0800	[thread overview]
Message-ID: <202011261912.LWvr1gPN-lkp@intel.com> (raw)
In-Reply-To: <20201126082817.1242995-1-iskren.chernev@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3600 bytes --]

Hi Iskren,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20201125]
[also build test ERROR on 6147c83fd749d19a0d3ccc2f64d12138ab010b47]
[cannot apply to drm-intel/for-linux-next drm-tip/drm-tip linus/master robclark/msm-next v5.10-rc5 v5.10-rc4 v5.10-rc3 v5.10-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Iskren-Chernev/drm-msm-Fix-use-after-free-in-msm_gem-with-carveout/20201126-163426
base:    9d3e48f20e1159a7bb2ff5de96594b6375157fe0
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/b08a39143f118f378b9fbb9ccfa03999dc419b1c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Iskren-Chernev/drm-msm-Fix-use-after-free-in-msm_gem-with-carveout/20201126-163426
        git checkout b08a39143f118f378b9fbb9ccfa03999dc419b1c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/arm/include/asm/bug.h:60,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/current.h:5,
                    from ./arch/arm/include/generated/asm/current.h:1,
                    from include/linux/sched.h:12,
                    from include/linux/ratelimit.h:6,
                    from include/linux/dev_printk.h:16,
                    from include/linux/device.h:15,
                    from include/linux/dma-mapping.h:7,
                    from include/linux/dma-map-ops.h:9,
                    from drivers/gpu/drm/msm/msm_gem.c:7:
   drivers/gpu/drm/msm/msm_gem.c: In function 'put_iova_vmas':
>> drivers/gpu/drm/msm/msm_gem.c:380:35: error: 'struct msm_gem_object' has no member named 'lock'
     380 |  WARN_ON(!mutex_is_locked(&msm_obj->lock));
         |                                   ^~
   include/asm-generic/bug.h:119:25: note: in definition of macro 'WARN_ON'
     119 |  int __ret_warn_on = !!(condition);    \
         |                         ^~~~~~~~~
   drivers/gpu/drm/msm/msm_gem.c: In function 'msm_gem_free_object':
>> drivers/gpu/drm/msm/msm_gem.c:983:2: error: implicit declaration of function 'put_iova_vma'; did you mean 'put_iova_vmas'? [-Werror=implicit-function-declaration]
     983 |  put_iova_vma(obj);
         |  ^~~~~~~~~~~~
         |  put_iova_vmas
   cc1: some warnings being treated as errors

vim +380 drivers/gpu/drm/msm/msm_gem.c

   372	
   373	/* Called with msm_obj locked */
   374	static void
   375	put_iova_vmas(struct drm_gem_object *obj)
   376	{
   377		struct msm_gem_object *msm_obj = to_msm_bo(obj);
   378		struct msm_gem_vma *vma, *tmp;
   379	
 > 380		WARN_ON(!mutex_is_locked(&msm_obj->lock));
   381	
   382		list_for_each_entry_safe(vma, tmp, &msm_obj->vmas, list) {
   383			del_vma(vma);
   384		}
   385	}
   386	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 53991 bytes --]

      reply	other threads:[~2020-11-26 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26  8:28 [PATCH] drm/msm: Fix use-after-free in msm_gem with carveout Iskren Chernev
2020-11-26 11:28 ` kernel test robot [this message]

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=202011261912.LWvr1gPN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=iskren.chernev@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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;
as well as URLs for NNTP newsgroup(s).