Hi Jan,

On 4/24/2024 1:58 PM, Jan Beulich wrote:
On 24.04.2024 05:34, Henry Wang wrote:
--- a/xen/common/dt-overlay.c
+++ b/xen/common/dt-overlay.c
@@ -381,9 +381,14 @@ static int remove_node_resources(struct dt_device_node 
*device_node)
      {
          if ( dt_device_is_protected(device_node) )
          {
+            write_lock(&dt_host_lock);
              rc = iommu_remove_dt_device(device_node);
Any particular reason you add two call sites to the unlock function,
instead of putting it here?

Oh...you are correct. It is indeed better to put the unlock here. If this is the only comment for this patch, can I respin this only patch as a v1.1 or would one of the committers be ok to fix on commit? Sorry for the trouble and thanks for the suggestion.

Kind regards,
Henry

Jan

              if ( rc < 0 )
+            {
+                write_unlock(&dt_host_lock);
                  return rc;
+            }
+            write_unlock(&dt_host_lock);
          }
      }


Reply via email to