On Thu, Sep 04, 2025 at 09:07:38AM +0200, Gabriele Monaco wrote:
> On Wed, 2025-09-03 at 14:51 +0800, Zhen Ni wrote:
> > If create_monitor_dir() fails, the function returns directly without
> > releasing rv_interface_lock. This leaves the mutex locked and causes
> > subsequent monitor registration attempts to deadlock.
> > 
> > Fix it by making the error path jump to out_unlock, ensuring that the
> > mutex is always released before returning.
> > 
> > Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct
> > rv_monitor")
> > Signed-off-by: Zhen Ni <[email protected]>
> 
> Good catch, thank you!
> 
> Reviewed-by: Gabriele Monaco <[email protected]>
> 
> I would also add a:
> 
> Fixes: 24cbfe18d55a ("rv: Merge struct rv_monitor_def into struct rv_monitor")

Am I hallucinating, or the fix tag is already there?

> (Adding Nam to the loop, as author of that patch)

Thanks for CC!

Reviewed-by: Nam Cao <[email protected]>

I have been debating whether we should convert rv to use lock guard.
Problem like this one is a good advocate.

Nam

Reply via email to