diff -ru linux-2.6.0-test1.orig/crypto/crypto_null.c linux-2.6.0-test1/crypto/crypto_null.c
--- linux-2.6.0-test1.orig/crypto/crypto_null.c 2003-07-14 05:33:47.000000000 +0200
+++ linux-2.6.0-test1/crypto/crypto_null.c 2003-07-28 18:07:34.000000000 +0200
@@ -22,8 +22,9 @@
#include <asm/scatterlist.h>
#include <linux/crypto.h>
-#define NULL_KEY_SIZE 0
-#define NULL_BLOCK_SIZE 1
+#define NULL_MIN_KEY_SIZE 0
+#define NULL_MAX_KEY_SIZE 32 /* losetup always uses LO_KEY_SIZE */
+#define NULL_BLOCK_SIZE 8 /* Prevents oops in cryptoloop ? */
#define NULL_DIGEST_SIZE 0
static int null_compress(void *ctx, const u8 *src, unsigned int slen,
@@ -48,10 +49,10 @@
{ return 0; }
static void null_encrypt(void *ctx, u8 *dst, const u8 *src)
-{ }
+{ memcpy(dst, src, NULL_BLOCK_SIZE); }
static void null_decrypt(void *ctx, u8 *dst, const u8 *src)
-{ }
+{ memcpy(dst, src, NULL_BLOCK_SIZE); }
static struct crypto_alg compress_null = {
.cra_name = "compress_null",
@@ -87,9 +88,9 @@
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(cipher_null.cra_list),
.cra_u = { .cipher = {
- .cia_min_keysize = NULL_KEY_SIZE,
- .cia_max_keysize = NULL_KEY_SIZE,
- .cia_ivsize = 0,
+ .cia_min_keysize = NULL_MIN_KEY_SIZE,
+ .cia_max_keysize = NULL_MAX_KEY_SIZE,
+ .cia_ivsize = 8, /* Prevents oops in cryptoloop ? */
.cia_setkey = null_setkey,
.cia_encrypt = null_encrypt,
.cia_decrypt = null_decrypt } }