Re: [Intel-gfx] [PATCH 4/5] dma-buf: Stop using SLAB_TYPESAFE_BY_RCU in selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jason,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.13-rc6 next-20210615]
[cannot apply to drm/drm-next]
[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/Jason-Ekstrand/dma-fence-i915-Stop-allowing-SLAB_TYPESAFE_BY_RCU-for-dma_fence/20210616-154432
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: sparc-randconfig-s032-20210615 (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/c889567ea79d1ce55ff8868bae789bbb3223503d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jason-Ekstrand/dma-fence-i915-Stop-allowing-SLAB_TYPESAFE_BY_RCU-for-dma_fence/20210616-154432
        git checkout c889567ea79d1ce55ff8868bae789bbb3223503d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sparc 

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


sparse warnings: (new ones prefixed by >>)
>> drivers/dma-buf/st-dma-fence.c:457:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected struct dma_fence *fence @@     got struct dma_fence [noderef] __rcu * @@
   drivers/dma-buf/st-dma-fence.c:457:57: sparse:     expected struct dma_fence *fence
   drivers/dma-buf/st-dma-fence.c:457:57: sparse:     got struct dma_fence [noderef] __rcu *

vim +457 drivers/dma-buf/st-dma-fence.c

   434	
   435	static int thread_signal_callback(void *arg)
   436	{
   437		const struct race_thread *t = arg;
   438		unsigned long pass = 0;
   439		unsigned long miss = 0;
   440		int err = 0;
   441	
   442		while (!err && !kthread_should_stop()) {
   443			struct dma_fence *f1, *f2;
   444			struct simple_cb cb;
   445	
   446			f1 = mock_fence();
   447			if (!f1) {
   448				err = -ENOMEM;
   449				break;
   450			}
   451	
   452			rcu_assign_pointer(t->fences[t->id], f1);
   453			smp_wmb();
   454	
   455			rcu_read_lock();
   456			do {
 > 457				f2 = dma_fence_get_rcu(t->fences[!t->id]);
   458			} while (!f2 && !kthread_should_stop());
   459			rcu_read_unlock();
   460	
   461			if (t->before)
   462				dma_fence_signal(f1);
   463	
   464			smp_store_mb(cb.seen, false);
   465			if (!f2 ||
   466			    dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
   467				miss++;
   468				cb.seen = true;
   469			}
   470	
   471			if (!t->before)
   472				dma_fence_signal(f1);
   473	
   474			if (!cb.seen) {
   475				dma_fence_wait(f2, false);
   476				__wait_for_callbacks(f2);
   477			}
   478	
   479			if (!READ_ONCE(cb.seen)) {
   480				pr_err("Callback not seen on thread %d, pass %lu (%lu misses), signaling %s add_callback; fence signaled? %s\n",
   481				       t->id, pass, miss,
   482				       t->before ? "before" : "after",
   483				       dma_fence_is_signaled(f2) ? "yes" : "no");
   484				err = -EINVAL;
   485			}
   486	
   487			dma_fence_put(f2);
   488	
   489			rcu_assign_pointer(t->fences[t->id], NULL);
   490			smp_wmb();
   491	
   492			dma_fence_put(f1);
   493	
   494			pass++;
   495		}
   496	
   497		pr_info("%s[%d] completed %lu passes, %lu misses\n",
   498			__func__, t->id, pass, miss);
   499		return err;
   500	}
   501	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux