From: Daniel Borkmann <dborkman@redhat.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [RFC PATCH 3/3] net: sctp: use sk_copy_sanitize for accept sockets
Date: Wed, 25 Dec 2013 01:14:31 +0000 [thread overview]
Message-ID: <52BA3177.5030503@redhat.com> (raw)
In-Reply-To: <1387891183-21169-4-git-send-email-dborkman@redhat.com>
On 12/24/2013 02:19 PM, Daniel Borkmann wrote:
> Wang reported an issue that lksctp's test_getname_v6 seems to fail.
>
> The issue is that we do not copy sk_v6_rcv_saddr over to the new
> socket, although the comment above says so regarding rcv_saddr.
>
> Commit 914e1c8b6980 ("sctp: Inherit all socket options from parent
> correctly.") originally moved that over to sctp_copy_sock(), but
> after commit efe4208f47f9 ("ipv6: make lookups simpler and faster")
> this no longer holds and the actual value of sk_v6_rcv_saddr was
> no longer being migrated.
>
> The issue seems to be deeper than that though. We always used to
> do a partial copy of socket members in accept/peeloff case. This
> means that also newly added members to the kernel's socket
> representation weren't inherited to spawned sockets, for example,
> Eric points out that settings of SO_MAX_PACING_RATE would be broken
> on SCTP as well.
>
> So lets get rid of this restriction by using sk_copy_sanitize().
> With this patch, the lksctp test suite also passes again for IPv6.
>
> Fixes: efe4208f47f9 ("ipv6: make lookups simpler and faster")
> Reported-by: Wang Weidong <wangweidong1@huawei.com>
> Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
> Not-yet-signed-off-by: Daniel Borkmann <dborkman@redhat.com>
> ---
One more thing for the non-RFC later on:
> out:
> + if (newsk) {
> + bh_unlock_sock(newsk);
> + sock_put(newsk);
This also needs to be done in error path.
> + }
> return newsk;
> }
prev parent reply other threads:[~2013-12-25 1:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-24 13:19 [RFC PATCH 3/3] net: sctp: use sk_copy_sanitize for accept sockets Daniel Borkmann
2013-12-25 1:14 ` Daniel Borkmann [this message]
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=52BA3177.5030503@redhat.com \
--to=dborkman@redhat.com \
--cc=linux-sctp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.