Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] rxrpc: fix bad unlock balance in rxrpc_do_sendmsg | Date | Mon, 22 Aug 2022 09:48:14 +0100 |
| |
Hawkins Jiawei <yin31149@gmail.com> 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
| |