int max_level;
int data_len = 0;
int sk_locked;
+<<<<<<< HEAD
+=======
+
+>>>>>>> v3.10.95
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
wait_for_unix_gc();
sock_put(other);
if (!sk_locked)
+<<<<<<< HEAD
unix_state_lock(sk);
+=======
+ unix_state_lock(sk);
+
+ err = 0;
+>>>>>>> v3.10.95
if (unix_peer(sk) == other) {
unix_peer(sk) = NULL;
unix_dgram_peer_wake_disconnect_wakeup(sk, other);
goto out_unlock;
}
+<<<<<<< HEAD
/* 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 (unlikely(unix_peer(other) != sk && unix_recvq_full(other))) {
+>>>>>>> v3.10.95
if (timeo) {
timeo = unix_wait_for_peer(other, timeo);
if (flags&MSG_OOB)
goto out;
- err = mutex_lock_interruptible(&u->readlock);
- if (unlikely(err)) {
- /* recvmsg() in non blocking mode is supposed to return -EAGAIN
- * sk_rcvtimeo is not honored by mutex_lock_interruptible()
- */
- err = noblock ? -EAGAIN : -ERESTARTSYS;
- goto out;
- }
+ mutex_lock(&u->readlock);
skip = sk_peek_offset(sk, flags);
}
- if (signal_pending(current)
- || mutex_lock_interruptible(&u->readlock)) {
+ if (signal_pending(current)) {
err = sock_intr_errno(timeo);
goto out;
}
+ mutex_lock(&u->readlock);
continue;
unlock:
unix_state_unlock(sk);