tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 8d055501b2f0dc4e29197de45eabdd21f73fa507 commit: 901dbb48d8a4f60af427f1ec67ac1247ff219f39 [22374/22416] nouveau: lock the client object tree. config: arm64-defconfig (https://download.01.org/0day-ci/archive/20240512/202405120429.wVDB0LUK-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240512/202405120429.wVDB0LUK-lkp@i...)
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 | Closes: https://lore.kernel.org/oe-kbuild-all/202405120429.wVDB0LUK-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpu/drm/nouveau/nvkm/core/object.c: In function 'nvkm_object_search':
drivers/gpu/drm/nouveau/nvkm/core/object.c:37:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
37 | struct rb_node *node = client->objroot.rb_node; | ^~~~~~ In file included from drivers/gpu/drm/nouveau/nvkm/core/object.c:25: drivers/gpu/drm/nouveau/nvkm/core/object.c: In function 'nvkm_object_fini': drivers/gpu/drm/nouveau/include/nvkm/core/client.h:41:28: warning: comparison of unsigned expression in '>= 0' is always true [-Wtype-limits] 41 | if (_client->debug >= NV_DBG_##l) \ | ^~ drivers/gpu/drm/nouveau/include/nvkm/core/client.h:45:30: note: in expansion of macro 'nvif_printk' 45 | #define nvif_fatal(o,f,a...) nvif_printk((o), FATAL, CRIT, f, ##a) | ^~~~~~~~~~~ drivers/gpu/drm/nouveau/nvkm/core/object.c:226:25: note: in expansion of macro 'nvif_fatal' 226 | nvif_fatal(object, "failed to restart, %d\n", rret); | ^~~~~~~~~~
vim +37 drivers/gpu/drm/nouveau/nvkm/core/object.c
9274f4a9ba7e70 drivers/gpu/drm/nouveau/core/core/object.c Ben Skeggs 2012-07-06 27 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 28 struct nvkm_object * 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 29 nvkm_object_search(struct nvkm_client *client, u64 handle, 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 30 const struct nvkm_object_func *func) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 31 { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 32 struct nvkm_object *object; 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 33 unsigned long flags; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 34 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 35 if (handle) { 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 36 spin_lock_irqsave(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 @37 struct rb_node *node = client->objroot.rb_node; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 38 while (node) { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 39 object = rb_entry(node, typeof(*object), node); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 40 if (handle < object->object) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 41 node = node->rb_left; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 42 else 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 43 if (handle > object->object) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 44 node = node->rb_right; 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 45 else { 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 46 spin_unlock_irqrestore(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 47 goto done; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 48 } 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 49 } 901dbb48d8a4f6 drivers/gpu/drm/nouveau/nvkm/core/object.c Dave Airlie 2024-05-09 50 spin_unlock_irqrestore(&client->obj_lock, flags); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 51 return ERR_PTR(-ENOENT); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 52 } else { 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 53 object = &client->object; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 54 } 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 55 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 56 done: 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 57 if (unlikely(func && object->func != func)) 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 58 return ERR_PTR(-EINVAL); 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 59 return object; 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 60 } 110cccff955313 drivers/gpu/drm/nouveau/nvkm/core/object.c Ben Skeggs 2016-12-22 61
:::::: The code at line 37 was first introduced by commit :::::: 110cccff955313c66dccd2817f62368f106d9bf2 drm/nouveau/core/object: support lookup of specific object types
:::::: TO: Ben Skeggs bskeggs@redhat.com :::::: CC: Ben Skeggs bskeggs@redhat.com