mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 05:45:20 +00:00
Merge branch 'smc-fixes'
Karsten Graul says: ==================== net/smc: fixes 2021-09-20 Please apply the following patches for smc to netdev's net tree. The first patch adds a missing error check, and the second patch fixes a possible leak of a lock in a worker. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
431db53c73
@ -230,7 +230,8 @@ static int smc_clc_prfx_set(struct socket *clcsock,
|
||||
goto out_rel;
|
||||
}
|
||||
/* get address to which the internal TCP socket is bound */
|
||||
kernel_getsockname(clcsock, (struct sockaddr *)&addrs);
|
||||
if (kernel_getsockname(clcsock, (struct sockaddr *)&addrs) < 0)
|
||||
goto out_rel;
|
||||
/* analyze IP specific data of net_device belonging to TCP socket */
|
||||
addr6 = (struct sockaddr_in6 *)&addrs;
|
||||
rcu_read_lock();
|
||||
|
@ -1474,7 +1474,9 @@ static void smc_conn_abort_work(struct work_struct *work)
|
||||
abort_work);
|
||||
struct smc_sock *smc = container_of(conn, struct smc_sock, conn);
|
||||
|
||||
lock_sock(&smc->sk);
|
||||
smc_conn_kill(conn, true);
|
||||
release_sock(&smc->sk);
|
||||
sock_put(&smc->sk); /* sock_hold done by schedulers of abort_work */
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user