From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH 4/6] drm/nouveau: Support sync FDs and syncobjs
Date: Mon, 31 Aug 2020 15:27:10 +0300 [thread overview]
Message-ID: <20200831122710.GK8299@kadam> (raw)
In-Reply-To: <20200828104016.1672195-5-thierry.reding@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4496 bytes --]
Hi Thierry,
url: https://github.com/0day-ci/linux/commits/Thierry-Reding/drm-nouveau-Support-sync-FDs-and-sync-objects/20200828-184155
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 15bc20c6af4ceee97a1f90b43c0e386643c071b4
config: x86_64-randconfig-m001-20200828 (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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/drm/nouveau/nouveau_gem.c:772 nouveau_channel_emit_fence() warn: passing zero to 'ERR_PTR'
Old smatch warnings:
include/drm/ttm/ttm_bo_driver.h:641 __ttm_bo_reserve() warn: inconsistent returns '*bo->base.resv'.
# https://github.com/0day-ci/linux/commit/2a7ed4e5037cdf9d59e36812ae6ce230df64d472
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thierry-Reding/drm-nouveau-Support-sync-FDs-and-sync-objects/20200828-184155
git checkout 2a7ed4e5037cdf9d59e36812ae6ce230df64d472
vim +/ERR_PTR +772 drivers/gpu/drm/nouveau/nouveau_gem.c
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 728 static struct nouveau_fence *
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 729 nouveau_channel_emit_fence(struct nouveau_channel *channel,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 730 struct drm_file *file_priv,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 731 struct drm_nouveau_gem_fence *f)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 732 {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 733 struct nouveau_fence *fence;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 734 int ret;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 735
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 736 ret = nouveau_fence_new(channel, false, &fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 737 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 738 return ERR_PTR(ret);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 739
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 740 if (f->flags & NOUVEAU_GEM_FENCE_FD) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 741 struct sync_file *file;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 742 int fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 743
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 744 fd = get_unused_fd_flags(O_CLOEXEC);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 745 if (fd < 0) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 746 ret = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 747 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 748 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 749
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 750 file = sync_file_create(&fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 751 if (!file) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 752 put_unused_fd(fd);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 753 ret = -ENOMEM;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 754 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 755 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 756
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 757 fd_install(fd, file->file);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 758 f->handle = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 759 } else {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 760 struct drm_syncobj *syncobj;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 761
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 762 ret = drm_syncobj_create(&syncobj, 0, &fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 763 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 764 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 765
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 766 ret = drm_syncobj_get_handle(file_priv, syncobj, &f->handle);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 767 drm_syncobj_put(syncobj);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 768 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 769
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 770 put:
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 771 nouveau_fence_unref(&fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 @772 return ERR_PTR(ret);
There is no "return fence;" success path in this function?
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 773 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38811 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 4/6] drm/nouveau: Support sync FDs and syncobjs
Date: Mon, 31 Aug 2020 15:27:10 +0300 [thread overview]
Message-ID: <20200831122710.GK8299@kadam> (raw)
In-Reply-To: <20200828104016.1672195-5-thierry.reding@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4496 bytes --]
Hi Thierry,
url: https://github.com/0day-ci/linux/commits/Thierry-Reding/drm-nouveau-Support-sync-FDs-and-sync-objects/20200828-184155
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 15bc20c6af4ceee97a1f90b43c0e386643c071b4
config: x86_64-randconfig-m001-20200828 (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@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/drm/nouveau/nouveau_gem.c:772 nouveau_channel_emit_fence() warn: passing zero to 'ERR_PTR'
Old smatch warnings:
include/drm/ttm/ttm_bo_driver.h:641 __ttm_bo_reserve() warn: inconsistent returns '*bo->base.resv'.
# https://github.com/0day-ci/linux/commit/2a7ed4e5037cdf9d59e36812ae6ce230df64d472
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thierry-Reding/drm-nouveau-Support-sync-FDs-and-sync-objects/20200828-184155
git checkout 2a7ed4e5037cdf9d59e36812ae6ce230df64d472
vim +/ERR_PTR +772 drivers/gpu/drm/nouveau/nouveau_gem.c
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 728 static struct nouveau_fence *
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 729 nouveau_channel_emit_fence(struct nouveau_channel *channel,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 730 struct drm_file *file_priv,
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 731 struct drm_nouveau_gem_fence *f)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 732 {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 733 struct nouveau_fence *fence;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 734 int ret;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 735
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 736 ret = nouveau_fence_new(channel, false, &fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 737 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 738 return ERR_PTR(ret);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 739
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 740 if (f->flags & NOUVEAU_GEM_FENCE_FD) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 741 struct sync_file *file;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 742 int fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 743
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 744 fd = get_unused_fd_flags(O_CLOEXEC);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 745 if (fd < 0) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 746 ret = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 747 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 748 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 749
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 750 file = sync_file_create(&fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 751 if (!file) {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 752 put_unused_fd(fd);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 753 ret = -ENOMEM;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 754 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 755 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 756
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 757 fd_install(fd, file->file);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 758 f->handle = fd;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 759 } else {
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 760 struct drm_syncobj *syncobj;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 761
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 762 ret = drm_syncobj_create(&syncobj, 0, &fence->base);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 763 if (ret < 0)
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 764 goto put;
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 765
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 766 ret = drm_syncobj_get_handle(file_priv, syncobj, &f->handle);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 767 drm_syncobj_put(syncobj);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 768 }
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 769
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 770 put:
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 771 nouveau_fence_unref(&fence);
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 @772 return ERR_PTR(ret);
There is no "return fence;" success path in this function?
2a7ed4e5037cdf9 Thierry Reding 2020-08-28 773 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38811 bytes --]
next prev parent reply other threads:[~2020-08-31 12:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 10:40 [PATCH 0/6] drm/nouveau: Support sync FDs and sync objects Thierry Reding
2020-08-28 10:40 ` Thierry Reding
[not found] ` <20200828104016.1672195-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-08-28 10:40 ` [PATCH 1/6] drm/nouveau: Split nouveau_fence_sync() Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-08-28 10:40 ` [PATCH 2/6] drm/nouveau: Add nouveau_fence_ref() Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-08-28 10:40 ` [PATCH 3/6] drm/nouveau: Support fence FDs at kickoff Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-08-28 10:40 ` [PATCH 4/6] drm/nouveau: Support sync FDs and syncobjs Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-08-31 12:27 ` Dan Carpenter [this message]
2020-08-31 12:27 ` Dan Carpenter
2020-08-28 10:40 ` [PATCH 5/6] drm/nouveau: Support DMA fence arrays Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-08-28 10:40 ` [PATCH 6/6] drm/nouveau: Allow zero pushbuffer submits Thierry Reding
2020-08-28 10:40 ` Thierry Reding
2020-09-23 9:18 ` [PATCH 0/6] drm/nouveau: Support sync FDs and sync objects Thierry Reding
2020-09-23 9:18 ` Thierry Reding
2020-09-23 15:21 ` Daniel Vetter
2020-09-23 15:21 ` [Nouveau] " Daniel Vetter
[not found] ` <20200923152124.GO438822-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2020-09-24 10:05 ` Thierry Reding
2020-09-24 10:05 ` [Nouveau] " Thierry Reding
2020-09-24 11:16 ` Daniel Vetter
2020-09-24 11:16 ` [Nouveau] " Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2020-08-28 21:46 [PATCH 4/6] drm/nouveau: Support sync FDs and syncobjs kernel test robot
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=20200831122710.GK8299@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@lists.01.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.