diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 83a76ba9d7b3..f3c95f9bd413 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5227,7 +5227,12 @@ int sctp_inet_listen(struct socket *sock, int backlog) /* Allocate HMAC for generating cookie. */ if (sctp_hmac_alg) { tfm = crypto_alloc_hash(sctp_hmac_alg, 0, CRYPTO_ALG_ASYNC); - if (!tfm) { + if (IS_ERR(tfm)) { + if (net_ratelimit()) { + printk(KERN_INFO + "SCTP: failed to load transform for %s: %ld\n", + sctp_hmac_alg, PTR_ERR(tfm)); + } err = -ENOSYS; goto out; } |