[Intel-gfx] [RFC 02/12] drm/i915: Update client name on context create

Chris Wilson chris at chris-wilson.co.uk
Tue Mar 10 18:11:48 UTC 2020


Quoting Tvrtko Ursulin (2020-03-09 18:31:19)
> @@ -92,8 +107,8 @@ __i915_drm_client_register(struct i915_drm_client *client,
>  static void
>  __i915_drm_client_unregister(struct i915_drm_client *client)
>  {
> -       put_pid(fetch_and_zero(&client->pid));
> -       kfree(fetch_and_zero(&client->name));
> +       put_pid(rcu_replace_pointer(client->pid, NULL, true));
> +       kfree(rcu_replace_pointer(client->name, NULL, true));

client_unregister is not after an RCU grace period, so what's the
protection here?
-Chris


More information about the Intel-gfx mailing list