# [Solved] iscsi-target problem on hardened-3.2.2-r1

## SnEptUne

Hi all,

This post is just to share a iscsi-problem I had when using the svn truck iscsi-target from https://iscsitarget.svn.sourceforge.net/svnroot/iscsitarget

Firstly, the kernel module failed during compilation with the following error:

```

iscsitarget/trunk/kernel/wthread.c: In function ‘worker_thread’:

iscsitarget/trunk/kernel/wthread.c:74:3: error: implicit declaration of function ‘get_task_io_context’

iscsitarget/trunk/kernel/wthread.c:74:21: warning: assignment makes pointer from integer without a cast

make[2]: *** [iscsitarget/trunk/kernel/wthread.o] Error 1

make[1]: *** [_module_/home/wltsang/iscsitarget/trunk/kernel] Error 2

```

This is fixed by applying the patch:

```

patch -p1 < patches/compat-2.6.39-3.2.patch

patching file kernel/wthread.c

```

But now, after the kernel module has been compiled successfully, the module will not load.  It simply returns "Cannot allocate memory" without any error.

After some debugging, I found the following change is required to load the module in hardened-3.2.2-r1:

```

int event_init(void)

{

-        nl = netlink_kernel_create(&init_net, NETLINK_IET, 1, event_recv_skb,

+       nl = netlink_kernel_create(&init_net, NETLINK_ISCSI, 1, event_recv_skb,

                                   NULL, THIS_MODULE);

```

After this change, the module loads fine without issue so far.

----------

## VoVaN

Thanks you for the tip! I had the same problem when tried to upgrade iscsi with the new kernel...

----------

## SnEptUne

No problem.  But I found that there is a better way, which is to update iet_u.h:

```

#define NETLINK_IET     23

```

It is because number 21 is already used by CRC32

----------

