Skip to contentSkip to conversation

FAILED: patch "[PATCH] drm/xe/sync: Cleanup partially initialized sync on parse" failed to apply to 6.12-stable tree

PATCH New [email protected] 2 participants 10 messages Mar 17 – Mar 19

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten-2bf3@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 1bfd7575092420ba5a0b944953c95b74a5646ff8 Mon Sep 17 00:00:00 2001
From: Shuicheng Lin <[email protected]>
Date: Thu, 19 Feb 2026 23:35:18 +0000
Subject: [PATCH] drm/xe/sync: Cleanup partially initialized sync on parse
failure

xe_sync_entry_parse() can allocate references (syncobj, fence, chain fence, or user fence) before hitting a later failure path. Several of those paths returned directly, leaving partially initialized state and leaking refs.

Route these error paths through a common free_sync label and call xe_sync_entry_cleanup(sync) before returning the error.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc Matthew Brost <[email protected]>
(cherry picked from commit f939bdd9207a5d1fc55cced5459858480686ce22)
drivers/gpu/drm/xe/xe_sync.c +17 -7
index eb136390dafd..ebf6c96d7a41 100644
@@ -146,8 +146,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 		if (!signal) {
 			sync->fence = drm_syncobj_fence_get(sync->syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 		}
 		break;
 
@@ -167,17 +169,21 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 		if (signal) {
 			sync->chain_fence = dma_fence_chain_alloc();
-			if (!sync->chain_fence)
-				return -ENOMEM;
+			if (!sync->chain_fence) {
+				err = -ENOMEM;
+				goto free_sync;
+			}
 		} else {
 			sync->fence = drm_syncobj_fence_get(sync->syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 
 			err = dma_fence_chain_find_seqno(&sync->fence,
 							 sync_in.timeline_value);
 			if (err)
-				return err;
+				goto free_sync;
 		}
 		break;
 
@@ -216,6 +222,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 	sync->timeline_value = sync_in.timeline_value;
 
 	return 0;
+
+free_sync:
+	xe_sync_entry_cleanup(sync);
+	return err;
 }
 ALLOW_ERROR_INJECTION(xe_sync_entry_parse, ERRNO);
 
#1 lore raw

PATCH 1/1 drm/xe/sync: Cleanup partially initialized sync on parse failure

xe_sync_entry_parse() can allocate references (syncobj, fence, chain fence, or user fence) before hitting a later failure path. Several of those paths returned directly, leaving partially initialized state and leaking refs.

Route these error paths through a common free_sync label and call xe_sync_entry_cleanup(sync) before returning the error.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc Matthew Brost <[email protected]>
(cherry picked from commit f939bdd9207a5d1fc55cced5459858480686ce22)
(cherry picked from commit 1bfd7575092420ba5a0b944953c95b74a5646ff8)
---
 drivers/gpu/drm/xe/xe_sync.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
drivers/gpu/drm/xe/xe_sync.c +17 -7
index dd7bd766ae18..6affdd0a8095 100644
@@ -142,8 +142,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 		if (!signal) {
 			sync->fence = drm_syncobj_fence_get(sync->syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 		}
 		break;
 
@@ -163,17 +165,21 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 
 		if (signal) {
 			sync->chain_fence = dma_fence_chain_alloc();
-			if (!sync->chain_fence)
-				return -ENOMEM;
+			if (!sync->chain_fence) {
+				err = -ENOMEM;
+				goto free_sync;
+			}
 		} else {
 			sync->fence = drm_syncobj_fence_get(sync->syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 
 			err = dma_fence_chain_find_seqno(&sync->fence,
 							 sync_in.timeline_value);
 			if (err)
-				return err;
+				goto free_sync;
 		}
 		break;
 
@@ -207,6 +213,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
 	sync->timeline_value = sync_in.timeline_value;
 
 	return 0;
+
+free_sync:
+	xe_sync_entry_cleanup(sync);
+	return err;
 }
 
 int xe_sync_entry_add_deps(struct xe_sync_entry *sync, struct xe_sched_job *job)
Signature · 1 line
2.50.1
#2 lore raw
In reply to [email protected]
Quoted 5 lines · gregkh

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Quoted 8 lines

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.
Thanks.

Shuicheng

Quoted 98 lines

Possible dependencies:

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 1bfd7575092420ba5a0b944953c95b74a5646ff8 Mon Sep 17 00:00:00 2001
From: Shuicheng Lin <[email protected]>
Date: Thu, 19 Feb 2026 23:35:18 +0000
Subject: [PATCH] drm/xe/sync: Cleanup partially initialized sync on parse failure

xe_sync_entry_parse() can allocate references (syncobj, fence, chain fence, or user fence) before hitting a later failure path. Several of those paths returned directly, leaving partially initialized state and leaking refs.

Route these error paths through a common free_sync label and call xe_sync_entry_cleanup(sync) before returning the error.

Fixes dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Cc Matthew Brost <[email protected]>

[email protected]
(cherry picked from commit
f939bdd9207a5d1fc55cced5459858480686ce22)

drivers/gpu/drm/xe/xe_sync.c +4 -2
index eb136390dafd..ebf6c96d7a41 100644
@@ -146,8 +146,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct
 xe_file *xef,
 
 		if (!signal) {
 			sync->fence = drm_syncobj_fence_get(sync-
 >syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 		}
drivers/gpu/drm/xe/xe_sync.c +9 -5
 		break;
@@ -167,17 +169,21 @@ int xe_sync_entry_parse(struct xe_device *xe,
 struct xe_file *xef,
 
 		if (signal) {
 			sync->chain_fence = dma_fence_chain_alloc();
-			if (!sync->chain_fence)
-				return -ENOMEM;
+			if (!sync->chain_fence) {
+				err = -ENOMEM;
+				goto free_sync;
+			}
 		} else {
 			sync->fence = drm_syncobj_fence_get(sync-
 >syncobj);
-			if (XE_IOCTL_DBG(xe, !sync->fence))
-				return -EINVAL;
+			if (XE_IOCTL_DBG(xe, !sync->fence)) {
+				err = -EINVAL;
+				goto free_sync;
+			}
 
 			err = dma_fence_chain_find_seqno(&sync->fence,
 
 sync_in.timeline_value);
 			if (err)
-				return err;
+				goto free_sync;
drivers/gpu/drm/xe/xe_sync.c +4 -0
 		}
 		break;
@@ -216,6 +222,10 @@ int xe_sync_entry_parse(struct xe_device *xe, struct
 xe_file *xef,
 	sync->timeline_value = sync_in.timeline_value;
 
 	return 0;
+
+free_sync:
+	xe_sync_entry_cleanup(sync);
+	return err;
 }
 ALLOW_ERROR_INJECTION(xe_sync_entry_parse, ERRNO);
author maintainer
#3 lore raw
Quoted 15 lines · Shuicheng
Quoted 5 lines · gregkh

The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

Quoted 8 lines

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Quoted 4 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Try building it after it is applied and notice how it breaks the build :(

thanks,

greg k-h

#4 lore raw
Quoted 17 lines · greg k-h
Quoted 7 lines · Shuicheng
Quoted 6 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 8 lines
Quoted 8 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH 6.12.y'

Quoted 8 lines

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?
Thanks.

Shuicheng

Quoted 4 lines

thanks,

greg k-h

author maintainer
#5 lore raw
Quoted 25 lines · Shuicheng
Quoted 24 lines · greg k-h
Quoted 7 lines · Shuicheng
Quoted 6 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 8 lines
Quoted 8 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH 6.12.y'

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Quoted 5 lines
Quoted 1 line

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?

CC [M] drivers/gpu/drm/xe/xe_sync.o
drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_parse’:
drivers/gpu/drm/xe/xe_sync.c:182:33: error: label ‘free_sync’ used but not defined

  182 |                                 goto free_sync;
      |                                 ^~~~

drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_add_deps’:
drivers/gpu/drm/xe/xe_sync.c:228:16: error: ‘err’ undeclared (first use in this function)
228 | return err;
| ^~~
drivers/gpu/drm/xe/xe_sync.c:228:16: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/xe/xe_sync.c:226:1: error: label ‘free_sync’ defined but not used [-Werror=unused-label]
226 | free_sync:

      | ^~~~~~~~~

cc1: all warnings being treated as errors

#6 lore raw
Quoted 35 lines · gregkh
Quoted 12 lines · Shuicheng
Quoted 11 lines · greg k-h
Quoted 8 lines · Shuicheng
Quoted 7 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH

6.12.y'

Quoted 7 lines
Quoted 7 lines

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Quoted 6 lines
Quoted 2 lines

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?

Quoted 6 lines

CC [M] drivers/gpu/drm/xe/xe_sync.o
drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_parse’:
drivers/gpu/drm/xe/xe_sync.c:182:33: error: label ‘free_sync’ used but not defined

  182 |                                 goto free_sync;
      |                                 ^~~~

Thanks for the log.
It seems the patch is not applied correctly and cause the build failure.
For the original patch 1bfd75750924 ("drm/xe/sync: Cleanup partially initialized sync on parse failure"), all the change is within function xe_sync_entry_parse().
This "free_sync" label is added at the end of xe_sync_entry_parse(), and some error path use goto to jump to this label.

For this and below err, it seems the last part of this patch is applied to function xe_sync_entry_add_deps(), which is the function after xe_sync_entry_parse(). The err should be due to "free_sync" label is added to function xe_sync_entry_add_deps() instead of xe_sync_entry_parse().
Could you please help me confirm it?
Thanks.

Shuicheng

Quoted 13 lines

drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_add_deps’:
drivers/gpu/drm/xe/xe_sync.c:228:16: error: ‘err’ undeclared (first use in this function)
228 | return err;
| ^~~
drivers/gpu/drm/xe/xe_sync.c:228:16: note: each undeclared identifier is reported only once for each function it appears in drivers/gpu/drm/xe/xe_sync.c:226:1: error: label ‘free_sync’ defined but not used [-Werror=unused-label]
226 | free_sync:

      | ^~~~~~~~~

cc1: all warnings being treated as errors

author maintainer
#7 lore raw
Quoted 49 lines · Shuicheng
Quoted 35 lines · gregkh
Quoted 12 lines · Shuicheng
Quoted 11 lines · greg k-h
Quoted 8 lines · Shuicheng
Quoted 7 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 1 line
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH

6.12.y'

Quoted 7 lines
Quoted 7 lines

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Quoted 6 lines
Quoted 2 lines

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?

Quoted 6 lines

CC [M] drivers/gpu/drm/xe/xe_sync.o
drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_parse’:
drivers/gpu/drm/xe/xe_sync.c:182:33: error: label ‘free_sync’ used but not defined

  182 |                                 goto free_sync;
      |                                 ^~~~

Thanks for the log.
It seems the patch is not applied correctly and cause the build failure.
For the original patch 1bfd75750924 ("drm/xe/sync: Cleanup partially initialized sync on parse failure"), all the change is within function xe_sync_entry_parse().
This "free_sync" label is added at the end of xe_sync_entry_parse(), and some error path use goto to jump to this label.

Quoted 3 lines

For this and below err, it seems the last part of this patch is applied to function xe_sync_entry_add_deps(), which is the function after xe_sync_entry_parse(). The err should be due to "free_sync" label is added to function xe_sync_entry_add_deps() instead of xe_sync_entry_parse().
Could you please help me confirm it?

It's best if you can send a properly backported patch for us to apply.

thanks,

greg k-h

#8 lore raw
Quoted 54 lines · greg k-h
Quoted 45 lines · Shuicheng
Quoted 37 lines · gregkh
Quoted 12 lines · Shuicheng
Quoted 11 lines · greg k-h
Quoted 8 lines · Shuicheng
Quoted 7 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
.git / linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x
1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH

6.12.y'

Quoted 7 lines
Quoted 7 lines

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Quoted 6 lines
Quoted 2 lines

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?

Quoted 6 lines

CC [M] drivers/gpu/drm/xe/xe_sync.o
drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_parse’:
drivers/gpu/drm/xe/xe_sync.c:182:33: error: label ‘free_sync’ used but not defined

  182 |                                 goto free_sync;
      |                                 ^~~~
Quoted 4 lines

Thanks for the log.
It seems the patch is not applied correctly and cause the build failure. For the original patch 1bfd75750924 ("drm/xe/sync: Cleanup partially initialized sync on parse failure"), all the change is within function

xe_sync_entry_parse().

Quoted 1 line

This "free_sync" label is added at the end of xe_sync_entry_parse(), and

some error path use goto to jump to this label.

Quoted 1 line
Quoted 8 lines
Quoted 1 line

For this and below err, it seems the last part of this patch is applied to

function xe_sync_entry_add_deps(), which is the function after xe_sync_entry_parse().

Quoted 1 line

The err should be due to "free_sync" label is added to function

xe_sync_entry_add_deps() instead of xe_sync_entry_parse().

Quoted 1 line

Could you please help me confirm it?

It's best if you can send a properly backported patch for us to apply.

Yes. I did re-send the patch yesterday following below cmd. The problem is that I cannot reproduce the failure.
"
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
git commit -s --amend
git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten-2bf3@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. "
There is no conflict and I could pass build.
Not sure what is the difference and lead to the issue.
Could you please have a try again with the patch I sent yesterday?
Thanks.

Shuicheng

Quoted 4 lines

thanks,

greg k-h

author maintainer
#9 lore raw
Quoted 64 lines · Shuicheng
Quoted 54 lines · greg k-h
Quoted 45 lines · Shuicheng
Quoted 37 lines · gregkh
Quoted 12 lines · Shuicheng
Quoted 11 lines · greg k-h
Quoted 8 lines · Shuicheng
Quoted 7 lines · gregkh

The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following

commands:

Quoted 1 line
Quoted 1 line
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

git fetch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux
.git / linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x
1bfd7575092420ba5a0b944953c95b74a5646ff8
# <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten- 2bf3@gregkh' --subject-prefix 'PATCH

6.12.y'

Quoted 7 lines
Quoted 7 lines

HEAD^..

Quoted 5 lines

I cannot reproduce the failure with upper cmd. The patch could be applied successfully without conflict. Anyway, I follow the instructions re-send the patch. Let me know if it still has issue.

Quoted 6 lines
Quoted 2 lines

Try building it after it is applied and notice how it breaks the build :(

I tried to do it, and it could build successfully.
I checked the code and cannot find what will cause the build failure. Could you please share me the failure signature?

Quoted 6 lines

CC [M] drivers/gpu/drm/xe/xe_sync.o
drivers/gpu/drm/xe/xe_sync.c: In function ‘xe_sync_entry_parse’:
drivers/gpu/drm/xe/xe_sync.c:182:33: error: label ‘free_sync’ used but not defined

  182 |                                 goto free_sync;
      |                                 ^~~~
Quoted 4 lines

Thanks for the log.
It seems the patch is not applied correctly and cause the build failure. For the original patch 1bfd75750924 ("drm/xe/sync: Cleanup partially initialized sync on parse failure"), all the change is within function

xe_sync_entry_parse().

Quoted 1 line

This "free_sync" label is added at the end of xe_sync_entry_parse(), and

some error path use goto to jump to this label.

Quoted 1 line
Quoted 8 lines
Quoted 1 line

For this and below err, it seems the last part of this patch is applied to

function xe_sync_entry_add_deps(), which is the function after xe_sync_entry_parse().

Quoted 1 line

The err should be due to "free_sync" label is added to function

xe_sync_entry_add_deps() instead of xe_sync_entry_parse().

Quoted 1 line

Could you please help me confirm it?

It's best if you can send a properly backported patch for us to apply.

Quoted 11 lines

Yes. I did re-send the patch yesterday following below cmd. The problem is that I cannot reproduce the failure.
"
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 1bfd7575092420ba5a0b944953c95b74a5646ff8
git commit -s --amend
git send-email --to '<[email protected]>' --in-reply-to '2026031732-size-unfasten-2bf3@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. "
There is no conflict and I could pass build.
Not sure what is the difference and lead to the issue.
Could you please have a try again with the patch I sent yesterday?

Your patch applied properly, thanks.

greg k-h