<div dir="ltr">Thanks, I've pushed it.</div><div class="gmail_extra"><br><div class="gmail_quote">On 8 June 2018 at 10:38, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry for missing that.<br>
<br>
Fixes: e73d136a023080 ("vulkan/wsi/x11: Implement FIFO mode.")<br>
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><div class="HOEnZb"><div class="h5"><br>
<br>
On 01/06/18 12:16, Cameron Kumar wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The queue_manager thread can access the images from x11_present_to_x11,<br>
hence this reorder prevents dereferencing of dangling pointers.<br>
<br>
Cc: "18.1" <<a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop<wbr>.org</a>><br>
---<br>
  src/vulkan/wsi/wsi_common_x11.<wbr>c | 6 +++---<br>
  1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_x1<wbr>1.c b/src/vulkan/wsi/wsi_common_x1<wbr>1.c<br>
index 1bfbc7c300..20d7cf5a2c 100644<br>
--- a/src/vulkan/wsi/wsi_common_x1<wbr>1.c<br>
+++ b/src/vulkan/wsi/wsi_common_x1<wbr>1.c<br>
@@ -1235,9 +1235,6 @@ x11_swapchain_destroy(struct wsi_swapchain *anv_chain,<br>
     struct x11_swapchain *chain = (struct x11_swapchain *)anv_chain;<br>
     xcb_void_cookie_t cookie;<br>
  -   for (uint32_t i = 0; i < chain->base.image_count; i++)<br>
-      x11_image_finish(chain, pAllocator, &chain->images[i]);<br>
-<br>
     if (chain->threaded) {<br>
        chain->status = VK_ERROR_OUT_OF_DATE_KHR;<br>
        /* Push a UINT32_MAX to wake up the manager */<br>
@@ -1247,6 +1244,9 @@ x11_swapchain_destroy(struct wsi_swapchain *anv_chain,<br>
        wsi_queue_destroy(&chain->pres<wbr>ent_queue);<br>
     }<br>
  +   for (uint32_t i = 0; i < chain->base.image_count; i++)<br>
+      x11_image_finish(chain, pAllocator, &chain->images[i]);<br>
+<br>
     xcb_unregister_for_special_ev<wbr>ent(chain->conn, chain->special_event);<br>
     cookie = xcb_present_select_input_check<wbr>ed(chain->conn, chain->event_id,<br>
                                               chain->window,<br>
</blockquote>
<br>
<br></div></div><div class="HOEnZb"><div class="h5">
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>