From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [RFC PATCH 2/4] gpu: dxgkrnl: hook up dxgkrnl
Date: Fri, 22 May 2020 11:10:57 +0300 [thread overview]
Message-ID: <20200522081057.GC22511@kadam> (raw)
In-Reply-To: <20200519163234.226513-3-sashal@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 4878 bytes --]
Hi Sasha,
url: https://github.com/0day-ci/linux/commits/Sasha-Levin/DirectX-on-Linux/20200520-004214
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 642b151f45dd54809ea00ecd3976a56c1ec9b53d
config: i386-allyesconfig (attached as .config)
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/dxgkrnl/dxgadapter.c:923 dxgallocation_destroy() error: we previously assumed 'alloc->owner.device' could be null (see line 919)
drivers/gpu/dxgkrnl/dxgadapter.c:1246 dxgsyncobject_create() error: we previously assumed 'syncobj' could be null (see line 1205)
drivers/gpu/dxgkrnl/dxgadapter.c:1248 dxgsyncobject_create() warn: variable dereferenced before check 'syncobj' (see line 1246)
drivers/gpu/dxgkrnl/dxgvmbus.c:205 dxgvmbuschannel_receive() warn: inconsistent indenting
drivers/gpu/dxgkrnl/dxgvmbus.c:240 dxgvmb_send_sync_msg() warn: inconsistent indenting
drivers/gpu/dxgkrnl/dxgvmbus.c:2310 dxgvmb_send_create_hwqueue() error: we previously assumed 'command' could be null (see line 2234)
Old smatch warnings:
drivers/gpu/dxgkrnl/dxgvmbus.c:246 dxgvmb_send_sync_msg() warn: inconsistent indenting
# https://github.com/0day-ci/linux/commit/09405fa255395b8e7fb7c8a886b18028b907487c
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 09405fa255395b8e7fb7c8a886b18028b907487c
vim +923 drivers/gpu/dxgkrnl/dxgadapter.c
9cc562c3695b5b Sasha Levin 2020-05-19 911 void dxgallocation_destroy(struct dxgallocation *alloc)
9cc562c3695b5b Sasha Levin 2020-05-19 912 {
9cc562c3695b5b Sasha Levin 2020-05-19 913 struct dxgprocess *process = alloc->process;
9cc562c3695b5b Sasha Levin 2020-05-19 914 struct d3dkmt_destroyallocation2 args = { };
9cc562c3695b5b Sasha Levin 2020-05-19 915
9cc562c3695b5b Sasha Levin 2020-05-19 916 dxgallocation_stop(alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 917 if (alloc->resource_owner)
9cc562c3695b5b Sasha Levin 2020-05-19 918 dxgresource_remove_alloc(alloc->owner.resource, alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 @919 else if (alloc->owner.device)
^^^^^^^^^^^^^^^^^^^
Checked.
9cc562c3695b5b Sasha Levin 2020-05-19 920 dxgdevice_remove_alloc(alloc->owner.device, alloc);
^^^^^^^^^^^^^^^^^^^
Freed here?
9cc562c3695b5b Sasha Levin 2020-05-19 921 dxgallocation_free_handle(alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 922 if (alloc->alloc_handle && !alloc->resource_owner) {
9cc562c3695b5b Sasha Levin 2020-05-19 @923 args.device = alloc->owner.device->handle;
^^^^^^^^^^^^^^^^^^^
Unchecked dereference.
9cc562c3695b5b Sasha Levin 2020-05-19 924 args.alloc_count = 1;
9cc562c3695b5b Sasha Levin 2020-05-19 925 args.flags.assume_not_in_use = 1;
9cc562c3695b5b Sasha Levin 2020-05-19 926 dxgvmb_send_destroy_allocation(process,
9cc562c3695b5b Sasha Levin 2020-05-19 927 alloc->owner.device,
9cc562c3695b5b Sasha Levin 2020-05-19 928 &alloc->owner.device->adapter->
9cc562c3695b5b Sasha Levin 2020-05-19 929 channel, &args,
9cc562c3695b5b Sasha Levin 2020-05-19 930 &alloc->alloc_handle);
9cc562c3695b5b Sasha Levin 2020-05-19 931 }
9cc562c3695b5b Sasha Levin 2020-05-19 932 if (alloc->gpadl) {
9cc562c3695b5b Sasha Levin 2020-05-19 933 TRACE_DEBUG(1, "Teardown gpadl %d", alloc->gpadl);
9cc562c3695b5b Sasha Levin 2020-05-19 934 vmbus_teardown_gpadl(dxgglobal_get_vmbus(), alloc->gpadl);
9cc562c3695b5b Sasha Levin 2020-05-19 935 TRACE_DEBUG(1, "Teardown gpadl end");
9cc562c3695b5b Sasha Levin 2020-05-19 936 alloc->gpadl = 0;
9cc562c3695b5b Sasha Levin 2020-05-19 937 }
9cc562c3695b5b Sasha Levin 2020-05-19 938 if (alloc->priv_drv_data)
9cc562c3695b5b Sasha Levin 2020-05-19 939 dxgmem_free(alloc->process, DXGMEM_ALLOCPRIVATE,
9cc562c3695b5b Sasha Levin 2020-05-19 940 alloc->priv_drv_data);
9cc562c3695b5b Sasha Levin 2020-05-19 941 if (alloc->cpu_address_mapped)
9cc562c3695b5b Sasha Levin 2020-05-19 942 pr_err("Alloc IO space is mapped: %p", alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 943 dxgmem_free(alloc->process, DXGMEM_ALLOCATION, alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 944 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 72427 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: [kbuild] Re: [RFC PATCH 2/4] gpu: dxgkrnl: hook up dxgkrnl
Date: Fri, 22 May 2020 11:10:57 +0300 [thread overview]
Message-ID: <20200522081057.GC22511@kadam> (raw)
In-Reply-To: <20200519163234.226513-3-sashal@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 4878 bytes --]
Hi Sasha,
url: https://github.com/0day-ci/linux/commits/Sasha-Levin/DirectX-on-Linux/20200520-004214
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 642b151f45dd54809ea00ecd3976a56c1ec9b53d
config: i386-allyesconfig (attached as .config)
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
drivers/gpu/dxgkrnl/dxgadapter.c:923 dxgallocation_destroy() error: we previously assumed 'alloc->owner.device' could be null (see line 919)
drivers/gpu/dxgkrnl/dxgadapter.c:1246 dxgsyncobject_create() error: we previously assumed 'syncobj' could be null (see line 1205)
drivers/gpu/dxgkrnl/dxgadapter.c:1248 dxgsyncobject_create() warn: variable dereferenced before check 'syncobj' (see line 1246)
drivers/gpu/dxgkrnl/dxgvmbus.c:205 dxgvmbuschannel_receive() warn: inconsistent indenting
drivers/gpu/dxgkrnl/dxgvmbus.c:240 dxgvmb_send_sync_msg() warn: inconsistent indenting
drivers/gpu/dxgkrnl/dxgvmbus.c:2310 dxgvmb_send_create_hwqueue() error: we previously assumed 'command' could be null (see line 2234)
Old smatch warnings:
drivers/gpu/dxgkrnl/dxgvmbus.c:246 dxgvmb_send_sync_msg() warn: inconsistent indenting
# https://github.com/0day-ci/linux/commit/09405fa255395b8e7fb7c8a886b18028b907487c
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 09405fa255395b8e7fb7c8a886b18028b907487c
vim +923 drivers/gpu/dxgkrnl/dxgadapter.c
9cc562c3695b5b Sasha Levin 2020-05-19 911 void dxgallocation_destroy(struct dxgallocation *alloc)
9cc562c3695b5b Sasha Levin 2020-05-19 912 {
9cc562c3695b5b Sasha Levin 2020-05-19 913 struct dxgprocess *process = alloc->process;
9cc562c3695b5b Sasha Levin 2020-05-19 914 struct d3dkmt_destroyallocation2 args = { };
9cc562c3695b5b Sasha Levin 2020-05-19 915
9cc562c3695b5b Sasha Levin 2020-05-19 916 dxgallocation_stop(alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 917 if (alloc->resource_owner)
9cc562c3695b5b Sasha Levin 2020-05-19 918 dxgresource_remove_alloc(alloc->owner.resource, alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 @919 else if (alloc->owner.device)
^^^^^^^^^^^^^^^^^^^
Checked.
9cc562c3695b5b Sasha Levin 2020-05-19 920 dxgdevice_remove_alloc(alloc->owner.device, alloc);
^^^^^^^^^^^^^^^^^^^
Freed here?
9cc562c3695b5b Sasha Levin 2020-05-19 921 dxgallocation_free_handle(alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 922 if (alloc->alloc_handle && !alloc->resource_owner) {
9cc562c3695b5b Sasha Levin 2020-05-19 @923 args.device = alloc->owner.device->handle;
^^^^^^^^^^^^^^^^^^^
Unchecked dereference.
9cc562c3695b5b Sasha Levin 2020-05-19 924 args.alloc_count = 1;
9cc562c3695b5b Sasha Levin 2020-05-19 925 args.flags.assume_not_in_use = 1;
9cc562c3695b5b Sasha Levin 2020-05-19 926 dxgvmb_send_destroy_allocation(process,
9cc562c3695b5b Sasha Levin 2020-05-19 927 alloc->owner.device,
9cc562c3695b5b Sasha Levin 2020-05-19 928 &alloc->owner.device->adapter->
9cc562c3695b5b Sasha Levin 2020-05-19 929 channel, &args,
9cc562c3695b5b Sasha Levin 2020-05-19 930 &alloc->alloc_handle);
9cc562c3695b5b Sasha Levin 2020-05-19 931 }
9cc562c3695b5b Sasha Levin 2020-05-19 932 if (alloc->gpadl) {
9cc562c3695b5b Sasha Levin 2020-05-19 933 TRACE_DEBUG(1, "Teardown gpadl %d", alloc->gpadl);
9cc562c3695b5b Sasha Levin 2020-05-19 934 vmbus_teardown_gpadl(dxgglobal_get_vmbus(), alloc->gpadl);
9cc562c3695b5b Sasha Levin 2020-05-19 935 TRACE_DEBUG(1, "Teardown gpadl end");
9cc562c3695b5b Sasha Levin 2020-05-19 936 alloc->gpadl = 0;
9cc562c3695b5b Sasha Levin 2020-05-19 937 }
9cc562c3695b5b Sasha Levin 2020-05-19 938 if (alloc->priv_drv_data)
9cc562c3695b5b Sasha Levin 2020-05-19 939 dxgmem_free(alloc->process, DXGMEM_ALLOCPRIVATE,
9cc562c3695b5b Sasha Levin 2020-05-19 940 alloc->priv_drv_data);
9cc562c3695b5b Sasha Levin 2020-05-19 941 if (alloc->cpu_address_mapped)
9cc562c3695b5b Sasha Levin 2020-05-19 942 pr_err("Alloc IO space is mapped: %p", alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 943 dxgmem_free(alloc->process, DXGMEM_ALLOCATION, alloc);
9cc562c3695b5b Sasha Levin 2020-05-19 944 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 72427 bytes --]
next prev parent reply other threads:[~2020-05-22 8:10 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 16:32 [RFC PATCH 0/4] DirectX on Linux Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` [RFC PATCH 1/4] gpu: dxgkrnl: core code Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 17:19 ` Greg KH
2020-05-19 17:19 ` Greg KH
2020-05-19 17:19 ` Greg KH
2020-05-19 17:21 ` Greg KH
2020-05-19 17:21 ` Greg KH
2020-05-19 17:21 ` Greg KH
2020-05-19 17:45 ` Sasha Levin
2020-05-19 17:45 ` Sasha Levin
2020-05-19 17:45 ` Sasha Levin
2020-05-20 6:13 ` Greg KH
2020-05-20 6:13 ` Greg KH
2020-05-20 6:13 ` Greg KH
2020-05-19 17:27 ` Greg KH
2020-05-19 17:27 ` Greg KH
2020-05-19 17:27 ` Greg KH
2020-05-19 16:32 ` [RFC PATCH 2/4] gpu: dxgkrnl: hook up dxgkrnl Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 23:27 ` kbuild test robot
2020-05-19 23:27 ` kbuild test robot
2020-05-20 7:05 ` kbuild test robot
2020-05-22 8:10 ` Dan Carpenter [this message]
2020-05-22 8:10 ` [kbuild] " Dan Carpenter
2020-05-30 13:48 ` kbuild test robot
2020-05-19 16:32 ` [RFC PATCH 3/4] Drivers: hv: vmbus: " Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` [RFC PATCH 4/4] gpu: dxgkrnl: create a MAINTAINERS entry Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 16:32 ` Sasha Levin
2020-05-19 19:21 ` [RFC PATCH 0/4] DirectX on Linux Daniel Vetter
2020-05-19 19:21 ` Daniel Vetter
2020-05-19 19:21 ` Daniel Vetter
2020-05-19 20:36 ` Sasha Levin
2020-05-19 20:36 ` Sasha Levin
2020-05-19 20:36 ` Sasha Levin
2020-05-20 10:37 ` Jan Engelhardt
2020-05-20 10:37 ` Jan Engelhardt
2020-05-20 10:37 ` Jan Engelhardt
2020-06-28 23:39 ` James Hilliard
2020-06-28 23:39 ` James Hilliard
2020-06-28 23:39 ` James Hilliard
2020-05-19 22:42 ` Dave Airlie
2020-05-19 22:42 ` Dave Airlie
2020-05-19 22:42 ` Dave Airlie
2020-05-19 23:01 ` Daniel Vetter
2020-05-19 23:01 ` Daniel Vetter
2020-05-19 23:01 ` Daniel Vetter
2020-05-20 3:47 ` [EXTERNAL] " Steve Pronovost
2020-05-20 3:47 ` Steve Pronovost
2020-05-20 3:47 ` Steve Pronovost
2020-05-20 7:40 ` Daniel Vetter
2020-05-20 8:19 ` Steve Pronovost
2020-05-20 15:34 ` Steve Pronovost
2020-05-20 15:34 ` Steve Pronovost
2020-05-20 15:34 ` Steve Pronovost
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-05-19 23:12 ` Dave Airlie
2020-05-19 23:12 ` Dave Airlie
2020-05-19 23:12 ` Dave Airlie
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-06-16 13:21 ` Sasha Levin
2020-06-16 13:21 ` Sasha Levin
2020-06-16 13:21 ` Sasha Levin
2020-05-20 7:10 ` Thomas Zimmermann
2020-05-20 7:10 ` Thomas Zimmermann
2020-05-20 7:10 ` Thomas Zimmermann
2020-05-20 7:42 ` [EXTERNAL] " Steve Pronovost
2020-05-20 7:42 ` Steve Pronovost
2020-05-20 7:42 ` Steve Pronovost
2020-05-20 11:06 ` Thomas Zimmermann
2020-05-20 11:06 ` Thomas Zimmermann
2020-05-20 11:06 ` Thomas Zimmermann
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-06-16 10:51 ` Pavel Machek
2020-06-16 13:28 ` Sasha Levin
2020-06-16 13:28 ` Sasha Levin
2020-06-16 13:28 ` Sasha Levin
2020-06-16 14:41 ` Pavel Machek
2020-06-16 14:41 ` Pavel Machek
2020-06-16 14:41 ` Pavel Machek
2020-06-16 16:00 ` Sasha Levin
2020-06-16 16:00 ` Sasha Levin
2020-06-16 16:00 ` Sasha Levin
-- strict thread matches above, loose matches on Subject: below --
2020-05-21 20:47 [RFC PATCH 2/4] gpu: dxgkrnl: hook up dxgkrnl kbuild 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=20200522081057.GC22511@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.