lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] rxrpc: fix bad unlock balance in rxrpc_do_sendmsg
Date
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

\
 
 \ /
  Last update: 2022-08-22 10:51    [W:0.164 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site