Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFC: double unlock in nfc_llcp_recv_connect()

We unlock inside the if block on the other side of this if else
statement. It could result in calling mutex_unlock() twice.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Dan Carpenter and committed by
John W. Linville
341ee434 bad69194

+1 -3
+1 -3
net/nfc/llcp/llcp.c
··· 554 554 goto enqueue; 555 555 } 556 556 } 557 - 557 + mutex_unlock(&local->socket_lock); 558 558 } 559 - 560 - mutex_unlock(&local->socket_lock); 561 559 562 560 reason = LLCP_DM_NOBOUND; 563 561 goto fail;