Skip to content

Commit 9d797ee

Browse files
q2venkuba-moo
authored andcommitted
Revert "af_unix: Call scm_recv() only after scm_set_cred()."
This reverts commit 3f5f118. Konrad reported that desktop environment below cannot be reached after commit 3f5f118 ("af_unix: Call scm_recv() only after scm_set_cred().") - postmarketOS (Alpine Linux w/ musl 1.2.4) - busybox 1.36.1 - GNOME 44.1 - networkmanager 1.42.6 - openrc 0.47 Regarding to the warning of SO_PASSPIDFD, I'll post another patch to suppress it by skipping SCM_PIDFD if scm->pid == NULL in scm_pidfd_recv(). Reported-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Kuniyuki Iwashima <[email protected]> Tested-by: Ido Schimmel <[email protected]> Tested-by: Gal Pressman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1a3f6fc commit 9d797ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/unix/af_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2807,7 +2807,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state,
28072807
} while (size);
28082808

28092809
mutex_unlock(&u->iolock);
2810-
if (state->msg && check_creds)
2810+
if (state->msg)
28112811
scm_recv(sock, state->msg, &scm, flags);
28122812
else
28132813
scm_destroy(&scm);

0 commit comments

Comments
 (0)