[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140306.161920.445388572324462521.davem@davemloft.net>
Date: Thu, 06 Mar 2014 16:19:20 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: anton@...ba.org
Cc: edumazet@...gle.com, gustavold@...ux.vnet.ibm.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] net: unix socket code abuses csum_partial
From: Anton Blanchard <anton@...ba.org>
Date: Wed, 5 Mar 2014 14:29:58 +1100
> Index: b/net/unix/af_unix.c
> ===================================================================
> --- a/net/unix/af_unix.c
> +++ b/net/unix/af_unix.c
> @@ -163,9 +163,8 @@ static inline void unix_set_secdata(stru
>
> static inline unsigned int unix_hash_fold(__wsum n)
> {
> - unsigned int hash = (__force unsigned int)n;
> + unsigned int hash = (__force unsigned int)csum_fold(n);
>
> - hash ^= hash>>16;
> hash ^= hash>>8;
> return hash&(UNIX_HASH_SIZE-1);
Looks great, I'll apply this, thanks Anton!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists