diff options
| author | Sebastian Reichel <[email protected]> | 2023-04-01 22:59:10 +0200 |
|---|---|---|
| committer | Sebastian Reichel <[email protected]> | 2023-04-01 22:59:10 +0200 |
| commit | 9d6ff170b5ee56cf2817cbe91dd0e5e7f9d742dd (patch) | |
| tree | f785f31a780f1fc12bf0fa5845bb837320c01b6e /net/unix/af_unix.c | |
| parent | 7cc7478e093782d2ac176c11a966de00bd0792dc (diff) | |
| parent | e8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff) | |
Merge tag 'v6.3-rc3'
Merge v6.3-rc3, so that 'acpi_quirk_skip_gpio_event_handlers'
is available, which is needed for adding x86 android tablet
support in axp288_charger.
Signed-off-by: Sebastian Reichel <[email protected]>
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++; |