diff --git a/doc/changelog.txt b/doc/changelog.txt index 3a21fb4..91b17d7 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -1,6 +1,8 @@ HEAD ==== +Fixes: +- xt_pknock: avoid crash when hash TFM could not be allocated v1.33 (2011-02-02) diff --git a/extensions/pknock/xt_pknock.c b/extensions/pknock/xt_pknock.c index 4e40911..d7fe379 100644 --- a/extensions/pknock/xt_pknock.c +++ b/extensions/pknock/xt_pknock.c @@ -1164,11 +1164,10 @@ static int __init xt_pknock_mt_init(void) } crypto.tfm = crypto_alloc_hash(crypto.algo, 0, CRYPTO_ALG_ASYNC); - - if (crypto.tfm == NULL) { + if (IS_ERR(crypto.tfm)) { printk(KERN_ERR PKNOCK "failed to load transform for %s\n", crypto.algo); - return -ENXIO; + return PTR_ERR(crypto.tfm); } crypto.size = crypto_hash_digestsize(crypto.tfm);