/* * Common values for SHA-3 algorithms */ #ifndef __CRYPTO_SHA3_H__ #define __CRYPTO_SHA3_H__ #define SHA3_224_DIGEST_SIZE (224 / 8) #define SHA3_224_BLOCK_SIZE (200 - 2 * SHA3_224_DIGEST_SIZE) #define SHA3_256_DIGEST_SIZE (256 / 8) #define SHA3_256_BLOCK_SIZE (200 - 2 * SHA3_256_DIGEST_SIZE) #define SHA3_384_DIGEST_SIZE (384 / 8) #define SHA3_384_BLOCK_SIZE (200 - 2 * SHA3_384_DIGEST_SIZE) #define SHA3_512_DIGEST_SIZE (512 / 8) #define SHA3_512_BLOCK_SIZE (200 - 2 * SHA3_512_DIGEST_SIZE) struct sha3_state { u64 st[25]; unsigned int md_len; unsigned int rsiz; unsigned int rsizw; unsigned int partial; u8 buf[SHA3_224_BLOCK_SIZE]; }; #endif cgit.cgi/'>cgit logo index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2017-01-23 11:17:35 -0800
committerDavid S. Miller <davem@davemloft.net>2017-01-24 14:30:56 -0500
commit0fb44559ffd67de8517098b81f675fa0210f13f0 (patch)
tree4fe2e2d2f415b7b831e8c3ee999a1915a24d2d4e
parenta59b7e0246774e28193126fe7fdbbd0ae9c67dcc (diff)
af_unix: move unix_mknod() out of bindlock
Dmitry reported a deadlock scenario: unix_bind() path: u->bindlock ==> sb_writer do_splice() path: sb_writer ==> pipe->mutex ==> u->bindlock In the unix_bind() code path, unix_mknod() does not have to be done with u->bindlock held, since it is a pure fs operation, so we can just move unix_mknod() out. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by: Dmitry Vyukov <dvyukov@google.com> Cc: Rainer Weikusat <rweikusat@mobileactivedefense.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat