[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJ9FNxuWXSDh70W-944+e7mD3g05RvOs-WxyMc4Bhy6vEAQY5Q@mail.gmail.com>
Date: Thu, 27 Jun 2024 15:11:55 +0200
From: Sam Kappen <skappen@...sta.com>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
tom.zanussi@...ux.intel.com, zanussi@...nel.org, sam.gsk@...il.com
Subject: Re: [PATCH RT v4.19] tcp: md5: Add a serialization in tcp MD5 hash functions.
On Thu, Jun 27, 2024 at 8:53 AM Sebastian Andrzej Siewior
<bigeasy@...utronix.de> wrote:
>
> On 2024-06-21 12:49:32 [+0200], Sam Kappen wrote:
> …
> > --- a/net/ipv4/tcp_ipv4.c
> > +++ b/net/ipv4/tcp_ipv4.c
> > @@ -93,6 +93,7 @@ static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
> > __be32 daddr, __be32 saddr, const struct tcphdr *th);
> > #endif
> >
> > +static DEFINE_LOCAL_IRQ_LOCK(tcp_md5_lock);
> > struct inet_hashinfo tcp_hashinfo;
> > EXPORT_SYMBOL(tcp_hashinfo);
> >
> > @@ -1224,6 +1225,7 @@ static int tcp_v4_md5_hash_hdr(char *md5_hash, const struct tcp_md5sig_key *key,
> > struct tcp_md5sig_pool *hp;
> > struct ahash_request *req;
> >
> > + local_lock(tcp_md5_lock);
> > hp = tcp_get_md5sig_pool();
>
> Instead of this, could you please move the lock to within
> tcp_get_md5sig_pool()/ tcp_put_md5sig_pool()? That way it will also fix
> ipv6 in the same way.
Thanks. I will update the patch and submit again.
Regards,
Sam
>
> Sebastian
Powered by blists - more mailing lists