diff options
| author | Mark Brown <broonie@kernel.org> | 2023-03-13 13:20:45 +0000 | 
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2023-03-13 13:20:45 +0000 | 
| commit | b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01 (patch) | |
| tree | 1e8f106c57c2934eee422f8ee5e59e73015e2dc4 /net/unix/af_unix.c | |
| parent | 5bd73a162bc881dbb98ff9909dd865286852ee2b (diff) | |
| parent | eeac8ede17557680855031c6f305ece2378af326 (diff) | |
Merge tag 'v6.3-rc2' into regulator-6.4 to fix clock related boot issues
Linux 6.3-rc2
Diffstat (limited to 'net/unix/af_unix.c')
| -rw-r--r-- | net/unix/af_unix.c | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 347122c3575e..0b0f18ecce44 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2105,7 +2105,8 @@ out:  #define UNIX_SKB_FRAGS_SZ (PAGE_SIZE << get_order(32768))  #if IS_ENABLED(CONFIG_AF_UNIX_OOB) -static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other) +static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other, +		     struct scm_cookie *scm, bool fds_sent)  {  	struct unix_sock *ousk = unix_sk(other);  	struct sk_buff *skb; @@ -2116,6 +2117,11 @@ static int queue_oob(struct socket *sock, struct msghdr *msg, struct sock *other  	if (!skb)  		return err; +	err = unix_scm_to_skb(scm, skb, !fds_sent); +	if (err < 0) { +		kfree_skb(skb); +		return err; +	}  	skb_put(skb, 1);  	err = skb_copy_datagram_from_iter(skb, 0, &msg->msg_iter, 1); @@ -2243,7 +2249,7 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,  #if IS_ENABLED(CONFIG_AF_UNIX_OOB)  	if (msg->msg_flags & MSG_OOB) { -		err = queue_oob(sock, msg, other); +		err = queue_oob(sock, msg, other, &scm, fds_sent);  		if (err)  			goto out_err;  		sent++;  | 
