Re: ipc/mqueue: release spinlock before freeing node_cache in mqueue_evict_inode()
From: Al Viro
Date: Fri Jun 27 2025 - 12:39:46 EST
On Fri, Jun 27, 2025 at 06:11:14PM +0530, ritu pal wrote:
> Hi,
>
> Currently, mqueue_evict_inode() holds info->lock while freeing
> info->node_cache
> with kfree(). Although kfree() does not sleep, it may take a non-trivial
> amount
> of time, increasing the duration the spinlock is held and potentially
> impacting
> concurrency.
That spinlock is inside the inode in question; what exactly is going to be
on the other side of contention? Note that none of the file methods
are going to run concurrent with that...