[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <985419bf-adfa-15fa-056d-743e18149257@suse.de>
Date: Fri, 21 Jul 2023 08:03:27 +0200
From: Hannes Reinecke <hare@...e.de>
To: Simon Horman <simon.horman@...igine.com>
Cc: Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
Keith Busch <kbusch@...nel.org>, linux-nvme@...ts.infradead.org,
Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
Boris Pismenny <boris.pismenny@...il.com>
Subject: Re: [PATCH 6/6] net/tls: implement ->read_sock()
On 7/20/23 20:32, Simon Horman wrote:
> On Wed, Jul 19, 2023 at 01:38:36PM +0200, Hannes Reinecke wrote:
>
> ...
>
> Hi Hannes,
>
>> diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
>> index d0636ea13009..4829d2cb9a7c 100644
>> --- a/net/tls/tls_sw.c
>> +++ b/net/tls/tls_sw.c
>> @@ -2202,6 +2202,102 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
>> goto splice_read_end;
>> }
>>
>> +int tls_sw_read_sock(struct sock *sk, read_descriptor_t *desc,
>> + sk_read_actor_t read_actor)
>> +{
>> + struct tls_context *tls_ctx = tls_get_ctx(sk);
>> + struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
>> + struct strp_msg *rxm = NULL;
>> + struct tls_msg *tlm;
>> + struct sk_buff *skb;
>> + struct sk_psock *psock;
>> + ssize_t copied = 0;
>> + bool bpf_strp_enabled;
>> + int err, used;
>> +
>> + psock = sk_psock_get(sk);
>> + err = tls_rx_reader_acquire(sk, ctx, true);
>> + if (err < 0)
>> + goto psock_put;
>
> skb is uninitialised here,
> however, it is used in the psock_put unwind path.
>
> Flagged by gcc-12 [-Wmaybe-uninitialized] and Smatch.
>
Will fix it up in the next round.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman
Powered by blists - more mailing lists