diff options
| author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2024-12-13 20:08:44 +0900 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2024-12-17 12:08:28 +0100 |
| commit | f4dd63165b08ba3b72117973d5daea456f36377d (patch) | |
| tree | 1c759fa81e0a9ed12a17725557029383faa2196c /tools/testing/selftests/bpf/prog_tests/autoload.c | |
| parent | af_unix: Set error only when needed in unix_dgram_sendmsg(). (diff) | |
| download | linux-f4dd63165b08ba3b72117973d5daea456f36377d.tar.gz linux-f4dd63165b08ba3b72117973d5daea456f36377d.zip | |
af_unix: Move !sunaddr case in unix_dgram_sendmsg().
When other is NULL in unix_dgram_sendmsg(), we check if sunaddr
is NULL before looking up a receiver socket.
There are three paths going through the check, but it's always
false for 2 out of the 3 paths: the first socket lookup and the
second 'goto restart'.
The condition can be true for the first 'goto restart' only when
SOCK_DEAD is flagged for the socket found with msg->msg_name.
Let's move the check to the single appropriate path.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions
