Re: [PATCH] drm/i915/selftests: Fix resource leak in __sseu_prepare

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

 



Hi Radhakrishna,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20190215]
[cannot apply to v5.0-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Radhakrishna-Sripada/drm-i915-selftests-Fix-resource-leak-in-__sseu_prepare/20190216-081923
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-k1-02151608 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from drivers/gpu/drm/i915/i915_gem_context.c:1386:
   drivers/gpu/drm/i915/selftests/i915_gem_context.c: In function '__sseu_prepare':
>> drivers/gpu/drm/i915/selftests/i915_gem_context.c:753:8: error: 'spin' undeclared (first use in this function); did you mean 'fs_pin'?
     kfree(spin);
           ^~~~
           fs_pin
   drivers/gpu/drm/i915/selftests/i915_gem_context.c:753:8: note: each undeclared identifier is reported only once for each function it appears in

vim +753 drivers/gpu/drm/i915/selftests/i915_gem_context.c

   706	
   707	static int
   708	__sseu_prepare(struct drm_i915_private *i915,
   709		       const char *name,
   710		       unsigned int flags,
   711		       struct i915_gem_context *ctx,
   712		       struct intel_engine_cs *engine,
   713		       struct igt_spinner **spin_out)
   714	{
   715		int ret = 0;
   716	
   717		if (flags & (TEST_BUSY | TEST_RESET)) {
   718			struct igt_spinner *spin;
   719			struct i915_request *rq;
   720	
   721			spin = kzalloc(sizeof(*spin), GFP_KERNEL);
   722			if (!spin) {
   723				ret = -ENOMEM;
   724				goto out;
   725			}
   726	
   727			ret = igt_spinner_init(spin, i915);
   728			if (ret)
   729				goto clean;
   730	
   731			rq = igt_spinner_create_request(spin, ctx, engine, MI_NOOP);
   732			if (IS_ERR(rq)) {
   733				ret = PTR_ERR(rq);
   734				igt_spinner_fini(spin);
   735				goto clean;
   736			}
   737	
   738			i915_request_add(rq);
   739	
   740			if (!igt_wait_for_spinner(spin, rq)) {
   741				pr_err("%s: Spinner failed to start!\n", name);
   742				igt_spinner_end(spin);
   743				igt_spinner_fini(spin);
   744				ret = -ETIMEDOUT;
   745				goto clean;
   746			}
   747	
   748			*spin_out = spin;
   749			goto out;
   750		}
   751	
   752	clean:
 > 753		kfree(spin);
   754	out:
   755		return ret;
   756	}
   757	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux