From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Simona Vetter <simona.vetter@ffwll.ch>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Intel Graphics" <intel-gfx@lists.freedesktop.org>,
DRI <dri-devel@lists.freedesktop.org>,
"DRM XE List" <intel-xe@lists.freedesktop.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Linux Next Mailing List" <linux-next@vger.kernel.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: linux-next: manual merge of the drm-xe tree with the drm-misc-fixes tree
Date: Tue, 8 Oct 2024 11:00:08 +1100 [thread overview]
Message-ID: <20241008110008.243b9be7@canb.auug.org.au> (raw)
In-Reply-To: <20241004121800.7ab3214b@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 3274 bytes --]
Hi all,
On Fri, 4 Oct 2024 12:18:00 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the drm-xe tree got a conflict in:
>
> drivers/gpu/drm/xe/xe_guc_submit.c
>
> between commit:
>
> 9286a191abe2 ("drm/xe: Drop GuC submit_wq pool")
>
> from the drm-misc-fixes tree and commit:
>
> 861108666cc0 ("drm/xe: fix UAF around queue destruction")
This is now also commit
2d2be279f1ca ("drm/xe: fix UAF around queue destruction")
in Linus' tree.
> from the drm-xe tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> diff --cc drivers/gpu/drm/xe/xe_guc_submit.c
> index 17c25f18e286,8a5c21a87977..000000000000
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@@ -224,11 -224,80 +224,27 @@@ static bool exec_queue_killed_or_banned
> EXEC_QUEUE_STATE_BANNED));
> }
>
> -#ifdef CONFIG_PROVE_LOCKING
> -static int alloc_submit_wq(struct xe_guc *guc)
> -{
> - int i;
> -
> - for (i = 0; i < NUM_SUBMIT_WQ; ++i) {
> - guc->submission_state.submit_wq_pool[i] =
> - alloc_ordered_workqueue("submit_wq", 0);
> - if (!guc->submission_state.submit_wq_pool[i])
> - goto err_free;
> - }
> -
> - return 0;
> -
> -err_free:
> - while (i)
> - destroy_workqueue(guc->submission_state.submit_wq_pool[--i]);
> -
> - return -ENOMEM;
> -}
> -
> -static void free_submit_wq(struct xe_guc *guc)
> -{
> - int i;
> -
> - for (i = 0; i < NUM_SUBMIT_WQ; ++i)
> - destroy_workqueue(guc->submission_state.submit_wq_pool[i]);
> -}
> -
> -static struct workqueue_struct *get_submit_wq(struct xe_guc *guc)
> -{
> - int idx = guc->submission_state.submit_wq_idx++ % NUM_SUBMIT_WQ;
> -
> - return guc->submission_state.submit_wq_pool[idx];
> -}
> -#else
> -static int alloc_submit_wq(struct xe_guc *guc)
> -{
> - return 0;
> -}
> -
> -static void free_submit_wq(struct xe_guc *guc)
> -{
> -
> -}
> -
> -static struct workqueue_struct *get_submit_wq(struct xe_guc *guc)
> -{
> - return NULL;
> -}
> -#endif
> -
> + static void xe_guc_submit_fini(struct xe_guc *guc)
> + {
> + struct xe_device *xe = guc_to_xe(guc);
> + struct xe_gt *gt = guc_to_gt(guc);
> + int ret;
> +
> + ret = wait_event_timeout(guc->submission_state.fini_wq,
> + xa_empty(&guc->submission_state.exec_queue_lookup),
> + HZ * 5);
> +
> + drain_workqueue(xe->destroy_wq);
> +
> + xe_gt_assert(gt, ret);
> + }
> +
> static void guc_submit_fini(struct drm_device *drm, void *arg)
> {
> struct xe_guc *guc = arg;
>
> + xe_guc_submit_fini(guc);
> xa_destroy(&guc->submission_state.exec_queue_lookup);
> - free_submit_wq(guc);
> }
>
> static void guc_submit_wedged_fini(void *arg)
This is now a conflict between the drm-misc-fixes tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2024-10-08 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 2:18 Stephen Rothwell
2024-10-08 0:00 ` Stephen Rothwell [this message]
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=20241008110008.243b9be7@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=simona.vetter@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®