crypto: algboss - Avoid spurious modprobe on LOADED

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

 



As it stands when any algorithm finishes testing a notification
is generated which triggers an unnecessary modprobe because algboss
returns NOTIFY_DONE instead of NOTIFY_OK (this denotes an event
that is not handled properly).

This patch changes the return value in algboss so that we don't
do an unnecessary modprobe.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/crypto/algboss.c b/crypto/algboss.c
index 527b44d0af21..01feb8234053 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -275,7 +275,7 @@ static int cryptomgr_notify(struct notifier_block *this, unsigned long msg,
 	case CRYPTO_MSG_ALG_REGISTER:
 		return cryptomgr_schedule_test(data);
 	case CRYPTO_MSG_ALG_LOADED:
-		break;
+		return NOTIFY_OK;
 	}
 
 	return NOTIFY_DONE;
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux