Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94bb6728 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "af_unix: Guard against other == sk in unix_dgram_sendmsg"

parents c3dae6c8 2ed2bb49
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1724,7 +1724,12 @@ restart_locked:
			goto out_unlock;
	}

	if (unlikely(unix_peer(other) != sk && unix_recvq_full(other))) {
	/* other == sk && unix_peer(other) != sk if
	 * - unix_peer(sk) == NULL, destination address bound to sk
	 * - unix_peer(sk) == sk by time of get but disconnected before lock
	 */
	if (other != sk &&
	    unlikely(unix_peer(other) != sk && unix_recvq_full(other))) {
		if (timeo) {
			timeo = unix_wait_for_peer(other, timeo);