Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] iscsi-target problem on hardened-3.2.2-r1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
SnEptUne
l33t
l33t


Joined: 23 Aug 2004
Posts: 656

PostPosted: Wed Apr 11, 2012 2:44 am    Post subject: [Solved] iscsi-target problem on hardened-3.2.2-r1 Reply with quote

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:

Code:

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:
Code:

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:

Code:

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.
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
VoVaN
l33t
l33t


Joined: 02 Jul 2003
Posts: 688
Location: The Netherlands

PostPosted: Thu May 03, 2012 10:19 am    Post subject: Reply with quote

Thanks you for the tip! I had the same problem when tried to upgrade iscsi with the new kernel...
Back to top
View user's profile Send private message
SnEptUne
l33t
l33t


Joined: 23 Aug 2004
Posts: 656

PostPosted: Thu May 03, 2012 11:22 am    Post subject: Reply with quote

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

Code:

#define NETLINK_IET     23


It is because number 21 is already used by CRC32
_________________
"There will be more joy in heaven over the tear-bathed face of a repentant sinner than over the white robes of a hundred just men." (LM, 114)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum