mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
calipso: unlock rcu before returning -EAFNOSUPPORT
syzbot reported that a recent patch forgot to unlock rcu
in the error path.
Adopt the convention that netlbl_conn_setattr() is already using.
Fixes: 6e9f2df1c5
("calipso: Don't call calipso functions for AF_INET sk.")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Link: https://patch.msgid.link/20250604133826.1667664-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
7632fedb26
commit
3cae906e1a
1 changed files with 4 additions and 2 deletions
|
@ -1165,8 +1165,10 @@ int netlbl_conn_setattr(struct sock *sk,
|
|||
break;
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
case AF_INET6:
|
||||
if (sk->sk_family != AF_INET6)
|
||||
return -EAFNOSUPPORT;
|
||||
if (sk->sk_family != AF_INET6) {
|
||||
ret_val = -EAFNOSUPPORT;
|
||||
goto conn_setattr_return;
|
||||
}
|
||||
|
||||
addr6 = (struct sockaddr_in6 *)addr;
|
||||
entry = netlbl_domhsh_getentry_af6(secattr->domain,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue