Re: [PATCH RT v4.19] tcp: md5: Add a serialization in tcp MD5 hash functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Sebastian





[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux