diff options
author | Kuniyuki Iwashima <kuniyu@amazon.co.jp> | 2021-11-24 11:14:23 +0900 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-11-26 18:01:55 -0800 |
commit | b8a58aa6fccc5b2940f0da18c7f02e8a1deb693a (patch) | |
tree | 5e24717e5234a215389fc574551ebeb319bf730b /net/ipv6/rpl.c | |
parent | aed26f557bbc94f0c778f63d7dfe86af99208f68 (diff) |
af_unix: Cut unix_validate_addr() out of unix_mkname().
unix_mkname() tests socket address length and family and does some
processing based on the address type. It is called in the early stage,
and therefore some instructions are redundant and can end up in vain.
The address length/family tests are done twice in unix_bind(). Also, the
address type is rechecked later in unix_bind() and unix_find_other(), where
we can do the same processing. Moreover, in the BSD address case, the hash
is set to 0 but never used and confusing.
This patch moves the address tests out of unix_mkname(), and the following
patches move the other part into appropriate places and remove
unix_mkname() finally.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.co.jp>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/rpl.c')
0 files changed, 0 insertions, 0 deletions