Re: [PATCH rc v4] iommufd/fault: Use a separate spinlock to protect fault->deliver list

From: Nicolin Chen
Date: Mon Jan 20 2025 - 01:02:19 EST


On Mon, Jan 20, 2025 at 05:37:13AM +0000, Tian, Kevin wrote:
> > From: Nicolin Chen <nicolinc@xxxxxxxxxx>
> > Sent: Saturday, January 18, 2025 3:29 AM
> >
> >
> > Lastly, move the mutex closer to the response in the fault structure,
> > and update its kdoc accordingly.
>
> Then this comment is stale.

Its position "in the fault structure" is moved though.. :)

> >
> > - /* The lists of outstanding faults protected by below mutex. */
> > - struct mutex mutex;
> > + spinlock_t lock; /* protects the deliver list */
> > struct list_head deliver;
> > + struct mutex mutex; /* serializes response flows */
> > struct xarray response;
> >
>
> And the comment for the mutex should be restored.

Why? I followed Baolu's suggestion to update that.. The response
flows are in fops_read/fops_write/auto_response, so I think the
new comment remains correct?

Thanks
Nic