lkml.org 
[lkml]   [2023]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v11 4/7] iommufd: Use iommufd_access_change_ioas in iommufd_access_destroy_object
On Thu, Jul 27, 2023 at 11:33:26PM -0700, Nicolin Chen wrote:
> Update the unprotect routine in iommufd_access_destroy_object() to calling
> the new iommufd_access_change_ioas() helper. This will reduce some risk of
> race condition with another concurrent iommufd_access_replace/detach call.
>
> Note that the behavior of this function call is changed: a WARN_ON will be
> triggered by a -EBUSY return code if there is another ongoing detach.

This should be completely impossible, at this point the object must
have a refcount of 0 so if another thread is concurrently detaching it
we are already UAFing.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

\
 
 \ /
  Last update: 2023-07-28 14:44    [W:0.081 / U:1.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site