Hi Thomas,
url:
https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/Convert-all-re...
base: 6b02addb1d1748d21dd1261e46029b264be4e5a0
config: i386-randconfig-m021-20200917 (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(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/gpu/drm/drm_prime.c:389 export_and_register_object() error: uninitialized symbol
'dmabuf'.
Old smatch warnings:
drivers/gpu/drm/drm_prime.c:359 drm_gem_prime_fd_to_handle() warn: inconsistent returns
'dev->object_name_lock'.
#
https://github.com/0day-ci/linux/commit/84300c9d089d60d5dc528a7bd6e287009...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Thomas-Zimmermann/Convert-all-remaining-drivers-to-GEM-object-functions/20200915-230157
git checkout 84300c9d089d60d5dc528a7bd6e2870090201f0e
vim +/dmabuf +389 drivers/gpu/drm/drm_prime.c
319c933c71f3db Daniel Vetter 2013-08-15 375 static struct dma_buf
*export_and_register_object(struct drm_device *dev,
319c933c71f3db Daniel Vetter 2013-08-15 376 struct drm_gem_object *obj,
319c933c71f3db Daniel Vetter 2013-08-15 377 uint32_t flags)
319c933c71f3db Daniel Vetter 2013-08-15 378 {
319c933c71f3db Daniel Vetter 2013-08-15 379 struct dma_buf *dmabuf;
319c933c71f3db Daniel Vetter 2013-08-15 380
319c933c71f3db Daniel Vetter 2013-08-15 381 /* prevent races with concurrent
gem_close. */
319c933c71f3db Daniel Vetter 2013-08-15 382 if (obj->handle_count == 0) {
319c933c71f3db Daniel Vetter 2013-08-15 383 dmabuf = ERR_PTR(-ENOENT);
319c933c71f3db Daniel Vetter 2013-08-15 384 return dmabuf;
319c933c71f3db Daniel Vetter 2013-08-15 385 }
319c933c71f3db Daniel Vetter 2013-08-15 386
b39b5394fabc79 Noralf Trønnes 2018-11-10 387 if (obj->funcs &&
obj->funcs->export)
b39b5394fabc79 Noralf Trønnes 2018-11-10 388 dmabuf = obj->funcs->export(obj,
flags);
dmabuf is not initialized on else path.
319c933c71f3db Daniel Vetter 2013-08-15 @389 if (IS_ERR(dmabuf)) {
^^^^^^^^^^^^^^
319c933c71f3db Daniel Vetter 2013-08-15 390 /* normally the created dma-buf takes
ownership of the ref,
319c933c71f3db Daniel Vetter 2013-08-15 391 * but if that fails then drop the ref
319c933c71f3db Daniel Vetter 2013-08-15 392 */
319c933c71f3db Daniel Vetter 2013-08-15 393 return dmabuf;
319c933c71f3db Daniel Vetter 2013-08-15 394 }
319c933c71f3db Daniel Vetter 2013-08-15 395
319c933c71f3db Daniel Vetter 2013-08-15 396 /*
319c933c71f3db Daniel Vetter 2013-08-15 397 * Note that callers do not need to clean
up the export cache
319c933c71f3db Daniel Vetter 2013-08-15 398 * since the check for
obj->handle_count guarantees that someone
319c933c71f3db Daniel Vetter 2013-08-15 399 * will clean it up.
319c933c71f3db Daniel Vetter 2013-08-15 400 */
319c933c71f3db Daniel Vetter 2013-08-15 401 obj->dma_buf = dmabuf;
319c933c71f3db Daniel Vetter 2013-08-15 402 get_dma_buf(obj->dma_buf);
319c933c71f3db Daniel Vetter 2013-08-15 403
319c933c71f3db Daniel Vetter 2013-08-15 404 return dmabuf;
319c933c71f3db Daniel Vetter 2013-08-15 405 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org