Re: [PATCH net 3/4] rxrpc: Fix missing active use pinning of rxrpc_local object

From: Jakub Kicinski
Date: Sun Feb 02 2020 - 15:27:40 EST


On Fri, 31 Jan 2020 13:29:36 +0000, David Howells wrote:
> diff --git a/net/rxrpc/conn_event.c b/net/rxrpc/conn_event.c
> index 808a4723f868..abfff3e0921c 100644
> --- a/net/rxrpc/conn_event.c
> +++ b/net/rxrpc/conn_event.c
> @@ -133,6 +133,8 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,
> break;
> }
>
> + BUG_ON(!conn->params.local);
> + BUG_ON(!conn->params.local->socket);

Is this really, really not possible to convert those into a WARN_ON()
and return?

> ret = kernel_sendmsg(conn->params.local->socket, &msg, iov, ioc, len);
> conn->params.peer->last_tx_at = ktime_get_seconds();
> if (ret < 0)