Re: [PATCH] rxrpc: fix bad unlock balance in rxrpc_do_sendmsg
From: David Howells
Date: Mon Aug 22 2022 - 04:49:03 EST
Hawkins Jiawei <yin31149@xxxxxxxxx> wrote:
> - if (mutex_lock_interruptible(&call->user_mutex) < 0)
> + if (mutex_lock_interruptible(&call->user_mutex) < 0) {
> + mutex_lock(&call->user_mutex);
Yeah, as Khalid points out that kind of makes the interruptible lock
pointless. Either rxrpc_send_data() needs to return a separate indication
that we returned without the lock held or it needs to always drop the lock on
error (at least for ERESTARTSYS/EINTR) which can be checked for higher up.
David