mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
net: qrtr: Do not take sock lock on blocking recv
Socket client's should be able to block on recv without blocking other socket operations such as sending. The qrtr core logic should also be able to operate on the sock while a client is blocked in recv. Remove the sock lock from around the recv_datagram to allow execution to continue while a client is blocked in recv. Change-Id: I6adb09b8e44c5ff3542b88db87b376a3ae5cb5ba Signed-off-by: Jay Jayanna <jayanna@codeaurora.org> Signed-off-by: Chris Lew <quic_clew@quicinc.com>
This commit is contained in:
parent
efcd1d175b
commit
a51c412524
|
|
@ -1140,18 +1140,15 @@ static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,
|
|||
struct qrtr_cb *cb;
|
||||
int copied, rc;
|
||||
|
||||
lock_sock(sk);
|
||||
|
||||
if (sock_flag(sk, SOCK_ZAPPED)) {
|
||||
release_sock(sk);
|
||||
if (sock_flag(sk, SOCK_ZAPPED))
|
||||
return -EADDRNOTAVAIL;
|
||||
}
|
||||
|
||||
skb = skb_recv_datagram(sk, flags, &rc);
|
||||
if (!skb) {
|
||||
release_sock(sk);
|
||||
if (!skb)
|
||||
return rc;
|
||||
}
|
||||
|
||||
lock_sock(sk);
|
||||
cb = (struct qrtr_cb *)skb->cb;
|
||||
|
||||
copied = skb->len;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user