From: Kevin Brodsky <kevin.brodsky@arm.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Kevin Brodsky <kevin.brodsky@arm.com>,
Christoph Hellwig <hch@lst.de>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH v2 3/3] net/ipv6: Initialise msg_control_is_user
Date: Thu, 13 Apr 2023 12:47:05 +0100 [thread overview]
Message-ID: <20230413114705.157046-4-kevin.brodsky@arm.com> (raw)
In-Reply-To: <20230413114705.157046-1-kevin.brodsky@arm.com>
do_ipv6_setsockopt() makes use of struct msghdr::msg_control in the
IPV6_2292PKTOPTIONS case. Make sure to initialise
msg_control_is_user accordingly.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
---
net/ipv6/ipv6_sockglue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 2917dd8d198c..ae818ff46224 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -716,6 +716,7 @@ int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
goto done;
msg.msg_controllen = optlen;
+ msg.msg_control_is_user = false;
msg.msg_control = (void *)(opt+1);
ipc6.opt = opt;
--
2.38.1
next prev parent reply other threads:[~2023-04-13 11:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 11:47 [PATCH v2 0/3] net: Finish up ->msg_control{,_user} split Kevin Brodsky
2023-04-13 11:47 ` [PATCH v2 1/3] net: Ensure ->msg_control_user is used for user buffers Kevin Brodsky
2023-04-13 14:08 ` Christoph Hellwig
2023-04-13 11:47 ` [PATCH v2 2/3] net/compat: Update msg_control_is_user when setting a kernel pointer Kevin Brodsky
2023-04-13 14:07 ` Christoph Hellwig
2023-04-13 11:47 ` Kevin Brodsky [this message]
2023-04-13 14:07 ` [PATCH v2 3/3] net/ipv6: Initialise msg_control_is_user Christoph Hellwig
2023-04-14 10:30 ` [PATCH v2 0/3] net: Finish up ->msg_control{,_user} split patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230413114705.157046-4-kevin.brodsky@arm.com \
--to=kevin.brodsky@arm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hch@lst.de \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).